//
// Generated by dtk
// Translation Unit: c_dylink.o
//

#include "c/c_dylink.h"
#include "d/d_com_lib_game.h"
#include "f_pc/f_pc_name.h"
#include "m_Do/m_Do_dvd_thread.h"
#include "m_Do/m_Do_ext.h"
#include "m_Do/m_Do_printf.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JKernel/JKRFileCache.h"
#include "JSystem/JKernel/JKRSolidHeap.h"
#include "DynamicLink.h"
#include "dolphin/os/OS.h"
#include "string.h"

DynamicModuleControlBase * DMC[fpcNm_MAX_NUM_e];
#if VERSION == VERSION_DEMO
JKRSolidHeap* cCc_solidHeap = NULL;
#else
bool DMC_initialized = false;
#endif
volatile BOOL cDyl_Initialized = false;
mDoDvdThd_callback_c * cDyl_DVD = NULL;

const cDyl_DynamicName_t DynamicNameTable[] = {
    {fpcNm_ALLDIE_e,         "d_a_alldie"},
    {fpcNm_TAG_EVSW_e,       "d_a_tag_evsw"},
    {fpcNm_Obj_Swpush_e,     "d_a_obj_swpush"},
    {fpcNm_Obj_Swheavy_e,    "d_a_obj_swheavy"},
    {fpcNm_Obj_Swflat_e,     "d_a_obj_swflat"},
    {fpcNm_Obj_Swlight_e,    "d_a_obj_swlight"},
    {fpcNm_Obj_Swhammer_e,   "d_a_obj_swhammer"},
    {fpcNm_Obj_Quake_e,      "d_a_obj_quake"},
    {fpcNm_Obj_Drift_e,      "d_a_obj_drift"},
    {fpcNm_Tag_Volcano_e,    "d_a_tag_volcano"},
    {fpcNm_TAG_SO_e,         "d_a_tag_so"},
    {fpcNm_Obj_Pbco_e,       "d_a_obj_pbco"},
    {fpcNm_SEATAG_e,         "d_a_seatag"},
    {fpcNm_Obj_Tide_e,       "d_a_obj_tide"},
    {fpcNm_Hmlif_e,          "d_a_hmlif"},
    {fpcNm_SCENECHG_e,       "d_a_scene_change"},
    {fpcNm_Obj_Magmarock_e,  "d_a_obj_magmarock"},
    {fpcNm_Obj_Movebox_e,    "d_a_obj_movebox"},
    {fpcNm_Obj_Tribox_e,     "d_a_obj_tribox"},
    {fpcNm_Obj_Shelf_e,      "d_a_obj_shelf"},
    {fpcNm_Obj_Hlift_e,      "d_a_obj_hlift"},
    {fpcNm_Obj_Hami2_e,      "d_a_obj_hami2"},
    {fpcNm_Obj_Hami3_e,      "d_a_obj_hami3"},
    {fpcNm_Obj_Hami4_e,      "d_a_obj_hami4"},
    {fpcNm_Obj_Hbrf1_e,      "d_a_obj_hbrf1"},
    {fpcNm_Obj_Volcano_e,    "d_a_obj_volcano"},
    {fpcNm_Obj_Vmc_e,        "d_a_obj_vmc"},
    {fpcNm_Obj_Usovmc_e,     "d_a_obj_usovmc"},
    {fpcNm_Obj_Vfan_e,       "d_a_obj_vfan"},
    {fpcNm_Obj_Iceisland_e,  "d_a_obj_iceisland"},
    {fpcNm_Obj_Dragonhead_e, "d_a_obj_dragonhead"},
    {fpcNm_Obj_Pirateship_e, "d_a_obj_pirateship"},
    {fpcNm_Obj_Tousekiki_e,  "d_a_obj_tousekiki"},
    {fpcNm_Tag_Ret_e,        "d_a_tag_ret"},
    {fpcNm_Kaji_e,           "d_a_kaji"},
    {fpcNm_Canon_e,          "d_a_canon"},
    {fpcNm_MGBOARD_e,        "d_a_mgameboard"},
    {fpcNm_OBJ_CANON_e,      "d_a_obj_canon"},
    {fpcNm_OBJ_OTBLE_e,      "d_a_obj_otble"},
    {fpcNm_OBJ_WARPT_e,      "d_a_obj_warpt"},
    {fpcNm_OBJ_TORIPOST_e,   "d_a_obj_toripost"},
    {fpcNm_OBJ_IKADA_e,      "d_a_obj_ikada"},
    {fpcNm_OBJ_MJDOOR_e,     "d_a_obj_majyuu_door"},
    {fpcNm_OBJ_PFALL_e,      "d_a_obj_pfall"},
    {fpcNm_OBJ_HOLE_e,       "d_a_obj_hole"},
    {fpcNm_Obj_Stair_e,      "d_a_obj_stair"},
    {fpcNm_Obj_Lpalm_e,      "d_a_obj_lpalm"},
    {fpcNm_Obj_Mtest_e,      "d_a_obj_mtest"},
    {fpcNm_Obj_Mkie_e,       "d_a_obj_mkie"},
    {fpcNm_Obj_Mkiek_e,      "d_a_obj_mkiek"},
    {fpcNm_Obj_MknjD_e,      "d_a_obj_mknjd"},
    {fpcNm_Obj_Msdan_e,      "d_a_obj_msdan"},
    {fpcNm_Obj_MsdanSub_e,   "d_a_obj_msdan_sub"},
    {fpcNm_Obj_Msdan2_e,     "d_a_obj_msdan2"},
    {fpcNm_Obj_MsdanSub2_e,  "d_a_obj_msdan_sub2"},
    {fpcNm_Obj_Nest_e,       "d_a_obj_nest"},
    {fpcNm_Obj_Ojtree_e,     "d_a_obj_ojtree"},
    {fpcNm_Obj_Ospbox_e,     "d_a_obj_ospbox"},
    {fpcNm_Obj_Ladder_e,     "d_a_obj_ladder"},
    {fpcNm_Obj_Smplbg_e,     "d_a_obj_smplbg"},
    {fpcNm_Obj_Akabe_e,      "d_a_obj_akabe"},
    {fpcNm_Obj_Ashut_e,      "d_a_obj_ashut"},
    {fpcNm_BRIDGE_e,         "d_a_bridge"},
    {fpcNm_MSW_e,            "d_a_msw"},
    {fpcNm_MFLFT_e,          "d_a_mflft"},
    {fpcNm_KLFT_e,           "d_a_klft"},
    {fpcNm_ICE_LIFT_e,       "d_a_icelift"},
    {fpcNm_AMI_PROP_e,       "d_a_amiprop"},
    {fpcNm_PEDESTAL_e,       "d_a_pedestal"},
    {fpcNm_FLOOR_e,          "d_a_floor"},
    {fpcNm_KITA_e,           "d_a_kita"},
    {fpcNm_KOKIIE_e,         "d_a_kokiie"},
    {fpcNm_SHAND_e,          "d_a_shand"},
    {fpcNm_BITA_e,           "d_a_bita"},
    {fpcNm_SK_e,             "d_a_sk"},
    {fpcNm_SK2_e,            "d_a_sk2"},
    {fpcNm_SSK_e,            "d_a_ssk"},
    {fpcNm_WARPFLOWER_e,     "d_a_warpf"},
    {fpcNm_WARPFOUT_e,       "d_a_warpfout"},
    {fpcNm_WARPLIGHT_e,      "d_a_warpls"},
    {fpcNm_WARPHYRULE_e,     "d_a_warphr"},
    {fpcNm_WARPDEMO20_e,     "d_a_warpdm20"},
    {fpcNm_WARPGANON_e,      "d_a_warpgn"},
    {fpcNm_WARPMAJYUU_e,     "d_a_warpmj"},
    {fpcNm_Balancelift_e,    "d_a_obj_balancelift"},
    {fpcNm_SHUTTER_e,        "d_a_shutter"},
    {fpcNm_SHUTTER2_e,       "d_a_shutter2"},
    {fpcNm_WINDMILL_e,       "d_a_windmill"},
    {fpcNm_MBDOOR_e,         "d_a_mbdoor"},
    {fpcNm_NPC_DE1_e,        "d_a_npc_de1"},
    {fpcNm_NPC_NZ_e,         "d_a_npc_nz"},
    {fpcNm_NPC_SO_e,         "d_a_npc_so"},
    {fpcNm_FM_e,             "d_a_fm"},
    {fpcNm_LEAF_LIFT_e,      "d_a_leaflift"},
    {fpcNm_Obj_Roten_e,      "d_a_obj_roten"},
    {fpcNm_TOGE_e,           "d_a_toge"},
    {fpcNm_Obj_Ferris_e,     "d_a_obj_ferris"},
    {fpcNm_Obj_Xfuta_e,      "d_a_obj_xfuta"},
    {fpcNm_Obj_Gaship_e,     "d_a_obj_gaship"},
    {fpcNm_Obj_Rforce_e,     "d_a_obj_rforce"},
    {fpcNm_Obj_Gaship2_e,    "d_a_obj_gaship2"},
    {fpcNm_Obj_Light_e,      "d_a_obj_light"},
    {fpcNm_Obj_Homen_e,      "d_a_obj_homen"},
    {fpcNm_Obj_Homensmk_e,   "d_a_obj_homensmoke"},
    {fpcNm_Obj_Ftree_e,      "d_a_obj_ftree"},
    {fpcNm_Obj_Vds_e,        "d_a_obj_Vds"},
    {fpcNm_Obj_Vyasi_e,      "d_a_obj_vyasi"},
    {fpcNm_Obj_Ajav_e,       "d_a_obj_ajav"},
    {fpcNm_Obj_Trap_e,       "d_a_obj_trap"},
    {fpcNm_Obj_Hha_e,        "d_a_obj_hha"},
    {fpcNm_Obj_Htetu1_e,     "d_a_obj_htetu1"},
    {fpcNm_Obj_Gnntakis_e,   "d_a_obj_gnndemotakis"},
    {fpcNm_Obj_Gnntakie_e,   "d_a_obj_gnndemotakie"},
    {fpcNm_Obj_Gnnbtaki_e,   "d_a_obj_gnnbtltaki"},
    {fpcNm_Obj_Rcloud_e,     "d_a_obj_rcloud"},
    {fpcNm_Obj_Gryw00_e,     "d_a_obj_gryw00"},
    {fpcNm_Obj_AjavW_e,      "d_a_obj_AjavW"},
    {fpcNm_Obj_Leaves_e,     "d_a_obj_leaves"},
    {fpcNm_Obj_YLzou_e,      "d_a_obj_YLzou"},
    {fpcNm_Obj_Gbed_e,       "d_a_obj_ganonbed"},
    {fpcNm_Obj_Vteng_e,      "d_a_obj_Vteng"},
    {fpcNm_Obj_Hfuck1_e,     "d_a_obj_hfuck1"},
    {fpcNm_Obj_Ohatch_e,     "d_a_obj_ohatch"},
    {fpcNm_Obj_Hcbh_e,       "d_a_obj_hcbh"},
    {fpcNm_Obj_Ygush00_e,    "d_a_obj_Ygush00"},
    {fpcNm_Obj_Bscurtain_e,  "d_a_obj_bscurtain"},
    {fpcNm_Obj_Shmrgrd_e,    "d_a_obj_shmrgrd"},
    {fpcNm_Obj_Eayogn_e,     "d_a_obj_eayogn"},
    {fpcNm_Obj_Vmsms_e,      "d_a_obj_vmsms"},
    {fpcNm_Obj_Vmsdz_e,      "d_a_obj_vmsdz"},
    {fpcNm_Ygcwp_e,          "d_a_ygcwp"},
    {fpcNm_Obj_Vgnfd_e,      "d_a_obj_vgnfd"},
    {fpcNm_Obj_Kanoke_e,     "d_a_obj_kanoke"},
    {fpcNm_Obj_Eskban_e,     "d_a_obj_eskban"},
    {fpcNm_Obj_Ekskz_e,      "d_a_obj_ekskz"},
    {fpcNm_Obj_Ebomzo_e,     "d_a_obj_ebomzo"},
    {fpcNm_Obj_Kanat_e,      "d_a_obj_kanat"},
    {fpcNm_Obj_Aygr_e,       "d_a_obj_aygr"},
    {fpcNm_SHIP_e,           "d_a_ship"},
    {fpcNm_Obj_Jump_e,       "d_a_obj_jump"},
    {fpcNm_NPC_MK_e,         "d_a_npc_mk"},
    {fpcNm_SAIL_e,           "d_a_sail"},
    {fpcNm_PIRATE_FLAG_e,    "d_a_pirate_flag"},
    {fpcNm_MAJUU_FLAG_e,     "d_a_majuu_flag"},
    {fpcNm_Tori_Flag_e,      "d_a_tori_flag"},
    {fpcNm_Sie_Flag_e,       "d_a_sie_flag"},
    {fpcNm_SYAN_e,           "d_a_syan"},
    {fpcNm_AYUSH_e,          "d_a_ghostship"},
    {fpcNm_OSHIP_e,          "d_a_oship"},
    {fpcNm_RECTANGLE_e,      "d_a_rectangle"},
    {fpcNm_BB_e,             "d_a_bb"},
    {fpcNm_KANBAN_e,         "d_a_kanban"},
    {fpcNm_HITOBJ_e,         "d_a_hitobj"},
    {fpcNm_KT_e,             "d_a_kt"},
    {fpcNm_EP_e,             "d_a_ep"},
    {fpcNm_LAMP_e,           "d_a_lamp"},
    {fpcNm_FF_e,             "d_a_ff"},
    {fpcNm_MO2_e,            "d_a_mo2"},
    {fpcNm_BK_e,             "d_a_bk"},
    {fpcNm_ST_e,             "d_a_st"},
    {fpcNm_TN_e,             "d_a_tn"},
    {fpcNm_MANT_e,           "d_a_mant"},
    {fpcNm_KANTERA_e,        "d_a_kantera"},
    {fpcNm_KAMOME_e,         "d_a_kamome"},
#if VERSION == VERSION_DEMO
    {fpcNm_KAMOME2_e,        "d_a_kamome2"},
#endif
    {fpcNm_NPC_KAM_e,        "d_a_npc_kamome"},
    {fpcNm_WBIRD_e,          "d_a_wbird"},
    {fpcNm_DEMO_KMM_e,       "d_a_demo_kmm"},
    {fpcNm_NZ_e,             "d_a_nz"},
    {fpcNm_NZG_e,            "d_a_nzg"},
    {fpcNm_KN_e,             "d_a_kn"},
    {fpcNm_DEMO_DK_e,        "d_a_demo_dk"},
    {fpcNm_AM_e,             "d_a_am"},
    {fpcNm_AM2_e,            "d_a_am2"},
    {fpcNm_GM_e,             "d_a_gm"},
    {fpcNm_KS_e,             "d_a_ks"},
    {fpcNm_CC_e,             "d_a_cc"},
    {fpcNm_BL_e,             "d_a_bl"},
    {fpcNm_WZ_e,             "d_a_wz"},
    {fpcNm_PH_e,             "d_a_ph"},
    {fpcNm_PZ_e,             "d_a_pz"},
    {fpcNm_BPW_e,            "d_a_bpw"},
    {fpcNm_PW_e,             "d_a_pw"},
    {fpcNm_JBO_e,            "d_a_jbo"},
    {fpcNm_BO_e,             "d_a_bo"},
    {fpcNm_KI_e,             "d_a_ki"},
    {fpcNm_MT_e,             "d_a_mt"},
    {fpcNm_BWD_e,            "d_a_bwd"},
    {fpcNm_BWDS_e,           "d_a_bwds"},
    {fpcNm_BWDG_e,           "d_a_bwdg"},
    {fpcNm_KB_e,             "d_a_kb"},
    {fpcNm_DR_e,             "d_a_dr"},
    {fpcNm_DR2_e,            "d_a_dr2"},
    {fpcNm_RD_e,             "d_a_rd"},
    {fpcNm_DAIOCTA_e,        "d_a_daiocta"},
    {fpcNm_DAIOCTA_EYE_e,    "d_a_daiocta_eye"},
    {fpcNm_OQ_e,             "d_a_oq"},
    {fpcNm_GY_e,             "d_a_gy"},
    {fpcNm_GY_CTRL_e,        "d_a_gy_ctrl"},
    {fpcNm_GY_CTRLB_e,       "d_a_gy_ctrl"},
    {fpcNm_Hot_Floor_e,      "d_a_hot_floor"},
    {fpcNm_Beam_e,           "d_a_beam"},
    {fpcNm_Bemos_e,          "d_a_obj_bemos"},
    {fpcNm_BTD_e,            "d_a_btd"},
    {fpcNm_BMD_e,            "d_a_bmd"},
    {fpcNm_BMDHAND_e,        "d_a_bmdhand"},
    {fpcNm_BMDFOOT_e,        "d_a_bmdfoot"},
    {fpcNm_DK_e,             "d_a_dk"},
    {fpcNm_BDK_e,            "d_a_bdk"},
    {fpcNm_BDKOBJ_e,         "d_a_bdkobj"},
    {fpcNm_BST_e,            "d_a_bst"},
    {fpcNm_FGANON_e,         "d_a_fganon"},
    {fpcNm_FGMAHOU_e,        "d_a_fgmahou"},
    {fpcNm_BGN_e,            "d_a_bgn"},
    {fpcNm_BGN2_e,           "d_a_bgn2"},
    {fpcNm_BGN3_e,           "d_a_bgn3"},
    {fpcNm_GND_e,            "d_a_gnd"},
    {fpcNm_PT_e,             "d_a_pt"},
    {fpcNm_SWTDOOR_e,        "d_a_swtdoor"},
    {fpcNm_MOZO_e,           "d_a_mozo"},
    {fpcNm_KUI_e,            "d_a_kui"},
    {fpcNm_SS_e,             "d_a_ss"},
    {fpcNm_SSS_e,            "d_a_sss"},
    {fpcNm_SITEM_e,          "d_a_sitem"},
    {fpcNm_MACHINE_e,        "d_a_machine"},
    {fpcNm_BOSSITEM_e,       "d_a_boss_item"},
    {fpcNm_Demo_Item_e,      "d_a_demo_item"},
    {fpcNm_RACEITEM_e,       "d_a_race_item"},
    {fpcNm_ShopItem_e,       "d_a_shop_item"},
    {fpcNm_DEKU_ITEM_e,      "d_a_deku_item"},
    {fpcNm_Obj_Paper_e,      "d_a_obj_paper"},
    {fpcNm_Obj_Demo_Barrel_e,"d_a_obj_demo_barrel"},
    {fpcNm_Obj_Dmgroom_e,    "d_a_obj_dmgroom"},
    {fpcNm_Obj_Doguu_e,      "d_a_obj_doguu"},
    {fpcNm_Obj_Wood_e,       "d_a_obj_wood"},
    {fpcNm_Obj_Flame_e,      "d_a_obj_flame"},
    {fpcNm_Obj_Buoyrace_e,   "d_a_obj_buoyrace"},
    {fpcNm_Obj_Coming_e,     "d_a_obj_coming"},
    {fpcNm_Coming2_e,        "d_a_coming2"},
    {fpcNm_Coming3_e,        "d_a_coming3"},
    {fpcNm_Obj_Mmrr_e,       "d_a_obj_mmrr"},
    {fpcNm_Obj_Pbka_e,       "d_a_obj_pbka"},
    {fpcNm_Obj_Plant_e,      "d_a_obj_plant"},
    {fpcNm_Obj_Gtaki_e,      "d_a_obj_gtaki"},
    {fpcNm_Obj_Yboil_e,      "d_a_obj_Yboil"},
    {fpcNm_Obj_Rflw_e,       "d_a_obj_rflw"},
    {fpcNm_Obj_Table_e,      "d_a_obj_table"},
    {fpcNm_Obj_Tenmado_e,    "d_a_obj_tenmado"},
    {fpcNm_Obj_Cafelmp_e,    "d_a_obj_cafelmp"},
    {fpcNm_Obj_Apzl_e,       "d_a_obj_apzl"},
    {fpcNm_Obj_Adnno_e,      "d_a_obj_adnno"},
    {fpcNm_Obj_Auzu_e,       "d_a_obj_auzu"},
    {fpcNm_Obj_Gong_e,       "d_a_obj_gong"},
    {fpcNm_Obj_Barrier_e,    "d_a_obj_barrier"},
    {fpcNm_Obj_Firewall_e,   "d_a_obj_firewall"},
    {fpcNm_Obj_TnTrap_e,     "d_a_obj_tntrap"},
    {fpcNm_Obj_Monument_e,   "d_a_obj_monument"},
    {fpcNm_Obj_Tapestry_e,   "d_a_obj_tapestry"},
    {fpcNm_Obj_HSH_e,        "d_a_obj_hsehi1"},
    {fpcNm_Goal_Flag_e,      "d_a_goal_flag"},
    {fpcNm_TBOX_e,           "d_a_tbox"},
    {fpcNm_SBOX_e,           "d_a_sbox"},
    {fpcNm_BOMB_FLOWER_e,    "d_a_bflower"},
    {fpcNm_ACORN_LEAF_e,     "d_a_acorn_leaf"},
    {fpcNm_SWC00_e,          "d_a_swc00"},
    {fpcNm_FAN_e,            "d_a_fan"},
    {fpcNm_DOOR10_e,         "d_a_door10"},
    {fpcNm_DOOR12_e,         "d_a_door12"},
    {fpcNm_ATDOOR_e,         "d_a_atdoor"},
    {fpcNm_MDOOR_e,          "d_a_mdoor"},
    {fpcNm_KDDOOR_e,         "d_a_kddoor"},
    {fpcNm_KNOB00_e,         "d_a_knob00"},
    {fpcNm_MTOGE_e,          "d_a_mtoge"},
    {fpcNm_ANDSW0_e,         "d_a_andsw0"},
    {fpcNm_ANDSW2_e,         "d_a_andsw2"},
    {fpcNm_DAI_e,            "d_a_dai"},
    {fpcNm_SW_ATTACK_e,      "d_a_swattack"},
    {fpcNm_SW_ITEM_e,        "d_a_switem"},
    {fpcNm_SW_TACT_e,        "d_a_swtact"},
    {fpcNm_NPC_OS_e,         "d_a_npc_os"},
    {fpcNm_NPC_YM1_e,        "d_a_npc_ym1"},
    {fpcNm_NPC_YM2_e,        "d_a_npc_ym1"},
    {fpcNm_NPC_YW1_e,        "d_a_npc_yw1"},
    {fpcNm_NPC_JI1_e,        "d_a_npc_ji1"},
    {fpcNm_NPC_KO1_e,        "d_a_npc_ko1"},
    {fpcNm_NPC_KO2_e,        "d_a_npc_ko1"},
    {fpcNm_NPC_LS1_e,        "d_a_npc_ls1"},
    {fpcNm_NPC_P1_e,         "d_a_npc_p1"},
    {fpcNm_NPC_P2_e,         "d_a_npc_p2"},
    {fpcNm_NPC_SARACE_e,     "d_a_npc_sarace"},
    {fpcNm_NPC_TC_e,         "d_a_npc_tc"},
    {fpcNm_NPC_BM1_e,        "d_a_npc_bm1"},
    {fpcNm_NPC_BM2_e,        "d_a_npc_bm1"},
    {fpcNm_NPC_BM3_e,        "d_a_npc_bm1"},
    {fpcNm_NPC_BM4_e,        "d_a_npc_bm1"},
    {fpcNm_NPC_BM5_e,        "d_a_npc_bm1"},
    {fpcNm_NPC_OB1_e,        "d_a_npc_ob1"},
    {fpcNm_NPC_AJ1_e,        "d_a_npc_aj1"},
    {fpcNm_NPC_KM1_e,        "d_a_npc_km1"},
    {fpcNm_NPC_CB1_e,        "d_a_npc_cb1"},
    {fpcNm_NPC_BA1_e,        "d_a_npc_ba1"},
    {fpcNm_NPC_BJ1_e,        "d_a_npc_bj1"},
    {fpcNm_NPC_BJ2_e,        "d_a_npc_bj1"},
    {fpcNm_NPC_BJ3_e,        "d_a_npc_bj1"},
    {fpcNm_NPC_BJ4_e,        "d_a_npc_bj1"},
    {fpcNm_NPC_BJ5_e,        "d_a_npc_bj1"},
    {fpcNm_NPC_BJ6_e,        "d_a_npc_bj1"},
    {fpcNm_NPC_BJ7_e,        "d_a_npc_bj1"},
    {fpcNm_NPC_BJ8_e,        "d_a_npc_bj1"},
    {fpcNm_NPC_BJ9_e,        "d_a_npc_bj1"},
    {fpcNm_NPC_BS1_e,        "d_a_npc_bs1"},
    {fpcNm_NPC_BMCON1_e,     "d_a_npc_bmcon1"},
    {fpcNm_NPC_BMS1_e,       "d_a_npc_bms1"},
    {fpcNm_NPC_BMSW_e,       "d_a_npc_bmsw"},
    {fpcNm_NPC_BTSW_e,       "d_a_npc_btsw"},
    {fpcNm_NPC_BTSW2_e,      "d_a_npc_btsw2"},
    {fpcNm_NPC_DS1_e,        "d_a_npc_ds1"},
    {fpcNm_NPC_RSH1_e,       "d_a_npc_rsh1"},
    {fpcNm_NPC_KK1_e,        "d_a_npc_kk1"},
    {fpcNm_NPC_PM1_e,        "d_a_npc_pm1"},
    {fpcNm_NPC_KP1_e,        "d_a_npc_kp1"},
    {fpcNm_NPC_PF1_e,        "d_a_npc_pf1"},
    {fpcNm_NPC_GP1_e,        "d_a_npc_gp1"},
    {fpcNm_NPC_JB1_e,        "d_a_npc_jb1"},
    {fpcNm_NPC_KF1_e,        "d_a_npc_kf1"},
    {fpcNm_NPC_AUCTION_e,    "d_a_npc_auction"},
    {fpcNm_NPC_KG1_e,        "d_a_npc_kg1"},
    {fpcNm_NPC_KG2_e,        "d_a_npc_kg2"},
    {fpcNm_NPC_TT_e,         "d_a_npc_tt"},
    {fpcNm_NPC_HR_e,         "d_a_npc_hr"},
    {fpcNm_NPC_HO_e,         "d_a_npc_ho"},
    {fpcNm_NPC_MD_e,         "d_a_npc_md"},
    {fpcNm_NPC_UK_e,         "d_a_npc_uk"},
    {fpcNm_BIGELF_e,         "d_a_bigelf"},
    {fpcNm_NPC_CO1_e,        "d_a_npc_co1"},
    {fpcNm_NPC_ZK1_e,        "d_a_npc_zk1"},
    {fpcNm_NPC_ROTEN_e,      "d_a_npc_roten"},
    {fpcNm_NPC_PEOPLE_e,     "d_a_npc_people"},
    {fpcNm_NPC_GK1_e,        "d_a_npc_gk1"},
    {fpcNm_NPC_PHOTO_e,      "d_a_npc_photo"},
    {fpcNm_NPC_AC1_e,        "d_a_npc_ac1"},
    {fpcNm_NPC_HI1_e,        "d_a_npc_hi1"},
    {fpcNm_NPC_SV_e,         "d_a_npc_sv"},
    {fpcNm_NPC_MT_e,         "d_a_npc_mt"},
    {fpcNm_NPC_MN_e,         "d_a_npc_mn"},
    {fpcNm_NPC_AH_e,         "d_a_npc_ah"},
    {fpcNm_AUCTION_e,        "d_a_auction"},
    {fpcNm_KYTAG00_e,        "d_a_kytag00"},
    {fpcNm_KYTAG01_e,        "d_a_kytag01"},
    {fpcNm_KYTAG02_e,        "d_a_kytag02"},
    {fpcNm_KYTAG03_e,        "d_a_kytag03"},
    {fpcNm_KYTAG04_e,        "d_a_kytag04"},
    {fpcNm_KYTAG05_e,        "d_a_kytag05"},
    {fpcNm_KYTAG06_e,        "d_a_kytag06"},
    {fpcNm_KYTAG07_e,        "d_a_kytag07"},
    {fpcNm_WindTag_e,        "d_a_wind_tag"},
    {fpcNm_YOUGAN_e,         "d_a_yougan"},
    {fpcNm_Mmusic_e,         "d_a_mmusic"},
    {fpcNm_Komore_e,         "d_a_komore"},
    {fpcNm_Tpota_e,          "d_a_tpota"},
    {fpcNm_Obj_Itnak_e,      "d_a_obj_Itnak"},
    {fpcNm_Obj_Zouk_e,       "d_a_obj_zouK"},
    {fpcNm_Ykgr_e,           "d_a_ykgr"},
    {fpcNm_SAKU_e,           "d_a_saku"},
    {fpcNm_Salvage_e,        "d_a_salvage"},
    {fpcNm_SALVAGE_TBOX_e,   "d_a_salvage_tbox"},
    {fpcNm_Kmon_e,           "d_a_kmon"},
    {fpcNm_OBJ_FIGURE_e,     "d_a_obj_figure"},
    {fpcNm_OBJ_HAT_e,        "d_a_obj_hat"},
    {fpcNm_Lwood_e,          "d_a_lwood"},
    {fpcNm_Dummy_e,          "d_a_dummy"},
    {fpcNm_TAG_EVENT_e,      "d_a_tag_event"},
    {fpcNm_TAG_HINT_e,       "d_a_tag_hint"},
    {fpcNm_TAG_MSG_e,        "d_a_tag_msg"},
    {fpcNm_TAG_ETC_e,        "d_a_tag_etc"},
    {fpcNm_TAG_ISLAND_e,     "d_a_tag_island"},
    {fpcNm_TAG_KF1_e,        "d_a_tag_kf1"},
    {fpcNm_TAG_KK1_e,        "d_a_tag_kk1"},
    {fpcNm_TAG_PHOTO_e,      "d_a_tag_photo"},
    {fpcNm_TAG_KB_ITEM_e,    "d_a_tag_kb_item"},
    {fpcNm_TAG_MK_e,         "d_a_tag_mk"},
    {fpcNm_TAG_MDCB_e,       "d_a_tag_md_cb"},
    {fpcNm_TAG_BA1_e,        "d_a_tag_ba1"},
    {fpcNm_TagRock_e,        "d_a_fallrock_tag"},
    {fpcNm_FallRock_e,       "d_a_fallrock"},
    {fpcNm_SteamTag_e,       "d_a_steam_tag"},
    {fpcNm_Fire_e,           "d_a_fire"},
    {fpcNm_BRANCH_e,         "d_a_branch"},
    {fpcNm_NPC_ZL1_e,        "d_a_npc_zl1"},
    {fpcNm_WATERFALL_e,      "d_a_waterfall"},
    {fpcNm_LIGHTBRIDGE_e,    "d_a_lbridge"},
    {fpcNm_LIGHTSTAIR_e,     "d_a_lstair"},
    {fpcNm_WALL_e,           "d_a_wall"},
    {fpcNm_SW_PROPELLER_e,   "d_a_swpropeller"},
    {fpcNm_IKARI_e,          "d_a_ikari"},
    {fpcNm_AGBSW0_e,         "d_a_agbsw0"},
    {fpcNm_MAGMA_e,          "d_a_magma"},
    {fpcNm_GRASS_e,          "d_a_grass"},
    {fpcNm_Obj_Tower_e,      "d_a_obj_tower"},
    {fpcNm_Obj_DoguuD_e,     "d_a_obj_doguu_demo"},
    {fpcNm_SPOTBOX_e,        "d_a_spotbox"},
    {fpcNm_TORNADO_e,        "d_a_tornado"},
    {fpcNm_TITLE_e,          "d_a_title"},
    {fpcNm_MP_e,             "d_a_movie_player"},
    {fpcNm_LODBG_e,          "d_a_lod_bg"},
    {fpcNm_HIMO3_e,          "d_a_himo3"},
    {fpcNm_ATT_e,            "d_a_att"},
    {fpcNm_Hys_e,            "d_a_hys"},
    {fpcNm_SWHIT0_e,         "d_a_swhit0"},
    {fpcNm_TAG_GSHIP_e,      "d_a_tag_ghostship"},
    {fpcNm_TSUBO_e,          "d_a_tsubo"},
    {fpcNm_STONE_e,          "d_a_stone"},
    {fpcNm_Stone2_e,         "d_a_stone2"},
    {fpcNm_Obj_Barrel_e,     "d_a_obj_barrel"},
    {fpcNm_Obj_Barrel2_e,    "d_a_obj_barrel2"},
    {fpcNm_Obj_Try_e,        "d_a_obj_try"},
    {fpcNm_Obj_Vtil_e,       "d_a_obj_vtil"},
    {fpcNm_Obj_Ice_e,        "d_a_obj_ice"},
    {fpcNm_Obj_Mshokki_e,    "d_a_obj_mshokki"},
    {fpcNm_BOKO_e,           "d_a_boko"},
    {fpcNm_TAMA_e,           "d_a_tama"},
    {fpcNm_Obj_Buoyflag_e,   "d_a_obj_buoyflag"},
    {fpcNm_Obj_Correct_e,    "d_a_obj_correct"},
    {fpcNm_Obj_Eff_e,        "d_a_obj_eff"},
    {fpcNm_Tag_Light_e,      "d_a_tag_light"},
    {fpcNm_Tag_Attention_e,  "d_a_tag_attention"},
    {fpcNm_Tag_Waterlevel_e, "d_a_tag_waterlevel"},
    {fpcNm_ARROW_ICEEFF_e,   "d_a_arrow_iceeff"},
    {fpcNm_ARROW_LIGHTEFF_e, "d_a_arrow_lighteff"},
    {fpcNm_Obj_Timer_e,      "d_a_obj_timer"},

    {0xFFFF, NULL},
};

