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

int __regparm3 sqlite3BtreeSetSpillSize(Btree *p,int mxPage)

{
  BtShared *pBVar1;
  PCache *pPVar2;
  int iVar3;
  int iVar4;
  int extraout_EDX;
  undefined8 uVar5;
  
  pBVar1 = p->pBt;
  iVar4 = mxPage;
  if (p->sharable != '\0') {
    sqlite3BtreeEnter(p);
    iVar4 = extraout_EDX;
  }
  pPVar2 = pBVar1->pPager->pPCache;
  if (mxPage == 0) {
    mxPage = pPVar2->szSpill;
  }
  else {
    if (mxPage < 0) {
      iVar4 = pPVar2->szExtra + pPVar2->szPage;
      uVar5 = __divdi3(mxPage * -0x400,
                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,
                       iVar4,iVar4 >> 0x1f);
      iVar4 = (int)((ulonglong)uVar5 >> 0x20);
      mxPage = (int)uVar5;
    }
    pPVar2->szSpill = mxPage;
  }
  iVar3 = pPVar2->szCache;
  uVar5 = CONCAT44(iVar4,iVar3);
  if (iVar3 < 0) {
    iVar4 = pPVar2->szExtra + pPVar2->szPage;
    uVar5 = __divdi3(iVar3 * -0x400,
                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,
                     iVar4 >> 0x1f);
  }
  if (mxPage <= (int)uVar5) {
    mxPage = (int)uVar5;
  }
  if (p->sharable != '\0') {
    sqlite3BtreeSetCacheSize(p,(int)((ulonglong)uVar5 >> 0x20));
  }
  return mxPage;
}



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

