
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int __regparm3 getOverflowPage(BtShared *pBt,Pgno ovfl,MemPage **ppPage,Pgno *pPgnoNext)

{
  uint uVar1;
  BtShared *pBVar2;
  int iVar3;
  BtShared *pBt_1;
  int in_GS_OFFSET;
  u8 eType;
  MemPage *pPage;
  Pgno pgno;
  int local_20;
  undefined4 uStack_14;
  
  iVar3 = sqlite3PendingByte;
  uStack_14 = 0x39d9d;
  pPage = (MemPage *)0x0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (pBt->autoVacuum == '\0') {
LAB_00039e1c:
    if (ppPage != (MemPage **)0x0) {
      iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);
      if (iVar3 == 0) {
        uVar1 = *(uint *)pPage->aData;
        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18
        ;
        *ppPage = pPage;
        goto LAB_00039e58;
      }
      *pPgnoNext = 0;
      goto LAB_00039e4b;
    }
    iVar3 = btreeGetPage(pBt,ovfl,&pPage,2);
    if (iVar3 == 0) {
      uVar1 = *(uint *)pPage->aData;
      *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
      sqlite3PagerUnrefNotNull(pPage->pDbPage);
      goto LAB_00039e58;
    }
    *pPgnoNext = 0;
LAB_00039f5e:
    if (pPage != (MemPage *)0x0) {
      sqlite3PagerUnrefNotNull(pPage->pDbPage);
    }
  }
  else {
    pBt_1 = (BtShared *)(ovfl + 1);
    uVar1 = pBt->pageSize;
    while( true ) {
      pBVar2 = (BtShared *)0x0;
      if ((BtShared *)0x1 < pBt_1) {
        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);
      }
      if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;
      pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);
    }
    if ((BtShared *)pBt->nPage < pBt_1) goto LAB_00039e1c;
    iVar3 = ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno);
    if (iVar3 == 0) {
      if ((eType == '\x04') && (pgno == ovfl)) {
        *pPgnoNext = (Pgno)pBt_1;
        if (ppPage == (MemPage **)0x0) {
          if (pPage != (MemPage *)0x0) {
            sqlite3PagerUnrefNotNull(pPage->pDbPage);
          }
        }
        else {
          *ppPage = pPage;
        }
        goto LAB_00039e58;
      }
      goto LAB_00039e1c;
    }
    *pPgnoNext = 0;
    if (ppPage == (MemPage **)0x0) goto LAB_00039f5e;
LAB_00039e4b:
    *ppPage = pPage;
  }
  if (iVar3 == 0x65) {
    iVar3 = 0;
  }
LAB_00039e58:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Removing unreachable block (ram,0x00039f66) */
/* WARNING: Removing unreachable block (ram,0x00039f1d) */

int __regparm3 FUN_00039d90(int param_1,int param_2,undefined4 *param_3,uint *param_4)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int in_GS_OFFSET;
  char local_29;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uVar2 = DAT_000de358;
  uStack_14 = 0x39d9d;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(char *)(param_1 + 0x11) == '\0') {
LAB_00039e1c:
    if (param_3 == (undefined4 *)0x0) {
      iVar4 = FUN_0001f5a0(2);
      if (iVar4 == 0) {
        uVar2 = *puRam00000038;
        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
        FUN_0001f150();
        goto LAB_00039e58;
      }
      *param_4 = 0;
    }
    else {
      iVar4 = FUN_0001f5a0(0);
      if (iVar4 == 0) {
        uVar2 = *puRam00000038;
        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
        *param_3 = 0;
        goto LAB_00039e58;
      }
      *param_4 = 0;
LAB_00039e4b:
      *param_3 = 0;
    }
  }
  else {
    uVar5 = param_2 + 1;
    uVar1 = *(uint *)(param_1 + 0x24);
    while( true ) {
      uVar3 = 0;
      if (1 < uVar5) {
        uVar3 = FUN_00027b10();
      }
      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;
      uVar5 = uVar5 + 1;
    }
    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;
    iVar4 = FUN_00039cb0(&local_24);
    if (iVar4 == 0) {
      if ((local_29 == '\x04') && (local_24 == param_2)) {
        *param_4 = uVar5;
        if (param_3 != (undefined4 *)0x0) {
          *param_3 = 0;
        }
        goto LAB_00039e58;
      }
      goto LAB_00039e1c;
    }
    *param_4 = 0;
    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;
  }
  if (iVar4 == 0x65) {
    iVar4 = 0;
  }
LAB_00039e58:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a9ea0();
}


