
/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

int __regparm3 pagerPagecount(Pager *pPager,Pgno *pnPage)

{
  Wal *pWVar1;
  sqlite3_io_methods *psVar2;
  uint uVar3;
  int iVar4;
  u32 uVar5;
  int in_GS_OFFSET;
  i64 n;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1f15d;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pWVar1 = pPager->pWal;
  if (((pWVar1 == (Wal *)0x0) || (pWVar1->readLock < 0)) ||
     (uVar5 = (pWVar1->hdr).nPage, uVar5 == 0)) {
    psVar2 = pPager->fd->pMethods;
    if (psVar2 != (sqlite3_io_methods *)0x0) {
      n._0_4_ = 0;
      n._4_4_ = 0;
      iVar4 = (*psVar2->xFileSize)(pPager->fd,&n);
      if (iVar4 != 0) goto LAB_0001f19c;
      uVar3 = pPager->pageSize;
      uVar5 = __divdi3(uVar3 + (uint)n + -1,
                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +
                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f);
      goto LAB_0001f18a;
    }
    uVar5 = 0;
  }
  else {
LAB_0001f18a:
    if (pPager->mxPgno < uVar5) {
      pPager->mxPgno = uVar5;
    }
  }
  *pnPage = uVar5;
  iVar4 = 0;
LAB_0001f19c:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



int __regparm3 FUN_0001f150(int param_1,uint *param_2)

{
  int iVar1;
  uint uVar2;
  int in_GS_OFFSET;
  uint local_2c;
  int local_28;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1f15d;
  FUN_000d0ab3();
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = *(int *)(param_1 + 0xd4);
  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||
     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {
    iVar1 = **(int **)(param_1 + 0x3c);
    if (iVar1 != 0) {
      local_2c = 0;
      local_28 = 0;
      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);
      if (iVar1 != 0) goto LAB_0001f19c;
      uVar2 = *(uint *)(param_1 + 0x94);
      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,
                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +
                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);
      goto LAB_0001f18a;
    }
    uVar2 = 0;
  }
  else {
LAB_0001f18a:
    if (*(uint *)(param_1 + 0x98) < uVar2) {
      *(uint *)(param_1 + 0x98) = uVar2;
    }
  }
  *param_2 = uVar2;
  iVar1 = 0;
