
/* WARNING: Restarted to delay deadcode elimination for space: register */
/* std::collate<char>::do_transform(char const*, char const*) const */

char * std::collate<char>::do_transform(char *param_1,char *param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  char *pcVar4;
  uint uVar5;
  size_t sVar6;
  char *__s;
  int unaff_EDI;
  int in_stack_0000000c;
  int in_stack_00000010;
  char *local_34;
  uint local_30;
  
  __x86_get_pc_thunk_di();
  *(int *)param_1 = unaff_EDI + 0x1a5a43;
                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */
  pcVar4 = std::string::_S_construct<char_const*>();
  iVar1 = *(int *)(pcVar4 + -0xc);
  local_30 = (in_stack_00000010 - in_stack_0000000c) * 2;
                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */
  local_34 = (char *)operator_new__(local_30);
  __s = pcVar4;
  do {
    uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);
    if (local_30 <= uVar5) {
      local_30 = uVar5 + 1;
      operator_delete__(local_34);
                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */
      local_34 = (char *)operator_new__(local_30);
      uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);
    }
                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */
    std::string::append((string *)param_1,local_34,uVar5);
    sVar6 = strlen(__s);
    if (pcVar4 + iVar1 == __s + sVar6) {
      operator_delete__(local_34);
      if ((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)) {
        return param_1;
      }
      std::string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));
      return param_1;
    }
    __s = __s + sVar6 + 1;
    iVar2 = *(int *)param_1;
    iVar3 = *(int *)(iVar2 + -0xc);
    uVar5 = iVar3 + 1;
    if (*(uint *)(iVar2 + -8) < uVar5) {
LAB_00211588:
                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */
      std::string::reserve((string *)param_1,uVar5);
    }
    else if (0 < *(int *)(iVar2 + -4)) goto LAB_00211588;
    *(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)) = 0;
    iVar2 = *(int *)param_1;
    if ((allocator *)(iVar2 + -0xc) != (allocator *)(unaff_EDI + 0x1a5a37)) {
      *(undefined4 *)(iVar2 + -4) = 0;
      *(uint *)(iVar2 + -0xc) = uVar5;
      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;
    }
  } while( true );
}



int * FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)

{
  int iVar1;
  int iVar2;
  int iVar3;
  char *pcVar4;
  uint uVar5;
  size_t sVar6;
  char *__s;
  int unaff_EDI;
  undefined4 local_34;
  uint local_30;
  undefined1 local_1d [13];
  
  FUN_000644be();
  *param_1 = unaff_EDI + 0x1a5a43;
                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */
  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);
  iVar1 = *(int *)(pcVar4 + -0xc);
  local_30 = (param_4 - param_3) * 2;
                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */
  local_34 = FUN_001fd400(local_30);
  __s = pcVar4;
  while( true ) {
    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);
    if (local_30 <= uVar5) {
      local_30 = uVar5 + 1;
      FUN_001fefd0(local_34);
                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */
      local_34 = FUN_001fd400(local_30);
      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);
    }
                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */
    FUN_00237fd0(param_1,local_34,uVar5);
    sVar6 = strlen(__s);
    if (pcVar4 + iVar1 == __s + sVar6) break;
    __s = __s + sVar6 + 1;
    iVar2 = *param_1;
    iVar3 = *(int *)(iVar2 + -0xc);
    uVar5 = iVar3 + 1;
    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {
                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */
      FUN_00237ce0(param_1,uVar5);
    }
    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;
    iVar2 = *param_1;
    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {
      *(undefined4 *)(iVar2 + -4) = 0;
      *(uint *)(iVar2 + -0xc) = uVar5;
      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;
    }
  }
  FUN_001fefd0(local_34);
  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {
    return param_1;
  }
  FUN_002112b0();
  return param_1;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