/* 800227A0-800229E0       .text cCc_Init__Fv */
BOOL cCc_Init() {
#if VERSION > VERSION_DEMO
    JUT_ASSERT(0x2a, !DMC_initialized);
#endif

#if VERSION == VERSION_DEMO
    JKRExpHeap * pHeap = mDoExt_getArchiveHeap();
    cCc_solidHeap = mDoExt_createSolidHeapToCurrent(0, NULL, 0);
#else
    JKRSolidHeap * pHeap = JKRSolidHeap::create(0x5648, mDoExt_getArchiveHeap(), false);
    JKRHeap * pOldHeap = pHeap->becomeCurrentHeap();
#endif
    memset(DMC, 0, sizeof(DMC));

    for (int i = 0; i < ARRAY_SIZE(DynamicNameTable); i++) {
        const cDyl_DynamicName_t & d = DynamicNameTable[i];
        if (d.name == NULL)
            continue;

        JUT_ASSERT(DEMO_SELECT(47, 57), d.mKey < ARRAY_SIZE(DMC));
        JUT_ASSERT(DEMO_SELECT(48, 58), DMC[d.mKey] == NULL);

        for (int j = 0; j < ARRAY_SIZE(DMC); j++) {
            if (DMC[j] != NULL) {
                if (!strcmp(d.name, DMC[j]->getModuleName())) {
                    DMC[d.mKey] = DMC[j];
                    break;
                }
            }
        }

        if (DMC[d.mKey] == NULL)
#if VERSION == VERSION_DEMO
            DMC[d.mKey] = new (pHeap, 0) DynamicModuleControl(d.name);
#else
            DMC[d.mKey] = new DynamicModuleControl(d.name);
#endif
    }

#if VERSION == VERSION_DEMO
    mDoExt_restoreCurrentHeap();
    mDoExt_adjustSolidHeap(cCc_solidHeap);
#else
    pHeap->adjustSize();
    pOldHeap->becomeCurrentHeap();
    DMC_initialized = TRUE;
#endif

    return TRUE;
}