LAB_0001f19c:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000d1450();
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
PUSH EBX
MOV ESI,EAX
CALL 0x000d0ab3
ADD EBP,0xe6ea3
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV EAX,dword ptr [ESI + 0xd4]
TEST EAX,EAX
JZ 0x0001f1b8
CMP word ptr [EAX + 0x28],0x0
JS 0x0001f1b8
MOV EAX,dword ptr [EAX + 0x48]
TEST EAX,EAX
JZ 0x0001f1b8
CMP dword ptr [ESI + 0x98],EAX
JNC 0x0001f198
MOV dword ptr [ESI + 0x98],EAX
MOV dword ptr [EDI],EAX
XOR EAX,EAX
MOV EBX,dword ptr [ESP + 0xc]
XOR EBX,dword ptr GS:[0x14]
JNZ 0x0001f214
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,dword ptr [ESI + 0x3c]
MOV EAX,dword ptr [EDX]
TEST EAX,EAX
JZ 0x0001f210
MOV dword ptr [ESP],0x0
MOV dword ptr [ESP + 0x4],0x0
SUB ESP,0x8
LEA ECX,[ESP + 0x8]
PUSH ECX
PUSH EDX
CALL dword ptr [EAX + 0x18]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0001f19c
MOV EAX,dword ptr [ESI + 0x94]
CDQ
MOV ECX,EAX
ADD ECX,dword ptr [ESP]
MOV EBX,EDX
ADC EBX,dword ptr [ESP + 0x4]
PUSH EDX
PUSH EAX
ADD ECX,-0x1
ADC EBX,-0x1
PUSH EBX
PUSH ECX
MOV EBX,EBP
CALL 0x000d0ac0
ADD ESP,0x10
JMP 0x0001f18a
XOR EAX,EAX
JMP 0x0001f198
CALL 0x000d1450
(translation_unit "int __regparm3 FUN_0001f150(int param_1,uint *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  uint local_2c;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  FUN_000d0ab3();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(int *)(param_1 + 0xd4);\n  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }\n  *param_2 = uVar2;\n  iVar1 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000d1450();\n}\n\n" (function_definition "int __regparm3 FUN_0001f150(int param_1,uint *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  uint local_2c;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  FUN_000d0ab3();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(int *)(param_1 + 0xd4);\n  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }\n  *param_2 = uVar2;\n  iVar1 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000d1450();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001f150(int param_1,uint *param_2)" identifier (parameter_list "(int param_1,uint *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  uint local_2c;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  FUN_000d0ab3();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(int *)(param_1 + 0xd4);\n  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }\n  *param_2 = uVar2;\n  iVar1 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000d1450();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_2c;" type_identifier identifier ;) (declaration "int local_28;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1f15d;" (assignment_expression "uStack_14 = 0x1f15d" identifier = number_literal) ;) (expression_statement "FUN_000d0ab3();" (call_expression "FUN_000d0ab3()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = *(int *)(param_1 + 0xd4);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xd4)" identifier = (pointer_expression "*(int *)(param_1 + 0xd4)" * (cast_expression "(int *)(param_1 + 0xd4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd4)" ( (binary_expression "param_1 + 0xd4" identifier + number_literal) ))))) ;) (if_statement "if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }" if (parenthesized_expression "(((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0))" ( (binary_expression "((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)" (parenthesized_expression "((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0))" ( (binary_expression "(iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) || (parenthesized_expression "(*(short *)(iVar1 + 0x28) < 0)" ( (binary_expression "*(short *)(iVar1 + 0x28) < 0" (pointer_expression "*(short *)(iVar1 + 0x28)" * (cast_expression "(short *)(iVar1 + 0x28)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x28)" ( (binary_expression "iVar1 + 0x28" identifier + number_literal) )))) < number_literal) ))) )) || (parenthesized_expression "(uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)" ( (comma_expression "uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0" (assignment_expression "uVar2 = *(uint *)(iVar1 + 0x48)" identifier = (pointer_expression "*(uint *)(iVar1 + 0x48)" * (cast_expression "(uint *)(iVar1 + 0x48)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x48)" ( (binary_expression "iVar1 + 0x48" identifier + number_literal) ))))) , (binary_expression "uVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }" { (expression_statement "iVar1 = **(int **)(param_1 + 0x3c);" (assignment_expression "iVar1 = **(int **)(param_1 + 0x3c)" identifier = (pointer_expression "**(int **)(param_1 + 0x3c)" * (pointer_expression "*(int **)(param_1 + 0x3c)" * (cast_expression "(int **)(param_1 + 0x3c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))))) ;) (if_statement "if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }" { (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);" (assignment_expression "iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c)" identifier = (call_expression "(**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c)" (parenthesized_expression "(**(code **)(iVar1 + 0x18))" ( (pointer_expression "**(code **)(iVar1 + 0x18)" * (pointer_expression "*(code **)(iVar1 + 0x18)" * (cast_expression "(code **)(iVar1 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0x3c),&local_2c)" ( (pointer_expression "*(int **)(param_1 + 0x3c)" * (cast_expression "(int **)(param_1 + 0x3c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) , (pointer_expression "&local_2c" & identifier) )))) ;) (if_statement "if (iVar1 != 0) goto LAB_0001f19c;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0001f19c;" goto statement_identifier ;)) (expression_statement "uVar2 = *(uint *)(param_1 + 0x94);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x94)" identifier = (pointer_expression "*(uint *)(param_1 + 0x94)" * (cast_expression "(uint *)(param_1 + 0x94)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);" (assignment_expression "uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f)" identifier = (call_expression "FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f)" identifier (argument_list "(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f)" ( (binary_expression "uVar2 + local_2c + -1" (binary_expression "uVar2 + local_2c" identifier + identifier) + number_literal) , (binary_expression "((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0)" (binary_expression "((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1" (binary_expression "((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c)" (binary_expression "((int)uVar2 >> 0x1f) + local_28" (parenthesized_expression "((int)uVar2 >> 0x1f)" ( (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) + identifier) + (cast_expression "(uint)CARRY4(uVar2,local_2c)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(uVar2,local_2c)" identifier (argument_list "(uVar2,local_2c)" ( identifier , identifier ))))) + number_literal) + (call_expression "(uint)(uVar2 + local_2c != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 + local_2c != 0)" ( (binary_expression "uVar2 + local_2c != 0" (binary_expression "uVar2 + local_2c" identifier + identifier) != number_literal) )))) , identifier , (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (goto_statement "goto LAB_0001f18a;" goto statement_identifier ;) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }" else (compound_statement "{\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }" { (labeled_statement "LAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }" statement_identifier : (if_statement "if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }" if (parenthesized_expression "(*(uint *)(param_1 + 0x98) < uVar2)" ( (binary_expression "*(uint *)(param_1 + 0x98) < uVar2" (pointer_expression "*(uint *)(param_1 + 0x98)" * (cast_expression "(uint *)(param_1 + 0x98)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }" { (expression_statement "*(uint *)(param_1 + 0x98) = uVar2;" (assignment_expression "*(uint *)(param_1 + 0x98) = uVar2" (pointer_expression "*(uint *)(param_1 + 0x98)" * (cast_expression "(uint *)(param_1 + 0x98)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) )))) = identifier) ;) }))) }))) (expression_statement "*param_2 = uVar2;" (assignment_expression "*param_2 = uVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) }))) comment (expression_statement "FUN_000d1450();" (call_expression "FUN_000d1450()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n\nint __regparm3 pagerPagecount(Pager *pPager,Pgno *pnPage)\n\n{\n  Wal *pWVar1;\n  sqlite3_io_methods *psVar2;\n  uint uVar3;\n  int iVar4;\n  u32 uVar5;\n  int in_GS_OFFSET;\n  i64 n;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pWVar1 = pPager->pWal;\n  if (((pWVar1 == (Wal *)0x0) || (pWVar1->readLock < 0)) ||\n     (uVar5 = (pWVar1->hdr).nPage, uVar5 == 0)) {\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2 != (sqlite3_io_methods *)0x0) {\n      n._0_4_ = 0;\n      n._4_4_ = 0;\n      iVar4 = (*psVar2->xFileSize)(pPager->fd,&n);\n      if (iVar4 != 0) goto LAB_0001f19c;\n      uVar3 = pPager->pageSize;\n      uVar5 = __divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar5 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (pPager->mxPgno < uVar5) {\n      pPager->mxPgno = uVar5;\n    }\n  }\n  *pnPage = uVar5;\n  iVar4 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "int __regparm3 pagerPagecount(Pager *pPager,Pgno *pnPage)\n\n{\n  Wal *pWVar1;\n  sqlite3_io_methods *psVar2;\n  uint uVar3;\n  int iVar4;\n  u32 uVar5;\n  int in_GS_OFFSET;\n  i64 n;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pWVar1 = pPager->pWal;\n  if (((pWVar1 == (Wal *)0x0) || (pWVar1->readLock < 0)) ||\n     (uVar5 = (pWVar1->hdr).nPage, uVar5 == 0)) {\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2 != (sqlite3_io_methods *)0x0) {\n      n._0_4_ = 0;\n      n._4_4_ = 0;\n      iVar4 = (*psVar2->xFileSize)(pPager->fd,&n);\n      if (iVar4 != 0) goto LAB_0001f19c;\n      uVar3 = pPager->pageSize;\n      uVar5 = __divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar5 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (pPager->mxPgno < uVar5) {\n      pPager->mxPgno = uVar5;\n    }\n  }\n  *pnPage = uVar5;\n  iVar4 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "pagerPagecount(Pager *pPager,Pgno *pnPage)" identifier (parameter_list "(Pager *pPager,Pgno *pnPage)" ( (parameter_declaration "Pager *pPager" type_identifier (pointer_declarator "*pPager" * identifier)) , (parameter_declaration "Pgno *pnPage" type_identifier (pointer_declarator "*pnPage" * identifier)) ))) (compound_statement "{\n  Wal *pWVar1;\n  sqlite3_io_methods *psVar2;\n  uint uVar3;\n  int iVar4;\n  u32 uVar5;\n  int in_GS_OFFSET;\n  i64 n;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pWVar1 = pPager->pWal;\n  if (((pWVar1 == (Wal *)0x0) || (pWVar1->readLock < 0)) ||\n     (uVar5 = (pWVar1->hdr).nPage, uVar5 == 0)) {\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2 != (sqlite3_io_methods *)0x0) {\n      n._0_4_ = 0;\n      n._4_4_ = 0;\n      iVar4 = (*psVar2->xFileSize)(pPager->fd,&n);\n      if (iVar4 != 0) goto LAB_0001f19c;\n      uVar3 = pPager->pageSize;\n      uVar5 = __divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar5 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (pPager->mxPgno < uVar5) {\n      pPager->mxPgno = uVar5;\n    }\n  }\n  *pnPage = uVar5;\n  iVar4 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "Wal *pWVar1;" type_identifier (pointer_declarator "*pWVar1" * identifier) ;) (declaration "sqlite3_io_methods *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "u32 uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "i64 n;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1f15d;" (assignment_expression "uStack_14 = 0x1f15d" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "pWVar1 = pPager->pWal;" (assignment_expression "pWVar1 = pPager->pWal" identifier = (field_expression "pPager->pWal" identifier -> field_identifier)) ;) (if_statement "if (((pWVar1 == (Wal *)0x0) || (pWVar1->readLock < 0)) ||\n     (uVar5 = (pWVar1->hdr).nPage, uVar5 == 0)) {\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2 != (sqlite3_io_methods *)0x0) {\n      n._0_4_ = 0;\n      n._4_4_ = 0;\n      iVar4 = (*psVar2->xFileSize)(pPager->fd,&n);\n      if (iVar4 != 0) goto LAB_0001f19c;\n      uVar3 = pPager->pageSize;\n      uVar5 = __divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar5 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (pPager->mxPgno < uVar5) {\n      pPager->mxPgno = uVar5;\n    }\n  }" if (parenthesized_expression "(((pWVar1 == (Wal *)0x0) || (pWVar1->readLock < 0)) ||\n     (uVar5 = (pWVar1->hdr).nPage, uVar5 == 0))" ( (binary_expression "((pWVar1 == (Wal *)0x0) || (pWVar1->readLock < 0)) ||\n     (uVar5 = (pWVar1->hdr).nPage, uVar5 == 0)" (parenthesized_expression "((pWVar1 == (Wal *)0x0) || (pWVar1->readLock < 0))" ( (binary_expression "(pWVar1 == (Wal *)0x0) || (pWVar1->readLock < 0)" (parenthesized_expression "(pWVar1 == (Wal *)0x0)" ( (binary_expression "pWVar1 == (Wal *)0x0" identifier == (cast_expression "(Wal *)0x0" ( (type_descriptor "Wal *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(pWVar1->readLock < 0)" ( (binary_expression "pWVar1->readLock < 0" (field_expression "pWVar1->readLock" identifier -> field_identifier) < number_literal) ))) )) || (parenthesized_expression "(uVar5 = (pWVar1->hdr).nPage, uVar5 == 0)" ( (comma_expression "uVar5 = (pWVar1->hdr).nPage, uVar5 == 0" (assignment_expression "uVar5 = (pWVar1->hdr).nPage" identifier = (field_expression "(pWVar1->hdr).nPage" (parenthesized_expression "(pWVar1->hdr)" ( (field_expression "pWVar1->hdr" identifier -> field_identifier) )) . field_identifier)) , (binary_expression "uVar5 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    psVar2 = pPager->fd->pMethods;\n    if (psVar2 != (sqlite3_io_methods *)0x0) {\n      n._0_4_ = 0;\n      n._4_4_ = 0;\n      iVar4 = (*psVar2->xFileSize)(pPager->fd,&n);\n      if (iVar4 != 0) goto LAB_0001f19c;\n      uVar3 = pPager->pageSize;\n      uVar5 = __divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar5 = 0;\n  }" { (expression_statement "psVar2 = pPager->fd->pMethods;" (assignment_expression "psVar2 = pPager->fd->pMethods" identifier = (field_expression "pPager->fd->pMethods" (field_expression "pPager->fd" identifier -> field_identifier) -> field_identifier)) ;) (if_statement "if (psVar2 != (sqlite3_io_methods *)0x0) {\n      n._0_4_ = 0;\n      n._4_4_ = 0;\n      iVar4 = (*psVar2->xFileSize)(pPager->fd,&n);\n      if (iVar4 != 0) goto LAB_0001f19c;\n      uVar3 = pPager->pageSize;\n      uVar5 = __divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f);\n      goto LAB_0001f18a;\n    }" if (parenthesized_expression "(psVar2 != (sqlite3_io_methods *)0x0)" ( (binary_expression "psVar2 != (sqlite3_io_methods *)0x0" identifier != (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      n._0_4_ = 0;\n      n._4_4_ = 0;\n      iVar4 = (*psVar2->xFileSize)(pPager->fd,&n);\n      if (iVar4 != 0) goto LAB_0001f19c;\n      uVar3 = pPager->pageSize;\n      uVar5 = __divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f);\n      goto LAB_0001f18a;\n    }" { (expression_statement "n._0_4_ = 0;" (assignment_expression "n._0_4_ = 0" (field_expression "n._0_4_" identifier . field_identifier) = number_literal) ;) (expression_statement "n._4_4_ = 0;" (assignment_expression "n._4_4_ = 0" (field_expression "n._4_4_" identifier . field_identifier) = number_literal) ;) (expression_statement "iVar4 = (*psVar2->xFileSize)(pPager->fd,&n);" (assignment_expression "iVar4 = (*psVar2->xFileSize)(pPager->fd,&n)" identifier = (call_expression "(*psVar2->xFileSize)(pPager->fd,&n)" (parenthesized_expression "(*psVar2->xFileSize)" ( (pointer_expression "*psVar2->xFileSize" * (field_expression "psVar2->xFileSize" identifier -> field_identifier)) )) (argument_list "(pPager->fd,&n)" ( (field_expression "pPager->fd" identifier -> field_identifier) , (pointer_expression "&n" & identifier) )))) ;) (if_statement "if (iVar4 != 0) goto LAB_0001f19c;" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0001f19c;" goto statement_identifier ;)) (expression_statement "uVar3 = pPager->pageSize;" (assignment_expression "uVar3 = pPager->pageSize" identifier = (field_expression "pPager->pageSize" identifier -> field_identifier)) ;) (expression_statement "uVar5 = __divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f);" (assignment_expression "uVar5 = __divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f)" identifier = (call_expression "__divdi3(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f)" identifier (argument_list "(uVar3 + (uint)n + -1,\n                       ((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0),uVar3,(int)uVar3 >> 0x1f)" ( (binary_expression "uVar3 + (uint)n + -1" (binary_expression "uVar3 + (uint)n" identifier + (cast_expression "(uint)n" ( (type_descriptor "uint" type_identifier) ) identifier)) + number_literal) , (binary_expression "((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1 +\n                       (uint)(uVar3 + (uint)n != 0)" (binary_expression "((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n) + -1" (binary_expression "((int)uVar3 >> 0x1f) + n._4_4_ + (uint)CARRY4(uVar3,(uint)n)" (binary_expression "((int)uVar3 >> 0x1f) + n._4_4_" (parenthesized_expression "((int)uVar3 >> 0x1f)" ( (binary_expression "(int)uVar3 >> 0x1f" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) + (field_expression "n._4_4_" identifier . field_identifier)) + (cast_expression "(uint)CARRY4(uVar3,(uint)n)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(uVar3,(uint)n)" identifier (argument_list "(uVar3,(uint)n)" ( identifier , (cast_expression "(uint)n" ( (type_descriptor "uint" type_identifier) ) identifier) ))))) + number_literal) + (call_expression "(uint)(uVar3 + (uint)n != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar3 + (uint)n != 0)" ( (binary_expression "uVar3 + (uint)n != 0" (binary_expression "uVar3 + (uint)n" identifier + (cast_expression "(uint)n" ( (type_descriptor "uint" type_identifier) ) identifier)) != number_literal) )))) , identifier , (binary_expression "(int)uVar3 >> 0x1f" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (goto_statement "goto LAB_0001f18a;" goto statement_identifier ;) })) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\nLAB_0001f18a:\n    if (pPager->mxPgno < uVar5) {\n      pPager->mxPgno = uVar5;\n    }\n  }" else (compound_statement "{\nLAB_0001f18a:\n    if (pPager->mxPgno < uVar5) {\n      pPager->mxPgno = uVar5;\n    }\n  }" { (labeled_statement "LAB_0001f18a:\n    if (pPager->mxPgno < uVar5) {\n      pPager->mxPgno = uVar5;\n    }" statement_identifier : (if_statement "if (pPager->mxPgno < uVar5) {\n      pPager->mxPgno = uVar5;\n    }" if (parenthesized_expression "(pPager->mxPgno < uVar5)" ( (binary_expression "pPager->mxPgno < uVar5" (field_expression "pPager->mxPgno" identifier -> field_identifier) < identifier) )) (compound_statement "{\n      pPager->mxPgno = uVar5;\n    }" { (expression_statement "pPager->mxPgno = uVar5;" (assignment_expression "pPager->mxPgno = uVar5" (field_expression "pPager->mxPgno" identifier -> field_identifier) = identifier) ;) }))) }))) (expression_statement "*pnPage = uVar5;" (assignment_expression "*pnPage = uVar5" (pointer_expression "*pnPage" * identifier) = identifier) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int __regparm3 FUN_0001f150(int param_1,uint *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  uint local_2c;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  FUN_000d0ab3();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(int *)(param_1 + 0xd4);\n  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }\n  *param_2 = uVar2;\n  iVar1 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000d1450();\n}\n\n" (function_definition "int __regparm3 FUN_0001f150(int param_1,uint *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  uint local_2c;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  FUN_000d0ab3();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(int *)(param_1 + 0xd4);\n  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }\n  *param_2 = uVar2;\n  iVar1 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000d1450();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001f150(int param_1,uint *param_2)" identifier (parameter_list "(int param_1,uint *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  uint local_2c;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  FUN_000d0ab3();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(int *)(param_1 + 0xd4);\n  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }\n  *param_2 = uVar2;\n  iVar1 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000d1450();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_2c;" type_identifier identifier ;) (declaration "int local_28;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1f15d;" (assignment_expression "uStack_14 = 0x1f15d" identifier = number_literal) ;) (expression_statement "FUN_000d0ab3();" (call_expression "FUN_000d0ab3()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = *(int *)(param_1 + 0xd4);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xd4)" identifier = (pointer_expression "*(int *)(param_1 + 0xd4)" * (cast_expression "(int *)(param_1 + 0xd4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd4)" ( (binary_expression "param_1 + 0xd4" identifier + number_literal) ))))) ;) (if_statement "if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }" if (parenthesized_expression "(((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0))" ( (binary_expression "((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)" (parenthesized_expression "((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0))" ( (binary_expression "(iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) || (parenthesized_expression "(*(short *)(iVar1 + 0x28) < 0)" ( (binary_expression "*(short *)(iVar1 + 0x28) < 0" (pointer_expression "*(short *)(iVar1 + 0x28)" * (cast_expression "(short *)(iVar1 + 0x28)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x28)" ( (binary_expression "iVar1 + 0x28" identifier + number_literal) )))) < number_literal) ))) )) || (parenthesized_expression "(uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)" ( (comma_expression "uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0" (assignment_expression "uVar2 = *(uint *)(iVar1 + 0x48)" identifier = (pointer_expression "*(uint *)(iVar1 + 0x48)" * (cast_expression "(uint *)(iVar1 + 0x48)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x48)" ( (binary_expression "iVar1 + 0x48" identifier + number_literal) ))))) , (binary_expression "uVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }" { (expression_statement "iVar1 = **(int **)(param_1 + 0x3c);" (assignment_expression "iVar1 = **(int **)(param_1 + 0x3c)" identifier = (pointer_expression "**(int **)(param_1 + 0x3c)" * (pointer_expression "*(int **)(param_1 + 0x3c)" * (cast_expression "(int **)(param_1 + 0x3c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))))) ;) (if_statement "if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }" { (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);" (assignment_expression "iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c)" identifier = (call_expression "(**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c)" (parenthesized_expression "(**(code **)(iVar1 + 0x18))" ( (pointer_expression "**(code **)(iVar1 + 0x18)" * (pointer_expression "*(code **)(iVar1 + 0x18)" * (cast_expression "(code **)(iVar1 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0x3c),&local_2c)" ( (pointer_expression "*(int **)(param_1 + 0x3c)" * (cast_expression "(int **)(param_1 + 0x3c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) , (pointer_expression "&local_2c" & identifier) )))) ;) (if_statement "if (iVar1 != 0) goto LAB_0001f19c;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0001f19c;" goto statement_identifier ;)) (expression_statement "uVar2 = *(uint *)(param_1 + 0x94);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x94)" identifier = (pointer_expression "*(uint *)(param_1 + 0x94)" * (cast_expression "(uint *)(param_1 + 0x94)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);" (assignment_expression "uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f)" identifier = (call_expression "FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f)" identifier (argument_list "(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f)" ( (binary_expression "uVar2 + local_2c + -1" (binary_expression "uVar2 + local_2c" identifier + identifier) + number_literal) , (binary_expression "((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0)" (binary_expression "((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1" (binary_expression "((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c)" (binary_expression "((int)uVar2 >> 0x1f) + local_28" (parenthesized_expression "((int)uVar2 >> 0x1f)" ( (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) + identifier) + (cast_expression "(uint)CARRY4(uVar2,local_2c)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(uVar2,local_2c)" identifier (argument_list "(uVar2,local_2c)" ( identifier , identifier ))))) + number_literal) + (call_expression "(uint)(uVar2 + local_2c != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 + local_2c != 0)" ( (binary_expression "uVar2 + local_2c != 0" (binary_expression "uVar2 + local_2c" identifier + identifier) != number_literal) )))) , identifier , (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (goto_statement "goto LAB_0001f18a;" goto statement_identifier ;) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }" else (compound_statement "{\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }" { (labeled_statement "LAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }" statement_identifier : (if_statement "if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }" if (parenthesized_expression "(*(uint *)(param_1 + 0x98) < uVar2)" ( (binary_expression "*(uint *)(param_1 + 0x98) < uVar2" (pointer_expression "*(uint *)(param_1 + 0x98)" * (cast_expression "(uint *)(param_1 + 0x98)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }" { (expression_statement "*(uint *)(param_1 + 0x98) = uVar2;" (assignment_expression "*(uint *)(param_1 + 0x98) = uVar2" (pointer_expression "*(uint *)(param_1 + 0x98)" * (cast_expression "(uint *)(param_1 + 0x98)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) )))) = identifier) ;) }))) }))) (expression_statement "*param_2 = uVar2;" (assignment_expression "*param_2 = uVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) }))) (expression_statement "FUN_000d1450();" (call_expression "FUN_000d1450()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (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 IDENT + LIT) ))))) ;) (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 (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT) ))) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression (binary_expression IDENT + IDENT) + LIT) , (binary_expression (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )) + IDENT) + (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) + LIT) + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression IDENT + IDENT) != LIT) )))) , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }))) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int __regparm3 FUN_0001f150(int param_1,uint *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  uint local_2c;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  FUN_000d0ab3();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(int *)(param_1 + 0xd4);\n  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }\n  *param_2 = uVar2;\n  iVar1 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000d1450();\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0001f150(int param_1,uint *param_2)" (identifier "FUN_0001f150") (parameter_list "(int param_1,uint *param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint *param_2" (type_identifier "uint") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  uint local_2c;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1f15d;\n  FUN_000d0ab3();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = *(int *)(param_1 + 0xd4);\n  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }\n  *param_2 = uVar2;\n  iVar1 = 0;\nLAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000d1450();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "uint local_2c;" (type_identifier "uint") (identifier "local_2c") (; ";")) (declaration "int local_28;" (primitive_type "int") (identifier "local_28") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1f15d;" (assignment_expression "uStack_14 = 0x1f15d" (identifier "uStack_14") (= "=") (number_literal "0x1f15d")) (; ";")) (expression_statement "FUN_000d0ab3();" (call_expression "FUN_000d0ab3()" (identifier "FUN_000d0ab3") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar1 = *(int *)(param_1 + 0xd4);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xd4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0xd4)" (* "*") (cast_expression "(int *)(param_1 + 0xd4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd4)" (( "(") (binary_expression "param_1 + 0xd4" (identifier "param_1") (+ "+") (number_literal "0xd4")) () ")"))))) (; ";")) (if_statement "if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }\n  else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }" (if "if") (parenthesized_expression "(((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0))" (( "(") (binary_expression "((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||\n     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)" (parenthesized_expression "((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0))" (( "(") (binary_expression "(iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)" (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*(short *)(iVar1 + 0x28) < 0)" (( "(") (binary_expression "*(short *)(iVar1 + 0x28) < 0" (pointer_expression "*(short *)(iVar1 + 0x28)" (* "*") (cast_expression "(short *)(iVar1 + 0x28)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x28)" (( "(") (binary_expression "iVar1 + 0x28" (identifier "iVar1") (+ "+") (number_literal "0x28")) () ")")))) (< "<") (number_literal "0")) () ")"))) () ")")) (|| "||") (parenthesized_expression "(uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)" (( "(") (comma_expression "uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0" (assignment_expression "uVar2 = *(uint *)(iVar1 + 0x48)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(iVar1 + 0x48)" (* "*") (cast_expression "(uint *)(iVar1 + 0x48)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x48)" (( "(") (binary_expression "iVar1 + 0x48" (identifier "iVar1") (+ "+") (number_literal "0x48")) () ")"))))) (, ",") (binary_expression "uVar2 == 0" (identifier "uVar2") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    iVar1 = **(int **)(param_1 + 0x3c);\n    if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }\n    uVar2 = 0;\n  }" ({ "{") (expression_statement "iVar1 = **(int **)(param_1 + 0x3c);" (assignment_expression "iVar1 = **(int **)(param_1 + 0x3c)" (identifier "iVar1") (= "=") (pointer_expression "**(int **)(param_1 + 0x3c)" (* "*") (pointer_expression "*(int **)(param_1 + 0x3c)" (* "*") (cast_expression "(int **)(param_1 + 0x3c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))))) (; ";")) (if_statement "if (iVar1 != 0) {\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      local_2c = 0;\n      local_28 = 0;\n      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);\n      if (iVar1 != 0) goto LAB_0001f19c;\n      uVar2 = *(uint *)(param_1 + 0x94);\n      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);\n      goto LAB_0001f18a;\n    }" ({ "{") (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" (identifier "local_2c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);" (assignment_expression "iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c)" (identifier "iVar1") (= "=") (call_expression "(**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c)" (parenthesized_expression "(**(code **)(iVar1 + 0x18))" (( "(") (pointer_expression "**(code **)(iVar1 + 0x18)" (* "*") (pointer_expression "*(code **)(iVar1 + 0x18)" (* "*") (cast_expression "(code **)(iVar1 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 0x3c),&local_2c)" (( "(") (pointer_expression "*(int **)(param_1 + 0x3c)" (* "*") (cast_expression "(int **)(param_1 + 0x3c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (, ",") (pointer_expression "&local_2c" (& "&") (identifier "local_2c")) () ")")))) (; ";")) (if_statement "if (iVar1 != 0) goto LAB_0001f19c;" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0001f19c;" (goto "goto") (statement_identifier "LAB_0001f19c") (; ";"))) (expression_statement "uVar2 = *(uint *)(param_1 + 0x94);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x94)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(param_1 + 0x94)" (* "*") (cast_expression "(uint *)(param_1 + 0x94)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x94)" (( "(") (binary_expression "param_1 + 0x94" (identifier "param_1") (+ "+") (number_literal "0x94")) () ")"))))) (; ";")) (expression_statement "uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);" (assignment_expression "uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f)" (identifier "uVar2") (= "=") (call_expression "FUN_000d0ac0(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f)" (identifier "FUN_000d0ac0") (argument_list "(uVar2 + local_2c + -1,\n                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f)" (( "(") (binary_expression "uVar2 + local_2c + -1" (binary_expression "uVar2 + local_2c" (identifier "uVar2") (+ "+") (identifier "local_2c")) (+ "+") (number_literal "-1")) (, ",") (binary_expression "((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +\n                           (uint)(uVar2 + local_2c != 0)" (binary_expression "((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1" (binary_expression "((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c)" (binary_expression "((int)uVar2 >> 0x1f) + local_28" (parenthesized_expression "((int)uVar2 >> 0x1f)" (( "(") (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (>> ">>") (number_literal "0x1f")) () ")")) (+ "+") (identifier "local_28")) (+ "+") (cast_expression "(uint)CARRY4(uVar2,local_2c)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CARRY4(uVar2,local_2c)" (identifier "CARRY4") (argument_list "(uVar2,local_2c)" (( "(") (identifier "uVar2") (, ",") (identifier "local_2c") () ")"))))) (+ "+") (number_literal "-1")) (+ "+") (call_expression "(uint)(uVar2 + local_2c != 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar2 + local_2c != 0)" (( "(") (binary_expression "uVar2 + local_2c != 0" (binary_expression "uVar2 + local_2c" (identifier "uVar2") (+ "+") (identifier "local_2c")) (!= "!=") (number_literal "0")) () ")")))) (, ",") (identifier "uVar2") (, ",") (binary_expression "(int)uVar2 >> 0x1f" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (>> ">>") (number_literal "0x1f")) () ")")))) (; ";")) (goto_statement "goto LAB_0001f18a;" (goto "goto") (statement_identifier "LAB_0001f18a") (; ";")) (} "}"))) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }" (else "else") (compound_statement "{\nLAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }\n  }" ({ "{") (labeled_statement "LAB_0001f18a:\n    if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }" (statement_identifier "LAB_0001f18a") (: ":") (if_statement "if (*(uint *)(param_1 + 0x98) < uVar2) {\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }" (if "if") (parenthesized_expression "(*(uint *)(param_1 + 0x98) < uVar2)" (( "(") (binary_expression "*(uint *)(param_1 + 0x98) < uVar2" (pointer_expression "*(uint *)(param_1 + 0x98)" (* "*") (cast_expression "(uint *)(param_1 + 0x98)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x98)" (( "(") (binary_expression "param_1 + 0x98" (identifier "param_1") (+ "+") (number_literal "0x98")) () ")")))) (< "<") (identifier "uVar2")) () ")")) (compound_statement "{\n      *(uint *)(param_1 + 0x98) = uVar2;\n    }" ({ "{") (expression_statement "*(uint *)(param_1 + 0x98) = uVar2;" (assignment_expression "*(uint *)(param_1 + 0x98) = uVar2" (pointer_expression "*(uint *)(param_1 + 0x98)" (* "*") (cast_expression "(uint *)(param_1 + 0x98)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x98)" (( "(") (binary_expression "param_1 + 0x98" (identifier "param_1") (+ "+") (number_literal "0x98")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (} "}")))) (} "}")))) (expression_statement "*param_2 = uVar2;" (assignment_expression "*param_2 = uVar2" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_0001f19c:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" (statement_identifier "LAB_0001f19c") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar1;\n  }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))) (expression_statement "FUN_000d1450();" (call_expression "FUN_000d1450()" (identifier "FUN_000d1450") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

int __regparm3 function_1(type_1 *pPager,type_2 *pnPage)

{
  type_3 *var_2;
  type_4 *var_4;
  type_5 var_7;
  int var_5;
  type_6 var_3;
  int var_1;
  type_7 n;
  int var_9;
  type_8 uStack_14;
  
  uStack_14 = 0x1f15d;
  var_9 = *(int *)(var_1 + 0x14);
  var_2 = pPager->pWal;
  if (((var_2 == (type_3 *)0x0) || (var_2->readLock < 0)) ||
     (var_3 = (var_2->hdr).nPage, var_3 == 0)) {
    var_4 = pPager->fd->pMethods;
    if (var_4 != (type_4 *)0x0) {
      n._0_4_ = 0;
      n._4_4_ = 0;
      var_5 = (*var_4->xFileSize)(pPager->fd,&n);
      if (var_5 != 0) goto LAB_0001f19c;
      var_7 = pPager->pageSize;
      var_3 = var_6(var_7 + (type_5)n + -1,
                       ((int)var_7 >> 0x1f) + n._4_4_ + (type_5)var_8(var_7,(type_5)n) + -1 +
                       (type_5)(var_7 + (type_5)n != 0),var_7,(int)var_7 >> 0x1f);
      goto LAB_0001f18a;
    }
    var_3 = 0;
  }
  else {
LAB_0001f18a:
    if (pPager->mxPgno < var_3) {
      pPager->mxPgno = var_3;
    }
  }
  *pnPage = var_3;
  var_5 = 0;
LAB_0001f19c:
  if (var_9 == *(int *)(var_1 + 0x14)) {
    return var_5;
  }
                    /* WARNING: Subroutine does not return */
  var_10();
}


(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: (type_identifier) 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: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (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: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) right: (parenthesized_expression (comma_expression left: (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)))))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (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: (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))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list (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))))) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_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))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)) (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) right: (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) right: (number_literal)) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))) (identifier) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (labeled_statement label: (statement_identifier) (if_statement condition: (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))))))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