int __regparm3 FUN_0002d060(int param_1,int param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  
  piVar1 = *(int **)(param_1 + 4);
  if (*(char *)(param_1 + 9) != '\0') {
    FUN_0002cb40();
  }
  iVar2 = *(int *)(*piVar1 + 0xd0);
  if (param_2 == 0) {
    param_2 = *(int *)(iVar2 + 0x14);
  }
  else {
    if (param_2 < 0) {
      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);
      param_2 = FUN_000f5a10(param_2 * -0x400,
                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |
                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);
    }
    *(int *)(iVar2 + 0x14) = param_2;
  }
  iVar3 = *(int *)(iVar2 + 0x10);
  if (iVar3 < 0) {
    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);
    iVar3 = FUN_000f5a10(iVar3 * -0x400,
                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,
                         iVar2,iVar2 >> 0x1f);
  }
  if (param_2 <= iVar3) {
    param_2 = iVar3;
  }
  if (*(char *)(param_1 + 9) != '\0') {
    FUN_0002cfa0();
  }
  return param_2;
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00014d20
ADD EBX,0x11de67
SUB ESP,0x1c
CMP byte ptr [EAX + 0x9],0x0
MOV EBP,dword ptr [EAX + 0x4]
JZ 0x0002d084
CALL 0x0002cb40
MOV EAX,dword ptr [EBP]
MOV EBP,dword ptr [EAX + 0xd0]
TEST ESI,ESI
JNZ 0x0002d0f0
MOV ESI,dword ptr [EBP + 0x14]
MOV EAX,dword ptr [EBP + 0x10]
TEST EAX,EAX
JNS 0x0002d0cb
CDQ
NEG EAX
ADC EDX,0x0
NEG EDX
SHLD EDX,EAX,0xa
SHL EAX,0xa
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [EBP + 0x1c]
ADD EAX,dword ptr [EBP + 0x18]
MOV dword ptr [ESP + 0xc],EDX
CDQ
PUSH EDX
PUSH EAX
PUSH dword ptr [ESP + 0x14]
PUSH dword ptr [ESP + 0x14]
CALL 0x000f5a10
ADD ESP,0x10
CMP EAX,ESI
CMOVGE ESI,EAX
CMP byte ptr [EDI + 0x9],0x0
JZ 0x0002d0dd
MOV EAX,EDI
CALL 0x0002cfa0
ADD ESP,0x1c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
JNS 0x0002d126
MOV EAX,ESI
CDQ
NEG EAX
ADC EDX,0x0
NEG EDX
SHLD EDX,EAX,0xa
SHL EAX,0xa
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [EBP + 0x1c]
ADD EAX,dword ptr [EBP + 0x18]
MOV dword ptr [ESP + 0xc],EDX
CDQ
PUSH EDX
PUSH EAX
PUSH dword ptr [ESP + 0x14]
PUSH dword ptr [ESP + 0x14]
CALL 0x000f5a10
ADD ESP,0x10
MOV ESI,EAX
MOV dword ptr [EBP + 0x14],ESI
JMP 0x0002d094
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 FUN_0002d060(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }\n  iVar2 = *(int *)(*piVar1 + 0xd0);\n  if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }\n  iVar3 = *(int *)(iVar2 + 0x10);\n  if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }\n  if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }\n  return param_2;\n}\n\n" comment (function_definition "int __regparm3 FUN_0002d060(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }\n  iVar2 = *(int *)(*piVar1 + 0xd0);\n  if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }\n  iVar3 = *(int *)(iVar2 + 0x10);\n  if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }\n  if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }\n  return param_2;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002d060(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }\n  iVar2 = *(int *)(*piVar1 + 0xd0);\n  if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }\n  iVar3 = *(int *)(iVar2 + 0x10);\n  if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }\n  if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }\n  return param_2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "piVar1 = *(int **)(param_1 + 4);" (assignment_expression "piVar1 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }" if (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" ( (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" * (cast_expression "(char *)(param_1 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0002cb40();\n  }" { (expression_statement "FUN_0002cb40();" (call_expression "FUN_0002cb40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar2 = *(int *)(*piVar1 + 0xd0);" (assignment_expression "iVar2 = *(int *)(*piVar1 + 0xd0)" identifier = (pointer_expression "*(int *)(*piVar1 + 0xd0)" * (cast_expression "(int *)(*piVar1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar1 + 0xd0)" ( (binary_expression "*piVar1 + 0xd0" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    param_2 = *(int *)(iVar2 + 0x14);\n  }" { (expression_statement "param_2 = *(int *)(iVar2 + 0x14);" (assignment_expression "param_2 = *(int *)(iVar2 + 0x14)" identifier = (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }" else (compound_statement "{\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }" { (if_statement "if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }" if (parenthesized_expression "(param_2 < 0)" ( (binary_expression "param_2 < 0" identifier < number_literal) )) (compound_statement "{\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }" { (expression_statement "iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);" (assignment_expression "iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" identifier = (binary_expression "*(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" (pointer_expression "*(int *)(iVar2 + 0x1c)" * (cast_expression "(int *)(iVar2 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) )))) + (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))))) ;) (expression_statement "param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);" (assignment_expression "param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f)" identifier = (call_expression "FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f)" identifier (argument_list "(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f)" ( (binary_expression "param_2 * -0x400" identifier * number_literal) , (binary_expression "((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16" (binary_expression "((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400" (parenthesized_expression "((param_2 >> 0x1f) + (uint)(param_2 != 0))" ( (binary_expression "(param_2 >> 0x1f) + (uint)(param_2 != 0)" (parenthesized_expression "(param_2 >> 0x1f)" ( (binary_expression "param_2 >> 0x1f" identifier >> number_literal) )) + (call_expression "(uint)(param_2 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )))) )) * number_literal) | (binary_expression "(uint)-param_2 >> 0x16" (binary_expression "(uint)-param_2" (parenthesized_expression "(uint)" ( identifier )) - identifier) >> number_literal)) , identifier , (binary_expression "iVar3 >> 0x1f" identifier >> number_literal) )))) ;) })) (expression_statement "*(int *)(iVar2 + 0x14) = param_2;" (assignment_expression "*(int *)(iVar2 + 0x14) = param_2" (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "iVar3 = *(int *)(iVar2 + 0x10);" (assignment_expression "iVar3 = *(int *)(iVar2 + 0x10)" identifier = (pointer_expression "*(int *)(iVar2 + 0x10)" * (cast_expression "(int *)(iVar2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x10)" ( (binary_expression "iVar2 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }" { (expression_statement "iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);" (assignment_expression "iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" identifier = (binary_expression "*(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" (pointer_expression "*(int *)(iVar2 + 0x1c)" * (cast_expression "(int *)(iVar2 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) )))) + (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))))) ;) (expression_statement "iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);" (assignment_expression "iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f)" identifier = (call_expression "FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f)" identifier (argument_list "(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f)" ( (binary_expression "iVar3 * -0x400" identifier * number_literal) , (binary_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16" (binary_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400" (parenthesized_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0))" ( (binary_expression "(iVar3 >> 0x1f) + (uint)(iVar3 != 0)" (parenthesized_expression "(iVar3 >> 0x1f)" ( (binary_expression "iVar3 >> 0x1f" identifier >> number_literal) )) + (call_expression "(uint)(iVar3 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )))) )) * number_literal) | (binary_expression "(uint)-iVar3 >> 0x16" (binary_expression "(uint)-iVar3" (parenthesized_expression "(uint)" ( identifier )) - identifier) >> number_literal)) , identifier , (binary_expression "iVar2 >> 0x1f" identifier >> number_literal) )))) ;) })) (if_statement "if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }" if (parenthesized_expression "(param_2 <= iVar3)" ( (binary_expression "param_2 <= iVar3" identifier <= identifier) )) (compound_statement "{\n    param_2 = iVar3;\n  }" { (expression_statement "param_2 = iVar3;" (assignment_expression "param_2 = iVar3" identifier = identifier) ;) })) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }" if (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" ( (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" * (cast_expression "(char *)(param_1 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0002cfa0();\n  }" { (expression_statement "FUN_0002cfa0();" (call_expression "FUN_0002cfa0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 sqlite3BtreeSetSpillSize(Btree *p,int mxPage)\n\n{\n  BtShared *pBVar1;\n  PCache *pPVar2;\n  int iVar3;\n  int iVar4;\n  int extraout_EDX;\n  undefined8 uVar5;\n  \n  pBVar1 = p->pBt;\n  iVar4 = mxPage;\n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n    iVar4 = extraout_EDX;\n  }\n  pPVar2 = pBVar1->pPager->pPCache;\n  if (mxPage == 0) {\n    mxPage = pPVar2->szSpill;\n  }\n  else {\n    if (mxPage < 0) {\n      iVar4 = pPVar2->szExtra + pPVar2->szPage;\n      uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f);\n      iVar4 = (int)((ulonglong)uVar5 >> 0x20);\n      mxPage = (int)uVar5;\n    }\n    pPVar2->szSpill = mxPage;\n  }\n  iVar3 = pPVar2->szCache;\n  uVar5 = CONCAT44(iVar4,iVar3);\n  if (iVar3 < 0) {\n    iVar4 = pPVar2->szExtra + pPVar2->szPage;\n    uVar5 = __divdi3(iVar3 * -0x400,\n                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,\n                     iVar4 >> 0x1f);\n  }\n  if (mxPage <= (int)uVar5) {\n    mxPage = (int)uVar5;\n  }\n  if (p->sharable != '\0') {\n    sqlite3BtreeSetCacheSize(p,(int)((ulonglong)uVar5 >> 0x20));\n  }\n  return mxPage;\n}\n\n" comment (function_definition "int __regparm3 sqlite3BtreeSetSpillSize(Btree *p,int mxPage)\n\n{\n  BtShared *pBVar1;\n  PCache *pPVar2;\n  int iVar3;\n  int iVar4;\n  int extraout_EDX;\n  undefined8 uVar5;\n  \n  pBVar1 = p->pBt;\n  iVar4 = mxPage;\n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n    iVar4 = extraout_EDX;\n  }\n  pPVar2 = pBVar1->pPager->pPCache;\n  if (mxPage == 0) {\n    mxPage = pPVar2->szSpill;\n  }\n  else {\n    if (mxPage < 0) {\n      iVar4 = pPVar2->szExtra + pPVar2->szPage;\n      uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f);\n      iVar4 = (int)((ulonglong)uVar5 >> 0x20);\n      mxPage = (int)uVar5;\n    }\n    pPVar2->szSpill = mxPage;\n  }\n  iVar3 = pPVar2->szCache;\n  uVar5 = CONCAT44(iVar4,iVar3);\n  if (iVar3 < 0) {\n    iVar4 = pPVar2->szExtra + pPVar2->szPage;\n    uVar5 = __divdi3(iVar3 * -0x400,\n                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,\n                     iVar4 >> 0x1f);\n  }\n  if (mxPage <= (int)uVar5) {\n    mxPage = (int)uVar5;\n  }\n  if (p->sharable != '\0') {\n    sqlite3BtreeSetCacheSize(p,(int)((ulonglong)uVar5 >> 0x20));\n  }\n  return mxPage;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3BtreeSetSpillSize(Btree *p,int mxPage)" identifier (parameter_list "(Btree *p,int mxPage)" ( (parameter_declaration "Btree *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "int mxPage" primitive_type identifier) ))) (compound_statement "{\n  BtShared *pBVar1;\n  PCache *pPVar2;\n  int iVar3;\n  int iVar4;\n  int extraout_EDX;\n  undefined8 uVar5;\n  \n  pBVar1 = p->pBt;\n  iVar4 = mxPage;\n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n    iVar4 = extraout_EDX;\n  }\n  pPVar2 = pBVar1->pPager->pPCache;\n  if (mxPage == 0) {\n    mxPage = pPVar2->szSpill;\n  }\n  else {\n    if (mxPage < 0) {\n      iVar4 = pPVar2->szExtra + pPVar2->szPage;\n      uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f);\n      iVar4 = (int)((ulonglong)uVar5 >> 0x20);\n      mxPage = (int)uVar5;\n    }\n    pPVar2->szSpill = mxPage;\n  }\n  iVar3 = pPVar2->szCache;\n  uVar5 = CONCAT44(iVar4,iVar3);\n  if (iVar3 < 0) {\n    iVar4 = pPVar2->szExtra + pPVar2->szPage;\n    uVar5 = __divdi3(iVar3 * -0x400,\n                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,\n                     iVar4 >> 0x1f);\n  }\n  if (mxPage <= (int)uVar5) {\n    mxPage = (int)uVar5;\n  }\n  if (p->sharable != '\0') {\n    sqlite3BtreeSetCacheSize(p,(int)((ulonglong)uVar5 >> 0x20));\n  }\n  return mxPage;\n}" { (declaration "BtShared *pBVar1;" type_identifier (pointer_declarator "*pBVar1" * identifier) ;) (declaration "PCache *pPVar2;" type_identifier (pointer_declarator "*pPVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int extraout_EDX;" primitive_type identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (expression_statement "pBVar1 = p->pBt;" (assignment_expression "pBVar1 = p->pBt" identifier = (field_expression "p->pBt" identifier -> field_identifier)) ;) (expression_statement "iVar4 = mxPage;" (assignment_expression "iVar4 = mxPage" identifier = identifier) ;) (if_statement "if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n    iVar4 = extraout_EDX;\n  }" if (parenthesized_expression "(p->sharable != '\0')" ( (binary_expression "p->sharable != '\0'" (field_expression "p->sharable" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    sqlite3BtreeEnter(p);\n    iVar4 = extraout_EDX;\n  }" { (expression_statement "sqlite3BtreeEnter(p);" (call_expression "sqlite3BtreeEnter(p)" identifier (argument_list "(p)" ( identifier ))) ;) (expression_statement "iVar4 = extraout_EDX;" (assignment_expression "iVar4 = extraout_EDX" identifier = identifier) ;) })) (expression_statement "pPVar2 = pBVar1->pPager->pPCache;" (assignment_expression "pPVar2 = pBVar1->pPager->pPCache" identifier = (field_expression "pBVar1->pPager->pPCache" (field_expression "pBVar1->pPager" identifier -> field_identifier) -> field_identifier)) ;) (if_statement "if (mxPage == 0) {\n    mxPage = pPVar2->szSpill;\n  }\n  else {\n    if (mxPage < 0) {\n      iVar4 = pPVar2->szExtra + pPVar2->szPage;\n      uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f);\n      iVar4 = (int)((ulonglong)uVar5 >> 0x20);\n      mxPage = (int)uVar5;\n    }\n    pPVar2->szSpill = mxPage;\n  }" if (parenthesized_expression "(mxPage == 0)" ( (binary_expression "mxPage == 0" identifier == number_literal) )) (compound_statement "{\n    mxPage = pPVar2->szSpill;\n  }" { (expression_statement "mxPage = pPVar2->szSpill;" (assignment_expression "mxPage = pPVar2->szSpill" identifier = (field_expression "pPVar2->szSpill" identifier -> field_identifier)) ;) }) (else_clause "else {\n    if (mxPage < 0) {\n      iVar4 = pPVar2->szExtra + pPVar2->szPage;\n      uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f);\n      iVar4 = (int)((ulonglong)uVar5 >> 0x20);\n      mxPage = (int)uVar5;\n    }\n    pPVar2->szSpill = mxPage;\n  }" else (compound_statement "{\n    if (mxPage < 0) {\n      iVar4 = pPVar2->szExtra + pPVar2->szPage;\n      uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f);\n      iVar4 = (int)((ulonglong)uVar5 >> 0x20);\n      mxPage = (int)uVar5;\n    }\n    pPVar2->szSpill = mxPage;\n  }" { (if_statement "if (mxPage < 0) {\n      iVar4 = pPVar2->szExtra + pPVar2->szPage;\n      uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f);\n      iVar4 = (int)((ulonglong)uVar5 >> 0x20);\n      mxPage = (int)uVar5;\n    }" if (parenthesized_expression "(mxPage < 0)" ( (binary_expression "mxPage < 0" identifier < number_literal) )) (compound_statement "{\n      iVar4 = pPVar2->szExtra + pPVar2->szPage;\n      uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f);\n      iVar4 = (int)((ulonglong)uVar5 >> 0x20);\n      mxPage = (int)uVar5;\n    }" { (expression_statement "iVar4 = pPVar2->szExtra + pPVar2->szPage;" (assignment_expression "iVar4 = pPVar2->szExtra + pPVar2->szPage" identifier = (binary_expression "pPVar2->szExtra + pPVar2->szPage" (field_expression "pPVar2->szExtra" identifier -> field_identifier) + (field_expression "pPVar2->szPage" identifier -> field_identifier))) ;) (expression_statement "uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f);" (assignment_expression "uVar5 = __divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f)" identifier = (call_expression "__divdi3(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f)" identifier (argument_list "(mxPage * -0x400,\n                       ((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16,\n                       iVar4,iVar4 >> 0x1f)" ( (binary_expression "mxPage * -0x400" identifier * number_literal) , (binary_expression "((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400 | (uint)-mxPage >> 0x16" (binary_expression "((mxPage >> 0x1f) + (uint)(mxPage != 0)) * -0x400" (parenthesized_expression "((mxPage >> 0x1f) + (uint)(mxPage != 0))" ( (binary_expression "(mxPage >> 0x1f) + (uint)(mxPage != 0)" (parenthesized_expression "(mxPage >> 0x1f)" ( (binary_expression "mxPage >> 0x1f" identifier >> number_literal) )) + (call_expression "(uint)(mxPage != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(mxPage != 0)" ( (binary_expression "mxPage != 0" identifier != number_literal) )))) )) * number_literal) | (binary_expression "(uint)-mxPage >> 0x16" (binary_expression "(uint)-mxPage" (parenthesized_expression "(uint)" ( identifier )) - identifier) >> number_literal)) , identifier , (binary_expression "iVar4 >> 0x1f" identifier >> number_literal) )))) ;) (expression_statement "iVar4 = (int)((ulonglong)uVar5 >> 0x20);" (assignment_expression "iVar4 = (int)((ulonglong)uVar5 >> 0x20)" identifier = (cast_expression "(int)((ulonglong)uVar5 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar5 >> 0x20)" ( (binary_expression "(ulonglong)uVar5 >> 0x20" (cast_expression "(ulonglong)uVar5" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "mxPage = (int)uVar5;" (assignment_expression "mxPage = (int)uVar5" identifier = (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (expression_statement "pPVar2->szSpill = mxPage;" (assignment_expression "pPVar2->szSpill = mxPage" (field_expression "pPVar2->szSpill" identifier -> field_identifier) = identifier) ;) }))) (expression_statement "iVar3 = pPVar2->szCache;" (assignment_expression "iVar3 = pPVar2->szCache" identifier = (field_expression "pPVar2->szCache" identifier -> field_identifier)) ;) (expression_statement "uVar5 = CONCAT44(iVar4,iVar3);" (assignment_expression "uVar5 = CONCAT44(iVar4,iVar3)" identifier = (call_expression "CONCAT44(iVar4,iVar3)" identifier (argument_list "(iVar4,iVar3)" ( identifier , identifier )))) ;) (if_statement "if (iVar3 < 0) {\n    iVar4 = pPVar2->szExtra + pPVar2->szPage;\n    uVar5 = __divdi3(iVar3 * -0x400,\n                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,\n                     iVar4 >> 0x1f);\n  }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar4 = pPVar2->szExtra + pPVar2->szPage;\n    uVar5 = __divdi3(iVar3 * -0x400,\n                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,\n                     iVar4 >> 0x1f);\n  }" { (expression_statement "iVar4 = pPVar2->szExtra + pPVar2->szPage;" (assignment_expression "iVar4 = pPVar2->szExtra + pPVar2->szPage" identifier = (binary_expression "pPVar2->szExtra + pPVar2->szPage" (field_expression "pPVar2->szExtra" identifier -> field_identifier) + (field_expression "pPVar2->szPage" identifier -> field_identifier))) ;) (expression_statement "uVar5 = __divdi3(iVar3 * -0x400,\n                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,\n                     iVar4 >> 0x1f);" (assignment_expression "uVar5 = __divdi3(iVar3 * -0x400,\n                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,\n                     iVar4 >> 0x1f)" identifier = (call_expression "__divdi3(iVar3 * -0x400,\n                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,\n                     iVar4 >> 0x1f)" identifier (argument_list "(iVar3 * -0x400,\n                     ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,iVar4,\n                     iVar4 >> 0x1f)" ( (binary_expression "iVar3 * -0x400" identifier * number_literal) , (binary_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16" (binary_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400" (parenthesized_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0))" ( (binary_expression "(iVar3 >> 0x1f) + (uint)(iVar3 != 0)" (parenthesized_expression "(iVar3 >> 0x1f)" ( (binary_expression "iVar3 >> 0x1f" identifier >> number_literal) )) + (call_expression "(uint)(iVar3 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )))) )) * number_literal) | (binary_expression "(uint)-iVar3 >> 0x16" (binary_expression "(uint)-iVar3" (parenthesized_expression "(uint)" ( identifier )) - identifier) >> number_literal)) , identifier , (binary_expression "iVar4 >> 0x1f" identifier >> number_literal) )))) ;) })) (if_statement "if (mxPage <= (int)uVar5) {\n    mxPage = (int)uVar5;\n  }" if (parenthesized_expression "(mxPage <= (int)uVar5)" ( (binary_expression "mxPage <= (int)uVar5" identifier <= (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    mxPage = (int)uVar5;\n  }" { (expression_statement "mxPage = (int)uVar5;" (assignment_expression "mxPage = (int)uVar5" identifier = (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (if_statement "if (p->sharable != '\0') {\n    sqlite3BtreeSetCacheSize(p,(int)((ulonglong)uVar5 >> 0x20));\n  }" if (parenthesized_expression "(p->sharable != '\0')" ( (binary_expression "p->sharable != '\0'" (field_expression "p->sharable" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    sqlite3BtreeSetCacheSize(p,(int)((ulonglong)uVar5 >> 0x20));\n  }" { (expression_statement "sqlite3BtreeSetCacheSize(p,(int)((ulonglong)uVar5 >> 0x20));" (call_expression "sqlite3BtreeSetCacheSize(p,(int)((ulonglong)uVar5 >> 0x20))" identifier (argument_list "(p,(int)((ulonglong)uVar5 >> 0x20))" ( identifier , (cast_expression "(int)((ulonglong)uVar5 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar5 >> 0x20)" ( (binary_expression "(ulonglong)uVar5 >> 0x20" (cast_expression "(ulonglong)uVar5" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) ))) ;) })) (return_statement "return mxPage;" return identifier ;) })))
(translation_unit "int __regparm3 FUN_0002d060(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }\n  iVar2 = *(int *)(*piVar1 + 0xd0);\n  if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }\n  iVar3 = *(int *)(iVar2 + 0x10);\n  if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }\n  if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }\n  return param_2;\n}\n\n" (function_definition "int __regparm3 FUN_0002d060(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }\n  iVar2 = *(int *)(*piVar1 + 0xd0);\n  if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }\n  iVar3 = *(int *)(iVar2 + 0x10);\n  if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }\n  if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }\n  return param_2;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002d060(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }\n  iVar2 = *(int *)(*piVar1 + 0xd0);\n  if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }\n  iVar3 = *(int *)(iVar2 + 0x10);\n  if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }\n  if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }\n  return param_2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "piVar1 = *(int **)(param_1 + 4);" (assignment_expression "piVar1 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }" if (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" ( (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" * (cast_expression "(char *)(param_1 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0002cb40();\n  }" { (expression_statement "FUN_0002cb40();" (call_expression "FUN_0002cb40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar2 = *(int *)(*piVar1 + 0xd0);" (assignment_expression "iVar2 = *(int *)(*piVar1 + 0xd0)" identifier = (pointer_expression "*(int *)(*piVar1 + 0xd0)" * (cast_expression "(int *)(*piVar1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar1 + 0xd0)" ( (binary_expression "*piVar1 + 0xd0" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    param_2 = *(int *)(iVar2 + 0x14);\n  }" { (expression_statement "param_2 = *(int *)(iVar2 + 0x14);" (assignment_expression "param_2 = *(int *)(iVar2 + 0x14)" identifier = (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }" else (compound_statement "{\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }" { (if_statement "if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }" if (parenthesized_expression "(param_2 < 0)" ( (binary_expression "param_2 < 0" identifier < number_literal) )) (compound_statement "{\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }" { (expression_statement "iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);" (assignment_expression "iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" identifier = (binary_expression "*(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" (pointer_expression "*(int *)(iVar2 + 0x1c)" * (cast_expression "(int *)(iVar2 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) )))) + (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))))) ;) (expression_statement "param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);" (assignment_expression "param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f)" identifier = (call_expression "FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f)" identifier (argument_list "(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f)" ( (binary_expression "param_2 * -0x400" identifier * number_literal) , (binary_expression "((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16" (binary_expression "((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400" (parenthesized_expression "((param_2 >> 0x1f) + (uint)(param_2 != 0))" ( (binary_expression "(param_2 >> 0x1f) + (uint)(param_2 != 0)" (parenthesized_expression "(param_2 >> 0x1f)" ( (binary_expression "param_2 >> 0x1f" identifier >> number_literal) )) + (call_expression "(uint)(param_2 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )))) )) * number_literal) | (binary_expression "(uint)-param_2 >> 0x16" (binary_expression "(uint)-param_2" (parenthesized_expression "(uint)" ( identifier )) - identifier) >> number_literal)) , identifier , (binary_expression "iVar3 >> 0x1f" identifier >> number_literal) )))) ;) })) (expression_statement "*(int *)(iVar2 + 0x14) = param_2;" (assignment_expression "*(int *)(iVar2 + 0x14) = param_2" (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "iVar3 = *(int *)(iVar2 + 0x10);" (assignment_expression "iVar3 = *(int *)(iVar2 + 0x10)" identifier = (pointer_expression "*(int *)(iVar2 + 0x10)" * (cast_expression "(int *)(iVar2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x10)" ( (binary_expression "iVar2 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }" { (expression_statement "iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);" (assignment_expression "iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" identifier = (binary_expression "*(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" (pointer_expression "*(int *)(iVar2 + 0x1c)" * (cast_expression "(int *)(iVar2 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) )))) + (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))))) ;) (expression_statement "iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);" (assignment_expression "iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f)" identifier = (call_expression "FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f)" identifier (argument_list "(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f)" ( (binary_expression "iVar3 * -0x400" identifier * number_literal) , (binary_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16" (binary_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400" (parenthesized_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0))" ( (binary_expression "(iVar3 >> 0x1f) + (uint)(iVar3 != 0)" (parenthesized_expression "(iVar3 >> 0x1f)" ( (binary_expression "iVar3 >> 0x1f" identifier >> number_literal) )) + (call_expression "(uint)(iVar3 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )))) )) * number_literal) | (binary_expression "(uint)-iVar3 >> 0x16" (binary_expression "(uint)-iVar3" (parenthesized_expression "(uint)" ( identifier )) - identifier) >> number_literal)) , identifier , (binary_expression "iVar2 >> 0x1f" identifier >> number_literal) )))) ;) })) (if_statement "if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }" if (parenthesized_expression "(param_2 <= iVar3)" ( (binary_expression "param_2 <= iVar3" identifier <= identifier) )) (compound_statement "{\n    param_2 = iVar3;\n  }" { (expression_statement "param_2 = iVar3;" (assignment_expression "param_2 = iVar3" identifier = identifier) ;) })) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }" if (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" ( (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" * (cast_expression "(char *)(param_1 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0002cfa0();\n  }" { (expression_statement "FUN_0002cfa0();" (call_expression "FUN_0002cfa0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_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) ))))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT * LIT) , (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT >> LIT) )) + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT != LIT) )))) )) * LIT) | (binary_expression (binary_expression (parenthesized_expression ( IDENT )) - IDENT) >> LIT)) , IDENT , (binary_expression IDENT >> 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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT * LIT) , (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT >> LIT) )) + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT != LIT) )))) )) * LIT) | (binary_expression (binary_expression (parenthesized_expression ( IDENT )) - IDENT) >> LIT)) , IDENT , (binary_expression IDENT >> LIT) )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_0002d060(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }\n  iVar2 = *(int *)(*piVar1 + 0xd0);\n  if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }\n  iVar3 = *(int *)(iVar2 + 0x10);\n  if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }\n  if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }\n  return param_2;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0002d060(int param_1,int param_2)" (identifier "FUN_0002d060") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }\n  iVar2 = *(int *)(*piVar1 + 0xd0);\n  if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }\n  iVar3 = *(int *)(iVar2 + 0x10);\n  if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }\n  if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }\n  return param_2;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "piVar1 = *(int **)(param_1 + 4);" (assignment_expression "piVar1 = *(int **)(param_1 + 4)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(param_1 + 4)" (* "*") (cast_expression "(int **)(param_1 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cb40();\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" (* "*") (cast_expression "(char *)(param_1 + 9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 9)" (( "(") (binary_expression "param_1 + 9" (identifier "param_1") (+ "+") (number_literal "9")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    FUN_0002cb40();\n  }" ({ "{") (expression_statement "FUN_0002cb40();" (call_expression "FUN_0002cb40()" (identifier "FUN_0002cb40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar2 = *(int *)(*piVar1 + 0xd0);" (assignment_expression "iVar2 = *(int *)(*piVar1 + 0xd0)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(*piVar1 + 0xd0)" (* "*") (cast_expression "(int *)(*piVar1 + 0xd0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar1 + 0xd0)" (( "(") (binary_expression "*piVar1 + 0xd0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "0xd0")) () ")"))))) (; ";")) (if_statement "if (param_2 == 0) {\n    param_2 = *(int *)(iVar2 + 0x14);\n  }\n  else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    param_2 = *(int *)(iVar2 + 0x14);\n  }" ({ "{") (expression_statement "param_2 = *(int *)(iVar2 + 0x14);" (assignment_expression "param_2 = *(int *)(iVar2 + 0x14)" (identifier "param_2") (= "=") (pointer_expression "*(int *)(iVar2 + 0x14)" (* "*") (cast_expression "(int *)(iVar2 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x14)" (( "(") (binary_expression "iVar2 + 0x14" (identifier "iVar2") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }" (else "else") (compound_statement "{\n    if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }\n    *(int *)(iVar2 + 0x14) = param_2;\n  }" ({ "{") (if_statement "if (param_2 < 0) {\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }" (if "if") (parenthesized_expression "(param_2 < 0)" (( "(") (binary_expression "param_2 < 0" (identifier "param_2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n      param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);\n    }" ({ "{") (expression_statement "iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);" (assignment_expression "iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" (identifier "iVar3") (= "=") (binary_expression "*(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" (pointer_expression "*(int *)(iVar2 + 0x1c)" (* "*") (cast_expression "(int *)(iVar2 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x1c)" (( "(") (binary_expression "iVar2 + 0x1c" (identifier "iVar2") (+ "+") (number_literal "0x1c")) () ")")))) (+ "+") (pointer_expression "*(int *)(iVar2 + 0x18)" (* "*") (cast_expression "(int *)(iVar2 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x18)" (( "(") (binary_expression "iVar2 + 0x18" (identifier "iVar2") (+ "+") (number_literal "0x18")) () ")")))))) (; ";")) (expression_statement "param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);" (assignment_expression "param_2 = FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f)" (identifier "param_2") (= "=") (call_expression "FUN_000f5a10(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f)" (identifier "FUN_000f5a10") (argument_list "(param_2 * -0x400,\n                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f)" (( "(") (binary_expression "param_2 * -0x400" (identifier "param_2") (* "*") (number_literal "-0x400")) (, ",") (binary_expression "((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |\n                             (uint)-param_2 >> 0x16" (binary_expression "((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400" (parenthesized_expression "((param_2 >> 0x1f) + (uint)(param_2 != 0))" (( "(") (binary_expression "(param_2 >> 0x1f) + (uint)(param_2 != 0)" (parenthesized_expression "(param_2 >> 0x1f)" (( "(") (binary_expression "param_2 >> 0x1f" (identifier "param_2") (>> ">>") (number_literal "0x1f")) () ")")) (+ "+") (call_expression "(uint)(param_2 != 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")))) () ")")) (* "*") (number_literal "-0x400")) (| "|") (binary_expression "(uint)-param_2 >> 0x16" (binary_expression "(uint)-param_2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (- "-") (identifier "param_2")) (>> ">>") (number_literal "0x16"))) (, ",") (identifier "iVar3") (, ",") (binary_expression "iVar3 >> 0x1f" (identifier "iVar3") (>> ">>") (number_literal "0x1f")) () ")")))) (; ";")) (} "}"))) (expression_statement "*(int *)(iVar2 + 0x14) = param_2;" (assignment_expression "*(int *)(iVar2 + 0x14) = param_2" (pointer_expression "*(int *)(iVar2 + 0x14)" (* "*") (cast_expression "(int *)(iVar2 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x14)" (( "(") (binary_expression "iVar2 + 0x14" (identifier "iVar2") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (} "}")))) (expression_statement "iVar3 = *(int *)(iVar2 + 0x10);" (assignment_expression "iVar3 = *(int *)(iVar2 + 0x10)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(iVar2 + 0x10)" (* "*") (cast_expression "(int *)(iVar2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x10)" (( "(") (binary_expression "iVar2 + 0x10" (identifier "iVar2") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (if_statement "if (iVar3 < 0) {\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }" (if "if") (parenthesized_expression "(iVar3 < 0)" (( "(") (binary_expression "iVar3 < 0" (identifier "iVar3") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);\n    iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);\n  }" ({ "{") (expression_statement "iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);" (assignment_expression "iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" (identifier "iVar2") (= "=") (binary_expression "*(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18)" (pointer_expression "*(int *)(iVar2 + 0x1c)" (* "*") (cast_expression "(int *)(iVar2 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x1c)" (( "(") (binary_expression "iVar2 + 0x1c" (identifier "iVar2") (+ "+") (number_literal "0x1c")) () ")")))) (+ "+") (pointer_expression "*(int *)(iVar2 + 0x18)" (* "*") (cast_expression "(int *)(iVar2 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x18)" (( "(") (binary_expression "iVar2 + 0x18" (identifier "iVar2") (+ "+") (number_literal "0x18")) () ")")))))) (; ";")) (expression_statement "iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f);" (assignment_expression "iVar3 = FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f)" (identifier "iVar3") (= "=") (call_expression "FUN_000f5a10(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f)" (identifier "FUN_000f5a10") (argument_list "(iVar3 * -0x400,\n                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,\n                         iVar2,iVar2 >> 0x1f)" (( "(") (binary_expression "iVar3 * -0x400" (identifier "iVar3") (* "*") (number_literal "-0x400")) (, ",") (binary_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16" (binary_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400" (parenthesized_expression "((iVar3 >> 0x1f) + (uint)(iVar3 != 0))" (( "(") (binary_expression "(iVar3 >> 0x1f) + (uint)(iVar3 != 0)" (parenthesized_expression "(iVar3 >> 0x1f)" (( "(") (binary_expression "iVar3 >> 0x1f" (identifier "iVar3") (>> ">>") (number_literal "0x1f")) () ")")) (+ "+") (call_expression "(uint)(iVar3 != 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")))) () ")")) (* "*") (number_literal "-0x400")) (| "|") (binary_expression "(uint)-iVar3 >> 0x16" (binary_expression "(uint)-iVar3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (- "-") (identifier "iVar3")) (>> ">>") (number_literal "0x16"))) (, ",") (identifier "iVar2") (, ",") (binary_expression "iVar2 >> 0x1f" (identifier "iVar2") (>> ">>") (number_literal "0x1f")) () ")")))) (; ";")) (} "}"))) (if_statement "if (param_2 <= iVar3) {\n    param_2 = iVar3;\n  }" (if "if") (parenthesized_expression "(param_2 <= iVar3)" (( "(") (binary_expression "param_2 <= iVar3" (identifier "param_2") (<= "<=") (identifier "iVar3")) () ")")) (compound_statement "{\n    param_2 = iVar3;\n  }" ({ "{") (expression_statement "param_2 = iVar3;" (assignment_expression "param_2 = iVar3" (identifier "param_2") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    FUN_0002cfa0();\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" (* "*") (cast_expression "(char *)(param_1 + 9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 9)" (( "(") (binary_expression "param_1 + 9" (identifier "param_1") (+ "+") (number_literal "9")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    FUN_0002cfa0();\n  }" ({ "{") (expression_statement "FUN_0002cfa0();" (call_expression "FUN_0002cfa0()" (identifier "FUN_0002cfa0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *p,int var_2)

{
  type_2 *pBVar1;
  type_3 *pPVar2;
  int var_6;
  int var_4;
  int extraout_EDX;
  type_4 uVar5;
  
  pBVar1 = p->pBt;
  var_4 = var_2;
  if (p->sharable != '\0') {
    var_1(p);
    var_4 = extraout_EDX;
  }
  pPVar2 = pBVar1->pPager->pPCache;
  if (var_2 == 0) {
    var_2 = pPVar2->szSpill;
  }
  else {
    if (var_2 < 0) {
      var_4 = pPVar2->szExtra + pPVar2->szPage;
      uVar5 = var_3(var_2 * -0x400,
                       ((var_2 >> 0x1f) + (uint)(var_2 != 0)) * -0x400 | (uint)-var_2 >> 0x16,
                       var_4,var_4 >> 0x1f);
      var_4 = (int)((type_5)uVar5 >> 0x20);
      var_2 = (int)uVar5;
    }
    pPVar2->szSpill = var_2;
  }
  var_6 = pPVar2->szCache;
  uVar5 = var_5(var_4,var_6);
  if (var_6 < 0) {
    var_4 = pPVar2->szExtra + pPVar2->szPage;
    uVar5 = var_3(var_6 * -0x400,
                     ((var_6 >> 0x1f) + (uint)(var_6 != 0)) * -0x400 | (uint)-var_6 >> 0x16,var_4,
                     var_4 >> 0x1f);
  }
  if (var_2 <= (int)uVar5) {
    var_2 = (int)uVar5;
  }
  if (p->sharable != '\0') {
    var_7(p,(int)((type_5)uVar5 >> 0x20));
  }
  return var_2;
}


(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)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (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: (pointer_expression argument: (identifier)) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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)))))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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: (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: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal)) right: (binary_expression left: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)) right: (number_literal))) (identifier) (binary_expression left: (identifier) right: (number_literal)))))))) (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 (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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: (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: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal)) right: (binary_expression left: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)) right: (number_literal))) (identifier) (binary_expression left: (identifier) right: (number_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))

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

int __regparm3 MASKED(int param_1,int param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  
  piVar1 = *(int **)(param_1 + 4);
  if (*(char *)(param_1 + 9) != '\0') {
    FUN_0002cb40();
  }
  iVar2 = *(int *)(*piVar1 + 0xd0);
  if (param_2 == 0) {
    param_2 = *(int *)(iVar2 + 0x14);
  }
  else {
    if (param_2 < 0) {
      iVar3 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);
      param_2 = FUN_000f5a10(param_2 * -0x400,
                             ((param_2 >> 0x1f) + (uint)(param_2 != 0)) * -0x400 |
                             (uint)-param_2 >> 0x16,iVar3,iVar3 >> 0x1f);
    }
    *(int *)(iVar2 + 0x14) = param_2;
  }
  iVar3 = *(int *)(iVar2 + 0x10);
  if (iVar3 < 0) {
    iVar2 = *(int *)(iVar2 + 0x1c) + *(int *)(iVar2 + 0x18);
    iVar3 = FUN_000f5a10(iVar3 * -0x400,
                         ((iVar3 >> 0x1f) + (uint)(iVar3 != 0)) * -0x400 | (uint)-iVar3 >> 0x16,
                         iVar2,iVar2 >> 0x1f);
  }
  if (param_2 <= iVar3) {
    param_2 = iVar3;
  }
  if (*(char *)(param_1 + 9) != '\0') {
    FUN_0002cfa0();
  }
  return param_2;
}