/* 800229E0-80022A80       .text cDyl_IsLinked__Fs */
BOOL cDyl_IsLinked(s16 i_ProfName) {
    JUT_ASSERT(DEMO_SELECT(134, 174), cDyl_Initialized);

    if (DMC[i_ProfName] != NULL)
        return DMC[i_ProfName]->isLinked();

    return TRUE;
}

/* 80022A80-80022B58       .text cDyl_Unlink__Fs */
BOOL cDyl_Unlink(s16 i_ProfName) {
    JUT_ASSERT(DEMO_SELECT(154, 197), cDyl_Initialized);
    JUT_ASSERT(DEMO_SELECT(155, 198), i_ProfName < ARRAY_SIZE(DMC));

    if (DMC[i_ProfName] != NULL)
        return DMC[i_ProfName]->unlink();

    return FALSE;
}

cPhs_State cDyl_Link(s16 i_ProfName) {
    JUT_ASSERT(180, cDyl_Initialized);
    if (i_ProfName >= ARRAY_SIZE(DMC)) {
        OSReport_Error("cDyl_Link i_ProfName=%d\n", i_ProfName);
        return cPhs_ERROR_e;
    }
    JUT_ASSERT(185, i_ProfName < ARRAY_SIZE(DMC));
    if (DMC[i_ProfName]) {
        if (DMC[i_ProfName]->link()) {
            return cPhs_COMPLEATE_e;
        } else {
            return cPhs_ERROR_e;
        }
    } else {
        return cPhs_COMPLEATE_e;
    }
}

