
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

long __regparm3
stab_get_struct_index(stab_write_handle *info,char *tag,uint id,debug_type_kind kind,uint *psize)

{
  size_t sVar1;
  int iVar2;
  uint uVar3;
  stab_tag_conflict *psVar4;
  uint uVar5;
  
  uVar5 = (info->type_cache).struct_types_alloc;
  if (uVar5 <= id) {
    if ((uVar5 == 0) && (uVar5 = 10, id < 10)) {
      iVar2 = 0xa0;
      uVar5 = 10;
    }
    else {
      do {
        uVar3 = uVar5;
        uVar5 = uVar3 * 2;
      } while (uVar5 <= id);
      iVar2 = uVar3 << 5;
    }
    psVar4 = (stab_tag_conflict *)xrealloc((info->type_cache).struct_types,iVar2);
    sVar1 = (info->type_cache).struct_types_alloc;
    (info->type_cache).struct_types = psVar4;
    memset(psVar4 + sVar1,0,(uVar5 - sVar1) * 0x10);
    (info->type_cache).struct_types_alloc = uVar5;
  }
  psVar4 = (info->type_cache).struct_types + id;
  if (psVar4->index == 0) {
    iVar2 = info->type_index;
    psVar4->index = iVar2;
    info->type_index = iVar2 + 1;
    psVar4->tag = tag;
    psVar4->kind = kind;
  }
  if (kind != DEBUG_KIND_ILLEGAL) {
    *psize = psVar4->size;
    return psVar4->index;
  }
  psVar4->kind = DEBUG_KIND_ILLEGAL;
  psVar4->size = *psize;
  return psVar4->index;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int __regparm3 FUN_00028fa0(int param_1,int param_2,uint param_3,int param_4,int *param_5)

{
  int iVar1;
  uint uVar2;
  int *piVar3;
  uint uVar4;
  
  uVar4 = *(uint *)(param_1 + 0xe0);
  if (uVar4 <= param_3) {
    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {
      iVar1 = 0xa0;
      uVar4 = 10;
    }
    else {
      do {
        uVar2 = uVar4;
        uVar4 = uVar2 * 2;
      } while (uVar4 <= param_3);
      iVar1 = uVar2 << 5;
    }
    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);
    *(int *)(param_1 + 0xdc) = iVar1;
    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,
           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);
    *(uint *)(param_1 + 0xe0) = uVar4;
  }
  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));
  if (*piVar3 == 0) {
    iVar1 = *(int *)(param_1 + 0x3c);
    *piVar3 = iVar1;
    *(int *)(param_1 + 0x3c) = iVar1 + 1;
    piVar3[1] = param_2;
    piVar3[2] = param_4;
  }
  if (param_4 != 0) {
    *param_5 = piVar3[3];
    return *piVar3;
  }
  piVar3[2] = 0;
  piVar3[3] = *param_5;
  return *piVar3;
}


