
/* std::ios::narrow(char, char) const */

uint __thiscall std::ios::narrow(ios *this,char param_1,char param_2)

{
  uint uVar1;
  uint uVar2;
  int iVar3;
  uint *puVar4;
  undefined3 in_register_00000014;
  undefined3 in_register_00000018;
  int *piVar5;
  undefined *puVar6;
  code *pcVar7;
  
  uVar2 = CONCAT31(in_register_00000014,param_1);
  puVar4 = *(uint **)(this + 0x7c);
  if (puVar4 != (uint *)0x0) {
    uVar1 = (uint)*(char *)((int)puVar4 + (byte)param_1 + 0x11d);
    if (uVar1 == 0) {
      uVar1 = uVar2;
      if (*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88) {
        uVar1 = (**(code **)(*puVar4 + 0x20))();
      }
      if (CONCAT31(in_register_00000018,param_2) == uVar1) {
        return CONCAT31(in_register_00000018,param_2);
      }
      *(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1;
    }
    return uVar1;
  }
  puVar6 = PTR___throw_bad_cast_004c22bc;
  (*(code *)PTR___throw_bad_cast_004c22bc)();
  piVar5 = (int *)puVar4[0x1f];
  pcVar7 = *(code **)(puVar6 + 0x15c3c4);
  if (piVar5 == (int *)0x0) {
    (*pcVar7)();
    (**(code **)(pcVar7 + 0x15c304))();
    *(undefined2 *)(puVar4 + 0x1d) = 0;
    puVar4[0x1c] = 0;
    puVar4[0x1e] = 0;
    iVar3 = *(int *)(pcVar7 + 0x15c308);
    puVar4[0x1f] = 0;
    puVar4[0x20] = 0;
    puVar4[0x21] = 0;
    *puVar4 = iVar3 + 8U;
    return iVar3 + 8U;
  }
  if (*(char *)(piVar5 + 7) != '\0') {
    return (int)*(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d);
  }
  (**(code **)(puVar6 + 0x15c3c8))(piVar5);
  if (*(code **)(*piVar5 + 0x18) == *(code **)(puVar6 + 0x15c3dc)) {
    return uVar2;
  }
                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar2 = (**(code **)(*piVar5 + 0x18))(piVar5);
  return uVar2;
}



uint FUN_00365e54(int param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  uint *puVar3;
  int *piVar4;
  undefined *puVar5;
  code *pcVar6;
  
  puVar3 = *(uint **)(param_1 + 0x7c);
  if (puVar3 != (uint *)0x0) {
    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);
    if (uVar1 == 0) {
      uVar1 = param_2;
      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {
        uVar1 = (**(code **)(*puVar3 + 0x20))();
      }
      if (param_3 == uVar1) {
        return param_3;
      }
      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;
    }
    return uVar1;
  }
  puVar5 = PTR___throw_bad_cast_004c22bc;
  (*(code *)PTR___throw_bad_cast_004c22bc)();
  piVar4 = (int *)puVar3[0x1f];
  pcVar6 = *(code **)(puVar5 + 0x15c3c4);
  if (piVar4 == (int *)0x0) {
    (*pcVar6)();
    (**(code **)(pcVar6 + 0x15c304))();
    *(undefined2 *)(puVar3 + 0x1d) = 0;
    puVar3[0x1c] = 0;
    puVar3[0x1e] = 0;
    iVar2 = *(int *)(pcVar6 + 0x15c308);
    puVar3[0x1f] = 0;
    puVar3[0x20] = 0;
    puVar3[0x21] = 0;
    *puVar3 = iVar2 + 8U;
    return iVar2 + 8U;
  }
  if (*(char *)(piVar4 + 7) != '\0') {
    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);
  }
  (**(code **)(puVar5 + 0x15c3c8))(piVar4);
  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {
    return param_2;
  }
                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);
  return uVar1;
}