CALL 0x000644be
ADD EDI,0x19daf7
PUSH ESI
PUSH EBX
SUB ESP,0x3c
MOV EBX,dword ptr [EBP + 0x8]
MOV ESI,dword ptr [EBP + 0x14]
LEA EAX,[EDI + 0x7f40]
MOV dword ptr [EBP + -0x38],EAX
ADD EAX,0xc
MOV dword ptr [EBX],EAX
LEA EAX,[EBP + -0x19]
MOV EBX,EDI
PUSH 0x0
PUSH EAX
PUSH ESI
PUSH dword ptr [EBP + 0x10]
MOV dword ptr [EBP + -0x48],EAX
CALL 0x00238a60
MOV EBX,dword ptr [EAX + -0xc]
SUB ESI,dword ptr [EBP + 0x10]
MOV dword ptr [EBP + -0x44],EAX
ADD EBX,EAX
LEA EAX,[ESI + ESI*0x1]
MOV dword ptr [EBP + -0x3c],EBX
MOV EBX,EDI
MOV dword ptr [EBP + -0x2c],EAX
MOV dword ptr [ESP],EAX
CALL 0x001fd400
MOV dword ptr [EBP + -0x30],EAX
ADD ESP,0x10
MOV ESI,dword ptr [EBP + -0x44]
JMP 0x002115b8
LEA ESI,[EAX + 0x1]
MOV EAX,dword ptr [EBP + 0x8]
MOV EAX,dword ptr [EAX]
MOV ECX,dword ptr [EAX + -0xc]
LEA EDX,[ECX + 0x1]
MOV dword ptr [EBP + -0x40],ECX
MOV dword ptr [EBP + -0x34],EDX
CMP EDX,dword ptr [EAX + -0x8]
JA 0x00211588
MOV EAX,dword ptr [EAX + -0x4]
TEST EAX,EAX
JLE 0x0021159b
SUB ESP,0x8
PUSH dword ptr [EBP + -0x34]
MOV EBX,EDI
PUSH dword ptr [EBP + 0x8]
CALL 0x00237ce0
ADD ESP,0x10
MOV EAX,dword ptr [EBP + 0x8]
MOV EAX,dword ptr [EAX]
MOV EDX,dword ptr [EAX + -0xc]
MOV byte ptr [EAX + EDX*0x1],0x0
MOV EAX,dword ptr [EBP + 0x8]
MOV EAX,dword ptr [EAX]
LEA EDX,[EAX + -0xc]
CMP EDX,dword ptr [EBP + -0x38]
JNZ 0x00211650
PUSH dword ptr [EBP + -0x2c]
MOV EBX,EDI
PUSH ESI
PUSH dword ptr [EBP + -0x30]
PUSH dword ptr [EBP + 0xc]
CALL 0x0024d7a0
ADD ESP,0x10
CMP dword ptr [EBP + -0x2c],EAX
JA 0x00211601
SUB ESP,0xc
PUSH dword ptr [EBP + -0x30]
ADD EAX,0x1
MOV dword ptr [EBP + -0x2c],EAX
CALL 0x001fefd0
POP EDX
PUSH dword ptr [EBP + -0x2c]
CALL 0x001fd400
ADD ESP,0x10
PUSH dword ptr [EBP + -0x2c]
PUSH ESI
PUSH EAX
PUSH dword ptr [EBP + 0xc]
MOV dword ptr [EBP + -0x30],EAX
CALL 0x0024d7a0
ADD ESP,0x10
SUB ESP,0x4
MOV EBX,EDI
PUSH EAX
PUSH dword ptr [EBP + -0x30]
PUSH dword ptr [EBP + 0x8]
CALL 0x00237fd0
MOV dword ptr [ESP],ESI
CALL 0x0002a5f0
ADD ESP,0x10
ADD EAX,ESI
CMP dword ptr [EBP + -0x3c],EAX
JNZ 0x00211568
SUB ESP,0xc
PUSH dword ptr [EBP + -0x30]
CALL 0x001fefd0
MOV EAX,dword ptr [EBP + -0x44]
ADD ESP,0x10
SUB EAX,0xc
CMP EAX,dword ptr [EBP + -0x38]
JNZ 0x00211670
MOV EAX,dword ptr [EBP + 0x8]
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET 0x4
MOV ECX,dword ptr [EBP + -0x34]
MOV dword ptr [EAX + -0x4],0x0
MOV dword ptr [EAX + -0xc],ECX
MOV EAX,dword ptr [EBP + -0x40]
MOV byte ptr [EDX + EAX*0x1 + 0xd],0x0
JMP 0x002115b8
MOV EDX,dword ptr [EBP + -0x48]
CALL 0x002112b0
MOV EAX,dword ptr [EBP + 0x8]
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET 0x4
(translation_unit "int * FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  undefined4 local_34;\n  uint local_30;\n  undefined1 local_1d [13];\n  \n  FUN_000644be();\n  *param_1 = unaff_EDI + 0x1a5a43;\n                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */\n  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (param_4 - param_3) * 2;\n                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */\n  local_34 = FUN_001fd400(local_30);\n  __s = pcVar4;\n  while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }\n  FUN_001fefd0(local_34);\n  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }\n  FUN_002112b0();\n  return param_1;\n}\n\n" (function_definition "int * FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  undefined4 local_34;\n  uint local_30;\n  undefined1 local_1d [13];\n  \n  FUN_000644be();\n  *param_1 = unaff_EDI + 0x1a5a43;\n                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */\n  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (param_4 - param_3) * 2;\n                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */\n  local_34 = FUN_001fd400(local_30);\n  __s = pcVar4;\n  while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }\n  FUN_001fefd0(local_34);\n  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }\n  FUN_002112b0();\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)" * (function_declarator "FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  undefined4 local_34;\n  uint local_30;\n  undefined1 local_1d [13];\n  \n  FUN_000644be();\n  *param_1 = unaff_EDI + 0x1a5a43;\n                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */\n  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (param_4 - param_3) * 2;\n                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */\n  local_34 = FUN_001fd400(local_30);\n  __s = pcVar4;\n  while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }\n  FUN_001fefd0(local_34);\n  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }\n  FUN_002112b0();\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "uint local_30;" type_identifier identifier ;) (declaration "undefined1 local_1d [13];" type_identifier (array_declarator "local_1d [13]" identifier [ number_literal ]) ;) (expression_statement "FUN_000644be();" (call_expression "FUN_000644be()" identifier (argument_list "()" ( ))) ;) (expression_statement "*param_1 = unaff_EDI + 0x1a5a43;" (assignment_expression "*param_1 = unaff_EDI + 0x1a5a43" (pointer_expression "*param_1" * identifier) = (binary_expression "unaff_EDI + 0x1a5a43" identifier + number_literal)) ;) comment (expression_statement "pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);" (assignment_expression "pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d)" identifier = (cast_expression "(char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00238a60(param_3,param_4,local_1d,0,local_1d)" identifier (argument_list "(param_3,param_4,local_1d,0,local_1d)" ( identifier , identifier , identifier , number_literal , identifier ))))) ;) (expression_statement "iVar1 = *(int *)(pcVar4 + -0xc);" (assignment_expression "iVar1 = *(int *)(pcVar4 + -0xc)" identifier = (pointer_expression "*(int *)(pcVar4 + -0xc)" * (cast_expression "(int *)(pcVar4 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar4 + -0xc)" ( (binary_expression "pcVar4 + -0xc" identifier + number_literal) ))))) ;) (expression_statement "local_30 = (param_4 - param_3) * 2;" (assignment_expression "local_30 = (param_4 - param_3) * 2" identifier = (binary_expression "(param_4 - param_3) * 2" (parenthesized_expression "(param_4 - param_3)" ( (binary_expression "param_4 - param_3" identifier - identifier) )) * number_literal)) ;) comment (expression_statement "local_34 = FUN_001fd400(local_30);" (assignment_expression "local_34 = FUN_001fd400(local_30)" identifier = (call_expression "FUN_001fd400(local_30)" identifier (argument_list "(local_30)" ( identifier )))) ;) (expression_statement "__s = pcVar4;" (assignment_expression "__s = pcVar4" identifier = identifier) ;) (while_statement "while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }" { (expression_statement "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);" (assignment_expression "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30)" identifier = (call_expression "FUN_0024d7a0(param_2,local_34,__s,local_30)" identifier (argument_list "(param_2,local_34,__s,local_30)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }" if (parenthesized_expression "(local_30 <= uVar5)" ( (binary_expression "local_30 <= uVar5" identifier <= identifier) )) (compound_statement "{\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }" { (expression_statement "local_30 = uVar5 + 1;" (assignment_expression "local_30 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "FUN_001fefd0(local_34);" (call_expression "FUN_001fefd0(local_34)" identifier (argument_list "(local_34)" ( identifier ))) ;) comment (expression_statement "local_34 = FUN_001fd400(local_30);" (assignment_expression "local_34 = FUN_001fd400(local_30)" identifier = (call_expression "FUN_001fd400(local_30)" identifier (argument_list "(local_30)" ( identifier )))) ;) (expression_statement "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);" (assignment_expression "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30)" identifier = (call_expression "FUN_0024d7a0(param_2,local_34,__s,local_30)" identifier (argument_list "(param_2,local_34,__s,local_30)" ( identifier , identifier , identifier , identifier )))) ;) })) comment (expression_statement "FUN_00237fd0(param_1,local_34,uVar5);" (call_expression "FUN_00237fd0(param_1,local_34,uVar5)" identifier (argument_list "(param_1,local_34,uVar5)" ( identifier , identifier , identifier ))) ;) (expression_statement "sVar6 = strlen(__s);" (assignment_expression "sVar6 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (pcVar4 + iVar1 == __s + sVar6) break;" if (parenthesized_expression "(pcVar4 + iVar1 == __s + sVar6)" ( (binary_expression "pcVar4 + iVar1 == __s + sVar6" (binary_expression "pcVar4 + iVar1" identifier + identifier) == (binary_expression "__s + sVar6" identifier + identifier)) )) (break_statement "break;" break ;)) (expression_statement "__s = __s + sVar6 + 1;" (assignment_expression "__s = __s + sVar6 + 1" identifier = (binary_expression "__s + sVar6 + 1" (binary_expression "__s + sVar6" identifier + identifier) + number_literal)) ;) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar3 = *(int *)(iVar2 + -0xc);" (assignment_expression "iVar3 = *(int *)(iVar2 + -0xc)" identifier = (pointer_expression "*(int *)(iVar2 + -0xc)" * (cast_expression "(int *)(iVar2 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = iVar3 + 1;" (assignment_expression "uVar5 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      FUN_00237ce0(param_1,uVar5);\n    }" if (parenthesized_expression "((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4)))" ( (binary_expression "(*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))" (parenthesized_expression "(*(uint *)(iVar2 + -8) < uVar5)" ( (binary_expression "*(uint *)(iVar2 + -8) < uVar5" (pointer_expression "*(uint *)(iVar2 + -8)" * (cast_expression "(uint *)(iVar2 + -8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -8)" ( (binary_expression "iVar2 + -8" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(0 < *(int *)(iVar2 + -4))" ( (binary_expression "0 < *(int *)(iVar2 + -4)" number_literal < (pointer_expression "*(int *)(iVar2 + -4)" * (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) ))))) ))) )) (compound_statement "{\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      FUN_00237ce0(param_1,uVar5);\n    }" { comment (expression_statement "FUN_00237ce0(param_1,uVar5);" (call_expression "FUN_00237ce0(param_1,uVar5)" identifier (argument_list "(param_1,uVar5)" ( identifier , identifier ))) ;) })) (expression_statement "*(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;" (assignment_expression "*(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0" (pointer_expression "*(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc))" * (cast_expression "(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + *(int *)(*param_1 + -0xc))" ( (binary_expression "*param_1 + *(int *)(*param_1 + -0xc)" (pointer_expression "*param_1" * identifier) + (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )))) = number_literal) ;) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }" if (parenthesized_expression "((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37))" ( (binary_expression "(char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)" (cast_expression "(char *)(iVar2 + -0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) != (cast_expression "(char *)(unaff_EDI + 0x1a5a37)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x1a5a37)" ( (binary_expression "unaff_EDI + 0x1a5a37" identifier + number_literal) )))) )) (compound_statement "{\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }" { (expression_statement "*(undefined4 *)(iVar2 + -4) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0" (pointer_expression "*(undefined4 *)(iVar2 + -4)" * (cast_expression "(undefined4 *)(iVar2 + -4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)(iVar2 + -0xc) = uVar5;" (assignment_expression "*(uint *)(iVar2 + -0xc) = uVar5" (pointer_expression "*(uint *)(iVar2 + -0xc)" * (cast_expression "(uint *)(iVar2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(iVar2 + 1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + 1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + 1 + iVar3)" * (cast_expression "(undefined1 *)(iVar2 + 1 + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 1 + iVar3)" ( (binary_expression "iVar2 + 1 + iVar3" (binary_expression "iVar2 + 1" identifier + number_literal) + identifier) )))) = number_literal) ;) })) })) (expression_statement "FUN_001fefd0(local_34);" (call_expression "FUN_001fefd0(local_34)" identifier (argument_list "(local_34)" ( identifier ))) ;) (if_statement "if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }" if (parenthesized_expression "(pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37))" ( (binary_expression "pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)" (binary_expression "pcVar4 + -0xc" identifier + number_literal) == (cast_expression "(char *)(unaff_EDI + 0x1a5a37)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x1a5a37)" ( (binary_expression "unaff_EDI + 0x1a5a37" identifier + number_literal) )))) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "FUN_002112b0();" (call_expression "FUN_002112b0()" identifier (argument_list "()" ( ))) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Restarted to delay deadcode elimination for space: register */\n/* std::collate<char>::do_transform(char const*, char const*) const */\n\nchar * std::collate<char>::do_transform(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  int in_stack_0000000c;\n  int in_stack_00000010;\n  char *local_34;\n  uint local_30;\n  \n  __x86_get_pc_thunk_di();\n  *(int *)param_1 = unaff_EDI + 0x1a5a43;\n                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */\n  pcVar4 = std::string::_S_construct<char_const*>();\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (in_stack_00000010 - in_stack_0000000c) * 2;\n                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */\n  local_34 = (char *)operator_new__(local_30);\n  __s = pcVar4;\n  do {\n    uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      operator_delete__(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = (char *)operator_new__(local_30);\n      uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    std::string::append((string *)param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) {\n      operator_delete__(local_34);\n      if ((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)) {\n        return param_1;\n      }\n      std::string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));\n      return param_1;\n    }\n    __s = __s + sVar6 + 1;\n    iVar2 = *(int *)param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if (*(uint *)(iVar2 + -8) < uVar5) {\nLAB_00211588:\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      std::string::reserve((string *)param_1,uVar5);\n    }\n    else if (0 < *(int *)(iVar2 + -4)) goto LAB_00211588;\n    *(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)) = 0;\n    iVar2 = *(int *)param_1;\n    if ((allocator *)(iVar2 + -0xc) != (allocator *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  } while( true );\n}\n\n" comment comment (function_definition "char * std::collate<char>::do_transform(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  int in_stack_0000000c;\n  int in_stack_00000010;\n  char *local_34;\n  uint local_30;\n  \n  __x86_get_pc_thunk_di();\n  *(int *)param_1 = unaff_EDI + 0x1a5a43;\n                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */\n  pcVar4 = std::string::_S_construct<char_const*>();\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (in_stack_00000010 - in_stack_0000000c) * 2;\n                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */\n  local_34 = (char *)operator_new__(local_30);\n  __s = pcVar4;\n  do {\n    uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      operator_delete__(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = (char *)operator_new__(local_30);\n      uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    std::string::append((string *)param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) {\n      operator_delete__(local_34);\n      if ((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)) {\n        return param_1;\n      }\n      std::string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));\n      return param_1;\n    }\n    __s = __s + sVar6 + 1;\n    iVar2 = *(int *)param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if (*(uint *)(iVar2 + -8) < uVar5) {\nLAB_00211588:\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      std::string::reserve((string *)param_1,uVar5);\n    }\n    else if (0 < *(int *)(iVar2 + -4)) goto LAB_00211588;\n    *(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)) = 0;\n    iVar2 = *(int *)param_1;\n    if ((allocator *)(iVar2 + -0xc) != (allocator *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  } while( true );\n}" primitive_type (pointer_declarator "* std::collate<char>::do_transform(char *param_1,char *param_2)" * (ERROR "std::collate<char>::" identifier : : identifier < primitive_type > : :) (function_declarator "do_transform(char *param_1,char *param_2)" identifier (parameter_list "(char *param_1,char *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  int in_stack_0000000c;\n  int in_stack_00000010;\n  char *local_34;\n  uint local_30;\n  \n  __x86_get_pc_thunk_di();\n  *(int *)param_1 = unaff_EDI + 0x1a5a43;\n                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */\n  pcVar4 = std::string::_S_construct<char_const*>();\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (in_stack_00000010 - in_stack_0000000c) * 2;\n                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */\n  local_34 = (char *)operator_new__(local_30);\n  __s = pcVar4;\n  do {\n    uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      operator_delete__(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = (char *)operator_new__(local_30);\n      uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    std::string::append((string *)param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) {\n      operator_delete__(local_34);\n      if ((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)) {\n        return param_1;\n      }\n      std::string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));\n      return param_1;\n    }\n    __s = __s + sVar6 + 1;\n    iVar2 = *(int *)param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if (*(uint *)(iVar2 + -8) < uVar5) {\nLAB_00211588:\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      std::string::reserve((string *)param_1,uVar5);\n    }\n    else if (0 < *(int *)(iVar2 + -4)) goto LAB_00211588;\n    *(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)) = 0;\n    iVar2 = *(int *)param_1;\n    if ((allocator *)(iVar2 + -0xc) != (allocator *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "int in_stack_0000000c;" primitive_type identifier ;) (declaration "int in_stack_00000010;" primitive_type identifier ;) (declaration "char *local_34;" primitive_type (pointer_declarator "*local_34" * identifier) ;) (declaration "uint local_30;" type_identifier identifier ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)param_1 = unaff_EDI + 0x1a5a43;" (assignment_expression "*(int *)param_1 = unaff_EDI + 0x1a5a43" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "unaff_EDI + 0x1a5a43" identifier + number_literal)) ;) comment (ERROR "pcVar4 = std::" (assignment_expression "pcVar4 = std" identifier = identifier) : :) (labeled_statement "string::_S_construct<char_const*>();" statement_identifier : (ERROR ":" :) (expression_statement "_S_construct<char_const*>();" (binary_expression "_S_construct<char_const" identifier < identifier) (ERROR "*>()" * > ( )) ;)) (expression_statement "iVar1 = *(int *)(pcVar4 + -0xc);" (assignment_expression "iVar1 = *(int *)(pcVar4 + -0xc)" identifier = (pointer_expression "*(int *)(pcVar4 + -0xc)" * (cast_expression "(int *)(pcVar4 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar4 + -0xc)" ( (binary_expression "pcVar4 + -0xc" identifier + number_literal) ))))) ;) (expression_statement "local_30 = (in_stack_00000010 - in_stack_0000000c) * 2;" (assignment_expression "local_30 = (in_stack_00000010 - in_stack_0000000c) * 2" identifier = (binary_expression "(in_stack_00000010 - in_stack_0000000c) * 2" (parenthesized_expression "(in_stack_00000010 - in_stack_0000000c)" ( (binary_expression "in_stack_00000010 - in_stack_0000000c" identifier - identifier) )) * number_literal)) ;) comment (expression_statement "local_34 = (char *)operator_new__(local_30);" (assignment_expression "local_34 = (char *)operator_new__(local_30)" identifier = (cast_expression "(char *)operator_new__(local_30)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "operator_new__(local_30)" identifier (argument_list "(local_30)" ( identifier ))))) ;) (expression_statement "__s = pcVar4;" (assignment_expression "__s = pcVar4" identifier = identifier) ;) (do_statement "do {\n    uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      operator_delete__(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = (char *)operator_new__(local_30);\n      uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    std::string::append((string *)param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) {\n      operator_delete__(local_34);\n      if ((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)) {\n        return param_1;\n      }\n      std::string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));\n      return param_1;\n    }\n    __s = __s + sVar6 + 1;\n    iVar2 = *(int *)param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if (*(uint *)(iVar2 + -8) < uVar5) {\nLAB_00211588:\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      std::string::reserve((string *)param_1,uVar5);\n    }\n    else if (0 < *(int *)(iVar2 + -4)) goto LAB_00211588;\n    *(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)) = 0;\n    iVar2 = *(int *)param_1;\n    if ((allocator *)(iVar2 + -0xc) != (allocator *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  } while( true );" do (compound_statement "{\n    uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      operator_delete__(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = (char *)operator_new__(local_30);\n      uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    }\n                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */\n    std::string::append((string *)param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) {\n      operator_delete__(local_34);\n      if ((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)) {\n        return param_1;\n      }\n      std::string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));\n      return param_1;\n    }\n    __s = __s + sVar6 + 1;\n    iVar2 = *(int *)param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if (*(uint *)(iVar2 + -8) < uVar5) {\nLAB_00211588:\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      std::string::reserve((string *)param_1,uVar5);\n    }\n    else if (0 < *(int *)(iVar2 + -4)) goto LAB_00211588;\n    *(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)) = 0;\n    iVar2 = *(int *)param_1;\n    if ((allocator *)(iVar2 + -0xc) != (allocator *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }" { (expression_statement "uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);" (assignment_expression "uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30)" identifier = (call_expression "_M_transform((collate<char> *)param_2,local_34,__s,local_30)" identifier (argument_list "((collate<char> *)param_2,local_34,__s,local_30)" ( (parenthesized_expression "(collate<char> *)param_2,local_34,__s,local_30)" ( (comma_expression "collate<char> *)param_2,local_34,__s,local_30" (binary_expression "collate<char> *)param_2" (binary_expression "collate<char" identifier < identifier) > (pointer_expression "*)param_2" * (ERROR ")" )) identifier)) , (comma_expression "local_34,__s,local_30" identifier , (comma_expression "__s,local_30" identifier , identifier))) )) )))) ;) (if_statement "if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      operator_delete__(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = (char *)operator_new__(local_30);\n      uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    }" if (parenthesized_expression "(local_30 <= uVar5)" ( (binary_expression "local_30 <= uVar5" identifier <= identifier) )) (compound_statement "{\n      local_30 = uVar5 + 1;\n      operator_delete__(local_34);\n                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */\n      local_34 = (char *)operator_new__(local_30);\n      uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);\n    }" { (expression_statement "local_30 = uVar5 + 1;" (assignment_expression "local_30 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "operator_delete__(local_34);" (call_expression "operator_delete__(local_34)" identifier (argument_list "(local_34)" ( identifier ))) ;) comment (expression_statement "local_34 = (char *)operator_new__(local_30);" (assignment_expression "local_34 = (char *)operator_new__(local_30)" identifier = (cast_expression "(char *)operator_new__(local_30)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "operator_new__(local_30)" identifier (argument_list "(local_30)" ( identifier ))))) ;) (expression_statement "uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30);" (assignment_expression "uVar5 = _M_transform((collate<char> *)param_2,local_34,__s,local_30)" identifier = (call_expression "_M_transform((collate<char> *)param_2,local_34,__s,local_30)" identifier (argument_list "((collate<char> *)param_2,local_34,__s,local_30)" ( (parenthesized_expression "(collate<char> *)param_2,local_34,__s,local_30)" ( (comma_expression "collate<char> *)param_2,local_34,__s,local_30" (binary_expression "collate<char> *)param_2" (binary_expression "collate<char" identifier < identifier) > (pointer_expression "*)param_2" * (ERROR ")" )) identifier)) , (comma_expression "local_34,__s,local_30" identifier , (comma_expression "__s,local_30" identifier , identifier))) )) )))) ;) })) comment (labeled_statement "std::string::append((string *)param_1,local_34,uVar5);" statement_identifier : (ERROR ":" :) (labeled_statement "string::append((string *)param_1,local_34,uVar5);" statement_identifier : (ERROR ":" :) (expression_statement "append((string *)param_1,local_34,uVar5);" (call_expression "append((string *)param_1,local_34,uVar5)" identifier (argument_list "((string *)param_1,local_34,uVar5)" ( (cast_expression "(string *)param_1" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier ))) ;))) (expression_statement "sVar6 = strlen(__s);" (assignment_expression "sVar6 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (pcVar4 + iVar1 == __s + sVar6) {\n      operator_delete__(local_34);\n      if ((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)) {\n        return param_1;\n      }\n      std::string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));\n      return param_1;\n    }" if (parenthesized_expression "(pcVar4 + iVar1 == __s + sVar6)" ( (binary_expression "pcVar4 + iVar1 == __s + sVar6" (binary_expression "pcVar4 + iVar1" identifier + identifier) == (binary_expression "__s + sVar6" identifier + identifier)) )) (compound_statement "{\n      operator_delete__(local_34);\n      if ((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)) {\n        return param_1;\n      }\n      std::string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));\n      return param_1;\n    }" { (expression_statement "operator_delete__(local_34);" (call_expression "operator_delete__(local_34)" identifier (argument_list "(local_34)" ( identifier ))) ;) (if_statement "if ((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)) {\n        return param_1;\n      }" if (parenthesized_expression "((allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37))" ( (binary_expression "(allocator *)(pcVar4 + -0xc) == (allocator *)(unaff_EDI + 0x1a5a37)" (cast_expression "(allocator *)(pcVar4 + -0xc)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar4 + -0xc)" ( (binary_expression "pcVar4 + -0xc" identifier + number_literal) ))) == (cast_expression "(allocator *)(unaff_EDI + 0x1a5a37)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x1a5a37)" ( (binary_expression "unaff_EDI + 0x1a5a37" identifier + number_literal) )))) )) (compound_statement "{\n        return param_1;\n      }" { (return_statement "return param_1;" return identifier ;) })) (labeled_statement "std::string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));" statement_identifier : (ERROR ":" :) (labeled_statement "string::_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_dispose((allocator *)(pcVar4 + -0xc));" statement_identifier : (ERROR ":" :) (expression_statement "_M_dispose((allocator *)(pcVar4 + -0xc));" (call_expression "_M_dispose((allocator *)(pcVar4 + -0xc))" identifier (argument_list "((allocator *)(pcVar4 + -0xc))" ( (cast_expression "(allocator *)(pcVar4 + -0xc)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar4 + -0xc)" ( (binary_expression "pcVar4 + -0xc" identifier + number_literal) ))) ))) ;)))) (return_statement "return param_1;" return identifier ;) })) (expression_statement "__s = __s + sVar6 + 1;" (assignment_expression "__s = __s + sVar6 + 1" identifier = (binary_expression "__s + sVar6 + 1" (binary_expression "__s + sVar6" identifier + identifier) + number_literal)) ;) (expression_statement "iVar2 = *(int *)param_1;" (assignment_expression "iVar2 = *(int *)param_1" identifier = (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar3 = *(int *)(iVar2 + -0xc);" (assignment_expression "iVar3 = *(int *)(iVar2 + -0xc)" identifier = (pointer_expression "*(int *)(iVar2 + -0xc)" * (cast_expression "(int *)(iVar2 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = iVar3 + 1;" (assignment_expression "uVar5 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (*(uint *)(iVar2 + -8) < uVar5) {\nLAB_00211588:\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      std::string::reserve((string *)param_1,uVar5);\n    }\n    else if (0 < *(int *)(iVar2 + -4)) goto LAB_00211588;" if (parenthesized_expression "(*(uint *)(iVar2 + -8) < uVar5)" ( (binary_expression "*(uint *)(iVar2 + -8) < uVar5" (pointer_expression "*(uint *)(iVar2 + -8)" * (cast_expression "(uint *)(iVar2 + -8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -8)" ( (binary_expression "iVar2 + -8" identifier + number_literal) )))) < identifier) )) (compound_statement "{\nLAB_00211588:\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      std::string::reserve((string *)param_1,uVar5);\n    }" { (labeled_statement "LAB_00211588:\n                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */\n      std::string::reserve((string *)param_1,uVar5);" statement_identifier : comment (labeled_statement "std::string::reserve((string *)param_1,uVar5);" statement_identifier : (ERROR ":" :) (labeled_statement "string::reserve((string *)param_1,uVar5);" statement_identifier : (ERROR ":" :) (expression_statement "reserve((string *)param_1,uVar5);" (call_expression "reserve((string *)param_1,uVar5)" identifier (argument_list "((string *)param_1,uVar5)" ( (cast_expression "(string *)param_1" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;)))) }) (else_clause "else if (0 < *(int *)(iVar2 + -4)) goto LAB_00211588;" else (if_statement "if (0 < *(int *)(iVar2 + -4)) goto LAB_00211588;" if (parenthesized_expression "(0 < *(int *)(iVar2 + -4))" ( (binary_expression "0 < *(int *)(iVar2 + -4)" number_literal < (pointer_expression "*(int *)(iVar2 + -4)" * (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) ))))) )) (goto_statement "goto LAB_00211588;" goto statement_identifier ;)))) (expression_statement "*(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)) = 0;" (assignment_expression "*(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)) = 0" (pointer_expression "*(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc))" * (cast_expression "(undefined1 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (binary_expression "*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" * (cast_expression "(int *)(*(int *)param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) = number_literal) ;) (expression_statement "iVar2 = *(int *)param_1;" (assignment_expression "iVar2 = *(int *)param_1" identifier = (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if ((allocator *)(iVar2 + -0xc) != (allocator *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }" if (parenthesized_expression "((allocator *)(iVar2 + -0xc) != (allocator *)(unaff_EDI + 0x1a5a37))" ( (binary_expression "(allocator *)(iVar2 + -0xc) != (allocator *)(unaff_EDI + 0x1a5a37)" (cast_expression "(allocator *)(iVar2 + -0xc)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) != (cast_expression "(allocator *)(unaff_EDI + 0x1a5a37)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x1a5a37)" ( (binary_expression "unaff_EDI + 0x1a5a37" identifier + number_literal) )))) )) (compound_statement "{\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }" { (expression_statement "*(undefined4 *)(iVar2 + -4) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0" (pointer_expression "*(undefined4 *)(iVar2 + -4)" * (cast_expression "(undefined4 *)(iVar2 + -4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)(iVar2 + -0xc) = uVar5;" (assignment_expression "*(uint *)(iVar2 + -0xc) = uVar5" (pointer_expression "*(uint *)(iVar2 + -0xc)" * (cast_expression "(uint *)(iVar2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(iVar2 + 1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + 1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + 1 + iVar3)" * (cast_expression "(undefined1 *)(iVar2 + 1 + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 1 + iVar3)" ( (binary_expression "iVar2 + 1 + iVar3" (binary_expression "iVar2 + 1" identifier + number_literal) + identifier) )))) = number_literal) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "int * FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  undefined4 local_34;\n  uint local_30;\n  undefined1 local_1d [13];\n  \n  FUN_000644be();\n  *param_1 = unaff_EDI + 0x1a5a43;\n                    \n  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (param_4 - param_3) * 2;\n                    \n  local_34 = FUN_001fd400(local_30);\n  __s = pcVar4;\n  while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    \n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }\n  FUN_001fefd0(local_34);\n  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }\n  FUN_002112b0();\n  return param_1;\n}\n\n" (function_definition "int * FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  undefined4 local_34;\n  uint local_30;\n  undefined1 local_1d [13];\n  \n  FUN_000644be();\n  *param_1 = unaff_EDI + 0x1a5a43;\n                    \n  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (param_4 - param_3) * 2;\n                    \n  local_34 = FUN_001fd400(local_30);\n  __s = pcVar4;\n  while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    \n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }\n  FUN_001fefd0(local_34);\n  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }\n  FUN_002112b0();\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)" * (function_declarator "FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  undefined4 local_34;\n  uint local_30;\n  undefined1 local_1d [13];\n  \n  FUN_000644be();\n  *param_1 = unaff_EDI + 0x1a5a43;\n                    \n  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (param_4 - param_3) * 2;\n                    \n  local_34 = FUN_001fd400(local_30);\n  __s = pcVar4;\n  while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    \n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }\n  FUN_001fefd0(local_34);\n  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }\n  FUN_002112b0();\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "uint local_30;" type_identifier identifier ;) (declaration "undefined1 local_1d [13];" type_identifier (array_declarator "local_1d [13]" identifier [ number_literal ]) ;) (expression_statement "FUN_000644be();" (call_expression "FUN_000644be()" identifier (argument_list "()" ( ))) ;) (expression_statement "*param_1 = unaff_EDI + 0x1a5a43;" (assignment_expression "*param_1 = unaff_EDI + 0x1a5a43" (pointer_expression "*param_1" * identifier) = (binary_expression "unaff_EDI + 0x1a5a43" identifier + number_literal)) ;) (expression_statement "pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);" (assignment_expression "pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d)" identifier = (cast_expression "(char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00238a60(param_3,param_4,local_1d,0,local_1d)" identifier (argument_list "(param_3,param_4,local_1d,0,local_1d)" ( identifier , identifier , identifier , number_literal , identifier ))))) ;) (expression_statement "iVar1 = *(int *)(pcVar4 + -0xc);" (assignment_expression "iVar1 = *(int *)(pcVar4 + -0xc)" identifier = (pointer_expression "*(int *)(pcVar4 + -0xc)" * (cast_expression "(int *)(pcVar4 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar4 + -0xc)" ( (binary_expression "pcVar4 + -0xc" identifier + number_literal) ))))) ;) (expression_statement "local_30 = (param_4 - param_3) * 2;" (assignment_expression "local_30 = (param_4 - param_3) * 2" identifier = (binary_expression "(param_4 - param_3) * 2" (parenthesized_expression "(param_4 - param_3)" ( (binary_expression "param_4 - param_3" identifier - identifier) )) * number_literal)) ;) (expression_statement "local_34 = FUN_001fd400(local_30);" (assignment_expression "local_34 = FUN_001fd400(local_30)" identifier = (call_expression "FUN_001fd400(local_30)" identifier (argument_list "(local_30)" ( identifier )))) ;) (expression_statement "__s = pcVar4;" (assignment_expression "__s = pcVar4" identifier = identifier) ;) (while_statement "while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    \n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    \n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }" { (expression_statement "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);" (assignment_expression "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30)" identifier = (call_expression "FUN_0024d7a0(param_2,local_34,__s,local_30)" identifier (argument_list "(param_2,local_34,__s,local_30)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }" if (parenthesized_expression "(local_30 <= uVar5)" ( (binary_expression "local_30 <= uVar5" identifier <= identifier) )) (compound_statement "{\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }" { (expression_statement "local_30 = uVar5 + 1;" (assignment_expression "local_30 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "FUN_001fefd0(local_34);" (call_expression "FUN_001fefd0(local_34)" identifier (argument_list "(local_34)" ( identifier ))) ;) (expression_statement "local_34 = FUN_001fd400(local_30);" (assignment_expression "local_34 = FUN_001fd400(local_30)" identifier = (call_expression "FUN_001fd400(local_30)" identifier (argument_list "(local_30)" ( identifier )))) ;) (expression_statement "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);" (assignment_expression "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30)" identifier = (call_expression "FUN_0024d7a0(param_2,local_34,__s,local_30)" identifier (argument_list "(param_2,local_34,__s,local_30)" ( identifier , identifier , identifier , identifier )))) ;) })) (expression_statement "FUN_00237fd0(param_1,local_34,uVar5);" (call_expression "FUN_00237fd0(param_1,local_34,uVar5)" identifier (argument_list "(param_1,local_34,uVar5)" ( identifier , identifier , identifier ))) ;) (expression_statement "sVar6 = strlen(__s);" (assignment_expression "sVar6 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (pcVar4 + iVar1 == __s + sVar6) break;" if (parenthesized_expression "(pcVar4 + iVar1 == __s + sVar6)" ( (binary_expression "pcVar4 + iVar1 == __s + sVar6" (binary_expression "pcVar4 + iVar1" identifier + identifier) == (binary_expression "__s + sVar6" identifier + identifier)) )) (break_statement "break;" break ;)) (expression_statement "__s = __s + sVar6 + 1;" (assignment_expression "__s = __s + sVar6 + 1" identifier = (binary_expression "__s + sVar6 + 1" (binary_expression "__s + sVar6" identifier + identifier) + number_literal)) ;) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar3 = *(int *)(iVar2 + -0xc);" (assignment_expression "iVar3 = *(int *)(iVar2 + -0xc)" identifier = (pointer_expression "*(int *)(iVar2 + -0xc)" * (cast_expression "(int *)(iVar2 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))))) ;) (expression_statement "uVar5 = iVar3 + 1;" (assignment_expression "uVar5 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }" if (parenthesized_expression "((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4)))" ( (binary_expression "(*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))" (parenthesized_expression "(*(uint *)(iVar2 + -8) < uVar5)" ( (binary_expression "*(uint *)(iVar2 + -8) < uVar5" (pointer_expression "*(uint *)(iVar2 + -8)" * (cast_expression "(uint *)(iVar2 + -8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -8)" ( (binary_expression "iVar2 + -8" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(0 < *(int *)(iVar2 + -4))" ( (binary_expression "0 < *(int *)(iVar2 + -4)" number_literal < (pointer_expression "*(int *)(iVar2 + -4)" * (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) ))))) ))) )) (compound_statement "{\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }" { (expression_statement "FUN_00237ce0(param_1,uVar5);" (call_expression "FUN_00237ce0(param_1,uVar5)" identifier (argument_list "(param_1,uVar5)" ( identifier , identifier ))) ;) })) (expression_statement "*(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;" (assignment_expression "*(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0" (pointer_expression "*(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc))" * (cast_expression "(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + *(int *)(*param_1 + -0xc))" ( (binary_expression "*param_1 + *(int *)(*param_1 + -0xc)" (pointer_expression "*param_1" * identifier) + (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )))) = number_literal) ;) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }" if (parenthesized_expression "((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37))" ( (binary_expression "(char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)" (cast_expression "(char *)(iVar2 + -0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) != (cast_expression "(char *)(unaff_EDI + 0x1a5a37)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x1a5a37)" ( (binary_expression "unaff_EDI + 0x1a5a37" identifier + number_literal) )))) )) (compound_statement "{\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }" { (expression_statement "*(undefined4 *)(iVar2 + -4) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0" (pointer_expression "*(undefined4 *)(iVar2 + -4)" * (cast_expression "(undefined4 *)(iVar2 + -4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)(iVar2 + -0xc) = uVar5;" (assignment_expression "*(uint *)(iVar2 + -0xc) = uVar5" (pointer_expression "*(uint *)(iVar2 + -0xc)" * (cast_expression "(uint *)(iVar2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(iVar2 + 1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + 1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + 1 + iVar3)" * (cast_expression "(undefined1 *)(iVar2 + 1 + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 1 + iVar3)" ( (binary_expression "iVar2 + 1 + iVar3" (binary_expression "iVar2 + 1" identifier + number_literal) + identifier) )))) = number_literal) ;) })) })) (expression_statement "FUN_001fefd0(local_34);" (call_expression "FUN_001fefd0(local_34)" identifier (argument_list "(local_34)" ( identifier ))) ;) (if_statement "if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }" if (parenthesized_expression "(pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37))" ( (binary_expression "pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)" (binary_expression "pcVar4 + -0xc" identifier + number_literal) == (cast_expression "(char *)(unaff_EDI + 0x1a5a37)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x1a5a37)" ( (binary_expression "unaff_EDI + 0x1a5a37" identifier + number_literal) )))) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "FUN_002112b0();" (call_expression "FUN_002112b0()" identifier (argument_list "()" ( ))) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , IDENT ))))) ;) (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 IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) * LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) == (binary_expression IDENT + IDENT)) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (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 IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )) || (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )) (compound_statement { (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = LIT) ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return IDENT ;) })))
(function_definition "int * FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  undefined4 local_34;\n  uint local_30;\n  undefined1 local_1d [13];\n  \n  FUN_000644be();\n  *param_1 = unaff_EDI + 0x1a5a43;\n                    \n  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (param_4 - param_3) * 2;\n                    \n  local_34 = FUN_001fd400(local_30);\n  __s = pcVar4;\n  while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    \n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }\n  FUN_001fefd0(local_34);\n  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }\n  FUN_002112b0();\n  return param_1;\n}" (primitive_type "int") (pointer_declarator "* FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)" (* "*") (function_declarator "FUN_00211500(int *param_1,undefined4 param_2,int param_3,int param_4)" (identifier "FUN_00211500") (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")")))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  char *pcVar4;\n  uint uVar5;\n  size_t sVar6;\n  char *__s;\n  int unaff_EDI;\n  undefined4 local_34;\n  uint local_30;\n  undefined1 local_1d [13];\n  \n  FUN_000644be();\n  *param_1 = unaff_EDI + 0x1a5a43;\n                    \n  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);\n  iVar1 = *(int *)(pcVar4 + -0xc);\n  local_30 = (param_4 - param_3) * 2;\n                    \n  local_34 = FUN_001fd400(local_30);\n  __s = pcVar4;\n  while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    \n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }\n  FUN_001fefd0(local_34);\n  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }\n  FUN_002112b0();\n  return param_1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "size_t sVar6;" (primitive_type "size_t") (identifier "sVar6") (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (declaration "undefined4 local_34;" (type_identifier "undefined4") (identifier "local_34") (; ";")) (declaration "uint local_30;" (type_identifier "uint") (identifier "local_30") (; ";")) (declaration "undefined1 local_1d [13];" (type_identifier "undefined1") (array_declarator "local_1d [13]" (identifier "local_1d") ([ "[") (number_literal "13") (] "]")) (; ";")) (expression_statement "FUN_000644be();" (call_expression "FUN_000644be()" (identifier "FUN_000644be") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*param_1 = unaff_EDI + 0x1a5a43;" (assignment_expression "*param_1 = unaff_EDI + 0x1a5a43" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "unaff_EDI + 0x1a5a43" (identifier "unaff_EDI") (+ "+") (number_literal "0x1a5a43"))) (; ";")) (expression_statement "pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);" (assignment_expression "pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d)" (identifier "pcVar4") (= "=") (cast_expression "(char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00238a60(param_3,param_4,local_1d,0,local_1d)" (identifier "FUN_00238a60") (argument_list "(param_3,param_4,local_1d,0,local_1d)" (( "(") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "local_1d") (, ",") (number_literal "0") (, ",") (identifier "local_1d") () ")"))))) (; ";")) (expression_statement "iVar1 = *(int *)(pcVar4 + -0xc);" (assignment_expression "iVar1 = *(int *)(pcVar4 + -0xc)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(pcVar4 + -0xc)" (* "*") (cast_expression "(int *)(pcVar4 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar4 + -0xc)" (( "(") (binary_expression "pcVar4 + -0xc" (identifier "pcVar4") (+ "+") (number_literal "-0xc")) () ")"))))) (; ";")) (expression_statement "local_30 = (param_4 - param_3) * 2;" (assignment_expression "local_30 = (param_4 - param_3) * 2" (identifier "local_30") (= "=") (binary_expression "(param_4 - param_3) * 2" (parenthesized_expression "(param_4 - param_3)" (( "(") (binary_expression "param_4 - param_3" (identifier "param_4") (- "-") (identifier "param_3")) () ")")) (* "*") (number_literal "2"))) (; ";")) (expression_statement "local_34 = FUN_001fd400(local_30);" (assignment_expression "local_34 = FUN_001fd400(local_30)" (identifier "local_34") (= "=") (call_expression "FUN_001fd400(local_30)" (identifier "FUN_001fd400") (argument_list "(local_30)" (( "(") (identifier "local_30") () ")")))) (; ";")) (expression_statement "__s = pcVar4;" (assignment_expression "__s = pcVar4" (identifier "__s") (= "=") (identifier "pcVar4")) (; ";")) (while_statement "while( true ) {\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    \n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }\n                    \n    FUN_00237fd0(param_1,local_34,uVar5);\n    sVar6 = strlen(__s);\n    if (pcVar4 + iVar1 == __s + sVar6) break;\n    __s = __s + sVar6 + 1;\n    iVar2 = *param_1;\n    iVar3 = *(int *)(iVar2 + -0xc);\n    uVar5 = iVar3 + 1;\n    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }\n    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;\n    iVar2 = *param_1;\n    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }\n  }" ({ "{") (expression_statement "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);" (assignment_expression "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30)" (identifier "uVar5") (= "=") (call_expression "FUN_0024d7a0(param_2,local_34,__s,local_30)" (identifier "FUN_0024d7a0") (argument_list "(param_2,local_34,__s,local_30)" (( "(") (identifier "param_2") (, ",") (identifier "local_34") (, ",") (identifier "__s") (, ",") (identifier "local_30") () ")")))) (; ";")) (if_statement "if (local_30 <= uVar5) {\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }" (if "if") (parenthesized_expression "(local_30 <= uVar5)" (( "(") (binary_expression "local_30 <= uVar5" (identifier "local_30") (<= "<=") (identifier "uVar5")) () ")")) (compound_statement "{\n      local_30 = uVar5 + 1;\n      FUN_001fefd0(local_34);\n                    \n      local_34 = FUN_001fd400(local_30);\n      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);\n    }" ({ "{") (expression_statement "local_30 = uVar5 + 1;" (assignment_expression "local_30 = uVar5 + 1" (identifier "local_30") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "FUN_001fefd0(local_34);" (call_expression "FUN_001fefd0(local_34)" (identifier "FUN_001fefd0") (argument_list "(local_34)" (( "(") (identifier "local_34") () ")"))) (; ";")) (expression_statement "local_34 = FUN_001fd400(local_30);" (assignment_expression "local_34 = FUN_001fd400(local_30)" (identifier "local_34") (= "=") (call_expression "FUN_001fd400(local_30)" (identifier "FUN_001fd400") (argument_list "(local_30)" (( "(") (identifier "local_30") () ")")))) (; ";")) (expression_statement "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);" (assignment_expression "uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30)" (identifier "uVar5") (= "=") (call_expression "FUN_0024d7a0(param_2,local_34,__s,local_30)" (identifier "FUN_0024d7a0") (argument_list "(param_2,local_34,__s,local_30)" (( "(") (identifier "param_2") (, ",") (identifier "local_34") (, ",") (identifier "__s") (, ",") (identifier "local_30") () ")")))) (; ";")) (} "}"))) (expression_statement "FUN_00237fd0(param_1,local_34,uVar5);" (call_expression "FUN_00237fd0(param_1,local_34,uVar5)" (identifier "FUN_00237fd0") (argument_list "(param_1,local_34,uVar5)" (( "(") (identifier "param_1") (, ",") (identifier "local_34") (, ",") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "sVar6 = strlen(__s);" (assignment_expression "sVar6 = strlen(__s)" (identifier "sVar6") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (if_statement "if (pcVar4 + iVar1 == __s + sVar6) break;" (if "if") (parenthesized_expression "(pcVar4 + iVar1 == __s + sVar6)" (( "(") (binary_expression "pcVar4 + iVar1 == __s + sVar6" (binary_expression "pcVar4 + iVar1" (identifier "pcVar4") (+ "+") (identifier "iVar1")) (== "==") (binary_expression "__s + sVar6" (identifier "__s") (+ "+") (identifier "sVar6"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "__s = __s + sVar6 + 1;" (assignment_expression "__s = __s + sVar6 + 1" (identifier "__s") (= "=") (binary_expression "__s + sVar6 + 1" (binary_expression "__s + sVar6" (identifier "__s") (+ "+") (identifier "sVar6")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" (identifier "iVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "iVar3 = *(int *)(iVar2 + -0xc);" (assignment_expression "iVar3 = *(int *)(iVar2 + -0xc)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(iVar2 + -0xc)" (* "*") (cast_expression "(int *)(iVar2 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -0xc)" (( "(") (binary_expression "iVar2 + -0xc" (identifier "iVar2") (+ "+") (number_literal "-0xc")) () ")"))))) (; ";")) (expression_statement "uVar5 = iVar3 + 1;" (assignment_expression "uVar5 = iVar3 + 1" (identifier "uVar5") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }" (if "if") (parenthesized_expression "((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4)))" (( "(") (binary_expression "(*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))" (parenthesized_expression "(*(uint *)(iVar2 + -8) < uVar5)" (( "(") (binary_expression "*(uint *)(iVar2 + -8) < uVar5" (pointer_expression "*(uint *)(iVar2 + -8)" (* "*") (cast_expression "(uint *)(iVar2 + -8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -8)" (( "(") (binary_expression "iVar2 + -8" (identifier "iVar2") (+ "+") (number_literal "-8")) () ")")))) (< "<") (identifier "uVar5")) () ")")) (|| "||") (parenthesized_expression "(0 < *(int *)(iVar2 + -4))" (( "(") (binary_expression "0 < *(int *)(iVar2 + -4)" (number_literal "0") (< "<") (pointer_expression "*(int *)(iVar2 + -4)" (* "*") (cast_expression "(int *)(iVar2 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -4)" (( "(") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n                    \n      FUN_00237ce0(param_1,uVar5);\n    }" ({ "{") (expression_statement "FUN_00237ce0(param_1,uVar5);" (call_expression "FUN_00237ce0(param_1,uVar5)" (identifier "FUN_00237ce0") (argument_list "(param_1,uVar5)" (( "(") (identifier "param_1") (, ",") (identifier "uVar5") () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;" (assignment_expression "*(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0" (pointer_expression "*(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc))" (* "*") (cast_expression "(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc))" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + *(int *)(*param_1 + -0xc))" (( "(") (binary_expression "*param_1 + *(int *)(*param_1 + -0xc)" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (pointer_expression "*(int *)(*param_1 + -0xc)" (* "*") (cast_expression "(int *)(*param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0xc)" (( "(") (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0xc")) () ")"))))) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" (identifier "iVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }" (if "if") (parenthesized_expression "((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37))" (( "(") (binary_expression "(char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)" (cast_expression "(char *)(iVar2 + -0xc)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -0xc)" (( "(") (binary_expression "iVar2 + -0xc" (identifier "iVar2") (+ "+") (number_literal "-0xc")) () ")"))) (!= "!=") (cast_expression "(char *)(unaff_EDI + 0x1a5a37)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x1a5a37)" (( "(") (binary_expression "unaff_EDI + 0x1a5a37" (identifier "unaff_EDI") (+ "+") (number_literal "0x1a5a37")) () ")")))) () ")")) (compound_statement "{\n      *(undefined4 *)(iVar2 + -4) = 0;\n      *(uint *)(iVar2 + -0xc) = uVar5;\n      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;\n    }" ({ "{") (expression_statement "*(undefined4 *)(iVar2 + -4) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0" (pointer_expression "*(undefined4 *)(iVar2 + -4)" (* "*") (cast_expression "(undefined4 *)(iVar2 + -4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -4)" (( "(") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(uint *)(iVar2 + -0xc) = uVar5;" (assignment_expression "*(uint *)(iVar2 + -0xc) = uVar5" (pointer_expression "*(uint *)(iVar2 + -0xc)" (* "*") (cast_expression "(uint *)(iVar2 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -0xc)" (( "(") (binary_expression "iVar2 + -0xc" (identifier "iVar2") (+ "+") (number_literal "-0xc")) () ")")))) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "*(undefined1 *)(iVar2 + 1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + 1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + 1 + iVar3)" (* "*") (cast_expression "(undefined1 *)(iVar2 + 1 + iVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 1 + iVar3)" (( "(") (binary_expression "iVar2 + 1 + iVar3" (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1")) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_001fefd0(local_34);" (call_expression "FUN_001fefd0(local_34)" (identifier "FUN_001fefd0") (argument_list "(local_34)" (( "(") (identifier "local_34") () ")"))) (; ";")) (if_statement "if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {\n    return param_1;\n  }" (if "if") (parenthesized_expression "(pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37))" (( "(") (binary_expression "pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)" (binary_expression "pcVar4 + -0xc" (identifier "pcVar4") (+ "+") (number_literal "-0xc")) (== "==") (cast_expression "(char *)(unaff_EDI + 0x1a5a37)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x1a5a37)" (( "(") (binary_expression "unaff_EDI + 0x1a5a37" (identifier "unaff_EDI") (+ "+") (number_literal "0x1a5a37")) () ")")))) () ")")) (compound_statement "{\n    return param_1;\n  }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "FUN_002112b0();" (call_expression "FUN_002112b0()" (identifier "FUN_002112b0") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* WARNING: Restarted to delay deadcode elimination for space: register */
/* std::collate<char>::do_transform(char const*, char const*) const */

char * std::var_10<char>::function_1(char *param_1,char *param_2)

{
  int var_17;
  int var_21;
  int var_22;
  char *var_5;
  type_1 var_13;
  size_t var_19;
  char *var_18;
  int var_2;
  int var_7;
  int var_6;
  char *local_34;
  type_1 var_12;
  
  var_1();
  *(int *)param_1 = var_2 + 0x1a5a43;
                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */
  var_5 = std::string::var_3<var_4*>();
  var_17 = *(int *)(var_5 + -0xc);
  var_12 = (var_6 - var_7) * 2;
                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */
  local_34 = (char *)var_8(var_12);
  var_18 = var_5;
  do {
    var_13 = var_9((var_10<var_11> *)param_2,local_34,var_18,var_12);
    if (var_12 <= var_13) {
      var_12 = var_13 + 1;
      var_14(local_34);
                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */
      local_34 = (char *)var_8(var_12);
      var_13 = var_9((var_10<var_11> *)param_2,local_34,var_18,var_12);
    }
                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */
    std::string::var_15((type_2 *)param_1,local_34,var_13);
    var_19 = var_16(var_18);
    if (var_5 + var_17 == var_18 + var_19) {
      var_14(local_34);
      if ((type_3 *)(var_5 + -0xc) == (type_3 *)(var_2 + 0x1a5a37)) {
        return param_1;
      }
      std::string::_Rep::var_20((type_3 *)(var_5 + -0xc));
      return param_1;
    }
    var_18 = var_18 + var_19 + 1;
    var_21 = *(int *)param_1;
    var_22 = *(int *)(var_21 + -0xc);
    var_13 = var_22 + 1;
    if (*(type_1 *)(var_21 + -8) < var_13) {
LAB_00211588:
                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */
      std::string::var_23((type_2 *)param_1,var_13);
    }
    else if (0 < *(int *)(var_21 + -4)) goto LAB_00211588;
    *(type_4 *)(*(int *)param_1 + *(int *)(*(int *)param_1 + -0xc)) = 0;
    var_21 = *(int *)param_1;
    if ((type_3 *)(var_21 + -0xc) != (type_3 *)(var_2 + 0x1a5a37)) {
      *(type_5 *)(var_21 + -4) = 0;
      *(type_1 *)(var_21 + -0xc) = var_13;
      *(type_4 *)(var_21 + 1 + var_22) = 0;
    }
  } while( true );
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (number_literal) (identifier)))))) (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: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (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: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_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: (identifier))) right: (parenthesized_expression (binary_expression left: (number_literal) 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))))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))) (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: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (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: (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: (identifier))) (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: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement (identifier)))))

int * MASKED(int *param_1,undefined4 param_2,int param_3,int param_4)

{
  int iVar1;
  int iVar2;
  int iVar3;
  char *pcVar4;
  uint uVar5;
  size_t sVar6;
  char *__s;
  int unaff_EDI;
  undefined4 local_34;
  uint local_30;
  undefined1 local_1d [13];
  
  FUN_000644be();
  *param_1 = unaff_EDI + 0x1a5a43;
                    /* try { // try from 00211537 to 0021153b has its CatchHandler @ 00211685 */
  pcVar4 = (char *)FUN_00238a60(param_3,param_4,local_1d,0,local_1d);
  iVar1 = *(int *)(pcVar4 + -0xc);
  local_30 = (param_4 - param_3) * 2;
                    /* try { // try from 00211555 to 00211559 has its CatchHandler @ 002116e5 */
  local_34 = FUN_001fd400(local_30);
  __s = pcVar4;
  while( true ) {
    uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);
    if (local_30 <= uVar5) {
      local_30 = uVar5 + 1;
      FUN_001fefd0(local_34);
                    /* try { // try from 002115e6 to 002115ea has its CatchHandler @ 002116e3 */
      local_34 = FUN_001fd400(local_30);
      uVar5 = FUN_0024d7a0(param_2,local_34,__s,local_30);
    }
                    /* try { // try from 0021160d to 00211611 has its CatchHandler @ 00211689 */
    FUN_00237fd0(param_1,local_34,uVar5);
    sVar6 = strlen(__s);
    if (pcVar4 + iVar1 == __s + sVar6) break;
    __s = __s + sVar6 + 1;
    iVar2 = *param_1;
    iVar3 = *(int *)(iVar2 + -0xc);
    uVar5 = iVar3 + 1;
    if ((*(uint *)(iVar2 + -8) < uVar5) || (0 < *(int *)(iVar2 + -4))) {
                    /* try { // try from 00211593 to 00211597 has its CatchHandler @ 00211689 */
      FUN_00237ce0(param_1,uVar5);
    }
    *(undefined1 *)(*param_1 + *(int *)(*param_1 + -0xc)) = 0;
    iVar2 = *param_1;
    if ((char *)(iVar2 + -0xc) != (char *)(unaff_EDI + 0x1a5a37)) {
      *(undefined4 *)(iVar2 + -4) = 0;
      *(uint *)(iVar2 + -0xc) = uVar5;
      *(undefined1 *)(iVar2 + 1 + iVar3) = 0;
    }
  }
  FUN_001fefd0(local_34);
  if (pcVar4 + -0xc == (char *)(unaff_EDI + 0x1a5a37)) {
    return param_1;
  }
  FUN_002112b0();
  return param_1;
}

