#ifdef MEDIA042_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
BOOLEAN F0294_CHAMPION_IsAmmunitionCompatibleWithWeapon(
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
P0616_ui_ChampionIndex, P0617_ui_WeaponSlotIndex, P0618_ui_AmmunitionSlotIndex)
#endif
unsigned int16_t P0616_ui_ChampionIndex       SEPARATOR
unsigned int16_t P0617_ui_WeaponSlotIndex     SEPARATOR
unsigned int16_t P0618_ui_AmmunitionSlotIndex FINAL_SEPARATOR
{
#ifdef MEDIA001_S10EA_S10EB /* CHANGE2_12_OPTIMIZATION Variable definition changed */
        CHAMPION* L0874_ps_Champion;
        REGISTER WEAPON_INFO* L0875_ps_WeaponInfo;
        REGISTER THING* L0876_pT_Thing;
#endif
#ifdef MEDIA001_S10EA_S10EB /* CHANGE2_06_FIX Useless code removed */
        long L0877_l_Unreferenced; /* BUG0_00 Useless code */
#endif
#ifdef MEDIA001_S10EA_S10EB /* CHANGE2_12_OPTIMIZATION Variable definition changed */
        int16_t L0879_i_WeaponClass;
#endif
#ifdef MEDIA227_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J /* CHANGE2_12_OPTIMIZATION Variable definition changed */
#ifdef MEDIA224_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE2_12_OPTIMIZATION Variable definition changed */
        REGISTER CHAMPION* L0874_ps_Champion;
#endif
        REGISTER WEAPON_INFO* L0875_ps_WeaponInfo;
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        REGISTER CHAMPION* L0874_ps_Champion;
#endif
        REGISTER THING L0878_T_Thing;
        REGISTER int16_t L0879_i_WeaponClass;
#endif


        L0874_ps_Champion = &M516_CHAMPIONS[P0616_ui_ChampionIndex];
#ifdef MEDIA001_S10EA_S10EB /* CHANGE2_12_OPTIMIZATION Variable definition changed */
        L0876_pT_Thing = &L0874_ps_Champion->Slots[P0617_ui_WeaponSlotIndex];
        if (M012_TYPE(*L0876_pT_Thing) != C05_THING_TYPE_WEAPON) {
#endif
#ifdef MEDIA224_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE2_12_OPTIMIZATION Variable definition changed */
        L0878_T_Thing = L0874_ps_Champion->Slots[P0617_ui_WeaponSlotIndex];
        if (M012_TYPE(L0878_T_Thing) != C05_THING_TYPE_WEAPON) {
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        if (M012_TYPE(L0878_T_Thing = L0874_ps_Champion->Slots[P0617_ui_WeaponSlotIndex]) != C05_THING_TYPE_WEAPON) {
#endif
                return C0_FALSE;
        }
#ifdef MEDIA001_S10EA_S10EB /* CHANGE2_01_OPTIMIZATION Inline code replaced by function calls */
        L0875_ps_WeaponInfo = &G0238_as_Graphic559_WeaponInfo[((WEAPON*)G0284_apuc_ThingData[C05_THING_TYPE_WEAPON])[M013_INDEX(*L0876_pT_Thing)].Type];
#endif
#ifdef MEDIA227_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J /* CHANGE2_01_OPTIMIZATION Inline code replaced by function calls */
        L0875_ps_WeaponInfo = F0158_DUNGEON_GetWeaponInfo(L0878_T_Thing);
#endif
        if ((L0875_ps_WeaponInfo->Class >= C016_CLASS_FIRST_BOW) && (L0875_ps_WeaponInfo->Class <= C031_CLASS_LAST_BOW)) {
                L0879_i_WeaponClass = C010_CLASS_BOW_AMMUNITION;
        } else {
                if ((L0875_ps_WeaponInfo->Class >= C032_CLASS_FIRST_SLING) && (L0875_ps_WeaponInfo->Class <= C047_CLASS_LAST_SLING)) {
                        L0879_i_WeaponClass = C011_CLASS_SLING_AMMUNITION;
                } else {
                        return C0_FALSE;
                }
        }
#ifdef MEDIA001_S10EA_S10EB /* CHANGE2_12_OPTIMIZATION Variable definition changed */
        L0876_pT_Thing = &L0874_ps_Champion->Slots[P0618_ui_AmmunitionSlotIndex];
#endif
#ifdef MEDIA224_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE2_12_OPTIMIZATION Variable definition changed */
        L0878_T_Thing = L0874_ps_Champion->Slots[P0618_ui_AmmunitionSlotIndex];
#endif
#ifdef MEDIA224_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE2_01_OPTIMIZATION Inline code replaced by function calls */
        L0875_ps_WeaponInfo = F0158_DUNGEON_GetWeaponInfo(L0878_T_Thing);
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        L0875_ps_WeaponInfo = F0158_DUNGEON_GetWeaponInfo(L0878_T_Thing = L0874_ps_Champion->Slots[P0618_ui_AmmunitionSlotIndex]);
#endif
#ifdef MEDIA001_S10EA_S10EB /* CHANGE2_01_OPTIMIZATION Inline code replaced by function calls */
        return ((M012_TYPE(*L0876_pT_Thing) == C05_THING_TYPE_WEAPON) && (G0238_as_Graphic559_WeaponInfo[((WEAPON*)G0284_apuc_ThingData[C05_THING_TYPE_WEAPON])[M013_INDEX(*L0876_pT_Thing)].Type].Class == L0879_i_WeaponClass));
#endif
#ifdef MEDIA227_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J /* CHANGE2_01_OPTIMIZATION Inline code replaced by function calls */
        return ((M012_TYPE(L0878_T_Thing) == C05_THING_TYPE_WEAPON) && (L0875_ps_WeaponInfo->Class == L0879_i_WeaponClass));
#endif
}
#endif