#if VERSION > VERSION_DEMO
static void dummy() {
    OSReport_Error("cDyl_LinkASync: リンクに失敗しました。諦めます\n");
}
#endif

/* 80022B58-80022CEC       .text cDyl_LinkASync__Fs */
cPhs_State cDyl_LinkASync(s16 i_ProfName) {
#if VERSION == VERSION_DEMO
    if (!cDyl_Initialized) {
        OSReport_Error("初期化が終わってないのに呼んでもらっても困ります %d\n", i_ProfName);
        return cPhs_INIT_e;
    }
    JUT_ASSERT(203, cDyl_Initialized);
#else
    JUT_ASSERT(257, DMC_initialized);
    if (!cDyl_Initialized)
        return cPhs_INIT_e;
#endif

    if (i_ProfName >= ARRAY_SIZE(DMC)) {
        OSReport_Error("cDyl_Link i_ProfName=%d\n", i_ProfName);
        return cPhs_ERROR_e;
    }

    JUT_ASSERT(DEMO_SELECT(208, 273), i_ProfName < ARRAY_SIZE(DMC));
    DynamicModuleControlBase * d = DMC[i_ProfName];
    if (d != NULL) {
#if VERSION > VERSION_DEMO
        JUT_ASSERT(0x115, cDyl_Initialized);
#endif
        if (d->load_async()) {
            if (d->link()) {
                return cPhs_COMPLEATE_e;
            } else {
#if VERSION > VERSION_DEMO
                OSReport_Error("cDyl_LinkASync: リンクに失敗しました。諦めます\n");
#endif
                return cPhs_ERROR_e;
            }
        }

        return cPhs_INIT_e;
    }

    return cPhs_COMPLEATE_e;
}