lui gp,0x16
addiu gp,gp,0x33ec
addu gp,gp,t9
addiu sp,sp,-0x28
lw a0,0x7c(a0)
sw gp,0x10(sp)
sw ra,0x24(sp)
sw s1,0x20(sp)
beq a0,zero,0x00365eec
_sw s0,0x1c(sp)
andi s0,a1,0xff
addu s0,a0,s0
lb v0,0x11d(s0)
bne v0,zero,0x00365eb0
_or v1,a1,zero
lw a3,0x0(a0)
lw v0,-0x65b8(gp)
lw t9,0x20(a3)
bne t9,v0,0x00365edc
_or s1,a2,zero
beq s1,v1,0x00365ec4
_or v0,v1,zero
sb v1,0x11d(s0)
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
lw ra,0x24(sp)
or v0,s1,zero
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
jalr t9
_nop
b 0x00365ea4
_or v1,v0,zero
lw t9,-0x6f84(gp)
jalr t9
_nop
(translation_unit "uint FUN_00365e54(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  int *piVar4;\n  undefined *puVar5;\n  code *pcVar6;\n  \n  puVar3 = *(uint **)(param_1 + 0x7c);\n  if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar5 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar4 = (int *)puVar3[0x1f];\n  pcVar6 = *(code **)(puVar5 + 0x15c3c4);\n  if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }\n  if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar5 + 0x15c3c8))(piVar4);\n  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }\n                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);\n  return uVar1;\n}\n\n" (function_definition "uint FUN_00365e54(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  int *piVar4;\n  undefined *puVar5;\n  code *pcVar6;\n  \n  puVar3 = *(uint **)(param_1 + 0x7c);\n  if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar5 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar4 = (int *)puVar3[0x1f];\n  pcVar6 = *(code **)(puVar5 + 0x15c3c4);\n  if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }\n  if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar5 + 0x15c3c8))(piVar4);\n  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }\n                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);\n  return uVar1;\n}" type_identifier (function_declarator "FUN_00365e54(int param_1,uint param_2,uint param_3)" identifier (parameter_list "(int param_1,uint param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  int *piVar4;\n  undefined *puVar5;\n  code *pcVar6;\n  \n  puVar3 = *(uint **)(param_1 + 0x7c);\n  if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar5 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar4 = (int *)puVar3[0x1f];\n  pcVar6 = *(code **)(puVar5 + 0x15c3c4);\n  if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }\n  if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar5 + 0x15c3c8))(piVar4);\n  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }\n                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "code *pcVar6;" type_identifier (pointer_declarator "*pcVar6" * identifier) ;) (expression_statement "puVar3 = *(uint **)(param_1 + 0x7c);" (assignment_expression "puVar3 = *(uint **)(param_1 + 0x7c)" identifier = (pointer_expression "*(uint **)(param_1 + 0x7c)" * (cast_expression "(uint **)(param_1 + 0x7c)" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) ))))) ;) (if_statement "if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }" if (parenthesized_expression "(puVar3 != (uint *)0x0)" ( (binary_expression "puVar3 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }" { (expression_statement "uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);" (assignment_expression "uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" identifier = (binary_expression "(uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar3 + (param_2 & 0xff) + 0x11d)" ( (binary_expression "(int)puVar3 + (param_2 & 0xff) + 0x11d" (binary_expression "(int)puVar3 + (param_2 & 0xff)" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(param_2 & 0xff)" ( (binary_expression "param_2 & 0xff" identifier & number_literal) ))) + number_literal) ))))) ;) (if_statement "if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }" { (expression_statement "uVar1 = param_2;" (assignment_expression "uVar1 = param_2" identifier = identifier) ;) (if_statement "if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }" if (parenthesized_expression "(*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88)" ( (binary_expression "*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88" (pointer_expression "*(code **)(*puVar3 + 0x20)" * (cast_expression "(code **)(*puVar3 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*puVar3 + 0x20)" ( (binary_expression "*puVar3 + 0x20" (pointer_expression "*puVar3" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_do_narrow_004c2c88" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }" { (expression_statement "uVar1 = (**(code **)(*puVar3 + 0x20))();" (assignment_expression "uVar1 = (**(code **)(*puVar3 + 0x20))()" identifier = (call_expression "(**(code **)(*puVar3 + 0x20))()" (parenthesized_expression "(**(code **)(*puVar3 + 0x20))" ( (pointer_expression "**(code **)(*puVar3 + 0x20)" * (pointer_expression "*(code **)(*puVar3 + 0x20)" * (cast_expression "(code **)(*puVar3 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*puVar3 + 0x20)" ( (binary_expression "*puVar3 + 0x20" (pointer_expression "*puVar3" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) })) (if_statement "if (param_3 == uVar1) {\n        return param_3;\n      }" if (parenthesized_expression "(param_3 == uVar1)" ( (binary_expression "param_3 == uVar1" identifier == identifier) )) (compound_statement "{\n        return param_3;\n      }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;" (assignment_expression "*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1" (pointer_expression "*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" * (cast_expression "(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar3 + (param_2 & 0xff) + 0x11d)" ( (binary_expression "(int)puVar3 + (param_2 & 0xff) + 0x11d" (binary_expression "(int)puVar3 + (param_2 & 0xff)" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(param_2 & 0xff)" ( (binary_expression "param_2 & 0xff" identifier & number_literal) ))) + number_literal) )))) = (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier)) ;) })) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "puVar5 = PTR___throw_bad_cast_004c22bc;" (assignment_expression "puVar5 = PTR___throw_bad_cast_004c22bc" identifier = identifier) ;) (expression_statement "(*(code *)PTR___throw_bad_cast_004c22bc)();" (call_expression "(*(code *)PTR___throw_bad_cast_004c22bc)()" (parenthesized_expression "(*(code *)PTR___throw_bad_cast_004c22bc)" ( (pointer_expression "*(code *)PTR___throw_bad_cast_004c22bc" * (cast_expression "(code *)PTR___throw_bad_cast_004c22bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "piVar4 = (int *)puVar3[0x1f];" (assignment_expression "piVar4 = (int *)puVar3[0x1f]" identifier = (cast_expression "(int *)puVar3[0x1f]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[0x1f]" identifier [ number_literal ]))) ;) (expression_statement "pcVar6 = *(code **)(puVar5 + 0x15c3c4);" (assignment_expression "pcVar6 = *(code **)(puVar5 + 0x15c3c4)" identifier = (pointer_expression "*(code **)(puVar5 + 0x15c3c4)" * (cast_expression "(code **)(puVar5 + 0x15c3c4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar5 + 0x15c3c4)" ( (binary_expression "puVar5 + 0x15c3c4" identifier + number_literal) ))))) ;) (if_statement "if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }" if (parenthesized_expression "(piVar4 == (int *)0x0)" ( (binary_expression "piVar4 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }" { (expression_statement "(*pcVar6)();" (call_expression "(*pcVar6)()" (parenthesized_expression "(*pcVar6)" ( (pointer_expression "*pcVar6" * identifier) )) (argument_list "()" ( ))) ;) (expression_statement "(**(code **)(pcVar6 + 0x15c304))();" (call_expression "(**(code **)(pcVar6 + 0x15c304))()" (parenthesized_expression "(**(code **)(pcVar6 + 0x15c304))" ( (pointer_expression "**(code **)(pcVar6 + 0x15c304)" * (pointer_expression "*(code **)(pcVar6 + 0x15c304)" * (cast_expression "(code **)(pcVar6 + 0x15c304)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(pcVar6 + 0x15c304)" ( (binary_expression "pcVar6 + 0x15c304" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (expression_statement "*(undefined2 *)(puVar3 + 0x1d) = 0;" (assignment_expression "*(undefined2 *)(puVar3 + 0x1d) = 0" (pointer_expression "*(undefined2 *)(puVar3 + 0x1d)" * (cast_expression "(undefined2 *)(puVar3 + 0x1d)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 0x1d)" ( (binary_expression "puVar3 + 0x1d" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar3[0x1c] = 0;" (assignment_expression "puVar3[0x1c] = 0" (subscript_expression "puVar3[0x1c]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0x1e] = 0;" (assignment_expression "puVar3[0x1e] = 0" (subscript_expression "puVar3[0x1e]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar2 = *(int *)(pcVar6 + 0x15c308);" (assignment_expression "iVar2 = *(int *)(pcVar6 + 0x15c308)" identifier = (pointer_expression "*(int *)(pcVar6 + 0x15c308)" * (cast_expression "(int *)(pcVar6 + 0x15c308)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar6 + 0x15c308)" ( (binary_expression "pcVar6 + 0x15c308" identifier + number_literal) ))))) ;) (expression_statement "puVar3[0x1f] = 0;" (assignment_expression "puVar3[0x1f] = 0" (subscript_expression "puVar3[0x1f]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0x20] = 0;" (assignment_expression "puVar3[0x20] = 0" (subscript_expression "puVar3[0x20]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0x21] = 0;" (assignment_expression "puVar3[0x21] = 0" (subscript_expression "puVar3[0x21]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar3 = iVar2 + 8U;" (assignment_expression "*puVar3 = iVar2 + 8U" (pointer_expression "*puVar3" * identifier) = (binary_expression "iVar2 + 8U" identifier + number_literal)) ;) (return_statement "return iVar2 + 8U;" return (binary_expression "iVar2 + 8U" identifier + number_literal) ;) })) (if_statement "if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }" if (parenthesized_expression "(*(char *)(piVar4 + 7) != '\0')" ( (binary_expression "*(char *)(piVar4 + 7) != '\0'" (pointer_expression "*(char *)(piVar4 + 7)" * (cast_expression "(char *)(piVar4 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 7)" ( (binary_expression "piVar4 + 7" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }" { (return_statement "return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);" return (cast_expression "(int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d)" * (cast_expression "(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar4 + (param_2 & 0xff) + 0x1d)" ( (binary_expression "(int)piVar4 + (param_2 & 0xff) + 0x1d" (binary_expression "(int)piVar4 + (param_2 & 0xff)" (cast_expression "(int)piVar4" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(param_2 & 0xff)" ( (binary_expression "param_2 & 0xff" identifier & number_literal) ))) + number_literal) ))))) ;) })) (expression_statement "(**(code **)(puVar5 + 0x15c3c8))(piVar4);" (call_expression "(**(code **)(puVar5 + 0x15c3c8))(piVar4)" (parenthesized_expression "(**(code **)(puVar5 + 0x15c3c8))" ( (pointer_expression "**(code **)(puVar5 + 0x15c3c8)" * (pointer_expression "*(code **)(puVar5 + 0x15c3c8)" * (cast_expression "(code **)(puVar5 + 0x15c3c8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar5 + 0x15c3c8)" ( (binary_expression "puVar5 + 0x15c3c8" identifier + number_literal) ))))) )) (argument_list "(piVar4)" ( identifier ))) ;) (if_statement "if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }" if (parenthesized_expression "(*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc))" ( (binary_expression "*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)" (pointer_expression "*(code **)(*piVar4 + 0x18)" * (cast_expression "(code **)(*piVar4 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 0x18)" ( (binary_expression "*piVar4 + 0x18" (pointer_expression "*piVar4" * identifier) + number_literal) )))) == (pointer_expression "*(code **)(puVar5 + 0x15c3dc)" * (cast_expression "(code **)(puVar5 + 0x15c3dc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar5 + 0x15c3dc)" ( (binary_expression "puVar5 + 0x15c3dc" identifier + number_literal) ))))) )) (compound_statement "{\n    return param_2;\n  }" { (return_statement "return param_2;" return identifier ;) })) comment comment (expression_statement "uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);" (assignment_expression "uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4)" identifier = (call_expression "(**(code **)(*piVar4 + 0x18))(piVar4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x18))" ( (pointer_expression "**(code **)(*piVar4 + 0x18)" * (pointer_expression "*(code **)(*piVar4 + 0x18)" * (cast_expression "(code **)(*piVar4 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 0x18)" ( (binary_expression "*piVar4 + 0x18" (pointer_expression "*piVar4" * identifier) + number_literal) ))))) )) (argument_list "(piVar4)" ( identifier )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* std::ios::narrow(char, char) const */\n\nuint __thiscall std::ios::narrow(ios *this,char param_1,char param_2)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  uint *puVar4;\n  undefined3 in_register_00000014;\n  undefined3 in_register_00000018;\n  int *piVar5;\n  undefined *puVar6;\n  code *pcVar7;\n  \n  uVar2 = CONCAT31(in_register_00000014,param_1);\n  puVar4 = *(uint **)(this + 0x7c);\n  if (puVar4 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar4 + (byte)param_1 + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = uVar2;\n      if (*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar4 + 0x20))();\n      }\n      if (CONCAT31(in_register_00000018,param_2) == uVar1) {\n        return CONCAT31(in_register_00000018,param_2);\n      }\n      *(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar6 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar5 = (int *)puVar4[0x1f];\n  pcVar7 = *(code **)(puVar6 + 0x15c3c4);\n  if (piVar5 == (int *)0x0) {\n    (*pcVar7)();\n    (**(code **)(pcVar7 + 0x15c304))();\n    *(undefined2 *)(puVar4 + 0x1d) = 0;\n    puVar4[0x1c] = 0;\n    puVar4[0x1e] = 0;\n    iVar3 = *(int *)(pcVar7 + 0x15c308);\n    puVar4[0x1f] = 0;\n    puVar4[0x20] = 0;\n    puVar4[0x21] = 0;\n    *puVar4 = iVar3 + 8U;\n    return iVar3 + 8U;\n  }\n  if (*(char *)(piVar5 + 7) != '\0') {\n    return (int)*(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar6 + 0x15c3c8))(piVar5);\n  if (*(code **)(*piVar5 + 0x18) == *(code **)(puVar6 + 0x15c3dc)) {\n    return uVar2;\n  }\n                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar2 = (**(code **)(*piVar5 + 0x18))(piVar5);\n  return uVar2;\n}\n\n" comment (function_definition "uint __thiscall std::ios::narrow(ios *this,char param_1,char param_2)\n\n{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  uint *puVar4;\n  undefined3 in_register_00000014;\n  undefined3 in_register_00000018;\n  int *piVar5;\n  undefined *puVar6;\n  code *pcVar7;\n  \n  uVar2 = CONCAT31(in_register_00000014,param_1);\n  puVar4 = *(uint **)(this + 0x7c);\n  if (puVar4 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar4 + (byte)param_1 + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = uVar2;\n      if (*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar4 + 0x20))();\n      }\n      if (CONCAT31(in_register_00000018,param_2) == uVar1) {\n        return CONCAT31(in_register_00000018,param_2);\n      }\n      *(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar6 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar5 = (int *)puVar4[0x1f];\n  pcVar7 = *(code **)(puVar6 + 0x15c3c4);\n  if (piVar5 == (int *)0x0) {\n    (*pcVar7)();\n    (**(code **)(pcVar7 + 0x15c304))();\n    *(undefined2 *)(puVar4 + 0x1d) = 0;\n    puVar4[0x1c] = 0;\n    puVar4[0x1e] = 0;\n    iVar3 = *(int *)(pcVar7 + 0x15c308);\n    puVar4[0x1f] = 0;\n    puVar4[0x20] = 0;\n    puVar4[0x21] = 0;\n    *puVar4 = iVar3 + 8U;\n    return iVar3 + 8U;\n  }\n  if (*(char *)(piVar5 + 7) != '\0') {\n    return (int)*(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar6 + 0x15c3c8))(piVar5);\n  if (*(code **)(*piVar5 + 0x18) == *(code **)(puVar6 + 0x15c3dc)) {\n    return uVar2;\n  }\n                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar2 = (**(code **)(*piVar5 + 0x18))(piVar5);\n  return uVar2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::ios::" identifier : : identifier : :) (function_declarator "narrow(ios *this,char param_1,char param_2)" identifier (parameter_list "(ios *this,char param_1,char param_2)" ( (parameter_declaration "ios *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char param_1" primitive_type identifier) , (parameter_declaration "char param_2" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  int iVar3;\n  uint *puVar4;\n  undefined3 in_register_00000014;\n  undefined3 in_register_00000018;\n  int *piVar5;\n  undefined *puVar6;\n  code *pcVar7;\n  \n  uVar2 = CONCAT31(in_register_00000014,param_1);\n  puVar4 = *(uint **)(this + 0x7c);\n  if (puVar4 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar4 + (byte)param_1 + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = uVar2;\n      if (*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar4 + 0x20))();\n      }\n      if (CONCAT31(in_register_00000018,param_2) == uVar1) {\n        return CONCAT31(in_register_00000018,param_2);\n      }\n      *(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar6 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar5 = (int *)puVar4[0x1f];\n  pcVar7 = *(code **)(puVar6 + 0x15c3c4);\n  if (piVar5 == (int *)0x0) {\n    (*pcVar7)();\n    (**(code **)(pcVar7 + 0x15c304))();\n    *(undefined2 *)(puVar4 + 0x1d) = 0;\n    puVar4[0x1c] = 0;\n    puVar4[0x1e] = 0;\n    iVar3 = *(int *)(pcVar7 + 0x15c308);\n    puVar4[0x1f] = 0;\n    puVar4[0x20] = 0;\n    puVar4[0x21] = 0;\n    *puVar4 = iVar3 + 8U;\n    return iVar3 + 8U;\n  }\n  if (*(char *)(piVar5 + 7) != '\0') {\n    return (int)*(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar6 + 0x15c3c8))(piVar5);\n  if (*(code **)(*piVar5 + 0x18) == *(code **)(puVar6 + 0x15c3dc)) {\n    return uVar2;\n  }\n                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar2 = (**(code **)(*piVar5 + 0x18))(piVar5);\n  return uVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined3 in_register_00000014;" type_identifier identifier ;) (declaration "undefined3 in_register_00000018;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "code *pcVar7;" type_identifier (pointer_declarator "*pcVar7" * identifier) ;) (expression_statement "uVar2 = CONCAT31(in_register_00000014,param_1);" (assignment_expression "uVar2 = CONCAT31(in_register_00000014,param_1)" identifier = (call_expression "CONCAT31(in_register_00000014,param_1)" identifier (argument_list "(in_register_00000014,param_1)" ( identifier , identifier )))) ;) (expression_statement "puVar4 = *(uint **)(this + 0x7c);" (assignment_expression "puVar4 = *(uint **)(this + 0x7c)" identifier = (pointer_expression "*(uint **)(this + 0x7c)" * (cast_expression "(uint **)(this + 0x7c)" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x7c)" ( (binary_expression "this + 0x7c" identifier + number_literal) ))))) ;) (if_statement "if (puVar4 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar4 + (byte)param_1 + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = uVar2;\n      if (*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar4 + 0x20))();\n      }\n      if (CONCAT31(in_register_00000018,param_2) == uVar1) {\n        return CONCAT31(in_register_00000018,param_2);\n      }\n      *(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }" if (parenthesized_expression "(puVar4 != (uint *)0x0)" ( (binary_expression "puVar4 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar1 = (uint)*(char *)((int)puVar4 + (byte)param_1 + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = uVar2;\n      if (*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar4 + 0x20))();\n      }\n      if (CONCAT31(in_register_00000018,param_2) == uVar1) {\n        return CONCAT31(in_register_00000018,param_2);\n      }\n      *(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }" { (expression_statement "uVar1 = (uint)*(char *)((int)puVar4 + (byte)param_1 + 0x11d);" (assignment_expression "uVar1 = (uint)*(char *)((int)puVar4 + (byte)param_1 + 0x11d)" identifier = (binary_expression "(uint)*(char *)((int)puVar4 + (byte)param_1 + 0x11d)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(char *)((int)puVar4 + (byte)param_1 + 0x11d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + (byte)param_1 + 0x11d)" ( (binary_expression "(int)puVar4 + (byte)param_1 + 0x11d" (binary_expression "(int)puVar4 + (byte)param_1" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + (cast_expression "(byte)param_1" ( (type_descriptor "byte" type_identifier) ) identifier)) + number_literal) ))))) ;) (if_statement "if (uVar1 == 0) {\n      uVar1 = uVar2;\n      if (*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar4 + 0x20))();\n      }\n      if (CONCAT31(in_register_00000018,param_2) == uVar1) {\n        return CONCAT31(in_register_00000018,param_2);\n      }\n      *(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1;\n    }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = uVar2;\n      if (*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar4 + 0x20))();\n      }\n      if (CONCAT31(in_register_00000018,param_2) == uVar1) {\n        return CONCAT31(in_register_00000018,param_2);\n      }\n      *(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1;\n    }" { (expression_statement "uVar1 = uVar2;" (assignment_expression "uVar1 = uVar2" identifier = identifier) ;) (if_statement "if (*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar4 + 0x20))();\n      }" if (parenthesized_expression "(*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88)" ( (binary_expression "*(code **)(*puVar4 + 0x20) != (code *)PTR_do_narrow_004c2c88" (pointer_expression "*(code **)(*puVar4 + 0x20)" * (cast_expression "(code **)(*puVar4 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*puVar4 + 0x20)" ( (binary_expression "*puVar4 + 0x20" (pointer_expression "*puVar4" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_do_narrow_004c2c88" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n        uVar1 = (**(code **)(*puVar4 + 0x20))();\n      }" { (expression_statement "uVar1 = (**(code **)(*puVar4 + 0x20))();" (assignment_expression "uVar1 = (**(code **)(*puVar4 + 0x20))()" identifier = (call_expression "(**(code **)(*puVar4 + 0x20))()" (parenthesized_expression "(**(code **)(*puVar4 + 0x20))" ( (pointer_expression "**(code **)(*puVar4 + 0x20)" * (pointer_expression "*(code **)(*puVar4 + 0x20)" * (cast_expression "(code **)(*puVar4 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*puVar4 + 0x20)" ( (binary_expression "*puVar4 + 0x20" (pointer_expression "*puVar4" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) })) (if_statement "if (CONCAT31(in_register_00000018,param_2) == uVar1) {\n        return CONCAT31(in_register_00000018,param_2);\n      }" if (parenthesized_expression "(CONCAT31(in_register_00000018,param_2) == uVar1)" ( (binary_expression "CONCAT31(in_register_00000018,param_2) == uVar1" (call_expression "CONCAT31(in_register_00000018,param_2)" identifier (argument_list "(in_register_00000018,param_2)" ( identifier , identifier ))) == identifier) )) (compound_statement "{\n        return CONCAT31(in_register_00000018,param_2);\n      }" { (return_statement "return CONCAT31(in_register_00000018,param_2);" return (call_expression "CONCAT31(in_register_00000018,param_2)" identifier (argument_list "(in_register_00000018,param_2)" ( identifier , identifier ))) ;) })) (expression_statement "*(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1;" (assignment_expression "*(char *)((int)puVar4 + (byte)param_1 + 0x11d) = (char)uVar1" (pointer_expression "*(char *)((int)puVar4 + (byte)param_1 + 0x11d)" * (cast_expression "(char *)((int)puVar4 + (byte)param_1 + 0x11d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + (byte)param_1 + 0x11d)" ( (binary_expression "(int)puVar4 + (byte)param_1 + 0x11d" (binary_expression "(int)puVar4 + (byte)param_1" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + (cast_expression "(byte)param_1" ( (type_descriptor "byte" type_identifier) ) identifier)) + number_literal) )))) = (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier)) ;) })) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "puVar6 = PTR___throw_bad_cast_004c22bc;" (assignment_expression "puVar6 = PTR___throw_bad_cast_004c22bc" identifier = identifier) ;) (expression_statement "(*(code *)PTR___throw_bad_cast_004c22bc)();" (call_expression "(*(code *)PTR___throw_bad_cast_004c22bc)()" (parenthesized_expression "(*(code *)PTR___throw_bad_cast_004c22bc)" ( (pointer_expression "*(code *)PTR___throw_bad_cast_004c22bc" * (cast_expression "(code *)PTR___throw_bad_cast_004c22bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "piVar5 = (int *)puVar4[0x1f];" (assignment_expression "piVar5 = (int *)puVar4[0x1f]" identifier = (cast_expression "(int *)puVar4[0x1f]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar4[0x1f]" identifier [ number_literal ]))) ;) (expression_statement "pcVar7 = *(code **)(puVar6 + 0x15c3c4);" (assignment_expression "pcVar7 = *(code **)(puVar6 + 0x15c3c4)" identifier = (pointer_expression "*(code **)(puVar6 + 0x15c3c4)" * (cast_expression "(code **)(puVar6 + 0x15c3c4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar6 + 0x15c3c4)" ( (binary_expression "puVar6 + 0x15c3c4" identifier + number_literal) ))))) ;) (if_statement "if (piVar5 == (int *)0x0) {\n    (*pcVar7)();\n    (**(code **)(pcVar7 + 0x15c304))();\n    *(undefined2 *)(puVar4 + 0x1d) = 0;\n    puVar4[0x1c] = 0;\n    puVar4[0x1e] = 0;\n    iVar3 = *(int *)(pcVar7 + 0x15c308);\n    puVar4[0x1f] = 0;\n    puVar4[0x20] = 0;\n    puVar4[0x21] = 0;\n    *puVar4 = iVar3 + 8U;\n    return iVar3 + 8U;\n  }" if (parenthesized_expression "(piVar5 == (int *)0x0)" ( (binary_expression "piVar5 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*pcVar7)();\n    (**(code **)(pcVar7 + 0x15c304))();\n    *(undefined2 *)(puVar4 + 0x1d) = 0;\n    puVar4[0x1c] = 0;\n    puVar4[0x1e] = 0;\n    iVar3 = *(int *)(pcVar7 + 0x15c308);\n    puVar4[0x1f] = 0;\n    puVar4[0x20] = 0;\n    puVar4[0x21] = 0;\n    *puVar4 = iVar3 + 8U;\n    return iVar3 + 8U;\n  }" { (expression_statement "(*pcVar7)();" (call_expression "(*pcVar7)()" (parenthesized_expression "(*pcVar7)" ( (pointer_expression "*pcVar7" * identifier) )) (argument_list "()" ( ))) ;) (expression_statement "(**(code **)(pcVar7 + 0x15c304))();" (call_expression "(**(code **)(pcVar7 + 0x15c304))()" (parenthesized_expression "(**(code **)(pcVar7 + 0x15c304))" ( (pointer_expression "**(code **)(pcVar7 + 0x15c304)" * (pointer_expression "*(code **)(pcVar7 + 0x15c304)" * (cast_expression "(code **)(pcVar7 + 0x15c304)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(pcVar7 + 0x15c304)" ( (binary_expression "pcVar7 + 0x15c304" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (expression_statement "*(undefined2 *)(puVar4 + 0x1d) = 0;" (assignment_expression "*(undefined2 *)(puVar4 + 0x1d) = 0" (pointer_expression "*(undefined2 *)(puVar4 + 0x1d)" * (cast_expression "(undefined2 *)(puVar4 + 0x1d)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 0x1d)" ( (binary_expression "puVar4 + 0x1d" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar4[0x1c] = 0;" (assignment_expression "puVar4[0x1c] = 0" (subscript_expression "puVar4[0x1c]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[0x1e] = 0;" (assignment_expression "puVar4[0x1e] = 0" (subscript_expression "puVar4[0x1e]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar3 = *(int *)(pcVar7 + 0x15c308);" (assignment_expression "iVar3 = *(int *)(pcVar7 + 0x15c308)" identifier = (pointer_expression "*(int *)(pcVar7 + 0x15c308)" * (cast_expression "(int *)(pcVar7 + 0x15c308)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar7 + 0x15c308)" ( (binary_expression "pcVar7 + 0x15c308" identifier + number_literal) ))))) ;) (expression_statement "puVar4[0x1f] = 0;" (assignment_expression "puVar4[0x1f] = 0" (subscript_expression "puVar4[0x1f]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[0x20] = 0;" (assignment_expression "puVar4[0x20] = 0" (subscript_expression "puVar4[0x20]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[0x21] = 0;" (assignment_expression "puVar4[0x21] = 0" (subscript_expression "puVar4[0x21]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar4 = iVar3 + 8U;" (assignment_expression "*puVar4 = iVar3 + 8U" (pointer_expression "*puVar4" * identifier) = (binary_expression "iVar3 + 8U" identifier + number_literal)) ;) (return_statement "return iVar3 + 8U;" return (binary_expression "iVar3 + 8U" identifier + number_literal) ;) })) (if_statement "if (*(char *)(piVar5 + 7) != '\0') {\n    return (int)*(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d);\n  }" if (parenthesized_expression "(*(char *)(piVar5 + 7) != '\0')" ( (binary_expression "*(char *)(piVar5 + 7) != '\0'" (pointer_expression "*(char *)(piVar5 + 7)" * (cast_expression "(char *)(piVar5 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar5 + 7)" ( (binary_expression "piVar5 + 7" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return (int)*(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d);\n  }" { (return_statement "return (int)*(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d);" return (cast_expression "(int)*(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d)" * (cast_expression "(char *)((int)piVar5 + (uVar2 & 0xff) + 0x1d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar5 + (uVar2 & 0xff) + 0x1d)" ( (binary_expression "(int)piVar5 + (uVar2 & 0xff) + 0x1d" (binary_expression "(int)piVar5 + (uVar2 & 0xff)" (cast_expression "(int)piVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar2 & 0xff)" ( (binary_expression "uVar2 & 0xff" identifier & number_literal) ))) + number_literal) ))))) ;) })) (expression_statement "(**(code **)(puVar6 + 0x15c3c8))(piVar5);" (call_expression "(**(code **)(puVar6 + 0x15c3c8))(piVar5)" (parenthesized_expression "(**(code **)(puVar6 + 0x15c3c8))" ( (pointer_expression "**(code **)(puVar6 + 0x15c3c8)" * (pointer_expression "*(code **)(puVar6 + 0x15c3c8)" * (cast_expression "(code **)(puVar6 + 0x15c3c8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar6 + 0x15c3c8)" ( (binary_expression "puVar6 + 0x15c3c8" identifier + number_literal) ))))) )) (argument_list "(piVar5)" ( identifier ))) ;) (if_statement "if (*(code **)(*piVar5 + 0x18) == *(code **)(puVar6 + 0x15c3dc)) {\n    return uVar2;\n  }" if (parenthesized_expression "(*(code **)(*piVar5 + 0x18) == *(code **)(puVar6 + 0x15c3dc))" ( (binary_expression "*(code **)(*piVar5 + 0x18) == *(code **)(puVar6 + 0x15c3dc)" (pointer_expression "*(code **)(*piVar5 + 0x18)" * (cast_expression "(code **)(*piVar5 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar5 + 0x18)" ( (binary_expression "*piVar5 + 0x18" (pointer_expression "*piVar5" * identifier) + number_literal) )))) == (pointer_expression "*(code **)(puVar6 + 0x15c3dc)" * (cast_expression "(code **)(puVar6 + 0x15c3dc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar6 + 0x15c3dc)" ( (binary_expression "puVar6 + 0x15c3dc" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) comment comment (expression_statement "uVar2 = (**(code **)(*piVar5 + 0x18))(piVar5);" (assignment_expression "uVar2 = (**(code **)(*piVar5 + 0x18))(piVar5)" identifier = (call_expression "(**(code **)(*piVar5 + 0x18))(piVar5)" (parenthesized_expression "(**(code **)(*piVar5 + 0x18))" ( (pointer_expression "**(code **)(*piVar5 + 0x18)" * (pointer_expression "*(code **)(*piVar5 + 0x18)" * (cast_expression "(code **)(*piVar5 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar5 + 0x18)" ( (binary_expression "*piVar5 + 0x18" (pointer_expression "*piVar5" * identifier) + number_literal) ))))) )) (argument_list "(piVar5)" ( identifier )))) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "uint FUN_00365e54(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  int *piVar4;\n  undefined *puVar5;\n  code *pcVar6;\n  \n  puVar3 = *(uint **)(param_1 + 0x7c);\n  if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar5 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar4 = (int *)puVar3[0x1f];\n  pcVar6 = *(code **)(puVar5 + 0x15c3c4);\n  if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }\n  if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar5 + 0x15c3c8))(piVar4);\n  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);\n  return uVar1;\n}\n\n" (function_definition "uint FUN_00365e54(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  int *piVar4;\n  undefined *puVar5;\n  code *pcVar6;\n  \n  puVar3 = *(uint **)(param_1 + 0x7c);\n  if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar5 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar4 = (int *)puVar3[0x1f];\n  pcVar6 = *(code **)(puVar5 + 0x15c3c4);\n  if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }\n  if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar5 + 0x15c3c8))(piVar4);\n  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);\n  return uVar1;\n}" type_identifier (function_declarator "FUN_00365e54(int param_1,uint param_2,uint param_3)" identifier (parameter_list "(int param_1,uint param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  int *piVar4;\n  undefined *puVar5;\n  code *pcVar6;\n  \n  puVar3 = *(uint **)(param_1 + 0x7c);\n  if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar5 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar4 = (int *)puVar3[0x1f];\n  pcVar6 = *(code **)(puVar5 + 0x15c3c4);\n  if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }\n  if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar5 + 0x15c3c8))(piVar4);\n  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "code *pcVar6;" type_identifier (pointer_declarator "*pcVar6" * identifier) ;) (expression_statement "puVar3 = *(uint **)(param_1 + 0x7c);" (assignment_expression "puVar3 = *(uint **)(param_1 + 0x7c)" identifier = (pointer_expression "*(uint **)(param_1 + 0x7c)" * (cast_expression "(uint **)(param_1 + 0x7c)" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) ))))) ;) (if_statement "if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }" if (parenthesized_expression "(puVar3 != (uint *)0x0)" ( (binary_expression "puVar3 != (uint *)0x0" identifier != (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }" { (expression_statement "uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);" (assignment_expression "uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" identifier = (binary_expression "(uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar3 + (param_2 & 0xff) + 0x11d)" ( (binary_expression "(int)puVar3 + (param_2 & 0xff) + 0x11d" (binary_expression "(int)puVar3 + (param_2 & 0xff)" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(param_2 & 0xff)" ( (binary_expression "param_2 & 0xff" identifier & number_literal) ))) + number_literal) ))))) ;) (if_statement "if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }" { (expression_statement "uVar1 = param_2;" (assignment_expression "uVar1 = param_2" identifier = identifier) ;) (if_statement "if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }" if (parenthesized_expression "(*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88)" ( (binary_expression "*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88" (pointer_expression "*(code **)(*puVar3 + 0x20)" * (cast_expression "(code **)(*puVar3 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*puVar3 + 0x20)" ( (binary_expression "*puVar3 + 0x20" (pointer_expression "*puVar3" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_do_narrow_004c2c88" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }" { (expression_statement "uVar1 = (**(code **)(*puVar3 + 0x20))();" (assignment_expression "uVar1 = (**(code **)(*puVar3 + 0x20))()" identifier = (call_expression "(**(code **)(*puVar3 + 0x20))()" (parenthesized_expression "(**(code **)(*puVar3 + 0x20))" ( (pointer_expression "**(code **)(*puVar3 + 0x20)" * (pointer_expression "*(code **)(*puVar3 + 0x20)" * (cast_expression "(code **)(*puVar3 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*puVar3 + 0x20)" ( (binary_expression "*puVar3 + 0x20" (pointer_expression "*puVar3" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) })) (if_statement "if (param_3 == uVar1) {\n        return param_3;\n      }" if (parenthesized_expression "(param_3 == uVar1)" ( (binary_expression "param_3 == uVar1" identifier == identifier) )) (compound_statement "{\n        return param_3;\n      }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;" (assignment_expression "*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1" (pointer_expression "*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" * (cast_expression "(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar3 + (param_2 & 0xff) + 0x11d)" ( (binary_expression "(int)puVar3 + (param_2 & 0xff) + 0x11d" (binary_expression "(int)puVar3 + (param_2 & 0xff)" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(param_2 & 0xff)" ( (binary_expression "param_2 & 0xff" identifier & number_literal) ))) + number_literal) )))) = (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier)) ;) })) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "puVar5 = PTR___throw_bad_cast_004c22bc;" (assignment_expression "puVar5 = PTR___throw_bad_cast_004c22bc" identifier = identifier) ;) (expression_statement "(*(code *)PTR___throw_bad_cast_004c22bc)();" (call_expression "(*(code *)PTR___throw_bad_cast_004c22bc)()" (parenthesized_expression "(*(code *)PTR___throw_bad_cast_004c22bc)" ( (pointer_expression "*(code *)PTR___throw_bad_cast_004c22bc" * (cast_expression "(code *)PTR___throw_bad_cast_004c22bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "piVar4 = (int *)puVar3[0x1f];" (assignment_expression "piVar4 = (int *)puVar3[0x1f]" identifier = (cast_expression "(int *)puVar3[0x1f]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[0x1f]" identifier [ number_literal ]))) ;) (expression_statement "pcVar6 = *(code **)(puVar5 + 0x15c3c4);" (assignment_expression "pcVar6 = *(code **)(puVar5 + 0x15c3c4)" identifier = (pointer_expression "*(code **)(puVar5 + 0x15c3c4)" * (cast_expression "(code **)(puVar5 + 0x15c3c4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar5 + 0x15c3c4)" ( (binary_expression "puVar5 + 0x15c3c4" identifier + number_literal) ))))) ;) (if_statement "if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }" if (parenthesized_expression "(piVar4 == (int *)0x0)" ( (binary_expression "piVar4 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }" { (expression_statement "(*pcVar6)();" (call_expression "(*pcVar6)()" (parenthesized_expression "(*pcVar6)" ( (pointer_expression "*pcVar6" * identifier) )) (argument_list "()" ( ))) ;) (expression_statement "(**(code **)(pcVar6 + 0x15c304))();" (call_expression "(**(code **)(pcVar6 + 0x15c304))()" (parenthesized_expression "(**(code **)(pcVar6 + 0x15c304))" ( (pointer_expression "**(code **)(pcVar6 + 0x15c304)" * (pointer_expression "*(code **)(pcVar6 + 0x15c304)" * (cast_expression "(code **)(pcVar6 + 0x15c304)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(pcVar6 + 0x15c304)" ( (binary_expression "pcVar6 + 0x15c304" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (expression_statement "*(undefined2 *)(puVar3 + 0x1d) = 0;" (assignment_expression "*(undefined2 *)(puVar3 + 0x1d) = 0" (pointer_expression "*(undefined2 *)(puVar3 + 0x1d)" * (cast_expression "(undefined2 *)(puVar3 + 0x1d)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 0x1d)" ( (binary_expression "puVar3 + 0x1d" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar3[0x1c] = 0;" (assignment_expression "puVar3[0x1c] = 0" (subscript_expression "puVar3[0x1c]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0x1e] = 0;" (assignment_expression "puVar3[0x1e] = 0" (subscript_expression "puVar3[0x1e]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar2 = *(int *)(pcVar6 + 0x15c308);" (assignment_expression "iVar2 = *(int *)(pcVar6 + 0x15c308)" identifier = (pointer_expression "*(int *)(pcVar6 + 0x15c308)" * (cast_expression "(int *)(pcVar6 + 0x15c308)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar6 + 0x15c308)" ( (binary_expression "pcVar6 + 0x15c308" identifier + number_literal) ))))) ;) (expression_statement "puVar3[0x1f] = 0;" (assignment_expression "puVar3[0x1f] = 0" (subscript_expression "puVar3[0x1f]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0x20] = 0;" (assignment_expression "puVar3[0x20] = 0" (subscript_expression "puVar3[0x20]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0x21] = 0;" (assignment_expression "puVar3[0x21] = 0" (subscript_expression "puVar3[0x21]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar3 = iVar2 + 8U;" (assignment_expression "*puVar3 = iVar2 + 8U" (pointer_expression "*puVar3" * identifier) = (binary_expression "iVar2 + 8U" identifier + number_literal)) ;) (return_statement "return iVar2 + 8U;" return (binary_expression "iVar2 + 8U" identifier + number_literal) ;) })) (if_statement "if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }" if (parenthesized_expression "(*(char *)(piVar4 + 7) != '\0')" ( (binary_expression "*(char *)(piVar4 + 7) != '\0'" (pointer_expression "*(char *)(piVar4 + 7)" * (cast_expression "(char *)(piVar4 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 7)" ( (binary_expression "piVar4 + 7" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }" { (return_statement "return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);" return (cast_expression "(int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d)" * (cast_expression "(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar4 + (param_2 & 0xff) + 0x1d)" ( (binary_expression "(int)piVar4 + (param_2 & 0xff) + 0x1d" (binary_expression "(int)piVar4 + (param_2 & 0xff)" (cast_expression "(int)piVar4" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(param_2 & 0xff)" ( (binary_expression "param_2 & 0xff" identifier & number_literal) ))) + number_literal) ))))) ;) })) (expression_statement "(**(code **)(puVar5 + 0x15c3c8))(piVar4);" (call_expression "(**(code **)(puVar5 + 0x15c3c8))(piVar4)" (parenthesized_expression "(**(code **)(puVar5 + 0x15c3c8))" ( (pointer_expression "**(code **)(puVar5 + 0x15c3c8)" * (pointer_expression "*(code **)(puVar5 + 0x15c3c8)" * (cast_expression "(code **)(puVar5 + 0x15c3c8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar5 + 0x15c3c8)" ( (binary_expression "puVar5 + 0x15c3c8" identifier + number_literal) ))))) )) (argument_list "(piVar4)" ( identifier ))) ;) (if_statement "if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }" if (parenthesized_expression "(*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc))" ( (binary_expression "*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)" (pointer_expression "*(code **)(*piVar4 + 0x18)" * (cast_expression "(code **)(*piVar4 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 0x18)" ( (binary_expression "*piVar4 + 0x18" (pointer_expression "*piVar4" * identifier) + number_literal) )))) == (pointer_expression "*(code **)(puVar5 + 0x15c3dc)" * (cast_expression "(code **)(puVar5 + 0x15c3dc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar5 + 0x15c3dc)" ( (binary_expression "puVar5 + 0x15c3dc" identifier + number_literal) ))))) )) (compound_statement "{\n    return param_2;\n  }" { (return_statement "return param_2;" return identifier ;) })) (expression_statement "uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);" (assignment_expression "uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4)" identifier = (call_expression "(**(code **)(*piVar4 + 0x18))(piVar4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x18))" ( (pointer_expression "**(code **)(*piVar4 + 0x18)" * (pointer_expression "*(code **)(*piVar4 + 0x18)" * (cast_expression "(code **)(*piVar4 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 0x18)" ( (binary_expression "*piVar4 + 0x18" (pointer_expression "*piVar4" * identifier) + number_literal) ))))) )) (argument_list "(piVar4)" ( identifier )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT & LIT) ))) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT & LIT) ))) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (return_statement return (binary_expression IDENT + LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT & LIT) ))) + LIT) ))))) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT )))) ;) (return_statement return IDENT ;) })))
(function_definition "uint FUN_00365e54(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  int *piVar4;\n  undefined *puVar5;\n  code *pcVar6;\n  \n  puVar3 = *(uint **)(param_1 + 0x7c);\n  if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar5 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar4 = (int *)puVar3[0x1f];\n  pcVar6 = *(code **)(puVar5 + 0x15c3c4);\n  if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }\n  if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar5 + 0x15c3c8))(piVar4);\n  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);\n  return uVar1;\n}" (type_identifier "uint") (function_declarator "FUN_00365e54(int param_1,uint param_2,uint param_3)" (identifier "FUN_00365e54") (parameter_list "(int param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  int *piVar4;\n  undefined *puVar5;\n  code *pcVar6;\n  \n  puVar3 = *(uint **)(param_1 + 0x7c);\n  if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }\n  puVar5 = PTR___throw_bad_cast_004c22bc;\n  (*(code *)PTR___throw_bad_cast_004c22bc)();\n  piVar4 = (int *)puVar3[0x1f];\n  pcVar6 = *(code **)(puVar5 + 0x15c3c4);\n  if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }\n  if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }\n  (**(code **)(puVar5 + 0x15c3c8))(piVar4);\n  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);\n  return uVar1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint *puVar3;" (type_identifier "uint") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "undefined *puVar5;" (type_identifier "undefined") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "code *pcVar6;" (type_identifier "code") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (expression_statement "puVar3 = *(uint **)(param_1 + 0x7c);" (assignment_expression "puVar3 = *(uint **)(param_1 + 0x7c)" (identifier "puVar3") (= "=") (pointer_expression "*(uint **)(param_1 + 0x7c)" (* "*") (cast_expression "(uint **)(param_1 + 0x7c)" (( "(") (type_descriptor "uint **" (type_identifier "uint") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x7c)" (( "(") (binary_expression "param_1 + 0x7c" (identifier "param_1") (+ "+") (number_literal "0x7c")) () ")"))))) (; ";")) (if_statement "if (puVar3 != (uint *)0x0) {\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }" (if "if") (parenthesized_expression "(puVar3 != (uint *)0x0)" (( "(") (binary_expression "puVar3 != (uint *)0x0" (identifier "puVar3") (!= "!=") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);\n    if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }\n    return uVar1;\n  }" ({ "{") (expression_statement "uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);" (assignment_expression "uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" (identifier "uVar1") (= "=") (binary_expression "(uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar3 + (param_2 & 0xff) + 0x11d)" (( "(") (binary_expression "(int)puVar3 + (param_2 & 0xff) + 0x11d" (binary_expression "(int)puVar3 + (param_2 & 0xff)" (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3")) (+ "+") (parenthesized_expression "(param_2 & 0xff)" (( "(") (binary_expression "param_2 & 0xff" (identifier "param_2") (& "&") (number_literal "0xff")) () ")"))) (+ "+") (number_literal "0x11d")) () ")"))))) (; ";")) (if_statement "if (uVar1 == 0) {\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }" (if "if") (parenthesized_expression "(uVar1 == 0)" (( "(") (binary_expression "uVar1 == 0" (identifier "uVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar1 = param_2;\n      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }\n      if (param_3 == uVar1) {\n        return param_3;\n      }\n      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;\n    }" ({ "{") (expression_statement "uVar1 = param_2;" (assignment_expression "uVar1 = param_2" (identifier "uVar1") (= "=") (identifier "param_2")) (; ";")) (if_statement "if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }" (if "if") (parenthesized_expression "(*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88)" (( "(") (binary_expression "*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88" (pointer_expression "*(code **)(*puVar3 + 0x20)" (* "*") (cast_expression "(code **)(*puVar3 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*puVar3 + 0x20)" (( "(") (binary_expression "*puVar3 + 0x20" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (+ "+") (number_literal "0x20")) () ")")))) (!= "!=") (cast_expression "(code *)PTR_do_narrow_004c2c88" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_do_narrow_004c2c88"))) () ")")) (compound_statement "{\n        uVar1 = (**(code **)(*puVar3 + 0x20))();\n      }" ({ "{") (expression_statement "uVar1 = (**(code **)(*puVar3 + 0x20))();" (assignment_expression "uVar1 = (**(code **)(*puVar3 + 0x20))()" (identifier "uVar1") (= "=") (call_expression "(**(code **)(*puVar3 + 0x20))()" (parenthesized_expression "(**(code **)(*puVar3 + 0x20))" (( "(") (pointer_expression "**(code **)(*puVar3 + 0x20)" (* "*") (pointer_expression "*(code **)(*puVar3 + 0x20)" (* "*") (cast_expression "(code **)(*puVar3 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*puVar3 + 0x20)" (( "(") (binary_expression "*puVar3 + 0x20" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (+ "+") (number_literal "0x20")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (} "}"))) (if_statement "if (param_3 == uVar1) {\n        return param_3;\n      }" (if "if") (parenthesized_expression "(param_3 == uVar1)" (( "(") (binary_expression "param_3 == uVar1" (identifier "param_3") (== "==") (identifier "uVar1")) () ")")) (compound_statement "{\n        return param_3;\n      }" ({ "{") (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}"))) (expression_statement "*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;" (assignment_expression "*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1" (pointer_expression "*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" (* "*") (cast_expression "(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar3 + (param_2 & 0xff) + 0x11d)" (( "(") (binary_expression "(int)puVar3 + (param_2 & 0xff) + 0x11d" (binary_expression "(int)puVar3 + (param_2 & 0xff)" (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3")) (+ "+") (parenthesized_expression "(param_2 & 0xff)" (( "(") (binary_expression "param_2 & 0xff" (identifier "param_2") (& "&") (number_literal "0xff")) () ")"))) (+ "+") (number_literal "0x11d")) () ")")))) (= "=") (cast_expression "(char)uVar1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar1"))) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (expression_statement "puVar5 = PTR___throw_bad_cast_004c22bc;" (assignment_expression "puVar5 = PTR___throw_bad_cast_004c22bc" (identifier "puVar5") (= "=") (identifier "PTR___throw_bad_cast_004c22bc")) (; ";")) (expression_statement "(*(code *)PTR___throw_bad_cast_004c22bc)();" (call_expression "(*(code *)PTR___throw_bad_cast_004c22bc)()" (parenthesized_expression "(*(code *)PTR___throw_bad_cast_004c22bc)" (( "(") (pointer_expression "*(code *)PTR___throw_bad_cast_004c22bc" (* "*") (cast_expression "(code *)PTR___throw_bad_cast_004c22bc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___throw_bad_cast_004c22bc"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar4 = (int *)puVar3[0x1f];" (assignment_expression "piVar4 = (int *)puVar3[0x1f]" (identifier "piVar4") (= "=") (cast_expression "(int *)puVar3[0x1f]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar3[0x1f]" (identifier "puVar3") ([ "[") (number_literal "0x1f") (] "]")))) (; ";")) (expression_statement "pcVar6 = *(code **)(puVar5 + 0x15c3c4);" (assignment_expression "pcVar6 = *(code **)(puVar5 + 0x15c3c4)" (identifier "pcVar6") (= "=") (pointer_expression "*(code **)(puVar5 + 0x15c3c4)" (* "*") (cast_expression "(code **)(puVar5 + 0x15c3c4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar5 + 0x15c3c4)" (( "(") (binary_expression "puVar5 + 0x15c3c4" (identifier "puVar5") (+ "+") (number_literal "0x15c3c4")) () ")"))))) (; ";")) (if_statement "if (piVar4 == (int *)0x0) {\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }" (if "if") (parenthesized_expression "(piVar4 == (int *)0x0)" (( "(") (binary_expression "piVar4 == (int *)0x0" (identifier "piVar4") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    (*pcVar6)();\n    (**(code **)(pcVar6 + 0x15c304))();\n    *(undefined2 *)(puVar3 + 0x1d) = 0;\n    puVar3[0x1c] = 0;\n    puVar3[0x1e] = 0;\n    iVar2 = *(int *)(pcVar6 + 0x15c308);\n    puVar3[0x1f] = 0;\n    puVar3[0x20] = 0;\n    puVar3[0x21] = 0;\n    *puVar3 = iVar2 + 8U;\n    return iVar2 + 8U;\n  }" ({ "{") (expression_statement "(*pcVar6)();" (call_expression "(*pcVar6)()" (parenthesized_expression "(*pcVar6)" (( "(") (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "(**(code **)(pcVar6 + 0x15c304))();" (call_expression "(**(code **)(pcVar6 + 0x15c304))()" (parenthesized_expression "(**(code **)(pcVar6 + 0x15c304))" (( "(") (pointer_expression "**(code **)(pcVar6 + 0x15c304)" (* "*") (pointer_expression "*(code **)(pcVar6 + 0x15c304)" (* "*") (cast_expression "(code **)(pcVar6 + 0x15c304)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(pcVar6 + 0x15c304)" (( "(") (binary_expression "pcVar6 + 0x15c304" (identifier "pcVar6") (+ "+") (number_literal "0x15c304")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(undefined2 *)(puVar3 + 0x1d) = 0;" (assignment_expression "*(undefined2 *)(puVar3 + 0x1d) = 0" (pointer_expression "*(undefined2 *)(puVar3 + 0x1d)" (* "*") (cast_expression "(undefined2 *)(puVar3 + 0x1d)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 0x1d)" (( "(") (binary_expression "puVar3 + 0x1d" (identifier "puVar3") (+ "+") (number_literal "0x1d")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[0x1c] = 0;" (assignment_expression "puVar3[0x1c] = 0" (subscript_expression "puVar3[0x1c]" (identifier "puVar3") ([ "[") (number_literal "0x1c") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[0x1e] = 0;" (assignment_expression "puVar3[0x1e] = 0" (subscript_expression "puVar3[0x1e]" (identifier "puVar3") ([ "[") (number_literal "0x1e") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar2 = *(int *)(pcVar6 + 0x15c308);" (assignment_expression "iVar2 = *(int *)(pcVar6 + 0x15c308)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(pcVar6 + 0x15c308)" (* "*") (cast_expression "(int *)(pcVar6 + 0x15c308)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar6 + 0x15c308)" (( "(") (binary_expression "pcVar6 + 0x15c308" (identifier "pcVar6") (+ "+") (number_literal "0x15c308")) () ")"))))) (; ";")) (expression_statement "puVar3[0x1f] = 0;" (assignment_expression "puVar3[0x1f] = 0" (subscript_expression "puVar3[0x1f]" (identifier "puVar3") ([ "[") (number_literal "0x1f") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[0x20] = 0;" (assignment_expression "puVar3[0x20] = 0" (subscript_expression "puVar3[0x20]" (identifier "puVar3") ([ "[") (number_literal "0x20") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[0x21] = 0;" (assignment_expression "puVar3[0x21] = 0" (subscript_expression "puVar3[0x21]" (identifier "puVar3") ([ "[") (number_literal "0x21") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*puVar3 = iVar2 + 8U;" (assignment_expression "*puVar3 = iVar2 + 8U" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (binary_expression "iVar2 + 8U" (identifier "iVar2") (+ "+") (number_literal "8U"))) (; ";")) (return_statement "return iVar2 + 8U;" (return "return") (binary_expression "iVar2 + 8U" (identifier "iVar2") (+ "+") (number_literal "8U")) (; ";")) (} "}"))) (if_statement "if (*(char *)(piVar4 + 7) != '\0') {\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }" (if "if") (parenthesized_expression "(*(char *)(piVar4 + 7) != '\0')" (( "(") (binary_expression "*(char *)(piVar4 + 7) != '\0'" (pointer_expression "*(char *)(piVar4 + 7)" (* "*") (cast_expression "(char *)(piVar4 + 7)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4 + 7)" (( "(") (binary_expression "piVar4 + 7" (identifier "piVar4") (+ "+") (number_literal "7")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);\n  }" ({ "{") (return_statement "return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);" (return "return") (cast_expression "(int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d)" (* "*") (cast_expression "(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar4 + (param_2 & 0xff) + 0x1d)" (( "(") (binary_expression "(int)piVar4 + (param_2 & 0xff) + 0x1d" (binary_expression "(int)piVar4 + (param_2 & 0xff)" (cast_expression "(int)piVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar4")) (+ "+") (parenthesized_expression "(param_2 & 0xff)" (( "(") (binary_expression "param_2 & 0xff" (identifier "param_2") (& "&") (number_literal "0xff")) () ")"))) (+ "+") (number_literal "0x1d")) () ")"))))) (; ";")) (} "}"))) (expression_statement "(**(code **)(puVar5 + 0x15c3c8))(piVar4);" (call_expression "(**(code **)(puVar5 + 0x15c3c8))(piVar4)" (parenthesized_expression "(**(code **)(puVar5 + 0x15c3c8))" (( "(") (pointer_expression "**(code **)(puVar5 + 0x15c3c8)" (* "*") (pointer_expression "*(code **)(puVar5 + 0x15c3c8)" (* "*") (cast_expression "(code **)(puVar5 + 0x15c3c8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar5 + 0x15c3c8)" (( "(") (binary_expression "puVar5 + 0x15c3c8" (identifier "puVar5") (+ "+") (number_literal "0x15c3c8")) () ")"))))) () ")")) (argument_list "(piVar4)" (( "(") (identifier "piVar4") () ")"))) (; ";")) (if_statement "if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {\n    return param_2;\n  }" (if "if") (parenthesized_expression "(*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc))" (( "(") (binary_expression "*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)" (pointer_expression "*(code **)(*piVar4 + 0x18)" (* "*") (cast_expression "(code **)(*piVar4 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar4 + 0x18)" (( "(") (binary_expression "*piVar4 + 0x18" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "0x18")) () ")")))) (== "==") (pointer_expression "*(code **)(puVar5 + 0x15c3dc)" (* "*") (cast_expression "(code **)(puVar5 + 0x15c3dc)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar5 + 0x15c3dc)" (( "(") (binary_expression "puVar5 + 0x15c3dc" (identifier "puVar5") (+ "+") (number_literal "0x15c3dc")) () ")"))))) () ")")) (compound_statement "{\n    return param_2;\n  }" ({ "{") (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}"))) (expression_statement "uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);" (assignment_expression "uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4)" (identifier "uVar1") (= "=") (call_expression "(**(code **)(*piVar4 + 0x18))(piVar4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x18))" (( "(") (pointer_expression "**(code **)(*piVar4 + 0x18)" (* "*") (pointer_expression "*(code **)(*piVar4 + 0x18)" (* "*") (cast_expression "(code **)(*piVar4 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar4 + 0x18)" (( "(") (binary_expression "*piVar4 + 0x18" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "(piVar4)" (( "(") (identifier "piVar4") () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

/* std::ios::narrow(char, char) const */

type_1 __thiscall std::type_2::function_1(type_2 *var_2,char param_1,char param_2)

{
  type_1 var_4;
  type_1 var_9;
  int var_8;
  type_1 *var_3;
  type_3 in_register_00000014;
  type_3 in_register_00000018;
  int *var_6;
  type_4 *var_5;
  type_5 *var_7;
  
  var_9 = var_1(in_register_00000014,param_1);
  var_3 = *(type_1 **)(var_2 + 0x7c);
  if (var_3 != (type_1 *)0x0) {
    var_4 = (type_1)*(char *)((int)var_3 + (type_6)param_1 + 0x11d);
    if (var_4 == 0) {
      var_4 = var_9;
      if (*(type_5 **)(*var_3 + 0x20) != (type_5 *)PTR_do_narrow_004c2c88) {
        var_4 = (**(type_5 **)(*var_3 + 0x20))();
      }
      if (var_1(in_register_00000018,param_2) == var_4) {
        return var_1(in_register_00000018,param_2);
      }
      *(char *)((int)var_3 + (type_6)param_1 + 0x11d) = (char)var_4;
    }
    return var_4;
  }
  var_5 = PTR___throw_bad_cast_004c22bc;
  (*(type_5 *)PTR___throw_bad_cast_004c22bc)();
  var_6 = (int *)var_3[0x1f];
  var_7 = *(type_5 **)(var_5 + 0x15c3c4);
  if (var_6 == (int *)0x0) {
    (*var_7)();
    (**(type_5 **)(var_7 + 0x15c304))();
    *(type_7 *)(var_3 + 0x1d) = 0;
    var_3[0x1c] = 0;
    var_3[0x1e] = 0;
    var_8 = *(int *)(var_7 + 0x15c308);
    var_3[0x1f] = 0;
    var_3[0x20] = 0;
    var_3[0x21] = 0;
    *var_3 = var_8 + 8U;
    return var_8 + 8U;
  }
  if (*(char *)(var_6 + 7) != '\0') {
    return (int)*(char *)((int)var_6 + (var_9 & 0xff) + 0x1d);
  }
  (**(type_5 **)(var_5 + 0x15c3c8))(var_6);
  if (*(type_5 **)(*var_6 + 0x18) == *(type_5 **)(var_5 + 0x15c3dc)) {
    return var_9;
  }
                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  var_9 = (**(type_5 **)(*var_6 + 0x18))(var_6);
  return var_9;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) arguments: (argument_list)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) (return_statement (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) arguments: (argument_list (identifier))))) (return_statement (identifier)))))

uint MASKED(int param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  uint *puVar3;
  int *piVar4;
  undefined *puVar5;
  code *pcVar6;
  
  puVar3 = *(uint **)(param_1 + 0x7c);
  if (puVar3 != (uint *)0x0) {
    uVar1 = (uint)*(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d);
    if (uVar1 == 0) {
      uVar1 = param_2;
      if (*(code **)(*puVar3 + 0x20) != (code *)PTR_do_narrow_004c2c88) {
        uVar1 = (**(code **)(*puVar3 + 0x20))();
      }
      if (param_3 == uVar1) {
        return param_3;
      }
      *(char *)((int)puVar3 + (param_2 & 0xff) + 0x11d) = (char)uVar1;
    }
    return uVar1;
  }
  puVar5 = PTR___throw_bad_cast_004c22bc;
  (*(code *)PTR___throw_bad_cast_004c22bc)();
  piVar4 = (int *)puVar3[0x1f];
  pcVar6 = *(code **)(puVar5 + 0x15c3c4);
  if (piVar4 == (int *)0x0) {
    (*pcVar6)();
    (**(code **)(pcVar6 + 0x15c304))();
    *(undefined2 *)(puVar3 + 0x1d) = 0;
    puVar3[0x1c] = 0;
    puVar3[0x1e] = 0;
    iVar2 = *(int *)(pcVar6 + 0x15c308);
    puVar3[0x1f] = 0;
    puVar3[0x20] = 0;
    puVar3[0x21] = 0;
    *puVar3 = iVar2 + 8U;
    return iVar2 + 8U;
  }
  if (*(char *)(piVar4 + 7) != '\0') {
    return (int)*(char *)((int)piVar4 + (param_2 & 0xff) + 0x1d);
  }
  (**(code **)(puVar5 + 0x15c3c8))(piVar4);
  if (*(code **)(*piVar4 + 0x18) == *(code **)(puVar5 + 0x15c3dc)) {
    return param_2;
  }
                    /* WARNING: Could not recover jumptable at 0x00365f8c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar1 = (**(code **)(*piVar4 + 0x18))(piVar4);
  return uVar1;
}