PUSH EBP
MOV EBP,EAX
PUSH EDI
PUSH ESI
MOV ESI,ECX
PUSH EBX
CALL 0x000166c0
ADD EBX,0x17053
SUB ESP,0x1c
MOV EAX,dword ptr [EAX + 0xe0]
MOV dword ptr [ESP + 0xc],EDX
CMP EAX,ECX
JA 0x00029028
TEST EAX,EAX
JNZ 0x00028fe2
MOV EAX,0xa
CMP ECX,0x9
JA 0x00028fe2
MOV EAX,0xa0
MOV EDI,0xa
JMP 0x00028fec
MOV EAX,EDI
LEA EDI,[EAX + EAX*0x1]
CMP ESI,EDI
JNC 0x00028fe0
SHL EAX,0x5
SUB ESP,0x8
PUSH EAX
PUSH dword ptr [EBP + 0xdc]
CALL 0x00013230
MOV EDX,dword ptr [EBP + 0xe0]
MOV ECX,EDI
ADD ESP,0xc
MOV dword ptr [EBP + 0xdc],EAX
SUB ECX,EDX
SHL EDX,0x4
SHL ECX,0x4
ADD EDX,EAX
PUSH ECX
PUSH 0x0
PUSH EDX
CALL 0x000135d0
MOV dword ptr [EBP + 0xe0],EDI
ADD ESP,0x10
SHL ESI,0x4
ADD ESI,dword ptr [EBP + 0xdc]
MOV EDX,dword ptr [ESI]
TEST EDX,EDX
JNZ 0x00029050
MOV EAX,dword ptr [EBP + 0x3c]
MOV dword ptr [ESI],EAX
ADD EAX,0x1
MOV dword ptr [EBP + 0x3c],EAX
MOV EAX,dword ptr [ESP + 0xc]
MOV dword ptr [ESI + 0x4],EAX
MOV EAX,dword ptr [ESP + 0x30]
MOV dword ptr [ESI + 0x8],EAX
MOV EAX,dword ptr [ESP + 0x30]
TEST EAX,EAX
JNZ 0x00029078
MOV EAX,dword ptr [ESP + 0x34]
MOV dword ptr [ESI + 0x8],0x0
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESI + 0xc],EAX
MOV EAX,dword ptr [ESI]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESI + 0xc]
MOV EBX,dword ptr [ESP + 0x34]
MOV dword ptr [EBX],EAX
MOV EAX,dword ptr [ESI]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 FUN_00028fa0(int param_1,int param_2,uint param_3,int param_4,int *param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int *piVar3;\n  uint uVar4;\n  \n  uVar4 = *(uint *)(param_1 + 0xe0);\n  if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }\n  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));\n  if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }\n  if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }\n  piVar3[2] = 0;\n  piVar3[3] = *param_5;\n  return *piVar3;\n}\n\n" comment (function_definition "int __regparm3 FUN_00028fa0(int param_1,int param_2,uint param_3,int param_4,int *param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int *piVar3;\n  uint uVar4;\n  \n  uVar4 = *(uint *)(param_1 + 0xe0);\n  if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }\n  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));\n  if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }\n  if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }\n  piVar3[2] = 0;\n  piVar3[3] = *param_5;\n  return *piVar3;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00028fa0(int param_1,int param_2,uint param_3,int param_4,int *param_5)" identifier (parameter_list "(int param_1,int param_2,uint param_3,int param_4,int *param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int *piVar3;\n  uint uVar4;\n  \n  uVar4 = *(uint *)(param_1 + 0xe0);\n  if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }\n  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));\n  if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }\n  if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }\n  piVar3[2] = 0;\n  piVar3[3] = *param_5;\n  return *piVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar4 = *(uint *)(param_1 + 0xe0);" (assignment_expression "uVar4 = *(uint *)(param_1 + 0xe0)" identifier = (pointer_expression "*(uint *)(param_1 + 0xe0)" * (cast_expression "(uint *)(param_1 + 0xe0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) ))))) ;) (if_statement "if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }" if (parenthesized_expression "(uVar4 <= param_3)" ( (binary_expression "uVar4 <= param_3" identifier <= identifier) )) (compound_statement "{\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }" { (if_statement "if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }" if (parenthesized_expression "((uVar4 == 0) && (uVar4 = 10, param_3 < 10))" ( (binary_expression "(uVar4 == 0) && (uVar4 = 10, param_3 < 10)" (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) && (parenthesized_expression "(uVar4 = 10, param_3 < 10)" ( (comma_expression "uVar4 = 10, param_3 < 10" (assignment_expression "uVar4 = 10" identifier = number_literal) , (binary_expression "param_3 < 10" identifier < number_literal)) ))) )) (compound_statement "{\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }" { (expression_statement "iVar1 = 0xa0;" (assignment_expression "iVar1 = 0xa0" identifier = number_literal) ;) (expression_statement "uVar4 = 10;" (assignment_expression "uVar4 = 10" identifier = number_literal) ;) }) (else_clause "else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }" else (compound_statement "{\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }" { (do_statement "do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);" do (compound_statement "{\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      }" { (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" identifier = identifier) ;) (expression_statement "uVar4 = uVar2 * 2;" (assignment_expression "uVar4 = uVar2 * 2" identifier = (binary_expression "uVar2 * 2" identifier * number_literal)) ;) }) while (parenthesized_expression "(uVar4 <= param_3)" ( (binary_expression "uVar4 <= param_3" identifier <= identifier) )) ;) (expression_statement "iVar1 = uVar2 << 5;" (assignment_expression "iVar1 = uVar2 << 5" identifier = (binary_expression "uVar2 << 5" identifier << number_literal)) ;) }))) (expression_statement "iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);" (assignment_expression "iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1)" identifier = (call_expression "xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1)" identifier (argument_list "(*(undefined4 *)(param_1 + 0xdc),iVar1)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xdc)" * (cast_expression "(undefined4 *)(param_1 + 0xdc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xdc)" ( (binary_expression "param_1 + 0xdc" identifier + number_literal) )))) , identifier )))) ;) (expression_statement "*(int *)(param_1 + 0xdc) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xdc) = iVar1" (pointer_expression "*(int *)(param_1 + 0xdc)" * (cast_expression "(int *)(param_1 + 0xdc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xdc)" ( (binary_expression "param_1 + 0xdc" identifier + number_literal) )))) = identifier) ;) (expression_statement "memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);" (call_expression "memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10)" identifier (argument_list "((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10)" ( (cast_expression "(void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xe0) * 0x10 + iVar1)" ( (binary_expression "*(int *)(param_1 + 0xe0) * 0x10 + iVar1" (binary_expression "*(int *)(param_1 + 0xe0) * 0x10" (pointer_expression "*(int *)(param_1 + 0xe0)" * (cast_expression "(int *)(param_1 + 0xe0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) * number_literal) + identifier) ))) , number_literal , (binary_expression "(uVar4 - *(int *)(param_1 + 0xe0)) * 0x10" (parenthesized_expression "(uVar4 - *(int *)(param_1 + 0xe0))" ( (binary_expression "uVar4 - *(int *)(param_1 + 0xe0)" identifier - (pointer_expression "*(int *)(param_1 + 0xe0)" * (cast_expression "(int *)(param_1 + 0xe0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) ))))) )) * number_literal) ))) ;) (expression_statement "*(uint *)(param_1 + 0xe0) = uVar4;" (assignment_expression "*(uint *)(param_1 + 0xe0) = uVar4" (pointer_expression "*(uint *)(param_1 + 0xe0)" * (cast_expression "(uint *)(param_1 + 0xe0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));" (assignment_expression "piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc))" identifier = (cast_expression "(int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc))" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 * 0x10 + *(int *)(param_1 + 0xdc))" ( (binary_expression "param_3 * 0x10 + *(int *)(param_1 + 0xdc)" (binary_expression "param_3 * 0x10" identifier * number_literal) + (pointer_expression "*(int *)(param_1 + 0xdc)" * (cast_expression "(int *)(param_1 + 0xdc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xdc)" ( (binary_expression "param_1 + 0xdc" identifier + number_literal) ))))) )))) ;) (if_statement "if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }" if (parenthesized_expression "(*piVar3 == 0)" ( (binary_expression "*piVar3 == 0" (pointer_expression "*piVar3" * identifier) == number_literal) )) (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0x3c);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x3c)" identifier = (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))))) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x3c) = iVar1 + 1;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar1 + 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "piVar3[1] = param_2;" (assignment_expression "piVar3[1] = param_2" (subscript_expression "piVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar3[2] = param_4;" (assignment_expression "piVar3[2] = param_4" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = identifier) ;) })) (if_statement "if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }" { (expression_statement "*param_5 = piVar3[3];" (assignment_expression "*param_5 = piVar3[3]" (pointer_expression "*param_5" * identifier) = (subscript_expression "piVar3[3]" identifier [ number_literal ])) ;) (return_statement "return *piVar3;" return (pointer_expression "*piVar3" * identifier) ;) })) (expression_statement "piVar3[2] = 0;" (assignment_expression "piVar3[2] = 0" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[3] = *param_5;" (assignment_expression "piVar3[3] = *param_5" (subscript_expression "piVar3[3]" identifier [ number_literal ]) = (pointer_expression "*param_5" * identifier)) ;) (return_statement "return *piVar3;" return (pointer_expression "*piVar3" * identifier) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nlong __regparm3\nstab_get_struct_index(stab_write_handle *info,char *tag,uint id,debug_type_kind kind,uint *psize)\n\n{\n  size_t sVar1;\n  int iVar2;\n  uint uVar3;\n  stab_tag_conflict *psVar4;\n  uint uVar5;\n  \n  uVar5 = (info->type_cache).struct_types_alloc;\n  if (uVar5 <= id) {\n    if ((uVar5 == 0) && (uVar5 = 10, id < 10)) {\n      iVar2 = 0xa0;\n      uVar5 = 10;\n    }\n    else {\n      do {\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      } while (uVar5 <= id);\n      iVar2 = uVar3 << 5;\n    }\n    psVar4 = (stab_tag_conflict *)xrealloc((info->type_cache).struct_types,iVar2);\n    sVar1 = (info->type_cache).struct_types_alloc;\n    (info->type_cache).struct_types = psVar4;\n    memset(psVar4 + sVar1,0,(uVar5 - sVar1) * 0x10);\n    (info->type_cache).struct_types_alloc = uVar5;\n  }\n  psVar4 = (info->type_cache).struct_types + id;\n  if (psVar4->index == 0) {\n    iVar2 = info->type_index;\n    psVar4->index = iVar2;\n    info->type_index = iVar2 + 1;\n    psVar4->tag = tag;\n    psVar4->kind = kind;\n  }\n  if (kind != DEBUG_KIND_ILLEGAL) {\n    *psize = psVar4->size;\n    return psVar4->index;\n  }\n  psVar4->kind = DEBUG_KIND_ILLEGAL;\n  psVar4->size = *psize;\n  return psVar4->index;\n}\n\n" comment (function_definition "long __regparm3\nstab_get_struct_index(stab_write_handle *info,char *tag,uint id,debug_type_kind kind,uint *psize)\n\n{\n  size_t sVar1;\n  int iVar2;\n  uint uVar3;\n  stab_tag_conflict *psVar4;\n  uint uVar5;\n  \n  uVar5 = (info->type_cache).struct_types_alloc;\n  if (uVar5 <= id) {\n    if ((uVar5 == 0) && (uVar5 = 10, id < 10)) {\n      iVar2 = 0xa0;\n      uVar5 = 10;\n    }\n    else {\n      do {\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      } while (uVar5 <= id);\n      iVar2 = uVar3 << 5;\n    }\n    psVar4 = (stab_tag_conflict *)xrealloc((info->type_cache).struct_types,iVar2);\n    sVar1 = (info->type_cache).struct_types_alloc;\n    (info->type_cache).struct_types = psVar4;\n    memset(psVar4 + sVar1,0,(uVar5 - sVar1) * 0x10);\n    (info->type_cache).struct_types_alloc = uVar5;\n  }\n  psVar4 = (info->type_cache).struct_types + id;\n  if (psVar4->index == 0) {\n    iVar2 = info->type_index;\n    psVar4->index = iVar2;\n    info->type_index = iVar2 + 1;\n    psVar4->tag = tag;\n    psVar4->kind = kind;\n  }\n  if (kind != DEBUG_KIND_ILLEGAL) {\n    *psize = psVar4->size;\n    return psVar4->index;\n  }\n  psVar4->kind = DEBUG_KIND_ILLEGAL;\n  psVar4->size = *psize;\n  return psVar4->index;\n}" (sized_type_specifier "long __regparm3" long type_identifier) (function_declarator "stab_get_struct_index(stab_write_handle *info,char *tag,uint id,debug_type_kind kind,uint *psize)" identifier (parameter_list "(stab_write_handle *info,char *tag,uint id,debug_type_kind kind,uint *psize)" ( (parameter_declaration "stab_write_handle *info" type_identifier (pointer_declarator "*info" * identifier)) , (parameter_declaration "char *tag" primitive_type (pointer_declarator "*tag" * identifier)) , (parameter_declaration "uint id" type_identifier identifier) , (parameter_declaration "debug_type_kind kind" type_identifier identifier) , (parameter_declaration "uint *psize" type_identifier (pointer_declarator "*psize" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  int iVar2;\n  uint uVar3;\n  stab_tag_conflict *psVar4;\n  uint uVar5;\n  \n  uVar5 = (info->type_cache).struct_types_alloc;\n  if (uVar5 <= id) {\n    if ((uVar5 == 0) && (uVar5 = 10, id < 10)) {\n      iVar2 = 0xa0;\n      uVar5 = 10;\n    }\n    else {\n      do {\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      } while (uVar5 <= id);\n      iVar2 = uVar3 << 5;\n    }\n    psVar4 = (stab_tag_conflict *)xrealloc((info->type_cache).struct_types,iVar2);\n    sVar1 = (info->type_cache).struct_types_alloc;\n    (info->type_cache).struct_types = psVar4;\n    memset(psVar4 + sVar1,0,(uVar5 - sVar1) * 0x10);\n    (info->type_cache).struct_types_alloc = uVar5;\n  }\n  psVar4 = (info->type_cache).struct_types + id;\n  if (psVar4->index == 0) {\n    iVar2 = info->type_index;\n    psVar4->index = iVar2;\n    info->type_index = iVar2 + 1;\n    psVar4->tag = tag;\n    psVar4->kind = kind;\n  }\n  if (kind != DEBUG_KIND_ILLEGAL) {\n    *psize = psVar4->size;\n    return psVar4->index;\n  }\n  psVar4->kind = DEBUG_KIND_ILLEGAL;\n  psVar4->size = *psize;\n  return psVar4->index;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "stab_tag_conflict *psVar4;" type_identifier (pointer_declarator "*psVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "uVar5 = (info->type_cache).struct_types_alloc;" (assignment_expression "uVar5 = (info->type_cache).struct_types_alloc" identifier = (field_expression "(info->type_cache).struct_types_alloc" (parenthesized_expression "(info->type_cache)" ( (field_expression "info->type_cache" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (uVar5 <= id) {\n    if ((uVar5 == 0) && (uVar5 = 10, id < 10)) {\n      iVar2 = 0xa0;\n      uVar5 = 10;\n    }\n    else {\n      do {\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      } while (uVar5 <= id);\n      iVar2 = uVar3 << 5;\n    }\n    psVar4 = (stab_tag_conflict *)xrealloc((info->type_cache).struct_types,iVar2);\n    sVar1 = (info->type_cache).struct_types_alloc;\n    (info->type_cache).struct_types = psVar4;\n    memset(psVar4 + sVar1,0,(uVar5 - sVar1) * 0x10);\n    (info->type_cache).struct_types_alloc = uVar5;\n  }" if (parenthesized_expression "(uVar5 <= id)" ( (binary_expression "uVar5 <= id" identifier <= identifier) )) (compound_statement "{\n    if ((uVar5 == 0) && (uVar5 = 10, id < 10)) {\n      iVar2 = 0xa0;\n      uVar5 = 10;\n    }\n    else {\n      do {\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      } while (uVar5 <= id);\n      iVar2 = uVar3 << 5;\n    }\n    psVar4 = (stab_tag_conflict *)xrealloc((info->type_cache).struct_types,iVar2);\n    sVar1 = (info->type_cache).struct_types_alloc;\n    (info->type_cache).struct_types = psVar4;\n    memset(psVar4 + sVar1,0,(uVar5 - sVar1) * 0x10);\n    (info->type_cache).struct_types_alloc = uVar5;\n  }" { (if_statement "if ((uVar5 == 0) && (uVar5 = 10, id < 10)) {\n      iVar2 = 0xa0;\n      uVar5 = 10;\n    }\n    else {\n      do {\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      } while (uVar5 <= id);\n      iVar2 = uVar3 << 5;\n    }" if (parenthesized_expression "((uVar5 == 0) && (uVar5 = 10, id < 10))" ( (binary_expression "(uVar5 == 0) && (uVar5 = 10, id < 10)" (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) && (parenthesized_expression "(uVar5 = 10, id < 10)" ( (comma_expression "uVar5 = 10, id < 10" (assignment_expression "uVar5 = 10" identifier = number_literal) , (binary_expression "id < 10" identifier < number_literal)) ))) )) (compound_statement "{\n      iVar2 = 0xa0;\n      uVar5 = 10;\n    }" { (expression_statement "iVar2 = 0xa0;" (assignment_expression "iVar2 = 0xa0" identifier = number_literal) ;) (expression_statement "uVar5 = 10;" (assignment_expression "uVar5 = 10" identifier = number_literal) ;) }) (else_clause "else {\n      do {\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      } while (uVar5 <= id);\n      iVar2 = uVar3 << 5;\n    }" else (compound_statement "{\n      do {\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      } while (uVar5 <= id);\n      iVar2 = uVar3 << 5;\n    }" { (do_statement "do {\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      } while (uVar5 <= id);" do (compound_statement "{\n        uVar3 = uVar5;\n        uVar5 = uVar3 * 2;\n      }" { (expression_statement "uVar3 = uVar5;" (assignment_expression "uVar3 = uVar5" identifier = identifier) ;) (expression_statement "uVar5 = uVar3 * 2;" (assignment_expression "uVar5 = uVar3 * 2" identifier = (binary_expression "uVar3 * 2" identifier * number_literal)) ;) }) while (parenthesized_expression "(uVar5 <= id)" ( (binary_expression "uVar5 <= id" identifier <= identifier) )) ;) (expression_statement "iVar2 = uVar3 << 5;" (assignment_expression "iVar2 = uVar3 << 5" identifier = (binary_expression "uVar3 << 5" identifier << number_literal)) ;) }))) (expression_statement "psVar4 = (stab_tag_conflict *)xrealloc((info->type_cache).struct_types,iVar2);" (assignment_expression "psVar4 = (stab_tag_conflict *)xrealloc((info->type_cache).struct_types,iVar2)" identifier = (cast_expression "(stab_tag_conflict *)xrealloc((info->type_cache).struct_types,iVar2)" ( (type_descriptor "stab_tag_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xrealloc((info->type_cache).struct_types,iVar2)" identifier (argument_list "((info->type_cache).struct_types,iVar2)" ( (field_expression "(info->type_cache).struct_types" (parenthesized_expression "(info->type_cache)" ( (field_expression "info->type_cache" identifier -> field_identifier) )) . field_identifier) , identifier ))))) ;) (expression_statement "sVar1 = (info->type_cache).struct_types_alloc;" (assignment_expression "sVar1 = (info->type_cache).struct_types_alloc" identifier = (field_expression "(info->type_cache).struct_types_alloc" (parenthesized_expression "(info->type_cache)" ( (field_expression "info->type_cache" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "(info->type_cache).struct_types = psVar4;" (assignment_expression "(info->type_cache).struct_types = psVar4" (field_expression "(info->type_cache).struct_types" (parenthesized_expression "(info->type_cache)" ( (field_expression "info->type_cache" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "memset(psVar4 + sVar1,0,(uVar5 - sVar1) * 0x10);" (call_expression "memset(psVar4 + sVar1,0,(uVar5 - sVar1) * 0x10)" identifier (argument_list "(psVar4 + sVar1,0,(uVar5 - sVar1) * 0x10)" ( (binary_expression "psVar4 + sVar1" identifier + identifier) , number_literal , (binary_expression "(uVar5 - sVar1) * 0x10" (parenthesized_expression "(uVar5 - sVar1)" ( (binary_expression "uVar5 - sVar1" identifier - identifier) )) * number_literal) ))) ;) (expression_statement "(info->type_cache).struct_types_alloc = uVar5;" (assignment_expression "(info->type_cache).struct_types_alloc = uVar5" (field_expression "(info->type_cache).struct_types_alloc" (parenthesized_expression "(info->type_cache)" ( (field_expression "info->type_cache" identifier -> field_identifier) )) . field_identifier) = identifier) ;) })) (expression_statement "psVar4 = (info->type_cache).struct_types + id;" (assignment_expression "psVar4 = (info->type_cache).struct_types + id" identifier = (binary_expression "(info->type_cache).struct_types + id" (field_expression "(info->type_cache).struct_types" (parenthesized_expression "(info->type_cache)" ( (field_expression "info->type_cache" identifier -> field_identifier) )) . field_identifier) + identifier)) ;) (if_statement "if (psVar4->index == 0) {\n    iVar2 = info->type_index;\n    psVar4->index = iVar2;\n    info->type_index = iVar2 + 1;\n    psVar4->tag = tag;\n    psVar4->kind = kind;\n  }" if (parenthesized_expression "(psVar4->index == 0)" ( (binary_expression "psVar4->index == 0" (field_expression "psVar4->index" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    iVar2 = info->type_index;\n    psVar4->index = iVar2;\n    info->type_index = iVar2 + 1;\n    psVar4->tag = tag;\n    psVar4->kind = kind;\n  }" { (expression_statement "iVar2 = info->type_index;" (assignment_expression "iVar2 = info->type_index" identifier = (field_expression "info->type_index" identifier -> field_identifier)) ;) (expression_statement "psVar4->index = iVar2;" (assignment_expression "psVar4->index = iVar2" (field_expression "psVar4->index" identifier -> field_identifier) = identifier) ;) (expression_statement "info->type_index = iVar2 + 1;" (assignment_expression "info->type_index = iVar2 + 1" (field_expression "info->type_index" identifier -> field_identifier) = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "psVar4->tag = tag;" (assignment_expression "psVar4->tag = tag" (field_expression "psVar4->tag" identifier -> field_identifier) = identifier) ;) (expression_statement "psVar4->kind = kind;" (assignment_expression "psVar4->kind = kind" (field_expression "psVar4->kind" identifier -> field_identifier) = identifier) ;) })) (if_statement "if (kind != DEBUG_KIND_ILLEGAL) {\n    *psize = psVar4->size;\n    return psVar4->index;\n  }" if (parenthesized_expression "(kind != DEBUG_KIND_ILLEGAL)" ( (binary_expression "kind != DEBUG_KIND_ILLEGAL" identifier != identifier) )) (compound_statement "{\n    *psize = psVar4->size;\n    return psVar4->index;\n  }" { (expression_statement "*psize = psVar4->size;" (assignment_expression "*psize = psVar4->size" (pointer_expression "*psize" * identifier) = (field_expression "psVar4->size" identifier -> field_identifier)) ;) (return_statement "return psVar4->index;" return (field_expression "psVar4->index" identifier -> field_identifier) ;) })) (expression_statement "psVar4->kind = DEBUG_KIND_ILLEGAL;" (assignment_expression "psVar4->kind = DEBUG_KIND_ILLEGAL" (field_expression "psVar4->kind" identifier -> field_identifier) = identifier) ;) (expression_statement "psVar4->size = *psize;" (assignment_expression "psVar4->size = *psize" (field_expression "psVar4->size" identifier -> field_identifier) = (pointer_expression "*psize" * identifier)) ;) (return_statement "return psVar4->index;" return (field_expression "psVar4->index" identifier -> field_identifier) ;) })))
(translation_unit "int __regparm3 FUN_00028fa0(int param_1,int param_2,uint param_3,int param_4,int *param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int *piVar3;\n  uint uVar4;\n  \n  uVar4 = *(uint *)(param_1 + 0xe0);\n  if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }\n  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));\n  if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }\n  if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }\n  piVar3[2] = 0;\n  piVar3[3] = *param_5;\n  return *piVar3;\n}\n\n" (function_definition "int __regparm3 FUN_00028fa0(int param_1,int param_2,uint param_3,int param_4,int *param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int *piVar3;\n  uint uVar4;\n  \n  uVar4 = *(uint *)(param_1 + 0xe0);\n  if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }\n  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));\n  if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }\n  if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }\n  piVar3[2] = 0;\n  piVar3[3] = *param_5;\n  return *piVar3;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00028fa0(int param_1,int param_2,uint param_3,int param_4,int *param_5)" identifier (parameter_list "(int param_1,int param_2,uint param_3,int param_4,int *param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int *piVar3;\n  uint uVar4;\n  \n  uVar4 = *(uint *)(param_1 + 0xe0);\n  if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }\n  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));\n  if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }\n  if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }\n  piVar3[2] = 0;\n  piVar3[3] = *param_5;\n  return *piVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar4 = *(uint *)(param_1 + 0xe0);" (assignment_expression "uVar4 = *(uint *)(param_1 + 0xe0)" identifier = (pointer_expression "*(uint *)(param_1 + 0xe0)" * (cast_expression "(uint *)(param_1 + 0xe0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) ))))) ;) (if_statement "if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }" if (parenthesized_expression "(uVar4 <= param_3)" ( (binary_expression "uVar4 <= param_3" identifier <= identifier) )) (compound_statement "{\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }" { (if_statement "if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }" if (parenthesized_expression "((uVar4 == 0) && (uVar4 = 10, param_3 < 10))" ( (binary_expression "(uVar4 == 0) && (uVar4 = 10, param_3 < 10)" (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) && (parenthesized_expression "(uVar4 = 10, param_3 < 10)" ( (comma_expression "uVar4 = 10, param_3 < 10" (assignment_expression "uVar4 = 10" identifier = number_literal) , (binary_expression "param_3 < 10" identifier < number_literal)) ))) )) (compound_statement "{\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }" { (expression_statement "iVar1 = 0xa0;" (assignment_expression "iVar1 = 0xa0" identifier = number_literal) ;) (expression_statement "uVar4 = 10;" (assignment_expression "uVar4 = 10" identifier = number_literal) ;) }) (else_clause "else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }" else (compound_statement "{\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }" { (do_statement "do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);" do (compound_statement "{\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      }" { (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" identifier = identifier) ;) (expression_statement "uVar4 = uVar2 * 2;" (assignment_expression "uVar4 = uVar2 * 2" identifier = (binary_expression "uVar2 * 2" identifier * number_literal)) ;) }) while (parenthesized_expression "(uVar4 <= param_3)" ( (binary_expression "uVar4 <= param_3" identifier <= identifier) )) ;) (expression_statement "iVar1 = uVar2 << 5;" (assignment_expression "iVar1 = uVar2 << 5" identifier = (binary_expression "uVar2 << 5" identifier << number_literal)) ;) }))) (expression_statement "iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);" (assignment_expression "iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1)" identifier = (call_expression "xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1)" identifier (argument_list "(*(undefined4 *)(param_1 + 0xdc),iVar1)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xdc)" * (cast_expression "(undefined4 *)(param_1 + 0xdc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xdc)" ( (binary_expression "param_1 + 0xdc" identifier + number_literal) )))) , identifier )))) ;) (expression_statement "*(int *)(param_1 + 0xdc) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xdc) = iVar1" (pointer_expression "*(int *)(param_1 + 0xdc)" * (cast_expression "(int *)(param_1 + 0xdc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xdc)" ( (binary_expression "param_1 + 0xdc" identifier + number_literal) )))) = identifier) ;) (expression_statement "memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);" (call_expression "memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10)" identifier (argument_list "((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10)" ( (cast_expression "(void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xe0) * 0x10 + iVar1)" ( (binary_expression "*(int *)(param_1 + 0xe0) * 0x10 + iVar1" (binary_expression "*(int *)(param_1 + 0xe0) * 0x10" (pointer_expression "*(int *)(param_1 + 0xe0)" * (cast_expression "(int *)(param_1 + 0xe0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) * number_literal) + identifier) ))) , number_literal , (binary_expression "(uVar4 - *(int *)(param_1 + 0xe0)) * 0x10" (parenthesized_expression "(uVar4 - *(int *)(param_1 + 0xe0))" ( (binary_expression "uVar4 - *(int *)(param_1 + 0xe0)" identifier - (pointer_expression "*(int *)(param_1 + 0xe0)" * (cast_expression "(int *)(param_1 + 0xe0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) ))))) )) * number_literal) ))) ;) (expression_statement "*(uint *)(param_1 + 0xe0) = uVar4;" (assignment_expression "*(uint *)(param_1 + 0xe0) = uVar4" (pointer_expression "*(uint *)(param_1 + 0xe0)" * (cast_expression "(uint *)(param_1 + 0xe0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));" (assignment_expression "piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc))" identifier = (cast_expression "(int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc))" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 * 0x10 + *(int *)(param_1 + 0xdc))" ( (binary_expression "param_3 * 0x10 + *(int *)(param_1 + 0xdc)" (binary_expression "param_3 * 0x10" identifier * number_literal) + (pointer_expression "*(int *)(param_1 + 0xdc)" * (cast_expression "(int *)(param_1 + 0xdc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xdc)" ( (binary_expression "param_1 + 0xdc" identifier + number_literal) ))))) )))) ;) (if_statement "if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }" if (parenthesized_expression "(*piVar3 == 0)" ( (binary_expression "*piVar3 == 0" (pointer_expression "*piVar3" * identifier) == number_literal) )) (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0x3c);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x3c)" identifier = (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))))) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x3c) = iVar1 + 1;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar1 + 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "piVar3[1] = param_2;" (assignment_expression "piVar3[1] = param_2" (subscript_expression "piVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar3[2] = param_4;" (assignment_expression "piVar3[2] = param_4" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = identifier) ;) })) (if_statement "if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }" { (expression_statement "*param_5 = piVar3[3];" (assignment_expression "*param_5 = piVar3[3]" (pointer_expression "*param_5" * identifier) = (subscript_expression "piVar3[3]" identifier [ number_literal ])) ;) (return_statement "return *piVar3;" return (pointer_expression "*piVar3" * identifier) ;) })) (expression_statement "piVar3[2] = 0;" (assignment_expression "piVar3[2] = 0" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[3] = *param_5;" (assignment_expression "piVar3[3] = *param_5" (subscript_expression "piVar3[3]" identifier [ number_literal ]) = (pointer_expression "*param_5" * identifier)) ;) (return_statement "return *piVar3;" return (pointer_expression "*piVar3" * identifier) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression IDENT < LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT << LIT)) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (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 IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) * LIT) + IDENT) ))) , LIT , (binary_expression (parenthesized_expression ( (binary_expression IDENT - (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 IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT * LIT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (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 (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (return_statement return (pointer_expression * IDENT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * IDENT)) ;) (return_statement return (pointer_expression * IDENT) ;) })))
(function_definition "int __regparm3 FUN_00028fa0(int param_1,int param_2,uint param_3,int param_4,int *param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int *piVar3;\n  uint uVar4;\n  \n  uVar4 = *(uint *)(param_1 + 0xe0);\n  if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }\n  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));\n  if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }\n  if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }\n  piVar3[2] = 0;\n  piVar3[3] = *param_5;\n  return *piVar3;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00028fa0(int param_1,int param_2,uint param_3,int param_4,int *param_5)" (identifier "FUN_00028fa0") (parameter_list "(int param_1,int param_2,uint param_3,int param_4,int *param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "int *param_5" (primitive_type "int") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int *piVar3;\n  uint uVar4;\n  \n  uVar4 = *(uint *)(param_1 + 0xe0);\n  if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }\n  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));\n  if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }\n  if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }\n  piVar3[2] = 0;\n  piVar3[3] = *param_5;\n  return *piVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "uVar4 = *(uint *)(param_1 + 0xe0);" (assignment_expression "uVar4 = *(uint *)(param_1 + 0xe0)" (identifier "uVar4") (= "=") (pointer_expression "*(uint *)(param_1 + 0xe0)" (* "*") (cast_expression "(uint *)(param_1 + 0xe0)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe0)" (( "(") (binary_expression "param_1 + 0xe0" (identifier "param_1") (+ "+") (number_literal "0xe0")) () ")"))))) (; ";")) (if_statement "if (uVar4 <= param_3) {\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }" (if "if") (parenthesized_expression "(uVar4 <= param_3)" (( "(") (binary_expression "uVar4 <= param_3" (identifier "uVar4") (<= "<=") (identifier "param_3")) () ")")) (compound_statement "{\n    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }\n    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);\n    *(int *)(param_1 + 0xdc) = iVar1;\n    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);\n    *(uint *)(param_1 + 0xe0) = uVar4;\n  }" ({ "{") (if_statement "if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }\n    else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }" (if "if") (parenthesized_expression "((uVar4 == 0) && (uVar4 = 10, param_3 < 10))" (( "(") (binary_expression "(uVar4 == 0) && (uVar4 = 10, param_3 < 10)" (parenthesized_expression "(uVar4 == 0)" (( "(") (binary_expression "uVar4 == 0" (identifier "uVar4") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(uVar4 = 10, param_3 < 10)" (( "(") (comma_expression "uVar4 = 10, param_3 < 10" (assignment_expression "uVar4 = 10" (identifier "uVar4") (= "=") (number_literal "10")) (, ",") (binary_expression "param_3 < 10" (identifier "param_3") (< "<") (number_literal "10"))) () ")"))) () ")")) (compound_statement "{\n      iVar1 = 0xa0;\n      uVar4 = 10;\n    }" ({ "{") (expression_statement "iVar1 = 0xa0;" (assignment_expression "iVar1 = 0xa0" (identifier "iVar1") (= "=") (number_literal "0xa0")) (; ";")) (expression_statement "uVar4 = 10;" (assignment_expression "uVar4 = 10" (identifier "uVar4") (= "=") (number_literal "10")) (; ";")) (} "}")) (else_clause "else {\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }" (else "else") (compound_statement "{\n      do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);\n      iVar1 = uVar2 << 5;\n    }" ({ "{") (do_statement "do {\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      } while (uVar4 <= param_3);" (do "do") (compound_statement "{\n        uVar2 = uVar4;\n        uVar4 = uVar2 * 2;\n      }" ({ "{") (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" (identifier "uVar2") (= "=") (identifier "uVar4")) (; ";")) (expression_statement "uVar4 = uVar2 * 2;" (assignment_expression "uVar4 = uVar2 * 2" (identifier "uVar4") (= "=") (binary_expression "uVar2 * 2" (identifier "uVar2") (* "*") (number_literal "2"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar4 <= param_3)" (( "(") (binary_expression "uVar4 <= param_3" (identifier "uVar4") (<= "<=") (identifier "param_3")) () ")")) (; ";")) (expression_statement "iVar1 = uVar2 << 5;" (assignment_expression "iVar1 = uVar2 << 5" (identifier "iVar1") (= "=") (binary_expression "uVar2 << 5" (identifier "uVar2") (<< "<<") (number_literal "5"))) (; ";")) (} "}")))) (expression_statement "iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);" (assignment_expression "iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1)" (identifier "iVar1") (= "=") (call_expression "xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1)" (identifier "xrealloc") (argument_list "(*(undefined4 *)(param_1 + 0xdc),iVar1)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xdc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xdc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xdc)" (( "(") (binary_expression "param_1 + 0xdc" (identifier "param_1") (+ "+") (number_literal "0xdc")) () ")")))) (, ",") (identifier "iVar1") () ")")))) (; ";")) (expression_statement "*(int *)(param_1 + 0xdc) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xdc) = iVar1" (pointer_expression "*(int *)(param_1 + 0xdc)" (* "*") (cast_expression "(int *)(param_1 + 0xdc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xdc)" (( "(") (binary_expression "param_1 + 0xdc" (identifier "param_1") (+ "+") (number_literal "0xdc")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);" (call_expression "memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10)" (identifier "memset") (argument_list "((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,\n           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10)" (( "(") (cast_expression "(void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0xe0) * 0x10 + iVar1)" (( "(") (binary_expression "*(int *)(param_1 + 0xe0) * 0x10 + iVar1" (binary_expression "*(int *)(param_1 + 0xe0) * 0x10" (pointer_expression "*(int *)(param_1 + 0xe0)" (* "*") (cast_expression "(int *)(param_1 + 0xe0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe0)" (( "(") (binary_expression "param_1 + 0xe0" (identifier "param_1") (+ "+") (number_literal "0xe0")) () ")")))) (* "*") (number_literal "0x10")) (+ "+") (identifier "iVar1")) () ")"))) (, ",") (number_literal "0") (, ",") (binary_expression "(uVar4 - *(int *)(param_1 + 0xe0)) * 0x10" (parenthesized_expression "(uVar4 - *(int *)(param_1 + 0xe0))" (( "(") (binary_expression "uVar4 - *(int *)(param_1 + 0xe0)" (identifier "uVar4") (- "-") (pointer_expression "*(int *)(param_1 + 0xe0)" (* "*") (cast_expression "(int *)(param_1 + 0xe0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe0)" (( "(") (binary_expression "param_1 + 0xe0" (identifier "param_1") (+ "+") (number_literal "0xe0")) () ")"))))) () ")")) (* "*") (number_literal "0x10")) () ")"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0xe0) = uVar4;" (assignment_expression "*(uint *)(param_1 + 0xe0) = uVar4" (pointer_expression "*(uint *)(param_1 + 0xe0)" (* "*") (cast_expression "(uint *)(param_1 + 0xe0)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe0)" (( "(") (binary_expression "param_1 + 0xe0" (identifier "param_1") (+ "+") (number_literal "0xe0")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (} "}"))) (expression_statement "piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));" (assignment_expression "piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc))" (identifier "piVar3") (= "=") (cast_expression "(int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc))" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 * 0x10 + *(int *)(param_1 + 0xdc))" (( "(") (binary_expression "param_3 * 0x10 + *(int *)(param_1 + 0xdc)" (binary_expression "param_3 * 0x10" (identifier "param_3") (* "*") (number_literal "0x10")) (+ "+") (pointer_expression "*(int *)(param_1 + 0xdc)" (* "*") (cast_expression "(int *)(param_1 + 0xdc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xdc)" (( "(") (binary_expression "param_1 + 0xdc" (identifier "param_1") (+ "+") (number_literal "0xdc")) () ")"))))) () ")")))) (; ";")) (if_statement "if (*piVar3 == 0) {\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }" (if "if") (parenthesized_expression "(*piVar3 == 0)" (( "(") (binary_expression "*piVar3 == 0" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0x3c);\n    *piVar3 = iVar1;\n    *(int *)(param_1 + 0x3c) = iVar1 + 1;\n    piVar3[1] = param_2;\n    piVar3[2] = param_4;\n  }" ({ "{") (expression_statement "iVar1 = *(int *)(param_1 + 0x3c);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x3c)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")"))))) (; ";")) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "*(int *)(param_1 + 0x3c) = iVar1 + 1;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar1 + 1" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "piVar3[1] = param_2;" (assignment_expression "piVar3[1] = param_2" (subscript_expression "piVar3[1]" (identifier "piVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "piVar3[2] = param_4;" (assignment_expression "piVar3[2] = param_4" (subscript_expression "piVar3[2]" (identifier "piVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_4")) (; ";")) (} "}"))) (if_statement "if (param_4 != 0) {\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *param_5 = piVar3[3];\n    return *piVar3;\n  }" ({ "{") (expression_statement "*param_5 = piVar3[3];" (assignment_expression "*param_5 = piVar3[3]" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (subscript_expression "piVar3[3]" (identifier "piVar3") ([ "[") (number_literal "3") (] "]"))) (; ";")) (return_statement "return *piVar3;" (return "return") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (} "}"))) (expression_statement "piVar3[2] = 0;" (assignment_expression "piVar3[2] = 0" (subscript_expression "piVar3[2]" (identifier "piVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar3[3] = *param_5;" (assignment_expression "piVar3[3] = *param_5" (subscript_expression "piVar3[3]" (identifier "piVar3") ([ "[") (number_literal "3") (] "]")) (= "=") (pointer_expression "*param_5" (* "*") (identifier "param_5"))) (; ";")) (return_statement "return *piVar3;" (return "return") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

long type_1
function_1(type_2 *info,char *tag,type_3 var_2,type_4 var_9,type_3 *psize)

{
  size_t var_7;
  int var_8;
  type_3 var_3;
  type_5 *var_6;
  type_3 var_1;
  
  var_1 = (info->type_cache).struct_types_alloc;
  if (var_1 <= var_2) {
    if ((var_1 == 0) && (var_1 = 10, var_2 < 10)) {
      var_8 = 0xa0;
      var_1 = 10;
    }
    else {
      do {
        var_3 = var_1;
        var_1 = var_3 * 2;
      } while (var_1 <= var_2);
      var_8 = var_3 << 5;
    }
    var_6 = (type_5 *)var_4((info->type_cache).struct_types,var_8);
    var_7 = (info->type_cache).struct_types_alloc;
    (info->type_cache).struct_types = var_6;
    var_5(var_6 + var_7,0,(var_1 - var_7) * 0x10);
    (info->type_cache).struct_types_alloc = var_1;
  }
  var_6 = (info->type_cache).struct_types + var_2;
  if (var_6->index == 0) {
    var_8 = info->type_index;
    var_6->index = var_8;
    info->type_index = var_8 + 1;
    var_6->tag = tag;
    var_6->var_9 = var_9;
  }
  if (var_9 != var_10) {
    *psize = var_6->size;
    return var_6->index;
  }
  var_6->var_9 = var_10;
  var_6->size = *psize;
  return var_6->index;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int __regparm3 MASKED(int param_1,int param_2,uint param_3,int param_4,int *param_5)

{
  int iVar1;
  uint uVar2;
  int *piVar3;
  uint uVar4;
  
  uVar4 = *(uint *)(param_1 + 0xe0);
  if (uVar4 <= param_3) {
    if ((uVar4 == 0) && (uVar4 = 10, param_3 < 10)) {
      iVar1 = 0xa0;
      uVar4 = 10;
    }
    else {
      do {
        uVar2 = uVar4;
        uVar4 = uVar2 * 2;
      } while (uVar4 <= param_3);
      iVar1 = uVar2 << 5;
    }
    iVar1 = xrealloc(*(undefined4 *)(param_1 + 0xdc),iVar1);
    *(int *)(param_1 + 0xdc) = iVar1;
    memset((void *)(*(int *)(param_1 + 0xe0) * 0x10 + iVar1),0,
           (uVar4 - *(int *)(param_1 + 0xe0)) * 0x10);
    *(uint *)(param_1 + 0xe0) = uVar4;
  }
  piVar3 = (int *)(param_3 * 0x10 + *(int *)(param_1 + 0xdc));
  if (*piVar3 == 0) {
    iVar1 = *(int *)(param_1 + 0x3c);
    *piVar3 = iVar1;
    *(int *)(param_1 + 0x3c) = iVar1 + 1;
    piVar3[1] = param_2;
    piVar3[2] = param_4;
  }
  if (param_4 != 0) {
    *param_5 = piVar3[3];
    return *piVar3;
  }
  piVar3[2] = 0;
  piVar3[3] = *param_5;
  return *piVar3;
}