/* 80022CEC-80022DF8       .text cDyl_InitCallback__FPv */
BOOL cDyl_InitCallback(void*) {
    JUT_ASSERT(DEMO_SELECT(230, 303), !cDyl_Initialized);
    JKRFileCache* loader = JKRMountDvdDrive("/", mDoExt_getArchiveHeap(), NULL);
    DynamicModuleControl::initialize();

    void* strTbl = JKRGetResource("/dvd/framework.str");
    JKRDetachResource(strTbl, loader);
    JKRUnmountDvdDrive(loader);
    OSSetStringTable(strTbl);

    DynamicModuleControl dmc("f_pc_profile_lst");
    dmc.link();
#if VERSION == VERSION_DEMO
    cCc_Init();
#endif
    cDyl_Initialized = TRUE;
    return TRUE;
}

/* 80022DF8-80022E70       .text cDyl_InitAsync__Fv */
void cDyl_InitAsync() {
#if VERSION > VERSION_DEMO
    cCc_Init();
#endif

    JUT_ASSERT(DEMO_SELECT(252, 325), cDyl_DVD == NULL);
    cDyl_DVD = mDoDvdThd_callback_c::create((mDoDvdThd_callback_func) cDyl_InitCallback, NULL);
}

/* 80022E70-80022EDC       .text cDyl_InitAsyncIsDone__Fv */
BOOL cDyl_InitAsyncIsDone() {
    if (cDyl_DVD == NULL)
        return TRUE;

    if (cDyl_DVD->sync()) {
        cDyl_DVD->destroy();
        cDyl_DVD = NULL;
        return TRUE;
    }

    return FALSE;
}