int __regparm3 MASKED(int param_1,uint *param_2)

{
  int iVar1;
  uint uVar2;
  int in_GS_OFFSET;
  uint local_2c;
  int local_28;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1f15d;
  FUN_000d0ab3();
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = *(int *)(param_1 + 0xd4);
  if (((iVar1 == 0) || (*(short *)(iVar1 + 0x28) < 0)) ||
     (uVar2 = *(uint *)(iVar1 + 0x48), uVar2 == 0)) {
    iVar1 = **(int **)(param_1 + 0x3c);
    if (iVar1 != 0) {
      local_2c = 0;
      local_28 = 0;
      iVar1 = (**(code **)(iVar1 + 0x18))(*(int **)(param_1 + 0x3c),&local_2c);
      if (iVar1 != 0) goto LAB_0001f19c;
      uVar2 = *(uint *)(param_1 + 0x94);
      uVar2 = FUN_000d0ac0(uVar2 + local_2c + -1,
                           ((int)uVar2 >> 0x1f) + local_28 + (uint)CARRY4(uVar2,local_2c) + -1 +
                           (uint)(uVar2 + local_2c != 0),uVar2,(int)uVar2 >> 0x1f);
      goto LAB_0001f18a;
    }
    uVar2 = 0;
  }
  else {
LAB_0001f18a:
    if (*(uint *)(param_1 + 0x98) < uVar2) {
      *(uint *)(param_1 + 0x98) = uVar2;
    }
  }
  *param_2 = uVar2;
  iVar1 = 0;
LAB_0001f19c:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000d1450();
}