PUSH EBP
PUSH EDI
MOV EBP,EAX
PUSH ESI
PUSH EBX
MOV EDI,ECX
CALL 0x000a94fb
ADD ESI,0xa4263
SUB ESP,0x3c
MOV EAX,dword ptr [ESP + 0x50]
MOV dword ptr [ESP + 0x10],EDX
MOV dword ptr [ESP + 0x24],0x0
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x2c],EAX
XOR EAX,EAX
CMP byte ptr [EBP + 0x11],0x0
JZ 0x00039e1c
LEA ECX,[EBP + 0x24]
MOV EAX,dword ptr [ESI + 0x358]
MOV dword ptr [ESP + 0x14],EDI
LEA EBX,[EDX + 0x1]
MOV ESI,dword ptr [EBP + 0x24]
MOV dword ptr [ESP + 0x1c],ECX
LEA ECX,[EBP + 0x28]
MOV EDI,EAX
MOV dword ptr [ESP + 0x18],ECX
JMP 0x00039df3
ADD EBX,0x1
XOR EAX,EAX
CMP EBX,0x1
JA 0x00039f30
CMP EBX,EAX
JZ 0x00039df0
XOR EDX,EDX
MOV EAX,EDI
DIV ESI
ADD EAX,0x1
CMP EAX,EBX
JZ 0x00039df0
CMP EBX,dword ptr [EBP + 0x30]
MOV EDI,dword ptr [ESP + 0x14]
JBE 0x00039ed0
TEST EDI,EDI
JZ 0x00039e90
LEA ECX,[ESP + 0x24]
SUB ESP,0xc
MOV EAX,EBP
PUSH 0x0
MOV EDX,dword ptr [ESP + 0x20]
CALL 0x0001f5a0
ADD ESP,0x10
TEST EAX,EAX
MOV ESI,EAX
JZ 0x00039e78
MOV EAX,dword ptr [ESP + 0xc]
MOV dword ptr [EAX],0x0
MOV EAX,dword ptr [ESP + 0x24]
MOV dword ptr [EDI],EAX
CMP ESI,0x65
MOV EAX,0x0
CMOVZ ESI,EAX
MOV ECX,dword ptr [ESP + 0x2c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,ESI
JNZ 0x00039f7a
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,dword ptr [ESP + 0x24]
MOV ECX,dword ptr [ESP + 0xc]
MOV EAX,dword ptr [EDX + 0x38]
MOV EAX,dword ptr [EAX]
BSWAP EAX
MOV dword ptr [ECX],EAX
MOV dword ptr [EDI],EDX
JMP 0x00039e58
LEA ECX,[ESP + 0x24]
SUB ESP,0xc
MOV EAX,EBP
PUSH 0x2
MOV EDX,dword ptr [ESP + 0x20]
CALL 0x0001f5a0
ADD ESP,0x10
TEST EAX,EAX
MOV ESI,EAX
JNZ 0x00039f7f
MOV EDX,dword ptr [ESP + 0x24]
MOV ECX,dword ptr [ESP + 0xc]
MOV EAX,dword ptr [EDX + 0x38]
MOV EAX,dword ptr [EAX]
BSWAP EAX
MOV dword ptr [ECX],EAX
MOV EAX,dword ptr [EDX + 0x48]
CALL 0x0001f150
JMP 0x00039e58
LEA ECX,[ESP + 0x23]
SUB ESP,0xc
MOV EDX,EBX
LEA EAX,[ESP + 0x34]
PUSH EAX
MOV EAX,EBP
CALL 0x00039cb0
ADD ESP,0x10
TEST EAX,EAX
MOV ESI,EAX
JNZ 0x00039f48
CMP byte ptr [ESP + 0x23],0x4
JNZ 0x00039e1c
MOV EAX,dword ptr [ESP + 0x10]
CMP dword ptr [ESP + 0x28],EAX
JNZ 0x00039e1c
MOV ECX,dword ptr [ESP + 0xc]
TEST EDI,EDI
MOV EAX,dword ptr [ESP + 0x24]
MOV dword ptr [ECX],EBX
JNZ 0x00039f73
TEST EAX,EAX
JZ 0x00039e58
MOV EAX,dword ptr [EAX + 0x48]
CALL 0x0001f150
JMP 0x00039e58
MOV EDX,dword ptr [ESP + 0x18]
MOV EAX,dword ptr [ESP + 0x1c]
MOV ECX,EBX
CALL 0x00027b10
JMP 0x00039dfe
MOV ECX,dword ptr [ESP + 0xc]
TEST EDI,EDI
MOV EAX,dword ptr [ESP + 0x24]
MOV dword ptr [ECX],0x0
JNZ 0x00039e4b
TEST EAX,EAX
JZ 0x00039e4d
MOV EAX,dword ptr [EAX + 0x48]
CALL 0x0001f150
JMP 0x00039e4d
MOV dword ptr [EDI],EAX
JMP 0x00039e58
CALL 0x000a9ea0
MOV EAX,dword ptr [ESP + 0xc]
MOV dword ptr [EAX],0x0
MOV EAX,dword ptr [ESP + 0x24]
JMP 0x00039f5e
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* WARNING: Removing unreachable block (ram,0x00039f66) */\n/* WARNING: Removing unreachable block (ram,0x00039f1d) */\n\nint __regparm3 FUN_00039d90(int param_1,int param_2,undefined4 *param_3,uint *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char local_29;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = DAT_000de358;\n  uStack_14 = 0x39d9d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }\n  if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a9ea0();\n}\n\n" comment comment comment (function_definition "int __regparm3 FUN_00039d90(int param_1,int param_2,undefined4 *param_3,uint *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char local_29;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = DAT_000de358;\n  uStack_14 = 0x39d9d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }\n  if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a9ea0();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00039d90(int param_1,int param_2,undefined4 *param_3,uint *param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 *param_3,uint *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char local_29;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = DAT_000de358;\n  uStack_14 = 0x39d9d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }\n  if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a9ea0();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char local_29;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uVar2 = DAT_000de358;" (assignment_expression "uVar2 = DAT_000de358" identifier = identifier) ;) (expression_statement "uStack_14 = 0x39d9d;" (assignment_expression "uStack_14 = 0x39d9d" 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) ))))) ;) (if_statement "if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x11) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x11) == '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" * (cast_expression "(char *)(param_1 + 0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x11)" ( (binary_expression "param_1 + 0x11" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }" { (labeled_statement "LAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" statement_identifier : (if_statement "if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" if (parenthesized_expression "(param_3 == (undefined4 *)0x0)" ( (binary_expression "param_3 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }" { (expression_statement "iVar4 = FUN_0001f5a0(2);" (assignment_expression "iVar4 = FUN_0001f5a0(2)" identifier = (call_expression "FUN_0001f5a0(2)" identifier (argument_list "(2)" ( number_literal )))) ;) (if_statement "if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }" { (expression_statement "uVar2 = *puRam00000038;" (assignment_expression "uVar2 = *puRam00000038" identifier = (pointer_expression "*puRam00000038" * identifier)) ;) (expression_statement "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (pointer_expression "*param_4" * identifier) = (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" ( (binary_expression "uVar2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" ( (binary_expression "uVar2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "FUN_0001f150();" (call_expression "FUN_0001f150()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00039e58;" goto statement_identifier ;) })) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) }) (else_clause "else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" else (compound_statement "{\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" { (expression_statement "iVar4 = FUN_0001f5a0(0);" (assignment_expression "iVar4 = FUN_0001f5a0(0)" identifier = (call_expression "FUN_0001f5a0(0)" identifier (argument_list "(0)" ( number_literal )))) ;) (if_statement "if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }" { (expression_statement "uVar2 = *puRam00000038;" (assignment_expression "uVar2 = *puRam00000038" identifier = (pointer_expression "*puRam00000038" * identifier)) ;) (expression_statement "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (pointer_expression "*param_4" * identifier) = (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" ( (binary_expression "uVar2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" ( (binary_expression "uVar2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (goto_statement "goto LAB_00039e58;" goto statement_identifier ;) })) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (labeled_statement "LAB_00039e4b:\n      *param_3 = 0;" statement_identifier : (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;)) })))) }) (else_clause "else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }" else (compound_statement "{\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }" { (expression_statement "uVar5 = param_2 + 1;" (assignment_expression "uVar5 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0x24);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x24)" identifier = (pointer_expression "*(uint *)(param_1 + 0x24)" * (cast_expression "(uint *)(param_1 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) ;) (while_statement "while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }" if (parenthesized_expression "(1 < uVar5)" ( (binary_expression "1 < uVar5" number_literal < identifier) )) (compound_statement "{\n        uVar3 = FUN_00027b10();\n      }" { (expression_statement "uVar3 = FUN_00027b10();" (assignment_expression "uVar3 = FUN_00027b10()" identifier = (call_expression "FUN_00027b10()" identifier (argument_list "()" ( )))) ;) })) (if_statement "if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;" if (parenthesized_expression "((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5))" ( (binary_expression "(uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)" (parenthesized_expression "(uVar5 != uVar3)" ( (binary_expression "uVar5 != uVar3" identifier != identifier) )) && (parenthesized_expression "(uVar2 / uVar1 + 1 != uVar5)" ( (binary_expression "uVar2 / uVar1 + 1 != uVar5" (binary_expression "uVar2 / uVar1 + 1" (binary_expression "uVar2 / uVar1" identifier / identifier) + number_literal) != identifier) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) })) (if_statement "if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;" if (parenthesized_expression "(*(uint *)(param_1 + 0x30) < uVar5)" ( (binary_expression "*(uint *)(param_1 + 0x30) < uVar5" (pointer_expression "*(uint *)(param_1 + 0x30)" * (cast_expression "(uint *)(param_1 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) < identifier) )) (goto_statement "goto LAB_00039e1c;" goto statement_identifier ;)) (expression_statement "iVar4 = FUN_00039cb0(&local_24);" (assignment_expression "iVar4 = FUN_00039cb0(&local_24)" identifier = (call_expression "FUN_00039cb0(&local_24)" identifier (argument_list "(&local_24)" ( (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }" { (if_statement "if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }" if (parenthesized_expression "((local_29 == '\x04') && (local_24 == param_2))" ( (binary_expression "(local_29 == '\x04') && (local_24 == param_2)" (parenthesized_expression "(local_29 == '\x04')" ( (binary_expression "local_29 == '\x04'" identifier == (char_literal "'\x04'" ' escape_sequence ')) )) && (parenthesized_expression "(local_24 == param_2)" ( (binary_expression "local_24 == param_2" identifier == identifier) ))) )) (compound_statement "{\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }" { (expression_statement "*param_4 = uVar5;" (assignment_expression "*param_4 = uVar5" (pointer_expression "*param_4" * identifier) = identifier) ;) (if_statement "if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }" if (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *param_3 = 0;\n        }" { (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) })) (goto_statement "goto LAB_00039e58;" goto statement_identifier ;) })) (goto_statement "goto LAB_00039e1c;" goto statement_identifier ;) })) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (if_statement "if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;" if (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00039e4b;" goto statement_identifier ;)) }))) (if_statement "if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }" if (parenthesized_expression "(iVar4 == 0x65)" ( (binary_expression "iVar4 == 0x65" identifier == number_literal) )) (compound_statement "{\n    iVar4 = 0;\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) })) (labeled_statement "LAB_00039e58:\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 "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nint __regparm3 getOverflowPage(BtShared *pBt,Pgno ovfl,MemPage **ppPage,Pgno *pPgnoNext)\n\n{\n  uint uVar1;\n  BtShared *pBVar2;\n  int iVar3;\n  BtShared *pBt_1;\n  int in_GS_OFFSET;\n  u8 eType;\n  MemPage *pPage;\n  Pgno pgno;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar3 = sqlite3PendingByte;\n  uStack_14 = 0x39d9d;\n  pPage = (MemPage *)0x0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (pBt->autoVacuum == '\0') {\nLAB_00039e1c:\n    if (ppPage != (MemPage **)0x0) {\n      iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);\n      if (iVar3 == 0) {\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }\n      *pPgnoNext = 0;\n      goto LAB_00039e4b;\n    }\n    iVar3 = btreeGetPage(pBt,ovfl,&pPage,2);\n    if (iVar3 == 0) {\n      uVar1 = *(uint *)pPage->aData;\n      *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n      goto LAB_00039e58;\n    }\n    *pPgnoNext = 0;\nLAB_00039f5e:\n    if (pPage != (MemPage *)0x0) {\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n    }\n  }\n  else {\n    pBt_1 = (BtShared *)(ovfl + 1);\n    uVar1 = pBt->pageSize;\n    while( true ) {\n      pBVar2 = (BtShared *)0x0;\n      if ((BtShared *)0x1 < pBt_1) {\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }\n      if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;\n      pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);\n    }\n    if ((BtShared *)pBt->nPage < pBt_1) goto LAB_00039e1c;\n    iVar3 = ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno);\n    if (iVar3 == 0) {\n      if ((eType == '\x04') && (pgno == ovfl)) {\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *pPgnoNext = 0;\n    if (ppPage == (MemPage **)0x0) goto LAB_00039f5e;\nLAB_00039e4b:\n    *ppPage = pPage;\n  }\n  if (iVar3 == 0x65) {\n    iVar3 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "int __regparm3 getOverflowPage(BtShared *pBt,Pgno ovfl,MemPage **ppPage,Pgno *pPgnoNext)\n\n{\n  uint uVar1;\n  BtShared *pBVar2;\n  int iVar3;\n  BtShared *pBt_1;\n  int in_GS_OFFSET;\n  u8 eType;\n  MemPage *pPage;\n  Pgno pgno;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar3 = sqlite3PendingByte;\n  uStack_14 = 0x39d9d;\n  pPage = (MemPage *)0x0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (pBt->autoVacuum == '\0') {\nLAB_00039e1c:\n    if (ppPage != (MemPage **)0x0) {\n      iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);\n      if (iVar3 == 0) {\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }\n      *pPgnoNext = 0;\n      goto LAB_00039e4b;\n    }\n    iVar3 = btreeGetPage(pBt,ovfl,&pPage,2);\n    if (iVar3 == 0) {\n      uVar1 = *(uint *)pPage->aData;\n      *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n      goto LAB_00039e58;\n    }\n    *pPgnoNext = 0;\nLAB_00039f5e:\n    if (pPage != (MemPage *)0x0) {\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n    }\n  }\n  else {\n    pBt_1 = (BtShared *)(ovfl + 1);\n    uVar1 = pBt->pageSize;\n    while( true ) {\n      pBVar2 = (BtShared *)0x0;\n      if ((BtShared *)0x1 < pBt_1) {\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }\n      if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;\n      pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);\n    }\n    if ((BtShared *)pBt->nPage < pBt_1) goto LAB_00039e1c;\n    iVar3 = ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno);\n    if (iVar3 == 0) {\n      if ((eType == '\x04') && (pgno == ovfl)) {\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *pPgnoNext = 0;\n    if (ppPage == (MemPage **)0x0) goto LAB_00039f5e;\nLAB_00039e4b:\n    *ppPage = pPage;\n  }\n  if (iVar3 == 0x65) {\n    iVar3 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "getOverflowPage(BtShared *pBt,Pgno ovfl,MemPage **ppPage,Pgno *pPgnoNext)" identifier (parameter_list "(BtShared *pBt,Pgno ovfl,MemPage **ppPage,Pgno *pPgnoNext)" ( (parameter_declaration "BtShared *pBt" type_identifier (pointer_declarator "*pBt" * identifier)) , (parameter_declaration "Pgno ovfl" type_identifier identifier) , (parameter_declaration "MemPage **ppPage" type_identifier (pointer_declarator "**ppPage" * (pointer_declarator "*ppPage" * identifier))) , (parameter_declaration "Pgno *pPgnoNext" type_identifier (pointer_declarator "*pPgnoNext" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  BtShared *pBVar2;\n  int iVar3;\n  BtShared *pBt_1;\n  int in_GS_OFFSET;\n  u8 eType;\n  MemPage *pPage;\n  Pgno pgno;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar3 = sqlite3PendingByte;\n  uStack_14 = 0x39d9d;\n  pPage = (MemPage *)0x0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (pBt->autoVacuum == '\0') {\nLAB_00039e1c:\n    if (ppPage != (MemPage **)0x0) {\n      iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);\n      if (iVar3 == 0) {\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }\n      *pPgnoNext = 0;\n      goto LAB_00039e4b;\n    }\n    iVar3 = btreeGetPage(pBt,ovfl,&pPage,2);\n    if (iVar3 == 0) {\n      uVar1 = *(uint *)pPage->aData;\n      *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n      goto LAB_00039e58;\n    }\n    *pPgnoNext = 0;\nLAB_00039f5e:\n    if (pPage != (MemPage *)0x0) {\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n    }\n  }\n  else {\n    pBt_1 = (BtShared *)(ovfl + 1);\n    uVar1 = pBt->pageSize;\n    while( true ) {\n      pBVar2 = (BtShared *)0x0;\n      if ((BtShared *)0x1 < pBt_1) {\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }\n      if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;\n      pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);\n    }\n    if ((BtShared *)pBt->nPage < pBt_1) goto LAB_00039e1c;\n    iVar3 = ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno);\n    if (iVar3 == 0) {\n      if ((eType == '\x04') && (pgno == ovfl)) {\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *pPgnoNext = 0;\n    if (ppPage == (MemPage **)0x0) goto LAB_00039f5e;\nLAB_00039e4b:\n    *ppPage = pPage;\n  }\n  if (iVar3 == 0x65) {\n    iVar3 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "BtShared *pBVar2;" type_identifier (pointer_declarator "*pBVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "BtShared *pBt_1;" type_identifier (pointer_declarator "*pBt_1" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "u8 eType;" type_identifier identifier ;) (declaration "MemPage *pPage;" type_identifier (pointer_declarator "*pPage" * identifier) ;) (declaration "Pgno pgno;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "iVar3 = sqlite3PendingByte;" (assignment_expression "iVar3 = sqlite3PendingByte" identifier = identifier) ;) (expression_statement "uStack_14 = 0x39d9d;" (assignment_expression "uStack_14 = 0x39d9d" identifier = number_literal) ;) (expression_statement "pPage = (MemPage *)0x0;" (assignment_expression "pPage = (MemPage *)0x0" identifier = (cast_expression "(MemPage *)0x0" ( (type_descriptor "MemPage *" type_identifier (abstract_pointer_declarator "*" *)) ) 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) ))))) ;) (if_statement "if (pBt->autoVacuum == '\0') {\nLAB_00039e1c:\n    if (ppPage != (MemPage **)0x0) {\n      iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);\n      if (iVar3 == 0) {\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }\n      *pPgnoNext = 0;\n      goto LAB_00039e4b;\n    }\n    iVar3 = btreeGetPage(pBt,ovfl,&pPage,2);\n    if (iVar3 == 0) {\n      uVar1 = *(uint *)pPage->aData;\n      *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n      goto LAB_00039e58;\n    }\n    *pPgnoNext = 0;\nLAB_00039f5e:\n    if (pPage != (MemPage *)0x0) {\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n    }\n  }\n  else {\n    pBt_1 = (BtShared *)(ovfl + 1);\n    uVar1 = pBt->pageSize;\n    while( true ) {\n      pBVar2 = (BtShared *)0x0;\n      if ((BtShared *)0x1 < pBt_1) {\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }\n      if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;\n      pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);\n    }\n    if ((BtShared *)pBt->nPage < pBt_1) goto LAB_00039e1c;\n    iVar3 = ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno);\n    if (iVar3 == 0) {\n      if ((eType == '\x04') && (pgno == ovfl)) {\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *pPgnoNext = 0;\n    if (ppPage == (MemPage **)0x0) goto LAB_00039f5e;\nLAB_00039e4b:\n    *ppPage = pPage;\n  }" if (parenthesized_expression "(pBt->autoVacuum == '\0')" ( (binary_expression "pBt->autoVacuum == '\0'" (field_expression "pBt->autoVacuum" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_00039e1c:\n    if (ppPage != (MemPage **)0x0) {\n      iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);\n      if (iVar3 == 0) {\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }\n      *pPgnoNext = 0;\n      goto LAB_00039e4b;\n    }\n    iVar3 = btreeGetPage(pBt,ovfl,&pPage,2);\n    if (iVar3 == 0) {\n      uVar1 = *(uint *)pPage->aData;\n      *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n      goto LAB_00039e58;\n    }\n    *pPgnoNext = 0;\nLAB_00039f5e:\n    if (pPage != (MemPage *)0x0) {\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n    }\n  }" { (labeled_statement "LAB_00039e1c:\n    if (ppPage != (MemPage **)0x0) {\n      iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);\n      if (iVar3 == 0) {\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }\n      *pPgnoNext = 0;\n      goto LAB_00039e4b;\n    }" statement_identifier : (if_statement "if (ppPage != (MemPage **)0x0) {\n      iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);\n      if (iVar3 == 0) {\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }\n      *pPgnoNext = 0;\n      goto LAB_00039e4b;\n    }" if (parenthesized_expression "(ppPage != (MemPage **)0x0)" ( (binary_expression "ppPage != (MemPage **)0x0" identifier != (cast_expression "(MemPage **)0x0" ( (type_descriptor "MemPage **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n      iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);\n      if (iVar3 == 0) {\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }\n      *pPgnoNext = 0;\n      goto LAB_00039e4b;\n    }" { (expression_statement "iVar3 = btreeGetPage(pBt,ovfl,&pPage,0);" (assignment_expression "iVar3 = btreeGetPage(pBt,ovfl,&pPage,0)" identifier = (call_expression "btreeGetPage(pBt,ovfl,&pPage,0)" identifier (argument_list "(pBt,ovfl,&pPage,0)" ( identifier , identifier , (pointer_expression "&pPage" & identifier) , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar1 = *(uint *)pPage->aData;\n        *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;\n        *ppPage = pPage;\n        goto LAB_00039e58;\n      }" { (expression_statement "uVar1 = *(uint *)pPage->aData;" (assignment_expression "uVar1 = *(uint *)pPage->aData" identifier = (pointer_expression "*(uint *)pPage->aData" * (cast_expression "(uint *)pPage->aData" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pPage->aData" identifier -> field_identifier)))) ;) (expression_statement "*pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18\n        ;" (assignment_expression "*pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (pointer_expression "*pPgnoNext" * identifier) = (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8" (binary_expression "uVar1 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar1 & 0xff0000) >> 8" (parenthesized_expression "(uVar1 & 0xff0000)" ( (binary_expression "uVar1 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff00) << 8" (parenthesized_expression "(uVar1 & 0xff00)" ( (binary_expression "uVar1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar1 << 0x18" identifier << number_literal))) ;) (expression_statement "*ppPage = pPage;" (assignment_expression "*ppPage = pPage" (pointer_expression "*ppPage" * identifier) = identifier) ;) (goto_statement "goto LAB_00039e58;" goto statement_identifier ;) })) (expression_statement "*pPgnoNext = 0;" (assignment_expression "*pPgnoNext = 0" (pointer_expression "*pPgnoNext" * identifier) = number_literal) ;) (goto_statement "goto LAB_00039e4b;" goto statement_identifier ;) }))) (expression_statement "iVar3 = btreeGetPage(pBt,ovfl,&pPage,2);" (assignment_expression "iVar3 = btreeGetPage(pBt,ovfl,&pPage,2)" identifier = (call_expression "btreeGetPage(pBt,ovfl,&pPage,2)" identifier (argument_list "(pBt,ovfl,&pPage,2)" ( identifier , identifier , (pointer_expression "&pPage" & identifier) , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n      uVar1 = *(uint *)pPage->aData;\n      *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n      goto LAB_00039e58;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = *(uint *)pPage->aData;\n      *pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n      goto LAB_00039e58;\n    }" { (expression_statement "uVar1 = *(uint *)pPage->aData;" (assignment_expression "uVar1 = *(uint *)pPage->aData" identifier = (pointer_expression "*(uint *)pPage->aData" * (cast_expression "(uint *)pPage->aData" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pPage->aData" identifier -> field_identifier)))) ;) (expression_statement "*pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;" (assignment_expression "*pPgnoNext = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (pointer_expression "*pPgnoNext" * identifier) = (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8" (binary_expression "uVar1 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar1 & 0xff0000) >> 8" (parenthesized_expression "(uVar1 & 0xff0000)" ( (binary_expression "uVar1 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff00) << 8" (parenthesized_expression "(uVar1 & 0xff00)" ( (binary_expression "uVar1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar1 << 0x18" identifier << number_literal))) ;) (expression_statement "sqlite3PagerUnrefNotNull(pPage->pDbPage);" (call_expression "sqlite3PagerUnrefNotNull(pPage->pDbPage)" identifier (argument_list "(pPage->pDbPage)" ( (field_expression "pPage->pDbPage" identifier -> field_identifier) ))) ;) (goto_statement "goto LAB_00039e58;" goto statement_identifier ;) })) (expression_statement "*pPgnoNext = 0;" (assignment_expression "*pPgnoNext = 0" (pointer_expression "*pPgnoNext" * identifier) = number_literal) ;) (labeled_statement "LAB_00039f5e:\n    if (pPage != (MemPage *)0x0) {\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n    }" statement_identifier : (if_statement "if (pPage != (MemPage *)0x0) {\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n    }" if (parenthesized_expression "(pPage != (MemPage *)0x0)" ( (binary_expression "pPage != (MemPage *)0x0" identifier != (cast_expression "(MemPage *)0x0" ( (type_descriptor "MemPage *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      sqlite3PagerUnrefNotNull(pPage->pDbPage);\n    }" { (expression_statement "sqlite3PagerUnrefNotNull(pPage->pDbPage);" (call_expression "sqlite3PagerUnrefNotNull(pPage->pDbPage)" identifier (argument_list "(pPage->pDbPage)" ( (field_expression "pPage->pDbPage" identifier -> field_identifier) ))) ;) }))) }) (else_clause "else {\n    pBt_1 = (BtShared *)(ovfl + 1);\n    uVar1 = pBt->pageSize;\n    while( true ) {\n      pBVar2 = (BtShared *)0x0;\n      if ((BtShared *)0x1 < pBt_1) {\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }\n      if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;\n      pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);\n    }\n    if ((BtShared *)pBt->nPage < pBt_1) goto LAB_00039e1c;\n    iVar3 = ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno);\n    if (iVar3 == 0) {\n      if ((eType == '\x04') && (pgno == ovfl)) {\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *pPgnoNext = 0;\n    if (ppPage == (MemPage **)0x0) goto LAB_00039f5e;\nLAB_00039e4b:\n    *ppPage = pPage;\n  }" else (compound_statement "{\n    pBt_1 = (BtShared *)(ovfl + 1);\n    uVar1 = pBt->pageSize;\n    while( true ) {\n      pBVar2 = (BtShared *)0x0;\n      if ((BtShared *)0x1 < pBt_1) {\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }\n      if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;\n      pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);\n    }\n    if ((BtShared *)pBt->nPage < pBt_1) goto LAB_00039e1c;\n    iVar3 = ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno);\n    if (iVar3 == 0) {\n      if ((eType == '\x04') && (pgno == ovfl)) {\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *pPgnoNext = 0;\n    if (ppPage == (MemPage **)0x0) goto LAB_00039f5e;\nLAB_00039e4b:\n    *ppPage = pPage;\n  }" { (expression_statement "pBt_1 = (BtShared *)(ovfl + 1);" (assignment_expression "pBt_1 = (BtShared *)(ovfl + 1)" identifier = (cast_expression "(BtShared *)(ovfl + 1)" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(ovfl + 1)" ( (binary_expression "ovfl + 1" identifier + number_literal) )))) ;) (expression_statement "uVar1 = pBt->pageSize;" (assignment_expression "uVar1 = pBt->pageSize" identifier = (field_expression "pBt->pageSize" identifier -> field_identifier)) ;) (while_statement "while( true ) {\n      pBVar2 = (BtShared *)0x0;\n      if ((BtShared *)0x1 < pBt_1) {\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }\n      if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;\n      pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      pBVar2 = (BtShared *)0x0;\n      if ((BtShared *)0x1 < pBt_1) {\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }\n      if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;\n      pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);\n    }" { (expression_statement "pBVar2 = (BtShared *)0x0;" (assignment_expression "pBVar2 = (BtShared *)0x0" identifier = (cast_expression "(BtShared *)0x0" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if ((BtShared *)0x1 < pBt_1) {\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }" if (parenthesized_expression "((BtShared *)0x1 < pBt_1)" ( (binary_expression "(BtShared *)0x1 < pBt_1" (cast_expression "(BtShared *)0x1" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) < identifier) )) (compound_statement "{\n        pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);\n      }" { (expression_statement "pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1);" (assignment_expression "pBVar2 = (BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1)" identifier = (cast_expression "(BtShared *)ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1)" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "ptrmapPageno((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1)" identifier (argument_list "((BtShared *)&pBt->pageSize,(Pgno)&pBt->usableSize,pBt_1)" ( (cast_expression "(BtShared *)&pBt->pageSize" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pBt->pageSize" & (field_expression "pBt->pageSize" identifier -> field_identifier))) , (binary_expression "(Pgno)&pBt->usableSize" (parenthesized_expression "(Pgno)" ( identifier )) & (field_expression "pBt->usableSize" identifier -> field_identifier)) , identifier ))))) ;) })) (if_statement "if ((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)) break;" if (parenthesized_expression "((pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1))" ( (binary_expression "(pBt_1 != pBVar2) && ((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)" (parenthesized_expression "(pBt_1 != pBVar2)" ( (binary_expression "pBt_1 != pBVar2" identifier != identifier) )) && (parenthesized_expression "((BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1)" ( (binary_expression "(BtShared *)((uint)iVar3 / uVar1 + 1) != pBt_1" (cast_expression "(BtShared *)((uint)iVar3 / uVar1 + 1)" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)iVar3 / uVar1 + 1)" ( (binary_expression "(uint)iVar3 / uVar1 + 1" (binary_expression "(uint)iVar3 / uVar1" (cast_expression "(uint)iVar3" ( (type_descriptor "uint" type_identifier) ) identifier) / identifier) + number_literal) ))) != identifier) ))) )) (break_statement "break;" break ;)) (expression_statement "pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1);" (assignment_expression "pBt_1 = (BtShared *)((int)&pBt_1->pPager + 1)" identifier = (cast_expression "(BtShared *)((int)&pBt_1->pPager + 1)" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&pBt_1->pPager + 1)" ( (binary_expression "(int)&pBt_1->pPager + 1" (cast_expression "(int)&pBt_1->pPager" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pBt_1->pPager" & (field_expression "pBt_1->pPager" identifier -> field_identifier))) + number_literal) )))) ;) })) (if_statement "if ((BtShared *)pBt->nPage < pBt_1) goto LAB_00039e1c;" if (parenthesized_expression "((BtShared *)pBt->nPage < pBt_1)" ( (binary_expression "(BtShared *)pBt->nPage < pBt_1" (cast_expression "(BtShared *)pBt->nPage" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pBt->nPage" identifier -> field_identifier)) < identifier) )) (goto_statement "goto LAB_00039e1c;" goto statement_identifier ;)) (expression_statement "iVar3 = ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno);" (assignment_expression "iVar3 = ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno)" identifier = (call_expression "ptrmapGet(pBt,(Pgno)pBt_1,&eType,&pgno)" identifier (argument_list "(pBt,(Pgno)pBt_1,&eType,&pgno)" ( identifier , (cast_expression "(Pgno)pBt_1" ( (type_descriptor "Pgno" type_identifier) ) identifier) , (pointer_expression "&eType" & identifier) , (pointer_expression "&pgno" & identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n      if ((eType == '\x04') && (pgno == ovfl)) {\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      if ((eType == '\x04') && (pgno == ovfl)) {\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }" { (if_statement "if ((eType == '\x04') && (pgno == ovfl)) {\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }" if (parenthesized_expression "((eType == '\x04') && (pgno == ovfl))" ( (binary_expression "(eType == '\x04') && (pgno == ovfl)" (parenthesized_expression "(eType == '\x04')" ( (binary_expression "eType == '\x04'" identifier == (char_literal "'\x04'" ' escape_sequence ')) )) && (parenthesized_expression "(pgno == ovfl)" ( (binary_expression "pgno == ovfl" identifier == identifier) ))) )) (compound_statement "{\n        *pPgnoNext = (Pgno)pBt_1;\n        if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }\n        goto LAB_00039e58;\n      }" { (expression_statement "*pPgnoNext = (Pgno)pBt_1;" (assignment_expression "*pPgnoNext = (Pgno)pBt_1" (pointer_expression "*pPgnoNext" * identifier) = (cast_expression "(Pgno)pBt_1" ( (type_descriptor "Pgno" type_identifier) ) identifier)) ;) (if_statement "if (ppPage == (MemPage **)0x0) {\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }\n        else {\n          *ppPage = pPage;\n        }" if (parenthesized_expression "(ppPage == (MemPage **)0x0)" ( (binary_expression "ppPage == (MemPage **)0x0" identifier == (cast_expression "(MemPage **)0x0" ( (type_descriptor "MemPage **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n          if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }\n        }" { (if_statement "if (pPage != (MemPage *)0x0) {\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }" if (parenthesized_expression "(pPage != (MemPage *)0x0)" ( (binary_expression "pPage != (MemPage *)0x0" identifier != (cast_expression "(MemPage *)0x0" ( (type_descriptor "MemPage *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            sqlite3PagerUnrefNotNull(pPage->pDbPage);\n          }" { (expression_statement "sqlite3PagerUnrefNotNull(pPage->pDbPage);" (call_expression "sqlite3PagerUnrefNotNull(pPage->pDbPage)" identifier (argument_list "(pPage->pDbPage)" ( (field_expression "pPage->pDbPage" identifier -> field_identifier) ))) ;) })) }) (else_clause "else {\n          *ppPage = pPage;\n        }" else (compound_statement "{\n          *ppPage = pPage;\n        }" { (expression_statement "*ppPage = pPage;" (assignment_expression "*ppPage = pPage" (pointer_expression "*ppPage" * identifier) = identifier) ;) }))) (goto_statement "goto LAB_00039e58;" goto statement_identifier ;) })) (goto_statement "goto LAB_00039e1c;" goto statement_identifier ;) })) (expression_statement "*pPgnoNext = 0;" (assignment_expression "*pPgnoNext = 0" (pointer_expression "*pPgnoNext" * identifier) = number_literal) ;) (if_statement "if (ppPage == (MemPage **)0x0) goto LAB_00039f5e;" if (parenthesized_expression "(ppPage == (MemPage **)0x0)" ( (binary_expression "ppPage == (MemPage **)0x0" identifier == (cast_expression "(MemPage **)0x0" ( (type_descriptor "MemPage **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (goto_statement "goto LAB_00039f5e;" goto statement_identifier ;)) (labeled_statement "LAB_00039e4b:\n    *ppPage = pPage;" statement_identifier : (expression_statement "*ppPage = pPage;" (assignment_expression "*ppPage = pPage" (pointer_expression "*ppPage" * identifier) = identifier) ;)) }))) (if_statement "if (iVar3 == 0x65) {\n    iVar3 = 0;\n  }" if (parenthesized_expression "(iVar3 == 0x65)" ( (binary_expression "iVar3 == 0x65" identifier == number_literal) )) (compound_statement "{\n    iVar3 = 0;\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) })) (labeled_statement "LAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\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 iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int __regparm3 FUN_00039d90(int param_1,int param_2,undefined4 *param_3,uint *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char local_29;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = DAT_000de358;\n  uStack_14 = 0x39d9d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }\n  if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_000a9ea0();\n}\n\n" (function_definition "int __regparm3 FUN_00039d90(int param_1,int param_2,undefined4 *param_3,uint *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char local_29;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = DAT_000de358;\n  uStack_14 = 0x39d9d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }\n  if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_000a9ea0();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00039d90(int param_1,int param_2,undefined4 *param_3,uint *param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 *param_3,uint *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char local_29;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = DAT_000de358;\n  uStack_14 = 0x39d9d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }\n  if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_000a9ea0();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char local_29;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uVar2 = DAT_000de358;" (assignment_expression "uVar2 = DAT_000de358" identifier = identifier) ;) (expression_statement "uStack_14 = 0x39d9d;" (assignment_expression "uStack_14 = 0x39d9d" 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) ))))) ;) (if_statement "if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x11) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x11) == '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" * (cast_expression "(char *)(param_1 + 0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x11)" ( (binary_expression "param_1 + 0x11" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }" { (labeled_statement "LAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" statement_identifier : (if_statement "if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" if (parenthesized_expression "(param_3 == (undefined4 *)0x0)" ( (binary_expression "param_3 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }" { (expression_statement "iVar4 = FUN_0001f5a0(2);" (assignment_expression "iVar4 = FUN_0001f5a0(2)" identifier = (call_expression "FUN_0001f5a0(2)" identifier (argument_list "(2)" ( number_literal )))) ;) (if_statement "if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }" { (expression_statement "uVar2 = *puRam00000038;" (assignment_expression "uVar2 = *puRam00000038" identifier = (pointer_expression "*puRam00000038" * identifier)) ;) (expression_statement "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (pointer_expression "*param_4" * identifier) = (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" ( (binary_expression "uVar2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" ( (binary_expression "uVar2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "FUN_0001f150();" (call_expression "FUN_0001f150()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00039e58;" goto statement_identifier ;) })) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) }) (else_clause "else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" else (compound_statement "{\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" { (expression_statement "iVar4 = FUN_0001f5a0(0);" (assignment_expression "iVar4 = FUN_0001f5a0(0)" identifier = (call_expression "FUN_0001f5a0(0)" identifier (argument_list "(0)" ( number_literal )))) ;) (if_statement "if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }" { (expression_statement "uVar2 = *puRam00000038;" (assignment_expression "uVar2 = *puRam00000038" identifier = (pointer_expression "*puRam00000038" * identifier)) ;) (expression_statement "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (pointer_expression "*param_4" * identifier) = (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" ( (binary_expression "uVar2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" ( (binary_expression "uVar2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (goto_statement "goto LAB_00039e58;" goto statement_identifier ;) })) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (labeled_statement "LAB_00039e4b:\n      *param_3 = 0;" statement_identifier : (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;)) })))) }) (else_clause "else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }" else (compound_statement "{\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }" { (expression_statement "uVar5 = param_2 + 1;" (assignment_expression "uVar5 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0x24);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x24)" identifier = (pointer_expression "*(uint *)(param_1 + 0x24)" * (cast_expression "(uint *)(param_1 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) ;) (while_statement "while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }" if (parenthesized_expression "(1 < uVar5)" ( (binary_expression "1 < uVar5" number_literal < identifier) )) (compound_statement "{\n        uVar3 = FUN_00027b10();\n      }" { (expression_statement "uVar3 = FUN_00027b10();" (assignment_expression "uVar3 = FUN_00027b10()" identifier = (call_expression "FUN_00027b10()" identifier (argument_list "()" ( )))) ;) })) (if_statement "if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;" if (parenthesized_expression "((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5))" ( (binary_expression "(uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)" (parenthesized_expression "(uVar5 != uVar3)" ( (binary_expression "uVar5 != uVar3" identifier != identifier) )) && (parenthesized_expression "(uVar2 / uVar1 + 1 != uVar5)" ( (binary_expression "uVar2 / uVar1 + 1 != uVar5" (binary_expression "uVar2 / uVar1 + 1" (binary_expression "uVar2 / uVar1" identifier / identifier) + number_literal) != identifier) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) })) (if_statement "if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;" if (parenthesized_expression "(*(uint *)(param_1 + 0x30) < uVar5)" ( (binary_expression "*(uint *)(param_1 + 0x30) < uVar5" (pointer_expression "*(uint *)(param_1 + 0x30)" * (cast_expression "(uint *)(param_1 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) < identifier) )) (goto_statement "goto LAB_00039e1c;" goto statement_identifier ;)) (expression_statement "iVar4 = FUN_00039cb0(&local_24);" (assignment_expression "iVar4 = FUN_00039cb0(&local_24)" identifier = (call_expression "FUN_00039cb0(&local_24)" identifier (argument_list "(&local_24)" ( (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }" { (if_statement "if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }" if (parenthesized_expression "((local_29 == '\x04') && (local_24 == param_2))" ( (binary_expression "(local_29 == '\x04') && (local_24 == param_2)" (parenthesized_expression "(local_29 == '\x04')" ( (binary_expression "local_29 == '\x04'" identifier == (char_literal "'\x04'" ' escape_sequence ')) )) && (parenthesized_expression "(local_24 == param_2)" ( (binary_expression "local_24 == param_2" identifier == identifier) ))) )) (compound_statement "{\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }" { (expression_statement "*param_4 = uVar5;" (assignment_expression "*param_4 = uVar5" (pointer_expression "*param_4" * identifier) = identifier) ;) (if_statement "if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }" if (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          *param_3 = 0;\n        }" { (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) })) (goto_statement "goto LAB_00039e58;" goto statement_identifier ;) })) (goto_statement "goto LAB_00039e1c;" goto statement_identifier ;) })) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (if_statement "if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;" if (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00039e4b;" goto statement_identifier ;)) }))) (if_statement "if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }" if (parenthesized_expression "(iVar4 == 0x65)" ( (binary_expression "iVar4 == 0x65" identifier == number_literal) )) (compound_statement "{\n    iVar4 = 0;\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) })) (labeled_statement "LAB_00039e58:\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 ;) }))) (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * 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 ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;)) })))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (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) ))))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != IDENT) )) && (parenthesized_expression ( (binary_expression (binary_expression (binary_expression IDENT / IDENT) + LIT) != IDENT) ))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (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) )))) < IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression IDENT == IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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_00039d90(int param_1,int param_2,undefined4 *param_3,uint *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char local_29;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = DAT_000de358;\n  uStack_14 = 0x39d9d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }\n  if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_000a9ea0();\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00039d90(int param_1,int param_2,undefined4 *param_3,uint *param_4)" (identifier "FUN_00039d90") (parameter_list "(int param_1,int param_2,undefined4 *param_3,uint *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "uint *param_4" (type_identifier "uint") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char local_29;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = DAT_000de358;\n  uStack_14 = 0x39d9d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }\n  if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }\nLAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_000a9ea0();\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char local_29;" (primitive_type "char") (identifier "local_29") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uVar2 = DAT_000de358;" (assignment_expression "uVar2 = DAT_000de358" (identifier "uVar2") (= "=") (identifier "DAT_000de358")) (; ";")) (expression_statement "uStack_14 = 0x39d9d;" (assignment_expression "uStack_14 = 0x39d9d" (identifier "uStack_14") (= "=") (number_literal "0x39d9d")) (; ";")) (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")) () ")"))))) (; ";")) (if_statement "if (*(char *)(param_1 + 0x11) == '\0') {\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }\n  else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x11) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x11) == '\0'" (pointer_expression "*(char *)(param_1 + 0x11)" (* "*") (cast_expression "(char *)(param_1 + 0x11)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x11)" (( "(") (binary_expression "param_1 + 0x11" (identifier "param_1") (+ "+") (number_literal "0x11")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\nLAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }\n  }" ({ "{") (labeled_statement "LAB_00039e1c:\n    if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" (statement_identifier "LAB_00039e1c") (: ":") (if_statement "if (param_3 == (undefined4 *)0x0) {\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }\n    else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" (if "if") (parenthesized_expression "(param_3 == (undefined4 *)0x0)" (( "(") (binary_expression "param_3 == (undefined4 *)0x0" (identifier "param_3") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar4 = FUN_0001f5a0(2);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\n    }" ({ "{") (expression_statement "iVar4 = FUN_0001f5a0(2);" (assignment_expression "iVar4 = FUN_0001f5a0(2)" (identifier "iVar4") (= "=") (call_expression "FUN_0001f5a0(2)" (identifier "FUN_0001f5a0") (argument_list "(2)" (( "(") (number_literal "2") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        FUN_0001f150();\n        goto LAB_00039e58;\n      }" ({ "{") (expression_statement "uVar2 = *puRam00000038;" (assignment_expression "uVar2 = *puRam00000038" (identifier "uVar2") (= "=") (pointer_expression "*puRam00000038" (* "*") (identifier "puRam00000038"))) (; ";")) (expression_statement "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" (identifier "uVar2") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" (( "(") (binary_expression "uVar2 & 0xff0000" (identifier "uVar2") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" (( "(") (binary_expression "uVar2 & 0xff00" (identifier "uVar2") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar2 << 0x18" (identifier "uVar2") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "FUN_0001f150();" (call_expression "FUN_0001f150()" (identifier "FUN_0001f150") (argument_list "()" (( "(") () ")"))) (; ";")) (goto_statement "goto LAB_00039e58;" (goto "goto") (statement_identifier "LAB_00039e58") (; ";")) (} "}"))) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" (else "else") (compound_statement "{\n      iVar4 = FUN_0001f5a0(0);\n      if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }\n      *param_4 = 0;\nLAB_00039e4b:\n      *param_3 = 0;\n    }" ({ "{") (expression_statement "iVar4 = FUN_0001f5a0(0);" (assignment_expression "iVar4 = FUN_0001f5a0(0)" (identifier "iVar4") (= "=") (call_expression "FUN_0001f5a0(0)" (identifier "FUN_0001f5a0") (argument_list "(0)" (( "(") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = *puRam00000038;\n        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n        *param_3 = 0;\n        goto LAB_00039e58;\n      }" ({ "{") (expression_statement "uVar2 = *puRam00000038;" (assignment_expression "uVar2 = *puRam00000038" (identifier "uVar2") (= "=") (pointer_expression "*puRam00000038" (* "*") (identifier "puRam00000038"))) (; ";")) (expression_statement "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "*param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" (identifier "uVar2") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" (( "(") (binary_expression "uVar2 & 0xff0000" (identifier "uVar2") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" (( "(") (binary_expression "uVar2 & 0xff00" (identifier "uVar2") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar2 << 0x18" (identifier "uVar2") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_00039e58;" (goto "goto") (statement_identifier "LAB_00039e58") (; ";")) (} "}"))) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_00039e4b:\n      *param_3 = 0;" (statement_identifier "LAB_00039e4b") (: ":") (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";"))) (} "}"))))) (} "}")) (else_clause "else {\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }" (else "else") (compound_statement "{\n    uVar5 = param_2 + 1;\n    uVar1 = *(uint *)(param_1 + 0x24);\n    while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }\n    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;\n    iVar4 = FUN_00039cb0(&local_24);\n    if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }\n    *param_4 = 0;\n    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;\n  }" ({ "{") (expression_statement "uVar5 = param_2 + 1;" (assignment_expression "uVar5 = param_2 + 1" (identifier "uVar5") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar1 = *(uint *)(param_1 + 0x24);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x24)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(param_1 + 0x24)" (* "*") (cast_expression "(uint *)(param_1 + 0x24)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")"))))) (; ";")) (while_statement "while( true ) {\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      uVar3 = 0;\n      if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }\n      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;\n      uVar5 = uVar5 + 1;\n    }" ({ "{") (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (if_statement "if (1 < uVar5) {\n        uVar3 = FUN_00027b10();\n      }" (if "if") (parenthesized_expression "(1 < uVar5)" (( "(") (binary_expression "1 < uVar5" (number_literal "1") (< "<") (identifier "uVar5")) () ")")) (compound_statement "{\n        uVar3 = FUN_00027b10();\n      }" ({ "{") (expression_statement "uVar3 = FUN_00027b10();" (assignment_expression "uVar3 = FUN_00027b10()" (identifier "uVar3") (= "=") (call_expression "FUN_00027b10()" (identifier "FUN_00027b10") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}"))) (if_statement "if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;" (if "if") (parenthesized_expression "((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5))" (( "(") (binary_expression "(uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)" (parenthesized_expression "(uVar5 != uVar3)" (( "(") (binary_expression "uVar5 != uVar3" (identifier "uVar5") (!= "!=") (identifier "uVar3")) () ")")) (&& "&&") (parenthesized_expression "(uVar2 / uVar1 + 1 != uVar5)" (( "(") (binary_expression "uVar2 / uVar1 + 1 != uVar5" (binary_expression "uVar2 / uVar1 + 1" (binary_expression "uVar2 / uVar1" (identifier "uVar2") (/ "/") (identifier "uVar1")) (+ "+") (number_literal "1")) (!= "!=") (identifier "uVar5")) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;" (if "if") (parenthesized_expression "(*(uint *)(param_1 + 0x30) < uVar5)" (( "(") (binary_expression "*(uint *)(param_1 + 0x30) < uVar5" (pointer_expression "*(uint *)(param_1 + 0x30)" (* "*") (cast_expression "(uint *)(param_1 + 0x30)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (< "<") (identifier "uVar5")) () ")")) (goto_statement "goto LAB_00039e1c;" (goto "goto") (statement_identifier "LAB_00039e1c") (; ";"))) (expression_statement "iVar4 = FUN_00039cb0(&local_24);" (assignment_expression "iVar4 = FUN_00039cb0(&local_24)" (identifier "iVar4") (= "=") (call_expression "FUN_00039cb0(&local_24)" (identifier "FUN_00039cb0") (argument_list "(&local_24)" (( "(") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }\n      goto LAB_00039e1c;\n    }" ({ "{") (if_statement "if ((local_29 == '\x04') && (local_24 == param_2)) {\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }" (if "if") (parenthesized_expression "((local_29 == '\x04') && (local_24 == param_2))" (( "(") (binary_expression "(local_29 == '\x04') && (local_24 == param_2)" (parenthesized_expression "(local_29 == '\x04')" (( "(") (binary_expression "local_29 == '\x04'" (identifier "local_29") (== "==") (char_literal "'\x04'" (' "'") (escape_sequence "\x04") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(local_24 == param_2)" (( "(") (binary_expression "local_24 == param_2" (identifier "local_24") (== "==") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n        *param_4 = uVar5;\n        if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }\n        goto LAB_00039e58;\n      }" ({ "{") (expression_statement "*param_4 = uVar5;" (assignment_expression "*param_4 = uVar5" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "uVar5")) (; ";")) (if_statement "if (param_3 != (undefined4 *)0x0) {\n          *param_3 = 0;\n        }" (if "if") (parenthesized_expression "(param_3 != (undefined4 *)0x0)" (( "(") (binary_expression "param_3 != (undefined4 *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          *param_3 = 0;\n        }" ({ "{") (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (goto_statement "goto LAB_00039e58;" (goto "goto") (statement_identifier "LAB_00039e58") (; ";")) (} "}"))) (goto_statement "goto LAB_00039e1c;" (goto "goto") (statement_identifier "LAB_00039e1c") (; ";")) (} "}"))) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;" (if "if") (parenthesized_expression "(param_3 != (undefined4 *)0x0)" (( "(") (binary_expression "param_3 != (undefined4 *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_00039e4b;" (goto "goto") (statement_identifier "LAB_00039e4b") (; ";"))) (} "}")))) (if_statement "if (iVar4 == 0x65) {\n    iVar4 = 0;\n  }" (if "if") (parenthesized_expression "(iVar4 == 0x65)" (( "(") (binary_expression "iVar4 == 0x65" (identifier "iVar4") (== "==") (number_literal "0x65")) () ")")) (compound_statement "{\n    iVar4 = 0;\n  }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (} "}"))) (labeled_statement "LAB_00039e58:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" (statement_identifier "LAB_00039e58") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\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 iVar4;\n  }" ({ "{") (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))) (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" (identifier "FUN_000a9ea0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int __regparm3 function_1(type_1 *pBt,type_2 var_8,type_3 **var_2,type_2 *pPgnoNext)

{
  type_4 var_5;
  type_1 *var_11;
  int var_4;
  type_1 *var_9;
  int var_1;
  type_5 var_13;
  type_3 *var_7;
  type_2 var_14;
  int var_15;
  type_6 uStack_14;
  
  var_4 = sqlite3PendingByte;
  uStack_14 = 0x39d9d;
  var_7 = (type_3 *)0x0;
  var_15 = *(int *)(var_1 + 0x14);
  if (pBt->autoVacuum == '\0') {
LAB_00039e1c:
    if (var_2 != (type_3 **)0x0) {
      var_4 = var_3(pBt,var_8,&var_7,0);
      if (var_4 == 0) {
        var_5 = *(type_4 *)var_7->aData;
        *pPgnoNext = var_5 >> 0x18 | (var_5 & 0xff0000) >> 8 | (var_5 & 0xff00) << 8 | var_5 << 0x18
        ;
        *var_2 = var_7;
        goto LAB_00039e58;
      }
      *pPgnoNext = 0;
      goto LAB_00039e4b;
    }
    var_4 = var_3(pBt,var_8,&var_7,2);
    if (var_4 == 0) {
      var_5 = *(type_4 *)var_7->aData;
      *pPgnoNext = var_5 >> 0x18 | (var_5 & 0xff0000) >> 8 | (var_5 & 0xff00) << 8 | var_5 << 0x18;
      var_6(var_7->pDbPage);
      goto LAB_00039e58;
    }
    *pPgnoNext = 0;
LAB_00039f5e:
    if (var_7 != (type_3 *)0x0) {
      var_6(var_7->pDbPage);
    }
  }
  else {
    var_9 = (type_1 *)(var_8 + 1);
    var_5 = pBt->pageSize;
    while( true ) {
      var_11 = (type_1 *)0x0;
      if ((type_1 *)0x1 < var_9) {
        var_11 = (type_1 *)var_10((type_1 *)&pBt->pageSize,(type_2)&pBt->usableSize,var_9);
      }
      if ((var_9 != var_11) && ((type_1 *)((type_4)var_4 / var_5 + 1) != var_9)) break;
      var_9 = (type_1 *)((int)&var_9->pPager + 1);
    }
    if ((type_1 *)pBt->nPage < var_9) goto LAB_00039e1c;
    var_4 = var_12(pBt,(type_2)var_9,&var_13,&var_14);
    if (var_4 == 0) {
      if ((var_13 == '\x04') && (var_14 == var_8)) {
        *pPgnoNext = (type_2)var_9;
        if (var_2 == (type_3 **)0x0) {
          if (var_7 != (type_3 *)0x0) {
            var_6(var_7->pDbPage);
          }
        }
        else {
          *var_2 = var_7;
        }
        goto LAB_00039e58;
      }
      goto LAB_00039e1c;
    }
    *pPgnoNext = 0;
    if (var_2 == (type_3 **)0x0) goto LAB_00039f5e;
LAB_00039e4b:
    *var_2 = var_7;
  }
  if (var_4 == 0x65) {
    var_4 = 0;
  }
LAB_00039e58:
  if (var_15 == *(int *)(var_1 + 0x14)) {
    return var_4;
  }
                    /* WARNING: Subroutine does not return */
  var_16();
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) 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: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_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: (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 (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (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))))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)) right: (identifier))))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (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: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) (goto_statement label: (statement_identifier)))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (goto_statement label: (statement_identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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))))))

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Removing unreachable block (ram,0x00039f66) */
/* WARNING: Removing unreachable block (ram,0x00039f1d) */

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

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int in_GS_OFFSET;
  char local_29;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uVar2 = DAT_000de358;
  uStack_14 = 0x39d9d;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(char *)(param_1 + 0x11) == '\0') {
LAB_00039e1c:
    if (param_3 == (undefined4 *)0x0) {
      iVar4 = FUN_0001f5a0(2);
      if (iVar4 == 0) {
        uVar2 = *puRam00000038;
        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
        FUN_0001f150();
        goto LAB_00039e58;
      }
      *param_4 = 0;
    }
    else {
      iVar4 = FUN_0001f5a0(0);
      if (iVar4 == 0) {
        uVar2 = *puRam00000038;
        *param_4 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
        *param_3 = 0;
        goto LAB_00039e58;
      }
      *param_4 = 0;
LAB_00039e4b:
      *param_3 = 0;
    }
  }
  else {
    uVar5 = param_2 + 1;
    uVar1 = *(uint *)(param_1 + 0x24);
    while( true ) {
      uVar3 = 0;
      if (1 < uVar5) {
        uVar3 = FUN_00027b10();
      }
      if ((uVar5 != uVar3) && (uVar2 / uVar1 + 1 != uVar5)) break;
      uVar5 = uVar5 + 1;
    }
    if (*(uint *)(param_1 + 0x30) < uVar5) goto LAB_00039e1c;
    iVar4 = FUN_00039cb0(&local_24);
    if (iVar4 == 0) {
      if ((local_29 == '\x04') && (local_24 == param_2)) {
        *param_4 = uVar5;
        if (param_3 != (undefined4 *)0x0) {
          *param_3 = 0;
        }
        goto LAB_00039e58;
      }
      goto LAB_00039e1c;
    }
    *param_4 = 0;
    if (param_3 != (undefined4 *)0x0) goto LAB_00039e4b;
  }
  if (iVar4 == 0x65) {
    iVar4 = 0;
  }
LAB_00039e58:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a9ea0();
}