/* 80022EDC-80022EE4       .text phase_01__7cDylPhsFPv */
cPhs_State cDylPhs::phase_01(void*) {
    return cPhs_NEXT_e;
}

/* 80022EE4-80022F1C       .text phase_02__7cDylPhsFPs */
cPhs_State cDylPhs::phase_02(s16* pProf) {
    cPhs_State ret = cDyl_LinkASync(*pProf);
    return ret == cPhs_COMPLEATE_e ? cPhs_NEXT_e : ret;
}

/* 80022F1C-80022F24       .text phase_03__7cDylPhsFPv */
cPhs_State cDylPhs::phase_03(void*) {
    return cPhs_INIT_e;
}

/* 80022F24-80022F68       .text Link__7cDylPhsFP30request_of_phase_process_classs */
cPhs_State cDylPhs::Link(request_of_phase_process_class* i_phase, s16 profName) {
    static cPhs__Handler l_method[] = {
        (cPhs__Handler) &cDylPhs::phase_01,
        (cPhs__Handler) &cDylPhs::phase_02,
        (cPhs__Handler) &cDylPhs::phase_03,
    };

    if (i_phase->id == 2)
        return cPhs_COMPLEATE_e;

    return dComLbG_PhaseHandler(i_phase, l_method, &profName);
}

/* 80022F68-80023004       .text Unlink__7cDylPhsFP30request_of_phase_process_classs */
BOOL cDylPhs::Unlink(request_of_phase_process_class* i_phase, s16 profName) {
    JUT_ASSERT(DEMO_SELECT(357, 422), i_phase->id != 1);

    BOOL ret;
    if (i_phase->id == 2) {
        ret = cDyl_Unlink(profName);
        i_phase->id = 0;
    } else {
        ret = FALSE;
    }
    return ret;
}
