
void checkList(IntegrityCk *pCheck,int isFreeList,int iPage,u32 N)

{
  int iVar1;
  uint *puVar2;
  int iVar3;
  BtShared *pBVar4;
  uint uVar5;
  char *pcVar6;
  uint *puVar7;
  u32 uVar8;
  u32 uVar9;
  uint uVar10;
  long in_FS_OFFSET;
  DbPage *pOvflPage;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  iVar1 = pCheck->nErr;
  if ((iPage == 0) || (uVar9 = N, pCheck->mxErr == 0)) {
    uVar5 = 0;
    if (N == 0) goto LAB_00158469;
  }
  else {
    while (iVar3 = checkRef(pCheck,iPage), iVar3 == 0) {
      uVar8 = uVar9 - 1;
      iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);
      if (iVar3 != 0) {
        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);
        uVar9 = uVar8;
        break;
      }
      pBVar4 = pCheck->pBt;
      puVar2 = (uint *)pOvflPage->pData;
      if (isFreeList == 0) {
        uVar5 = *puVar2;
        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;
        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {
          checkPtrmap(pCheck,uVar5,'\x04',iPage);
          goto LAB_001583d1;
        }
LAB_00158452:
        sqlite3PagerUnrefNotNull(pOvflPage);
        iPage = uVar5;
        uVar9 = uVar8;
      }
      else {
        uVar5 = puVar2[1];
        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;
        if (pBVar4->autoVacuum != '\0') {
          checkPtrmap(pCheck,iPage,'\x02',0);
          pBVar4 = pCheck->pBt;
        }
        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {
          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);
          uVar8 = uVar9 - 2;
        }
        else {
          if (0 < (int)uVar5) {
            puVar7 = puVar2 + 2;
            while( true ) {
              uVar10 = *puVar7;
              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |
                       uVar10 << 0x18;
              if (pBVar4->autoVacuum != '\0') {
                checkPtrmap(pCheck,uVar10,'\x02',0);
              }
              puVar7 = puVar7 + 1;
              checkRef(pCheck,uVar10);
              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;
              pBVar4 = pCheck->pBt;
            }
          }
          uVar8 = uVar8 - uVar5;
        }
LAB_001583d1:
        uVar5 = *puVar2;
        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;
        iPage = uVar5;
        uVar9 = uVar8;
        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;
      }
      if ((iPage == 0) || (pCheck->mxErr == 0)) break;
    }
    if ((uVar9 == 0) || (pCheck->nErr != iVar1)) goto LAB_00158469;
    uVar5 = N - uVar9;
  }
  pcVar6 = "size";
  if (isFreeList == 0) {
    pcVar6 = "overflow list length";
  }
  checkAppendMsg(pCheck,"%s is %d but should be %d",pcVar6,(ulong)uVar5,(ulong)N);
LAB_00158469:
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



void FUN_00158340(long *param_1,int param_2,uint param_3,int param_4)

{
  uint *puVar1;
  long lVar2;
  int iVar3;
  int iVar4;
  long lVar5;
  int iVar6;
  char *pcVar7;
  uint *puVar8;
  uint uVar9;
  uint uVar10;
  long in_FS_OFFSET;
  long local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  lVar2 = param_1[4];
  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {
    iVar6 = 0;
    if (param_4 == 0) goto LAB_00158469;
  }
  else {
    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {
      iVar3 = iVar6 + -1;
      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);
      if (iVar4 != 0) {
        FUN_001580b0(param_1,"failed to get page %d",param_3);
        iVar6 = iVar3;
        break;
      }
      lVar5 = *param_1;
      puVar1 = *(uint **)(local_48 + 8);
      if (param_2 == 0) {
        uVar9 = *puVar1;
        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;
        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {
          FUN_00158270(param_1,uVar9,4,param_3);
          goto LAB_001583d1;
        }
LAB_00158452:
        FUN_00110c90();
        param_3 = uVar9;
        iVar6 = iVar3;
      }
      else {
        uVar9 = puVar1[1];
        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;
        if (*(char *)(lVar5 + 0x21) != '\0') {
          FUN_00158270(param_1,param_3,2,0);
          lVar5 = *param_1;
        }
        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {
          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);
          iVar3 = iVar6 + -2;
        }
        else {
          if (0 < (int)uVar9) {
            puVar8 = puVar1 + 2;
            while( true ) {
              uVar10 = *puVar8;
              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |
                       uVar10 << 0x18;
              if (*(char *)(lVar5 + 0x21) != '\0') {
                FUN_00158270(param_1,uVar10,2,0);
              }
              puVar8 = puVar8 + 1;
              FUN_001581f0(param_1,uVar10);
              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;
              lVar5 = *param_1;
            }
          }
          iVar3 = iVar3 - uVar9;
        }
LAB_001583d1:
        uVar9 = *puVar1;
        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;
        param_3 = uVar9;
        iVar6 = iVar3;
        if (local_48 != 0) goto LAB_00158452;
      }
      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;
    }
    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;
    iVar6 = param_4 - iVar6;
  }
  pcVar7 = "size";
  if (param_2 == 0) {
    pcVar7 = "overflow list length";
  }
  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);
LAB_00158469:
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x38
MOV dword ptr [RSP + 0x14],ESI
MOV dword ptr [RSP + 0x18],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RDI + 0x20]
MOV dword ptr [RSP + 0x1c],EAX
TEST EDX,EDX
JZ 0x001585b1
MOV ESI,dword ptr [RDI + 0x1c]
LEA RAX,[RSP + 0x20]
MOV EBP,EDX
MOV R14D,dword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
TEST ESI,ESI
JNZ 0x001583ec
JMP 0x001585b1
MOV R13D,dword ptr [R12 + 0x4]
BSWAP R13D
TEST DL,DL
JNZ 0x00158500
MOV EDX,dword ptr [RAX + 0x34]
SHR EDX,0x2
SUB EDX,0x2
CMP EDX,R13D
JNC 0x00158490
MOV EDX,EBP
LEA RSI,[0x1f6418]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001580b0
SUB R14D,0x2
MOV EBP,dword ptr [R12]
MOV RDI,qword ptr [RSP + 0x20]
BSWAP EBP
TEST RDI,RDI
JNZ 0x00158452
TEST EBP,EBP
JZ 0x00158460
MOV ECX,dword ptr [RBX + 0x1c]
TEST ECX,ECX
JZ 0x00158460
MOV ESI,EBP
MOV RDI,RBX
CALL 0x001581f0
TEST EAX,EAX
JNZ 0x00158460
MOV RAX,qword ptr [RBX + 0x8]
XOR ECX,ECX
LEA R15D,[R14 + -0x1]
MOV RDX,qword ptr [RSP + 0x8]
MOV ESI,EBP
MOV RDI,RAX
CALL qword ptr [RAX + 0x108]
TEST EAX,EAX
JNZ 0x00158590
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RBX]
MOV R8D,dword ptr [RSP + 0x14]
MOV R12,qword ptr [RDI + 0x8]
MOVZX EDX,byte ptr [RAX + 0x21]
TEST R8D,R8D
JNZ 0x00158398
MOV ESI,dword ptr [R12]
BSWAP ESI
TEST DL,DL
JZ 0x0015844d
TEST R15D,R15D
JNZ 0x00158520
MOV EBP,ESI
MOV R14D,R15D
CALL 0x00110c90
TEST EBP,EBP
JNZ 0x001583e5
NOP dword ptr [RAX + RAX*0x1]
TEST R14D,R14D
JNZ 0x00158540
MOV RAX,qword ptr [RSP + 0x28]
XOR RAX,qword ptr FS:[0x28]
JNZ 0x001585c0
ADD RSP,0x38
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
TEST R13D,R13D
JLE 0x001584f0
LEA EDX,[R13 + -0x1]
LEA RBP,[R12 + 0x8]
LEA RCX,[R12 + RDX*0x4 + 0xc]
MOV qword ptr [RSP],RCX
JMP 0x001584c8
MOV ESI,R14D
MOV RDI,RBX
ADD RBP,0x4
CALL 0x001581f0
CMP qword ptr [RSP],RBP
JZ 0x001584f0
MOV RAX,qword ptr [RBX]
MOV R14D,dword ptr [RBP]
CMP byte ptr [RAX + 0x21],0x0
BSWAP R14D
JZ 0x001584b0
XOR ECX,ECX
MOV EDX,0x2
MOV ESI,R14D
MOV RDI,RBX
CALL 0x00158270
JMP 0x001584b0
SUB R15D,R13D
MOV R14D,R15D
JMP 0x001583d1
XOR ECX,ECX
MOV EDX,0x2
MOV ESI,EBP
MOV RDI,RBX
CALL 0x00158270
MOV RAX,qword ptr [RBX]
JMP 0x001583a8
MOV ECX,EBP
MOV EDX,0x4
MOV RDI,RBX
MOV R14D,R15D
CALL 0x00158270
JMP 0x001583d1
MOV EAX,dword ptr [RSP + 0x1c]
CMP dword ptr [RBX + 0x20],EAX
JNZ 0x00158469
MOV ECX,dword ptr [RSP + 0x18]
SUB ECX,R14D
MOV EDX,dword ptr [RSP + 0x14]
MOV R8D,dword ptr [RSP + 0x18]
MOV RDI,RBX
LEA RAX,[0x1e9e04]
LEA RSI,[0x1e9e2f]
TEST EDX,EDX
LEA RDX,[0x1eb3d7]
CMOVZ RDX,RAX
XOR EAX,EAX
CALL 0x001580b0
JMP 0x00158469
MOV EDX,EBP
LEA RSI,[0x1e9e19]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001580b0
MOV R14D,R15D
TEST R14D,R14D
JZ 0x00158469
JMP 0x00158540
MOV EAX,dword ptr [RSP + 0x18]
XOR ECX,ECX
TEST EAX,EAX
JNZ 0x00158554
JMP 0x00158469
CALL 0x0010a140
(translation_unit "void FUN_00158340(long *param_1,int param_2,uint param_3,int param_4)\n\n{\n  uint *puVar1;\n  long lVar2;\n  int iVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  char *pcVar7;\n  uint *puVar8;\n  uint uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  long local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  lVar2 = param_1[4];\n  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }\n  pcVar7 = "size";\n  if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }\n  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "void FUN_00158340(long *param_1,int param_2,uint param_3,int param_4)\n\n{\n  uint *puVar1;\n  long lVar2;\n  int iVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  char *pcVar7;\n  uint *puVar8;\n  uint uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  long local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  lVar2 = param_1[4];\n  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }\n  pcVar7 = "size";\n  if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }\n  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_00158340(long *param_1,int param_2,uint param_3,int param_4)" identifier (parameter_list "(long *param_1,int param_2,uint param_3,int param_4)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  uint *puVar1;\n  long lVar2;\n  int iVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  char *pcVar7;\n  uint *puVar8;\n  uint uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  long local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  lVar2 = param_1[4];\n  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }\n  pcVar7 = "size";\n  if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }\n  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint uVar9;" type_identifier identifier ;) (declaration "uint uVar10;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_48;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "lVar2 = param_1[4];" (assignment_expression "lVar2 = param_1[4]" identifier = (subscript_expression "param_1[4]" identifier [ number_literal ])) ;) (if_statement "if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }" if (parenthesized_expression "((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0))" ( (binary_expression "(param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)" (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)" ( (comma_expression "iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0" (assignment_expression "iVar6 = param_4" identifier = identifier) , (binary_expression "*(int *)((long)param_1 + 0x1c) == 0" (pointer_expression "*(int *)((long)param_1 + 0x1c)" * (cast_expression "(int *)((long)param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x1c)" ( (binary_expression "(long)param_1 + 0x1c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == number_literal)) ))) )) (compound_statement "{\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (if_statement "if (param_4 == 0) goto LAB_00158469;" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00158469;" goto statement_identifier ;)) }) (else_clause "else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }" else (compound_statement "{\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }" { (while_statement "while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }" while (parenthesized_expression "(iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0)" ( (comma_expression "iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0" (assignment_expression "iVar3 = FUN_001581f0(param_1,param_3)" identifier = (call_expression "FUN_001581f0(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier )))) , (binary_expression "iVar3 == 0" identifier == number_literal)) )) (compound_statement "{\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }" { (expression_statement "iVar3 = iVar6 + -1;" (assignment_expression "iVar3 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (expression_statement "iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);" (assignment_expression "iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0)" identifier = (call_expression "(**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0)" (parenthesized_expression "(**(code **)(param_1[1] + 0x108))" ( (pointer_expression "**(code **)(param_1[1] + 0x108)" * (pointer_expression "*(code **)(param_1[1] + 0x108)" * (cast_expression "(code **)(param_1[1] + 0x108)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1[1] + 0x108)" ( (binary_expression "param_1[1] + 0x108" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) ))))) )) (argument_list "(param_1[1],param_3,&local_48,0)" ( (subscript_expression "param_1[1]" identifier [ number_literal ]) , identifier , (pointer_expression "&local_48" & identifier) , number_literal )))) ;) (if_statement "if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }" { (expression_statement "FUN_001580b0(param_1,"failed to get page %d",param_3);" (call_expression "FUN_001580b0(param_1,"failed to get page %d",param_3)" identifier (argument_list "(param_1,"failed to get page %d",param_3)" ( identifier , (string_literal ""failed to get page %d"" " string_content ") , identifier ))) ;) (expression_statement "iVar6 = iVar3;" (assignment_expression "iVar6 = iVar3" identifier = identifier) ;) (break_statement "break;" break ;) })) (expression_statement "lVar5 = *param_1;" (assignment_expression "lVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "puVar1 = *(uint **)(local_48 + 8);" (assignment_expression "puVar1 = *(uint **)(local_48 + 8)" identifier = (pointer_expression "*(uint **)(local_48 + 8)" * (cast_expression "(uint **)(local_48 + 8)" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(local_48 + 8)" ( (binary_expression "local_48 + 8" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }" { (expression_statement "uVar9 = *puVar1;" (assignment_expression "uVar9 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;" (assignment_expression "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" identifier = (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" ( (binary_expression "uVar9 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" ( (binary_expression "uVar9 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar9 << 0x18" identifier << number_literal))) ;) (if_statement "if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }" if (parenthesized_expression "((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0))" ( (binary_expression "(*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)" (parenthesized_expression "(*(char *)(lVar5 + 0x21) != '\0')" ( (binary_expression "*(char *)(lVar5 + 0x21) != '\0'" (pointer_expression "*(char *)(lVar5 + 0x21)" * (cast_expression "(char *)(lVar5 + 0x21)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x21)" ( (binary_expression "lVar5 + 0x21" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) ))) )) (compound_statement "{\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }" { (expression_statement "FUN_00158270(param_1,uVar9,4,param_3);" (call_expression "FUN_00158270(param_1,uVar9,4,param_3)" identifier (argument_list "(param_1,uVar9,4,param_3)" ( identifier , identifier , number_literal , identifier ))) ;) (goto_statement "goto LAB_001583d1;" goto statement_identifier ;) })) (labeled_statement "LAB_00158452:\n        FUN_00110c90();" statement_identifier : (expression_statement "FUN_00110c90();" (call_expression "FUN_00110c90()" identifier (argument_list "()" ( ))) ;)) (expression_statement "param_3 = uVar9;" (assignment_expression "param_3 = uVar9" identifier = identifier) ;) (expression_statement "iVar6 = iVar3;" (assignment_expression "iVar6 = iVar3" identifier = identifier) ;) }) (else_clause "else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }" else (compound_statement "{\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }" { (expression_statement "uVar9 = puVar1[1];" (assignment_expression "uVar9 = puVar1[1]" identifier = (subscript_expression "puVar1[1]" identifier [ number_literal ])) ;) (expression_statement "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;" (assignment_expression "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" identifier = (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" ( (binary_expression "uVar9 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" ( (binary_expression "uVar9 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar9 << 0x18" identifier << number_literal))) ;) (if_statement "if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }" if (parenthesized_expression "(*(char *)(lVar5 + 0x21) != '\0')" ( (binary_expression "*(char *)(lVar5 + 0x21) != '\0'" (pointer_expression "*(char *)(lVar5 + 0x21)" * (cast_expression "(char *)(lVar5 + 0x21)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x21)" ( (binary_expression "lVar5 + 0x21" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }" { (expression_statement "FUN_00158270(param_1,param_3,2,0);" (call_expression "FUN_00158270(param_1,param_3,2,0)" identifier (argument_list "(param_1,param_3,2,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "lVar5 = *param_1;" (assignment_expression "lVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) (if_statement "if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }" if (parenthesized_expression "((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9)" ( (binary_expression "(*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9" (binary_expression "(*(uint *)(lVar5 + 0x34) >> 2) - 2" (parenthesized_expression "(*(uint *)(lVar5 + 0x34) >> 2)" ( (binary_expression "*(uint *)(lVar5 + 0x34) >> 2" (pointer_expression "*(uint *)(lVar5 + 0x34)" * (cast_expression "(uint *)(lVar5 + 0x34)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x34)" ( (binary_expression "lVar5 + 0x34" identifier + number_literal) )))) >> number_literal) )) - number_literal) < identifier) )) (compound_statement "{\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }" { (expression_statement "FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);" (call_expression "FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3)" identifier (argument_list "(param_1,"freelist leaf count too big on page %d",param_3)" ( identifier , (string_literal ""freelist leaf count too big on page %d"" " string_content ") , identifier ))) ;) (expression_statement "iVar3 = iVar6 + -2;" (assignment_expression "iVar3 = iVar6 + -2" identifier = (binary_expression "iVar6 + -2" identifier + number_literal)) ;) }) (else_clause "else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }" else (compound_statement "{\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }" { (if_statement "if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }" if (parenthesized_expression "(0 < (int)uVar9)" ( (binary_expression "0 < (int)uVar9" number_literal < (cast_expression "(int)uVar9" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }" { (expression_statement "puVar8 = puVar1 + 2;" (assignment_expression "puVar8 = puVar1 + 2" identifier = (binary_expression "puVar1 + 2" identifier + number_literal)) ;) (while_statement "while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }" { (expression_statement "uVar10 = *puVar8;" (assignment_expression "uVar10 = *puVar8" identifier = (pointer_expression "*puVar8" * identifier)) ;) (expression_statement "uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;" (assignment_expression "uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18" identifier = (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18" (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8" (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8" (binary_expression "uVar10 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar10 & 0xff0000) >> 8" (parenthesized_expression "(uVar10 & 0xff0000)" ( (binary_expression "uVar10 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar10 & 0xff00) << 8" (parenthesized_expression "(uVar10 & 0xff00)" ( (binary_expression "uVar10 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar10 << 0x18" identifier << number_literal))) ;) (if_statement "if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }" if (parenthesized_expression "(*(char *)(lVar5 + 0x21) != '\0')" ( (binary_expression "*(char *)(lVar5 + 0x21) != '\0'" (pointer_expression "*(char *)(lVar5 + 0x21)" * (cast_expression "(char *)(lVar5 + 0x21)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x21)" ( (binary_expression "lVar5 + 0x21" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n                FUN_00158270(param_1,uVar10,2,0);\n              }" { (expression_statement "FUN_00158270(param_1,uVar10,2,0);" (call_expression "FUN_00158270(param_1,uVar10,2,0)" identifier (argument_list "(param_1,uVar10,2,0)" ( identifier , identifier , number_literal , number_literal ))) ;) })) (expression_statement "puVar8 = puVar8 + 1;" (assignment_expression "puVar8 = puVar8 + 1" identifier = (binary_expression "puVar8 + 1" identifier + number_literal)) ;) (expression_statement "FUN_001581f0(param_1,uVar10);" (call_expression "FUN_001581f0(param_1,uVar10)" identifier (argument_list "(param_1,uVar10)" ( identifier , identifier ))) ;) (if_statement "if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;" if (parenthesized_expression "(puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8)" ( (binary_expression "puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8" (binary_expression "puVar1 + (ulong)(uVar9 - 1) + 3" (binary_expression "puVar1 + (ulong)(uVar9 - 1)" identifier + (call_expression "(ulong)(uVar9 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar9 - 1)" ( (binary_expression "uVar9 - 1" identifier - number_literal) )))) + number_literal) == identifier) )) (break_statement "break;" break ;)) (expression_statement "lVar5 = *param_1;" (assignment_expression "lVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) })) (expression_statement "iVar3 = iVar3 - uVar9;" (assignment_expression "iVar3 = iVar3 - uVar9" identifier = (binary_expression "iVar3 - uVar9" identifier - identifier)) ;) }))) (labeled_statement "LAB_001583d1:\n        uVar9 = *puVar1;" statement_identifier : (expression_statement "uVar9 = *puVar1;" (assignment_expression "uVar9 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;)) (expression_statement "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;" (assignment_expression "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" identifier = (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" ( (binary_expression "uVar9 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" ( (binary_expression "uVar9 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar9 << 0x18" identifier << number_literal))) ;) (expression_statement "param_3 = uVar9;" (assignment_expression "param_3 = uVar9" identifier = identifier) ;) (expression_statement "iVar6 = iVar3;" (assignment_expression "iVar6 = iVar3" identifier = identifier) ;) (if_statement "if (local_48 != 0) goto LAB_00158452;" if (parenthesized_expression "(local_48 != 0)" ( (binary_expression "local_48 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00158452;" goto statement_identifier ;)) }))) (if_statement "if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;" if (parenthesized_expression "((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0))" ( (binary_expression "(param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)" (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) || (parenthesized_expression "(*(int *)((long)param_1 + 0x1c) == 0)" ( (binary_expression "*(int *)((long)param_1 + 0x1c) == 0" (pointer_expression "*(int *)((long)param_1 + 0x1c)" * (cast_expression "(int *)((long)param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x1c)" ( (binary_expression "(long)param_1 + 0x1c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == number_literal) ))) )) (break_statement "break;" break ;)) })) (if_statement "if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;" if (parenthesized_expression "((iVar6 == 0) || ((int)param_1[4] != (int)lVar2))" ( (binary_expression "(iVar6 == 0) || ((int)param_1[4] != (int)lVar2)" (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) || (parenthesized_expression "((int)param_1[4] != (int)lVar2)" ( (binary_expression "(int)param_1[4] != (int)lVar2" (cast_expression "(int)param_1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[4]" identifier [ number_literal ])) != (cast_expression "(int)lVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (goto_statement "goto LAB_00158469;" goto statement_identifier ;)) (expression_statement "iVar6 = param_4 - iVar6;" (assignment_expression "iVar6 = param_4 - iVar6" identifier = (binary_expression "param_4 - iVar6" identifier - identifier)) ;) }))) (expression_statement "pcVar7 = "size";" (assignment_expression "pcVar7 = "size"" identifier = (string_literal ""size"" " string_content ")) ;) (if_statement "if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    pcVar7 = "overflow list length";\n  }" { (expression_statement "pcVar7 = "overflow list length";" (assignment_expression "pcVar7 = "overflow list length"" identifier = (string_literal ""overflow list length"" " string_content ")) ;) })) (expression_statement "FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);" (call_expression "FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4)" identifier (argument_list "(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4)" ( identifier , (string_literal ""%s is %d but should be %d"" " string_content ") , identifier , identifier , identifier ))) ;) (labeled_statement "LAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" statement_identifier : (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void checkList(IntegrityCk *pCheck,int isFreeList,int iPage,u32 N)\n\n{\n  int iVar1;\n  uint *puVar2;\n  int iVar3;\n  BtShared *pBVar4;\n  uint uVar5;\n  char *pcVar6;\n  uint *puVar7;\n  u32 uVar8;\n  u32 uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  DbPage *pOvflPage;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = pCheck->nErr;\n  if ((iPage == 0) || (uVar9 = N, pCheck->mxErr == 0)) {\n    uVar5 = 0;\n    if (N == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = checkRef(pCheck,iPage), iVar3 == 0) {\n      uVar8 = uVar9 - 1;\n      iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);\n      if (iVar3 != 0) {\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }\n      pBVar4 = pCheck->pBt;\n      puVar2 = (uint *)pOvflPage->pData;\n      if (isFreeList == 0) {\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }\n      else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }\n      if ((iPage == 0) || (pCheck->mxErr == 0)) break;\n    }\n    if ((uVar9 == 0) || (pCheck->nErr != iVar1)) goto LAB_00158469;\n    uVar5 = N - uVar9;\n  }\n  pcVar6 = "size";\n  if (isFreeList == 0) {\n    pcVar6 = "overflow list length";\n  }\n  checkAppendMsg(pCheck,"%s is %d but should be %d",pcVar6,(ulong)uVar5,(ulong)N);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "void checkList(IntegrityCk *pCheck,int isFreeList,int iPage,u32 N)\n\n{\n  int iVar1;\n  uint *puVar2;\n  int iVar3;\n  BtShared *pBVar4;\n  uint uVar5;\n  char *pcVar6;\n  uint *puVar7;\n  u32 uVar8;\n  u32 uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  DbPage *pOvflPage;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = pCheck->nErr;\n  if ((iPage == 0) || (uVar9 = N, pCheck->mxErr == 0)) {\n    uVar5 = 0;\n    if (N == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = checkRef(pCheck,iPage), iVar3 == 0) {\n      uVar8 = uVar9 - 1;\n      iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);\n      if (iVar3 != 0) {\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }\n      pBVar4 = pCheck->pBt;\n      puVar2 = (uint *)pOvflPage->pData;\n      if (isFreeList == 0) {\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }\n      else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }\n      if ((iPage == 0) || (pCheck->mxErr == 0)) break;\n    }\n    if ((uVar9 == 0) || (pCheck->nErr != iVar1)) goto LAB_00158469;\n    uVar5 = N - uVar9;\n  }\n  pcVar6 = "size";\n  if (isFreeList == 0) {\n    pcVar6 = "overflow list length";\n  }\n  checkAppendMsg(pCheck,"%s is %d but should be %d",pcVar6,(ulong)uVar5,(ulong)N);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "checkList(IntegrityCk *pCheck,int isFreeList,int iPage,u32 N)" identifier (parameter_list "(IntegrityCk *pCheck,int isFreeList,int iPage,u32 N)" ( (parameter_declaration "IntegrityCk *pCheck" type_identifier (pointer_declarator "*pCheck" * identifier)) , (parameter_declaration "int isFreeList" primitive_type identifier) , (parameter_declaration "int iPage" primitive_type identifier) , (parameter_declaration "u32 N" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint *puVar2;\n  int iVar3;\n  BtShared *pBVar4;\n  uint uVar5;\n  char *pcVar6;\n  uint *puVar7;\n  u32 uVar8;\n  u32 uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  DbPage *pOvflPage;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = pCheck->nErr;\n  if ((iPage == 0) || (uVar9 = N, pCheck->mxErr == 0)) {\n    uVar5 = 0;\n    if (N == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = checkRef(pCheck,iPage), iVar3 == 0) {\n      uVar8 = uVar9 - 1;\n      iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);\n      if (iVar3 != 0) {\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }\n      pBVar4 = pCheck->pBt;\n      puVar2 = (uint *)pOvflPage->pData;\n      if (isFreeList == 0) {\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }\n      else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }\n      if ((iPage == 0) || (pCheck->mxErr == 0)) break;\n    }\n    if ((uVar9 == 0) || (pCheck->nErr != iVar1)) goto LAB_00158469;\n    uVar5 = N - uVar9;\n  }\n  pcVar6 = "size";\n  if (isFreeList == 0) {\n    pcVar6 = "overflow list length";\n  }\n  checkAppendMsg(pCheck,"%s is %d but should be %d",pcVar6,(ulong)uVar5,(ulong)N);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "BtShared *pBVar4;" type_identifier (pointer_declarator "*pBVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "uint *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "u32 uVar8;" type_identifier identifier ;) (declaration "u32 uVar9;" type_identifier identifier ;) (declaration "uint uVar10;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "DbPage *pOvflPage;" type_identifier (pointer_declarator "*pOvflPage" * identifier) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = pCheck->nErr;" (assignment_expression "iVar1 = pCheck->nErr" identifier = (field_expression "pCheck->nErr" identifier -> field_identifier)) ;) (if_statement "if ((iPage == 0) || (uVar9 = N, pCheck->mxErr == 0)) {\n    uVar5 = 0;\n    if (N == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = checkRef(pCheck,iPage), iVar3 == 0) {\n      uVar8 = uVar9 - 1;\n      iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);\n      if (iVar3 != 0) {\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }\n      pBVar4 = pCheck->pBt;\n      puVar2 = (uint *)pOvflPage->pData;\n      if (isFreeList == 0) {\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }\n      else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }\n      if ((iPage == 0) || (pCheck->mxErr == 0)) break;\n    }\n    if ((uVar9 == 0) || (pCheck->nErr != iVar1)) goto LAB_00158469;\n    uVar5 = N - uVar9;\n  }" if (parenthesized_expression "((iPage == 0) || (uVar9 = N, pCheck->mxErr == 0))" ( (binary_expression "(iPage == 0) || (uVar9 = N, pCheck->mxErr == 0)" (parenthesized_expression "(iPage == 0)" ( (binary_expression "iPage == 0" identifier == number_literal) )) || (parenthesized_expression "(uVar9 = N, pCheck->mxErr == 0)" ( (comma_expression "uVar9 = N, pCheck->mxErr == 0" (assignment_expression "uVar9 = N" identifier = identifier) , (binary_expression "pCheck->mxErr == 0" (field_expression "pCheck->mxErr" identifier -> field_identifier) == number_literal)) ))) )) (compound_statement "{\n    uVar5 = 0;\n    if (N == 0) goto LAB_00158469;\n  }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (if_statement "if (N == 0) goto LAB_00158469;" if (parenthesized_expression "(N == 0)" ( (binary_expression "N == 0" identifier == number_literal) )) (goto_statement "goto LAB_00158469;" goto statement_identifier ;)) }) (else_clause "else {\n    while (iVar3 = checkRef(pCheck,iPage), iVar3 == 0) {\n      uVar8 = uVar9 - 1;\n      iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);\n      if (iVar3 != 0) {\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }\n      pBVar4 = pCheck->pBt;\n      puVar2 = (uint *)pOvflPage->pData;\n      if (isFreeList == 0) {\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }\n      else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }\n      if ((iPage == 0) || (pCheck->mxErr == 0)) break;\n    }\n    if ((uVar9 == 0) || (pCheck->nErr != iVar1)) goto LAB_00158469;\n    uVar5 = N - uVar9;\n  }" else (compound_statement "{\n    while (iVar3 = checkRef(pCheck,iPage), iVar3 == 0) {\n      uVar8 = uVar9 - 1;\n      iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);\n      if (iVar3 != 0) {\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }\n      pBVar4 = pCheck->pBt;\n      puVar2 = (uint *)pOvflPage->pData;\n      if (isFreeList == 0) {\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }\n      else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }\n      if ((iPage == 0) || (pCheck->mxErr == 0)) break;\n    }\n    if ((uVar9 == 0) || (pCheck->nErr != iVar1)) goto LAB_00158469;\n    uVar5 = N - uVar9;\n  }" { (while_statement "while (iVar3 = checkRef(pCheck,iPage), iVar3 == 0) {\n      uVar8 = uVar9 - 1;\n      iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);\n      if (iVar3 != 0) {\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }\n      pBVar4 = pCheck->pBt;\n      puVar2 = (uint *)pOvflPage->pData;\n      if (isFreeList == 0) {\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }\n      else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }\n      if ((iPage == 0) || (pCheck->mxErr == 0)) break;\n    }" while (parenthesized_expression "(iVar3 = checkRef(pCheck,iPage), iVar3 == 0)" ( (comma_expression "iVar3 = checkRef(pCheck,iPage), iVar3 == 0" (assignment_expression "iVar3 = checkRef(pCheck,iPage)" identifier = (call_expression "checkRef(pCheck,iPage)" identifier (argument_list "(pCheck,iPage)" ( identifier , identifier )))) , (binary_expression "iVar3 == 0" identifier == number_literal)) )) (compound_statement "{\n      uVar8 = uVar9 - 1;\n      iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);\n      if (iVar3 != 0) {\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }\n      pBVar4 = pCheck->pBt;\n      puVar2 = (uint *)pOvflPage->pData;\n      if (isFreeList == 0) {\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }\n      else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }\n      if ((iPage == 0) || (pCheck->mxErr == 0)) break;\n    }" { (expression_statement "uVar8 = uVar9 - 1;" (assignment_expression "uVar8 = uVar9 - 1" identifier = (binary_expression "uVar9 - 1" identifier - number_literal)) ;) (expression_statement "iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0);" (assignment_expression "iVar3 = (*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0)" identifier = (call_expression "(*pCheck->pPager->xGet)(pCheck->pPager,iPage,&pOvflPage,0)" (parenthesized_expression "(*pCheck->pPager->xGet)" ( (pointer_expression "*pCheck->pPager->xGet" * (field_expression "pCheck->pPager->xGet" (field_expression "pCheck->pPager" identifier -> field_identifier) -> field_identifier)) )) (argument_list "(pCheck->pPager,iPage,&pOvflPage,0)" ( (field_expression "pCheck->pPager" identifier -> field_identifier) , identifier , (pointer_expression "&pOvflPage" & identifier) , number_literal )))) ;) (if_statement "if (iVar3 != 0) {\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);\n        uVar9 = uVar8;\n        break;\n      }" { (expression_statement "checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage);" (call_expression "checkAppendMsg(pCheck,"failed to get page %d",(ulong)(uint)iPage)" identifier (argument_list "(pCheck,"failed to get page %d",(ulong)(uint)iPage)" ( identifier , (string_literal ""failed to get page %d"" " string_content ") , (cast_expression "(ulong)(uint)iPage" ( (type_descriptor "ulong" type_identifier) ) (cast_expression "(uint)iPage" ( (type_descriptor "uint" type_identifier) ) identifier)) ))) ;) (expression_statement "uVar9 = uVar8;" (assignment_expression "uVar9 = uVar8" identifier = identifier) ;) (break_statement "break;" break ;) })) (expression_statement "pBVar4 = pCheck->pBt;" (assignment_expression "pBVar4 = pCheck->pBt" identifier = (field_expression "pCheck->pBt" identifier -> field_identifier)) ;) (expression_statement "puVar2 = (uint *)pOvflPage->pData;" (assignment_expression "puVar2 = (uint *)pOvflPage->pData" identifier = (cast_expression "(uint *)pOvflPage->pData" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pOvflPage->pData" identifier -> field_identifier))) ;) (if_statement "if (isFreeList == 0) {\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }\n      else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }" if (parenthesized_expression "(isFreeList == 0)" ( (binary_expression "isFreeList == 0" identifier == number_literal) )) (compound_statement "{\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);\n        iPage = uVar5;\n        uVar9 = uVar8;\n      }" { (expression_statement "uVar5 = *puVar2;" (assignment_expression "uVar5 = *puVar2" identifier = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;" (assignment_expression "uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18" identifier = (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18" (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8" (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8" (binary_expression "uVar5 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar5 & 0xff0000) >> 8" (parenthesized_expression "(uVar5 & 0xff0000)" ( (binary_expression "uVar5 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar5 & 0xff00) << 8" (parenthesized_expression "(uVar5 & 0xff00)" ( (binary_expression "uVar5 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar5 << 0x18" identifier << number_literal))) ;) (if_statement "if ((pBVar4->autoVacuum != '\0') && (uVar8 != 0)) {\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }" if (parenthesized_expression "((pBVar4->autoVacuum != '\0') && (uVar8 != 0))" ( (binary_expression "(pBVar4->autoVacuum != '\0') && (uVar8 != 0)" (parenthesized_expression "(pBVar4->autoVacuum != '\0')" ( (binary_expression "pBVar4->autoVacuum != '\0'" (field_expression "pBVar4->autoVacuum" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(uVar8 != 0)" ( (binary_expression "uVar8 != 0" identifier != number_literal) ))) )) (compound_statement "{\n          checkPtrmap(pCheck,uVar5,'\x04',iPage);\n          goto LAB_001583d1;\n        }" { (expression_statement "checkPtrmap(pCheck,uVar5,'\x04',iPage);" (call_expression "checkPtrmap(pCheck,uVar5,'\x04',iPage)" identifier (argument_list "(pCheck,uVar5,'\x04',iPage)" ( identifier , identifier , (char_literal "'\x04'" ' escape_sequence ') , identifier ))) ;) (goto_statement "goto LAB_001583d1;" goto statement_identifier ;) })) (labeled_statement "LAB_00158452:\n        sqlite3PagerUnrefNotNull(pOvflPage);" statement_identifier : (expression_statement "sqlite3PagerUnrefNotNull(pOvflPage);" (call_expression "sqlite3PagerUnrefNotNull(pOvflPage)" identifier (argument_list "(pOvflPage)" ( identifier ))) ;)) (expression_statement "iPage = uVar5;" (assignment_expression "iPage = uVar5" identifier = identifier) ;) (expression_statement "uVar9 = uVar8;" (assignment_expression "uVar9 = uVar8" identifier = identifier) ;) }) (else_clause "else {\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }" else (compound_statement "{\n        uVar5 = puVar2[1];\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }\n        if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }\nLAB_001583d1:\n        uVar5 = *puVar2;\n        uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;\n        iPage = uVar5;\n        uVar9 = uVar8;\n        if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;\n      }" { (expression_statement "uVar5 = puVar2[1];" (assignment_expression "uVar5 = puVar2[1]" identifier = (subscript_expression "puVar2[1]" identifier [ number_literal ])) ;) (expression_statement "uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;" (assignment_expression "uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18" identifier = (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18" (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8" (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8" (binary_expression "uVar5 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar5 & 0xff0000) >> 8" (parenthesized_expression "(uVar5 & 0xff0000)" ( (binary_expression "uVar5 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar5 & 0xff00) << 8" (parenthesized_expression "(uVar5 & 0xff00)" ( (binary_expression "uVar5 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar5 << 0x18" identifier << number_literal))) ;) (if_statement "if (pBVar4->autoVacuum != '\0') {\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }" if (parenthesized_expression "(pBVar4->autoVacuum != '\0')" ( (binary_expression "pBVar4->autoVacuum != '\0'" (field_expression "pBVar4->autoVacuum" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          checkPtrmap(pCheck,iPage,'\x02',0);\n          pBVar4 = pCheck->pBt;\n        }" { (expression_statement "checkPtrmap(pCheck,iPage,'\x02',0);" (call_expression "checkPtrmap(pCheck,iPage,'\x02',0)" identifier (argument_list "(pCheck,iPage,'\x02',0)" ( identifier , identifier , (char_literal "'\x02'" ' escape_sequence ') , number_literal ))) ;) (expression_statement "pBVar4 = pCheck->pBt;" (assignment_expression "pBVar4 = pCheck->pBt" identifier = (field_expression "pCheck->pBt" identifier -> field_identifier)) ;) })) (if_statement "if ((pBVar4->usableSize >> 2) - 2 < uVar5) {\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }\n        else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }" if (parenthesized_expression "((pBVar4->usableSize >> 2) - 2 < uVar5)" ( (binary_expression "(pBVar4->usableSize >> 2) - 2 < uVar5" (binary_expression "(pBVar4->usableSize >> 2) - 2" (parenthesized_expression "(pBVar4->usableSize >> 2)" ( (binary_expression "pBVar4->usableSize >> 2" (field_expression "pBVar4->usableSize" identifier -> field_identifier) >> number_literal) )) - number_literal) < identifier) )) (compound_statement "{\n          checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);\n          uVar8 = uVar9 - 2;\n        }" { (expression_statement "checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage);" (call_expression "checkAppendMsg(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage)" identifier (argument_list "(pCheck,"freelist leaf count too big on page %d",(ulong)(uint)iPage)" ( identifier , (string_literal ""freelist leaf count too big on page %d"" " string_content ") , (cast_expression "(ulong)(uint)iPage" ( (type_descriptor "ulong" type_identifier) ) (cast_expression "(uint)iPage" ( (type_descriptor "uint" type_identifier) ) identifier)) ))) ;) (expression_statement "uVar8 = uVar9 - 2;" (assignment_expression "uVar8 = uVar9 - 2" identifier = (binary_expression "uVar9 - 2" identifier - number_literal)) ;) }) (else_clause "else {\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }" else (compound_statement "{\n          if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }\n          uVar8 = uVar8 - uVar5;\n        }" { (if_statement "if (0 < (int)uVar5) {\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }" if (parenthesized_expression "(0 < (int)uVar5)" ( (binary_expression "0 < (int)uVar5" number_literal < (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n            puVar7 = puVar2 + 2;\n            while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }\n          }" { (expression_statement "puVar7 = puVar2 + 2;" (assignment_expression "puVar7 = puVar2 + 2" identifier = (binary_expression "puVar2 + 2" identifier + number_literal)) ;) (while_statement "while( true ) {\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n              uVar10 = *puVar7;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }\n              puVar7 = puVar7 + 1;\n              checkRef(pCheck,uVar10);\n              if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;\n              pBVar4 = pCheck->pBt;\n            }" { (expression_statement "uVar10 = *puVar7;" (assignment_expression "uVar10 = *puVar7" identifier = (pointer_expression "*puVar7" * identifier)) ;) (expression_statement "uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;" (assignment_expression "uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18" identifier = (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18" (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8" (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8" (binary_expression "uVar10 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar10 & 0xff0000) >> 8" (parenthesized_expression "(uVar10 & 0xff0000)" ( (binary_expression "uVar10 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar10 & 0xff00) << 8" (parenthesized_expression "(uVar10 & 0xff00)" ( (binary_expression "uVar10 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar10 << 0x18" identifier << number_literal))) ;) (if_statement "if (pBVar4->autoVacuum != '\0') {\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }" if (parenthesized_expression "(pBVar4->autoVacuum != '\0')" ( (binary_expression "pBVar4->autoVacuum != '\0'" (field_expression "pBVar4->autoVacuum" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n                checkPtrmap(pCheck,uVar10,'\x02',0);\n              }" { (expression_statement "checkPtrmap(pCheck,uVar10,'\x02',0);" (call_expression "checkPtrmap(pCheck,uVar10,'\x02',0)" identifier (argument_list "(pCheck,uVar10,'\x02',0)" ( identifier , identifier , (char_literal "'\x02'" ' escape_sequence ') , number_literal ))) ;) })) (expression_statement "puVar7 = puVar7 + 1;" (assignment_expression "puVar7 = puVar7 + 1" identifier = (binary_expression "puVar7 + 1" identifier + number_literal)) ;) (expression_statement "checkRef(pCheck,uVar10);" (call_expression "checkRef(pCheck,uVar10)" identifier (argument_list "(pCheck,uVar10)" ( identifier , identifier ))) ;) (if_statement "if (puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7) break;" if (parenthesized_expression "(puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7)" ( (binary_expression "puVar2 + (ulong)(uVar5 - 1) + 3 == puVar7" (binary_expression "puVar2 + (ulong)(uVar5 - 1) + 3" (binary_expression "puVar2 + (ulong)(uVar5 - 1)" identifier + (call_expression "(ulong)(uVar5 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar5 - 1)" ( (binary_expression "uVar5 - 1" identifier - number_literal) )))) + number_literal) == identifier) )) (break_statement "break;" break ;)) (expression_statement "pBVar4 = pCheck->pBt;" (assignment_expression "pBVar4 = pCheck->pBt" identifier = (field_expression "pCheck->pBt" identifier -> field_identifier)) ;) })) })) (expression_statement "uVar8 = uVar8 - uVar5;" (assignment_expression "uVar8 = uVar8 - uVar5" identifier = (binary_expression "uVar8 - uVar5" identifier - identifier)) ;) }))) (labeled_statement "LAB_001583d1:\n        uVar5 = *puVar2;" statement_identifier : (expression_statement "uVar5 = *puVar2;" (assignment_expression "uVar5 = *puVar2" identifier = (pointer_expression "*puVar2" * identifier)) ;)) (expression_statement "uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;" (assignment_expression "uVar5 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18" identifier = (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18" (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8" (binary_expression "uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8" (binary_expression "uVar5 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar5 & 0xff0000) >> 8" (parenthesized_expression "(uVar5 & 0xff0000)" ( (binary_expression "uVar5 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar5 & 0xff00) << 8" (parenthesized_expression "(uVar5 & 0xff00)" ( (binary_expression "uVar5 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar5 << 0x18" identifier << number_literal))) ;) (expression_statement "iPage = uVar5;" (assignment_expression "iPage = uVar5" identifier = identifier) ;) (expression_statement "uVar9 = uVar8;" (assignment_expression "uVar9 = uVar8" identifier = identifier) ;) (if_statement "if (pOvflPage != (DbPage *)0x0) goto LAB_00158452;" if (parenthesized_expression "(pOvflPage != (DbPage *)0x0)" ( (binary_expression "pOvflPage != (DbPage *)0x0" identifier != (cast_expression "(DbPage *)0x0" ( (type_descriptor "DbPage *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00158452;" goto statement_identifier ;)) }))) (if_statement "if ((iPage == 0) || (pCheck->mxErr == 0)) break;" if (parenthesized_expression "((iPage == 0) || (pCheck->mxErr == 0))" ( (binary_expression "(iPage == 0) || (pCheck->mxErr == 0)" (parenthesized_expression "(iPage == 0)" ( (binary_expression "iPage == 0" identifier == number_literal) )) || (parenthesized_expression "(pCheck->mxErr == 0)" ( (binary_expression "pCheck->mxErr == 0" (field_expression "pCheck->mxErr" identifier -> field_identifier) == number_literal) ))) )) (break_statement "break;" break ;)) })) (if_statement "if ((uVar9 == 0) || (pCheck->nErr != iVar1)) goto LAB_00158469;" if (parenthesized_expression "((uVar9 == 0) || (pCheck->nErr != iVar1))" ( (binary_expression "(uVar9 == 0) || (pCheck->nErr != iVar1)" (parenthesized_expression "(uVar9 == 0)" ( (binary_expression "uVar9 == 0" identifier == number_literal) )) || (parenthesized_expression "(pCheck->nErr != iVar1)" ( (binary_expression "pCheck->nErr != iVar1" (field_expression "pCheck->nErr" identifier -> field_identifier) != identifier) ))) )) (goto_statement "goto LAB_00158469;" goto statement_identifier ;)) (expression_statement "uVar5 = N - uVar9;" (assignment_expression "uVar5 = N - uVar9" identifier = (binary_expression "N - uVar9" identifier - identifier)) ;) }))) (expression_statement "pcVar6 = "size";" (assignment_expression "pcVar6 = "size"" identifier = (string_literal ""size"" " string_content ")) ;) (if_statement "if (isFreeList == 0) {\n    pcVar6 = "overflow list length";\n  }" if (parenthesized_expression "(isFreeList == 0)" ( (binary_expression "isFreeList == 0" identifier == number_literal) )) (compound_statement "{\n    pcVar6 = "overflow list length";\n  }" { (expression_statement "pcVar6 = "overflow list length";" (assignment_expression "pcVar6 = "overflow list length"" identifier = (string_literal ""overflow list length"" " string_content ")) ;) })) (expression_statement "checkAppendMsg(pCheck,"%s is %d but should be %d",pcVar6,(ulong)uVar5,(ulong)N);" (call_expression "checkAppendMsg(pCheck,"%s is %d but should be %d",pcVar6,(ulong)uVar5,(ulong)N)" identifier (argument_list "(pCheck,"%s is %d but should be %d",pcVar6,(ulong)uVar5,(ulong)N)" ( identifier , (string_literal ""%s is %d but should be %d"" " string_content ") , identifier , (cast_expression "(ulong)uVar5" ( (type_descriptor "ulong" type_identifier) ) identifier) , (cast_expression "(ulong)N" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (labeled_statement "LAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" statement_identifier : (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_00158340(long *param_1,int param_2,uint param_3,int param_4)\n\n{\n  uint *puVar1;\n  long lVar2;\n  int iVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  char *pcVar7;\n  uint *puVar8;\n  uint uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  long local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  lVar2 = param_1[4];\n  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }\n  pcVar7 = "size";\n  if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }\n  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "void FUN_00158340(long *param_1,int param_2,uint param_3,int param_4)\n\n{\n  uint *puVar1;\n  long lVar2;\n  int iVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  char *pcVar7;\n  uint *puVar8;\n  uint uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  long local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  lVar2 = param_1[4];\n  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }\n  pcVar7 = "size";\n  if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }\n  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_00158340(long *param_1,int param_2,uint param_3,int param_4)" identifier (parameter_list "(long *param_1,int param_2,uint param_3,int param_4)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  uint *puVar1;\n  long lVar2;\n  int iVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  char *pcVar7;\n  uint *puVar8;\n  uint uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  long local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  lVar2 = param_1[4];\n  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }\n  pcVar7 = "size";\n  if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }\n  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint uVar9;" type_identifier identifier ;) (declaration "uint uVar10;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_48;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "lVar2 = param_1[4];" (assignment_expression "lVar2 = param_1[4]" identifier = (subscript_expression "param_1[4]" identifier [ number_literal ])) ;) (if_statement "if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }" if (parenthesized_expression "((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0))" ( (binary_expression "(param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)" (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)" ( (comma_expression "iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0" (assignment_expression "iVar6 = param_4" identifier = identifier) , (binary_expression "*(int *)((long)param_1 + 0x1c) == 0" (pointer_expression "*(int *)((long)param_1 + 0x1c)" * (cast_expression "(int *)((long)param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x1c)" ( (binary_expression "(long)param_1 + 0x1c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == number_literal)) ))) )) (compound_statement "{\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (if_statement "if (param_4 == 0) goto LAB_00158469;" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00158469;" goto statement_identifier ;)) }) (else_clause "else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }" else (compound_statement "{\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }" { (while_statement "while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }" while (parenthesized_expression "(iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0)" ( (comma_expression "iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0" (assignment_expression "iVar3 = FUN_001581f0(param_1,param_3)" identifier = (call_expression "FUN_001581f0(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier )))) , (binary_expression "iVar3 == 0" identifier == number_literal)) )) (compound_statement "{\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }" { (expression_statement "iVar3 = iVar6 + -1;" (assignment_expression "iVar3 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (expression_statement "iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);" (assignment_expression "iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0)" identifier = (call_expression "(**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0)" (parenthesized_expression "(**(code **)(param_1[1] + 0x108))" ( (pointer_expression "**(code **)(param_1[1] + 0x108)" * (pointer_expression "*(code **)(param_1[1] + 0x108)" * (cast_expression "(code **)(param_1[1] + 0x108)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1[1] + 0x108)" ( (binary_expression "param_1[1] + 0x108" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) ))))) )) (argument_list "(param_1[1],param_3,&local_48,0)" ( (subscript_expression "param_1[1]" identifier [ number_literal ]) , identifier , (pointer_expression "&local_48" & identifier) , number_literal )))) ;) (if_statement "if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }" { (expression_statement "FUN_001580b0(param_1,"failed to get page %d",param_3);" (call_expression "FUN_001580b0(param_1,"failed to get page %d",param_3)" identifier (argument_list "(param_1,"failed to get page %d",param_3)" ( identifier , (string_literal ""failed to get page %d"" " string_content ") , identifier ))) ;) (expression_statement "iVar6 = iVar3;" (assignment_expression "iVar6 = iVar3" identifier = identifier) ;) (break_statement "break;" break ;) })) (expression_statement "lVar5 = *param_1;" (assignment_expression "lVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "puVar1 = *(uint **)(local_48 + 8);" (assignment_expression "puVar1 = *(uint **)(local_48 + 8)" identifier = (pointer_expression "*(uint **)(local_48 + 8)" * (cast_expression "(uint **)(local_48 + 8)" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(local_48 + 8)" ( (binary_expression "local_48 + 8" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }" { (expression_statement "uVar9 = *puVar1;" (assignment_expression "uVar9 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;" (assignment_expression "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" identifier = (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" ( (binary_expression "uVar9 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" ( (binary_expression "uVar9 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar9 << 0x18" identifier << number_literal))) ;) (if_statement "if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }" if (parenthesized_expression "((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0))" ( (binary_expression "(*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)" (parenthesized_expression "(*(char *)(lVar5 + 0x21) != '\0')" ( (binary_expression "*(char *)(lVar5 + 0x21) != '\0'" (pointer_expression "*(char *)(lVar5 + 0x21)" * (cast_expression "(char *)(lVar5 + 0x21)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x21)" ( (binary_expression "lVar5 + 0x21" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) ))) )) (compound_statement "{\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }" { (expression_statement "FUN_00158270(param_1,uVar9,4,param_3);" (call_expression "FUN_00158270(param_1,uVar9,4,param_3)" identifier (argument_list "(param_1,uVar9,4,param_3)" ( identifier , identifier , number_literal , identifier ))) ;) (goto_statement "goto LAB_001583d1;" goto statement_identifier ;) })) (labeled_statement "LAB_00158452:\n        FUN_00110c90();" statement_identifier : (expression_statement "FUN_00110c90();" (call_expression "FUN_00110c90()" identifier (argument_list "()" ( ))) ;)) (expression_statement "param_3 = uVar9;" (assignment_expression "param_3 = uVar9" identifier = identifier) ;) (expression_statement "iVar6 = iVar3;" (assignment_expression "iVar6 = iVar3" identifier = identifier) ;) }) (else_clause "else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }" else (compound_statement "{\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }" { (expression_statement "uVar9 = puVar1[1];" (assignment_expression "uVar9 = puVar1[1]" identifier = (subscript_expression "puVar1[1]" identifier [ number_literal ])) ;) (expression_statement "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;" (assignment_expression "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" identifier = (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" ( (binary_expression "uVar9 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" ( (binary_expression "uVar9 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar9 << 0x18" identifier << number_literal))) ;) (if_statement "if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }" if (parenthesized_expression "(*(char *)(lVar5 + 0x21) != '\0')" ( (binary_expression "*(char *)(lVar5 + 0x21) != '\0'" (pointer_expression "*(char *)(lVar5 + 0x21)" * (cast_expression "(char *)(lVar5 + 0x21)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x21)" ( (binary_expression "lVar5 + 0x21" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }" { (expression_statement "FUN_00158270(param_1,param_3,2,0);" (call_expression "FUN_00158270(param_1,param_3,2,0)" identifier (argument_list "(param_1,param_3,2,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "lVar5 = *param_1;" (assignment_expression "lVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) (if_statement "if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }" if (parenthesized_expression "((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9)" ( (binary_expression "(*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9" (binary_expression "(*(uint *)(lVar5 + 0x34) >> 2) - 2" (parenthesized_expression "(*(uint *)(lVar5 + 0x34) >> 2)" ( (binary_expression "*(uint *)(lVar5 + 0x34) >> 2" (pointer_expression "*(uint *)(lVar5 + 0x34)" * (cast_expression "(uint *)(lVar5 + 0x34)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x34)" ( (binary_expression "lVar5 + 0x34" identifier + number_literal) )))) >> number_literal) )) - number_literal) < identifier) )) (compound_statement "{\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }" { (expression_statement "FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);" (call_expression "FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3)" identifier (argument_list "(param_1,"freelist leaf count too big on page %d",param_3)" ( identifier , (string_literal ""freelist leaf count too big on page %d"" " string_content ") , identifier ))) ;) (expression_statement "iVar3 = iVar6 + -2;" (assignment_expression "iVar3 = iVar6 + -2" identifier = (binary_expression "iVar6 + -2" identifier + number_literal)) ;) }) (else_clause "else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }" else (compound_statement "{\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }" { (if_statement "if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }" if (parenthesized_expression "(0 < (int)uVar9)" ( (binary_expression "0 < (int)uVar9" number_literal < (cast_expression "(int)uVar9" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }" { (expression_statement "puVar8 = puVar1 + 2;" (assignment_expression "puVar8 = puVar1 + 2" identifier = (binary_expression "puVar1 + 2" identifier + number_literal)) ;) (while_statement "while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }" { (expression_statement "uVar10 = *puVar8;" (assignment_expression "uVar10 = *puVar8" identifier = (pointer_expression "*puVar8" * identifier)) ;) (expression_statement "uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;" (assignment_expression "uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18" identifier = (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18" (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8" (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8" (binary_expression "uVar10 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar10 & 0xff0000) >> 8" (parenthesized_expression "(uVar10 & 0xff0000)" ( (binary_expression "uVar10 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar10 & 0xff00) << 8" (parenthesized_expression "(uVar10 & 0xff00)" ( (binary_expression "uVar10 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar10 << 0x18" identifier << number_literal))) ;) (if_statement "if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }" if (parenthesized_expression "(*(char *)(lVar5 + 0x21) != '\0')" ( (binary_expression "*(char *)(lVar5 + 0x21) != '\0'" (pointer_expression "*(char *)(lVar5 + 0x21)" * (cast_expression "(char *)(lVar5 + 0x21)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x21)" ( (binary_expression "lVar5 + 0x21" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n                FUN_00158270(param_1,uVar10,2,0);\n              }" { (expression_statement "FUN_00158270(param_1,uVar10,2,0);" (call_expression "FUN_00158270(param_1,uVar10,2,0)" identifier (argument_list "(param_1,uVar10,2,0)" ( identifier , identifier , number_literal , number_literal ))) ;) })) (expression_statement "puVar8 = puVar8 + 1;" (assignment_expression "puVar8 = puVar8 + 1" identifier = (binary_expression "puVar8 + 1" identifier + number_literal)) ;) (expression_statement "FUN_001581f0(param_1,uVar10);" (call_expression "FUN_001581f0(param_1,uVar10)" identifier (argument_list "(param_1,uVar10)" ( identifier , identifier ))) ;) (if_statement "if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;" if (parenthesized_expression "(puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8)" ( (binary_expression "puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8" (binary_expression "puVar1 + (ulong)(uVar9 - 1) + 3" (binary_expression "puVar1 + (ulong)(uVar9 - 1)" identifier + (call_expression "(ulong)(uVar9 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar9 - 1)" ( (binary_expression "uVar9 - 1" identifier - number_literal) )))) + number_literal) == identifier) )) (break_statement "break;" break ;)) (expression_statement "lVar5 = *param_1;" (assignment_expression "lVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) })) (expression_statement "iVar3 = iVar3 - uVar9;" (assignment_expression "iVar3 = iVar3 - uVar9" identifier = (binary_expression "iVar3 - uVar9" identifier - identifier)) ;) }))) (labeled_statement "LAB_001583d1:\n        uVar9 = *puVar1;" statement_identifier : (expression_statement "uVar9 = *puVar1;" (assignment_expression "uVar9 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;)) (expression_statement "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;" (assignment_expression "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" identifier = (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" ( (binary_expression "uVar9 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" ( (binary_expression "uVar9 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar9 << 0x18" identifier << number_literal))) ;) (expression_statement "param_3 = uVar9;" (assignment_expression "param_3 = uVar9" identifier = identifier) ;) (expression_statement "iVar6 = iVar3;" (assignment_expression "iVar6 = iVar3" identifier = identifier) ;) (if_statement "if (local_48 != 0) goto LAB_00158452;" if (parenthesized_expression "(local_48 != 0)" ( (binary_expression "local_48 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00158452;" goto statement_identifier ;)) }))) (if_statement "if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;" if (parenthesized_expression "((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0))" ( (binary_expression "(param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)" (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) || (parenthesized_expression "(*(int *)((long)param_1 + 0x1c) == 0)" ( (binary_expression "*(int *)((long)param_1 + 0x1c) == 0" (pointer_expression "*(int *)((long)param_1 + 0x1c)" * (cast_expression "(int *)((long)param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x1c)" ( (binary_expression "(long)param_1 + 0x1c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == number_literal) ))) )) (break_statement "break;" break ;)) })) (if_statement "if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;" if (parenthesized_expression "((iVar6 == 0) || ((int)param_1[4] != (int)lVar2))" ( (binary_expression "(iVar6 == 0) || ((int)param_1[4] != (int)lVar2)" (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) || (parenthesized_expression "((int)param_1[4] != (int)lVar2)" ( (binary_expression "(int)param_1[4] != (int)lVar2" (cast_expression "(int)param_1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[4]" identifier [ number_literal ])) != (cast_expression "(int)lVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (goto_statement "goto LAB_00158469;" goto statement_identifier ;)) (expression_statement "iVar6 = param_4 - iVar6;" (assignment_expression "iVar6 = param_4 - iVar6" identifier = (binary_expression "param_4 - iVar6" identifier - identifier)) ;) }))) (expression_statement "pcVar7 = "size";" (assignment_expression "pcVar7 = "size"" identifier = (string_literal ""size"" " string_content ")) ;) (if_statement "if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    pcVar7 = "overflow list length";\n  }" { (expression_statement "pcVar7 = "overflow list length";" (assignment_expression "pcVar7 = "overflow list length"" identifier = (string_literal ""overflow list length"" " string_content ")) ;) })) (expression_statement "FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);" (call_expression "FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4)" identifier (argument_list "(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4)" ( identifier , (string_literal ""%s is %d but should be %d"" " string_content ") , identifier , identifier , identifier ))) ;) (labeled_statement "LAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" statement_identifier : (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) }))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) , (binary_expression IDENT == LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) )) (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT , (pointer_expression & IDENT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (break_statement break ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_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))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( ))) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_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))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) >> LIT) )) - LIT) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_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))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (binary_expression IDENT + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) )))) + LIT) == IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;)) (expression_statement (assignment_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 IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) }))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) == LIT) ))) )) (break_statement break ;)) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) != (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) }))) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT , IDENT , IDENT ))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_00158340(long *param_1,int param_2,uint param_3,int param_4)\n\n{\n  uint *puVar1;\n  long lVar2;\n  int iVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  char *pcVar7;\n  uint *puVar8;\n  uint uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  long local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  lVar2 = param_1[4];\n  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }\n  pcVar7 = "size";\n  if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }\n  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" (primitive_type "void") (function_declarator "FUN_00158340(long *param_1,int param_2,uint param_3,int param_4)" (identifier "FUN_00158340") (parameter_list "(long *param_1,int param_2,uint param_3,int param_4)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  uint *puVar1;\n  long lVar2;\n  int iVar3;\n  int iVar4;\n  long lVar5;\n  int iVar6;\n  char *pcVar7;\n  uint *puVar8;\n  uint uVar9;\n  uint uVar10;\n  long in_FS_OFFSET;\n  long local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  lVar2 = param_1[4];\n  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }\n  pcVar7 = "size";\n  if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }\n  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);\nLAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "uint *puVar1;" (type_identifier "uint") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "char *pcVar7;" (primitive_type "char") (pointer_declarator "*pcVar7" (* "*") (identifier "pcVar7")) (; ";")) (declaration "uint *puVar8;" (type_identifier "uint") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "uint uVar9;" (type_identifier "uint") (identifier "uVar9") (; ";")) (declaration "uint uVar10;" (type_identifier "uint") (identifier "uVar10") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "long local_48;" (sized_type_specifier "long" (long "long")) (identifier "local_48") (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "lVar2 = param_1[4];" (assignment_expression "lVar2 = param_1[4]" (identifier "lVar2") (= "=") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) (; ";")) (if_statement "if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }\n  else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }" (if "if") (parenthesized_expression "((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0))" (( "(") (binary_expression "(param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)" (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)" (( "(") (comma_expression "iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0" (assignment_expression "iVar6 = param_4" (identifier "iVar6") (= "=") (identifier "param_4")) (, ",") (binary_expression "*(int *)((long)param_1 + 0x1c) == 0" (pointer_expression "*(int *)((long)param_1 + 0x1c)" (* "*") (cast_expression "(int *)((long)param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 0x1c)" (( "(") (binary_expression "(long)param_1 + 0x1c" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "0x1c")) () ")")))) (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    iVar6 = 0;\n    if (param_4 == 0) goto LAB_00158469;\n  }" ({ "{") (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_4 == 0) goto LAB_00158469;" (if "if") (parenthesized_expression "(param_4 == 0)" (( "(") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00158469;" (goto "goto") (statement_identifier "LAB_00158469") (; ";"))) (} "}")) (else_clause "else {\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }" (else "else") (compound_statement "{\n    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }\n    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;\n    iVar6 = param_4 - iVar6;\n  }" ({ "{") (while_statement "while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }" (while "while") (parenthesized_expression "(iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0)" (( "(") (comma_expression "iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0" (assignment_expression "iVar3 = FUN_001581f0(param_1,param_3)" (identifier "iVar3") (= "=") (call_expression "FUN_001581f0(param_1,param_3)" (identifier "FUN_001581f0") (argument_list "(param_1,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") () ")")))) (, ",") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0"))) () ")")) (compound_statement "{\n      iVar3 = iVar6 + -1;\n      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);\n      if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }\n      lVar5 = *param_1;\n      puVar1 = *(uint **)(local_48 + 8);\n      if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }\n      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;\n    }" ({ "{") (expression_statement "iVar3 = iVar6 + -1;" (assignment_expression "iVar3 = iVar6 + -1" (identifier "iVar3") (= "=") (binary_expression "iVar6 + -1" (identifier "iVar6") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);" (assignment_expression "iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0)" (identifier "iVar4") (= "=") (call_expression "(**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0)" (parenthesized_expression "(**(code **)(param_1[1] + 0x108))" (( "(") (pointer_expression "**(code **)(param_1[1] + 0x108)" (* "*") (pointer_expression "*(code **)(param_1[1] + 0x108)" (* "*") (cast_expression "(code **)(param_1[1] + 0x108)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1[1] + 0x108)" (( "(") (binary_expression "param_1[1] + 0x108" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "0x108")) () ")"))))) () ")")) (argument_list "(param_1[1],param_3,&local_48,0)" (( "(") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (, ",") (identifier "param_3") (, ",") (pointer_expression "&local_48" (& "&") (identifier "local_48")) (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_001580b0(param_1,"failed to get page %d",param_3);\n        iVar6 = iVar3;\n        break;\n      }" ({ "{") (expression_statement "FUN_001580b0(param_1,"failed to get page %d",param_3);" (call_expression "FUN_001580b0(param_1,"failed to get page %d",param_3)" (identifier "FUN_001580b0") (argument_list "(param_1,"failed to get page %d",param_3)" (( "(") (identifier "param_1") (, ",") (string_literal ""failed to get page %d"" (" """) (string_content "failed to get page %d") (" """)) (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "iVar6 = iVar3;" (assignment_expression "iVar6 = iVar3" (identifier "iVar6") (= "=") (identifier "iVar3")) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "lVar5 = *param_1;" (assignment_expression "lVar5 = *param_1" (identifier "lVar5") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "puVar1 = *(uint **)(local_48 + 8);" (assignment_expression "puVar1 = *(uint **)(local_48 + 8)" (identifier "puVar1") (= "=") (pointer_expression "*(uint **)(local_48 + 8)" (* "*") (cast_expression "(uint **)(local_48 + 8)" (( "(") (type_descriptor "uint **" (type_identifier "uint") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(local_48 + 8)" (( "(") (binary_expression "local_48 + 8" (identifier "local_48") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (param_2 == 0) {\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }\n      else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }\nLAB_00158452:\n        FUN_00110c90();\n        param_3 = uVar9;\n        iVar6 = iVar3;\n      }" ({ "{") (expression_statement "uVar9 = *puVar1;" (assignment_expression "uVar9 = *puVar1" (identifier "uVar9") (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";")) (expression_statement "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;" (assignment_expression "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (identifier "uVar9") (= "=") (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" (identifier "uVar9") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" (( "(") (binary_expression "uVar9 & 0xff0000" (identifier "uVar9") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" (( "(") (binary_expression "uVar9 & 0xff00" (identifier "uVar9") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar9 << 0x18" (identifier "uVar9") (<< "<<") (number_literal "0x18")))) (; ";")) (if_statement "if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }" (if "if") (parenthesized_expression "((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0))" (( "(") (binary_expression "(*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)" (parenthesized_expression "(*(char *)(lVar5 + 0x21) != '\0')" (( "(") (binary_expression "*(char *)(lVar5 + 0x21) != '\0'" (pointer_expression "*(char *)(lVar5 + 0x21)" (* "*") (cast_expression "(char *)(lVar5 + 0x21)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 + 0x21)" (( "(") (binary_expression "lVar5 + 0x21" (identifier "lVar5") (+ "+") (number_literal "0x21")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n          FUN_00158270(param_1,uVar9,4,param_3);\n          goto LAB_001583d1;\n        }" ({ "{") (expression_statement "FUN_00158270(param_1,uVar9,4,param_3);" (call_expression "FUN_00158270(param_1,uVar9,4,param_3)" (identifier "FUN_00158270") (argument_list "(param_1,uVar9,4,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "uVar9") (, ",") (number_literal "4") (, ",") (identifier "param_3") () ")"))) (; ";")) (goto_statement "goto LAB_001583d1;" (goto "goto") (statement_identifier "LAB_001583d1") (; ";")) (} "}"))) (labeled_statement "LAB_00158452:\n        FUN_00110c90();" (statement_identifier "LAB_00158452") (: ":") (expression_statement "FUN_00110c90();" (call_expression "FUN_00110c90()" (identifier "FUN_00110c90") (argument_list "()" (( "(") () ")"))) (; ";"))) (expression_statement "param_3 = uVar9;" (assignment_expression "param_3 = uVar9" (identifier "param_3") (= "=") (identifier "uVar9")) (; ";")) (expression_statement "iVar6 = iVar3;" (assignment_expression "iVar6 = iVar3" (identifier "iVar6") (= "=") (identifier "iVar3")) (; ";")) (} "}")) (else_clause "else {\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }" (else "else") (compound_statement "{\n        uVar9 = puVar1[1];\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }\n        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }\nLAB_001583d1:\n        uVar9 = *puVar1;\n        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;\n        param_3 = uVar9;\n        iVar6 = iVar3;\n        if (local_48 != 0) goto LAB_00158452;\n      }" ({ "{") (expression_statement "uVar9 = puVar1[1];" (assignment_expression "uVar9 = puVar1[1]" (identifier "uVar9") (= "=") (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;" (assignment_expression "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (identifier "uVar9") (= "=") (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" (identifier "uVar9") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" (( "(") (binary_expression "uVar9 & 0xff0000" (identifier "uVar9") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" (( "(") (binary_expression "uVar9 & 0xff00" (identifier "uVar9") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar9 << 0x18" (identifier "uVar9") (<< "<<") (number_literal "0x18")))) (; ";")) (if_statement "if (*(char *)(lVar5 + 0x21) != '\0') {\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }" (if "if") (parenthesized_expression "(*(char *)(lVar5 + 0x21) != '\0')" (( "(") (binary_expression "*(char *)(lVar5 + 0x21) != '\0'" (pointer_expression "*(char *)(lVar5 + 0x21)" (* "*") (cast_expression "(char *)(lVar5 + 0x21)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 + 0x21)" (( "(") (binary_expression "lVar5 + 0x21" (identifier "lVar5") (+ "+") (number_literal "0x21")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n          FUN_00158270(param_1,param_3,2,0);\n          lVar5 = *param_1;\n        }" ({ "{") (expression_statement "FUN_00158270(param_1,param_3,2,0);" (call_expression "FUN_00158270(param_1,param_3,2,0)" (identifier "FUN_00158270") (argument_list "(param_1,param_3,2,0)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") (, ",") (number_literal "2") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "lVar5 = *param_1;" (assignment_expression "lVar5 = *param_1" (identifier "lVar5") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}"))) (if_statement "if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }\n        else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }" (if "if") (parenthesized_expression "((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9)" (( "(") (binary_expression "(*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9" (binary_expression "(*(uint *)(lVar5 + 0x34) >> 2) - 2" (parenthesized_expression "(*(uint *)(lVar5 + 0x34) >> 2)" (( "(") (binary_expression "*(uint *)(lVar5 + 0x34) >> 2" (pointer_expression "*(uint *)(lVar5 + 0x34)" (* "*") (cast_expression "(uint *)(lVar5 + 0x34)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 + 0x34)" (( "(") (binary_expression "lVar5 + 0x34" (identifier "lVar5") (+ "+") (number_literal "0x34")) () ")")))) (>> ">>") (number_literal "2")) () ")")) (- "-") (number_literal "2")) (< "<") (identifier "uVar9")) () ")")) (compound_statement "{\n          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);\n          iVar3 = iVar6 + -2;\n        }" ({ "{") (expression_statement "FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);" (call_expression "FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3)" (identifier "FUN_001580b0") (argument_list "(param_1,"freelist leaf count too big on page %d",param_3)" (( "(") (identifier "param_1") (, ",") (string_literal ""freelist leaf count too big on page %d"" (" """) (string_content "freelist leaf count too big on page %d") (" """)) (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "iVar3 = iVar6 + -2;" (assignment_expression "iVar3 = iVar6 + -2" (identifier "iVar3") (= "=") (binary_expression "iVar6 + -2" (identifier "iVar6") (+ "+") (number_literal "-2"))) (; ";")) (} "}")) (else_clause "else {\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }" (else "else") (compound_statement "{\n          if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }\n          iVar3 = iVar3 - uVar9;\n        }" ({ "{") (if_statement "if (0 < (int)uVar9) {\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }" (if "if") (parenthesized_expression "(0 < (int)uVar9)" (( "(") (binary_expression "0 < (int)uVar9" (number_literal "0") (< "<") (cast_expression "(int)uVar9" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar9"))) () ")")) (compound_statement "{\n            puVar8 = puVar1 + 2;\n            while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }\n          }" ({ "{") (expression_statement "puVar8 = puVar1 + 2;" (assignment_expression "puVar8 = puVar1 + 2" (identifier "puVar8") (= "=") (binary_expression "puVar1 + 2" (identifier "puVar1") (+ "+") (number_literal "2"))) (; ";")) (while_statement "while( true ) {\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n              uVar10 = *puVar8;\n              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;\n              if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }\n              puVar8 = puVar8 + 1;\n              FUN_001581f0(param_1,uVar10);\n              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;\n              lVar5 = *param_1;\n            }" ({ "{") (expression_statement "uVar10 = *puVar8;" (assignment_expression "uVar10 = *puVar8" (identifier "uVar10") (= "=") (pointer_expression "*puVar8" (* "*") (identifier "puVar8"))) (; ";")) (expression_statement "uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18;" (assignment_expression "uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18" (identifier "uVar10") (= "=") (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |\n                       uVar10 << 0x18" (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8" (binary_expression "uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8" (binary_expression "uVar10 >> 0x18" (identifier "uVar10") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar10 & 0xff0000) >> 8" (parenthesized_expression "(uVar10 & 0xff0000)" (( "(") (binary_expression "uVar10 & 0xff0000" (identifier "uVar10") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar10 & 0xff00) << 8" (parenthesized_expression "(uVar10 & 0xff00)" (( "(") (binary_expression "uVar10 & 0xff00" (identifier "uVar10") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar10 << 0x18" (identifier "uVar10") (<< "<<") (number_literal "0x18")))) (; ";")) (if_statement "if (*(char *)(lVar5 + 0x21) != '\0') {\n                FUN_00158270(param_1,uVar10,2,0);\n              }" (if "if") (parenthesized_expression "(*(char *)(lVar5 + 0x21) != '\0')" (( "(") (binary_expression "*(char *)(lVar5 + 0x21) != '\0'" (pointer_expression "*(char *)(lVar5 + 0x21)" (* "*") (cast_expression "(char *)(lVar5 + 0x21)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 + 0x21)" (( "(") (binary_expression "lVar5 + 0x21" (identifier "lVar5") (+ "+") (number_literal "0x21")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n                FUN_00158270(param_1,uVar10,2,0);\n              }" ({ "{") (expression_statement "FUN_00158270(param_1,uVar10,2,0);" (call_expression "FUN_00158270(param_1,uVar10,2,0)" (identifier "FUN_00158270") (argument_list "(param_1,uVar10,2,0)" (( "(") (identifier "param_1") (, ",") (identifier "uVar10") (, ",") (number_literal "2") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}"))) (expression_statement "puVar8 = puVar8 + 1;" (assignment_expression "puVar8 = puVar8 + 1" (identifier "puVar8") (= "=") (binary_expression "puVar8 + 1" (identifier "puVar8") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "FUN_001581f0(param_1,uVar10);" (call_expression "FUN_001581f0(param_1,uVar10)" (identifier "FUN_001581f0") (argument_list "(param_1,uVar10)" (( "(") (identifier "param_1") (, ",") (identifier "uVar10") () ")"))) (; ";")) (if_statement "if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;" (if "if") (parenthesized_expression "(puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8)" (( "(") (binary_expression "puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8" (binary_expression "puVar1 + (ulong)(uVar9 - 1) + 3" (binary_expression "puVar1 + (ulong)(uVar9 - 1)" (identifier "puVar1") (+ "+") (call_expression "(ulong)(uVar9 - 1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(uVar9 - 1)" (( "(") (binary_expression "uVar9 - 1" (identifier "uVar9") (- "-") (number_literal "1")) () ")")))) (+ "+") (number_literal "3")) (== "==") (identifier "puVar8")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar5 = *param_1;" (assignment_expression "lVar5 = *param_1" (identifier "lVar5") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar3 = iVar3 - uVar9;" (assignment_expression "iVar3 = iVar3 - uVar9" (identifier "iVar3") (= "=") (binary_expression "iVar3 - uVar9" (identifier "iVar3") (- "-") (identifier "uVar9"))) (; ";")) (} "}")))) (labeled_statement "LAB_001583d1:\n        uVar9 = *puVar1;" (statement_identifier "LAB_001583d1") (: ":") (expression_statement "uVar9 = *puVar1;" (assignment_expression "uVar9 = *puVar1" (identifier "uVar9") (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";"))) (expression_statement "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;" (assignment_expression "uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (identifier "uVar9") (= "=") (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8" (binary_expression "uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8" (binary_expression "uVar9 >> 0x18" (identifier "uVar9") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar9 & 0xff0000) >> 8" (parenthesized_expression "(uVar9 & 0xff0000)" (( "(") (binary_expression "uVar9 & 0xff0000" (identifier "uVar9") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar9 & 0xff00) << 8" (parenthesized_expression "(uVar9 & 0xff00)" (( "(") (binary_expression "uVar9 & 0xff00" (identifier "uVar9") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar9 << 0x18" (identifier "uVar9") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "param_3 = uVar9;" (assignment_expression "param_3 = uVar9" (identifier "param_3") (= "=") (identifier "uVar9")) (; ";")) (expression_statement "iVar6 = iVar3;" (assignment_expression "iVar6 = iVar3" (identifier "iVar6") (= "=") (identifier "iVar3")) (; ";")) (if_statement "if (local_48 != 0) goto LAB_00158452;" (if "if") (parenthesized_expression "(local_48 != 0)" (( "(") (binary_expression "local_48 != 0" (identifier "local_48") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00158452;" (goto "goto") (statement_identifier "LAB_00158452") (; ";"))) (} "}")))) (if_statement "if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;" (if "if") (parenthesized_expression "((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0))" (( "(") (binary_expression "(param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)" (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*(int *)((long)param_1 + 0x1c) == 0)" (( "(") (binary_expression "*(int *)((long)param_1 + 0x1c) == 0" (pointer_expression "*(int *)((long)param_1 + 0x1c)" (* "*") (cast_expression "(int *)((long)param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 0x1c)" (( "(") (binary_expression "(long)param_1 + 0x1c" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "0x1c")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}"))) (if_statement "if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;" (if "if") (parenthesized_expression "((iVar6 == 0) || ((int)param_1[4] != (int)lVar2))" (( "(") (binary_expression "(iVar6 == 0) || ((int)param_1[4] != (int)lVar2)" (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "((int)param_1[4] != (int)lVar2)" (( "(") (binary_expression "(int)param_1[4] != (int)lVar2" (cast_expression "(int)param_1[4]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) (!= "!=") (cast_expression "(int)lVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "lVar2"))) () ")"))) () ")")) (goto_statement "goto LAB_00158469;" (goto "goto") (statement_identifier "LAB_00158469") (; ";"))) (expression_statement "iVar6 = param_4 - iVar6;" (assignment_expression "iVar6 = param_4 - iVar6" (identifier "iVar6") (= "=") (binary_expression "param_4 - iVar6" (identifier "param_4") (- "-") (identifier "iVar6"))) (; ";")) (} "}")))) (expression_statement "pcVar7 = "size";" (assignment_expression "pcVar7 = "size"" (identifier "pcVar7") (= "=") (string_literal ""size"" (" """) (string_content "size") (" """))) (; ";")) (if_statement "if (param_2 == 0) {\n    pcVar7 = "overflow list length";\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    pcVar7 = "overflow list length";\n  }" ({ "{") (expression_statement "pcVar7 = "overflow list length";" (assignment_expression "pcVar7 = "overflow list length"" (identifier "pcVar7") (= "=") (string_literal ""overflow list length"" (" """) (string_content "overflow list length") (" """))) (; ";")) (} "}"))) (expression_statement "FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);" (call_expression "FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4)" (identifier "FUN_001580b0") (argument_list "(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4)" (( "(") (identifier "param_1") (, ",") (string_literal ""%s is %d but should be %d"" (" """) (string_content "%s is %d but should be %d") (" """)) (, ",") (identifier "pcVar7") (, ",") (identifier "iVar6") (, ",") (identifier "param_4") () ")"))) (; ";")) (labeled_statement "LAB_00158469:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" (statement_identifier "LAB_00158469") (: ":") (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}")))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

void function_1(type_1 *pCheck,int var_8,int var_2,type_2 var_3)

{
  int var_17;
  type_3 *var_13;
  int var_5;
  type_4 *pBVar4;
  type_3 var_9;
  char *pcVar6;
  type_3 *var_15;
  type_2 var_10;
  type_2 var_6;
  type_3 var_14;
  long var_1;
  type_5 *var_16;
  long var_18;
  
  var_18 = *(long *)(var_1 + 0x28);
  var_17 = pCheck->nErr;
  if ((var_2 == 0) || (var_6 = var_3, pCheck->mxErr == 0)) {
    var_9 = 0;
    if (var_3 == 0) goto LAB_00158469;
  }
  else {
    while (var_5 = var_4(pCheck,var_2), var_5 == 0) {
      var_10 = var_6 - 1;
      var_5 = (*pCheck->pPager->xGet)(pCheck->pPager,var_2,&var_16,0);
      if (var_5 != 0) {
        var_7(pCheck,"failed to get page %d",(type_6)(type_3)var_2);
        var_6 = var_10;
        break;
      }
      pBVar4 = pCheck->pBt;
      var_13 = (type_3 *)var_16->pData;
      if (var_8 == 0) {
        var_9 = *var_13;
        var_9 = var_9 >> 0x18 | (var_9 & 0xff0000) >> 8 | (var_9 & 0xff00) << 8 | var_9 << 0x18;
        if ((pBVar4->autoVacuum != '\0') && (var_10 != 0)) {
          var_11(pCheck,var_9,'\x04',var_2);
          goto LAB_001583d1;
        }
LAB_00158452:
        var_12(var_16);
        var_2 = var_9;
        var_6 = var_10;
      }
      else {
        var_9 = var_13[1];
        var_9 = var_9 >> 0x18 | (var_9 & 0xff0000) >> 8 | (var_9 & 0xff00) << 8 | var_9 << 0x18;
        if (pBVar4->autoVacuum != '\0') {
          var_11(pCheck,var_2,'\x02',0);
          pBVar4 = pCheck->pBt;
        }
        if ((pBVar4->usableSize >> 2) - 2 < var_9) {
          var_7(pCheck,"freelist leaf count too big on page %d",(type_6)(type_3)var_2);
          var_10 = var_6 - 2;
        }
        else {
          if (0 < (int)var_9) {
            var_15 = var_13 + 2;
            while( true ) {
              var_14 = *var_15;
              var_14 = var_14 >> 0x18 | (var_14 & 0xff0000) >> 8 | (var_14 & 0xff00) << 8 |
                       var_14 << 0x18;
              if (pBVar4->autoVacuum != '\0') {
                var_11(pCheck,var_14,'\x02',0);
              }
              var_15 = var_15 + 1;
              var_4(pCheck,var_14);
              if (var_13 + (type_6)(var_9 - 1) + 3 == var_15) break;
              pBVar4 = pCheck->pBt;
            }
          }
          var_10 = var_10 - var_9;
        }
LAB_001583d1:
        var_9 = *var_13;
        var_9 = var_9 >> 0x18 | (var_9 & 0xff0000) >> 8 | (var_9 & 0xff00) << 8 | var_9 << 0x18;
        var_2 = var_9;
        var_6 = var_10;
        if (var_16 != (type_5 *)0x0) goto LAB_00158452;
      }
      if ((var_2 == 0) || (pCheck->mxErr == 0)) break;
    }
    if ((var_6 == 0) || (pCheck->nErr != var_17)) goto LAB_00158469;
    var_9 = var_3 - var_6;
  }
  pcVar6 = "size";
  if (var_8 == 0) {
    pcVar6 = "overflow list length";
  }
  var_7(pCheck,"%s is %d but should be %d",pcVar6,(type_6)var_9,(type_6)var_3);
LAB_00158469:
  if (var_18 == *(long *)(var_1 + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_19();
}


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

void MASKED(long *param_1,int param_2,uint param_3,int param_4)

{
  uint *puVar1;
  long lVar2;
  int iVar3;
  int iVar4;
  long lVar5;
  int iVar6;
  char *pcVar7;
  uint *puVar8;
  uint uVar9;
  uint uVar10;
  long in_FS_OFFSET;
  long local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  lVar2 = param_1[4];
  if ((param_3 == 0) || (iVar6 = param_4, *(int *)((long)param_1 + 0x1c) == 0)) {
    iVar6 = 0;
    if (param_4 == 0) goto LAB_00158469;
  }
  else {
    while (iVar3 = FUN_001581f0(param_1,param_3), iVar3 == 0) {
      iVar3 = iVar6 + -1;
      iVar4 = (**(code **)(param_1[1] + 0x108))(param_1[1],param_3,&local_48,0);
      if (iVar4 != 0) {
        FUN_001580b0(param_1,"failed to get page %d",param_3);
        iVar6 = iVar3;
        break;
      }
      lVar5 = *param_1;
      puVar1 = *(uint **)(local_48 + 8);
      if (param_2 == 0) {
        uVar9 = *puVar1;
        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;
        if ((*(char *)(lVar5 + 0x21) != '\0') && (iVar3 != 0)) {
          FUN_00158270(param_1,uVar9,4,param_3);
          goto LAB_001583d1;
        }
LAB_00158452:
        FUN_00110c90();
        param_3 = uVar9;
        iVar6 = iVar3;
      }
      else {
        uVar9 = puVar1[1];
        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;
        if (*(char *)(lVar5 + 0x21) != '\0') {
          FUN_00158270(param_1,param_3,2,0);
          lVar5 = *param_1;
        }
        if ((*(uint *)(lVar5 + 0x34) >> 2) - 2 < uVar9) {
          FUN_001580b0(param_1,"freelist leaf count too big on page %d",param_3);
          iVar3 = iVar6 + -2;
        }
        else {
          if (0 < (int)uVar9) {
            puVar8 = puVar1 + 2;
            while( true ) {
              uVar10 = *puVar8;
              uVar10 = uVar10 >> 0x18 | (uVar10 & 0xff0000) >> 8 | (uVar10 & 0xff00) << 8 |
                       uVar10 << 0x18;
              if (*(char *)(lVar5 + 0x21) != '\0') {
                FUN_00158270(param_1,uVar10,2,0);
              }
              puVar8 = puVar8 + 1;
              FUN_001581f0(param_1,uVar10);
              if (puVar1 + (ulong)(uVar9 - 1) + 3 == puVar8) break;
              lVar5 = *param_1;
            }
          }
          iVar3 = iVar3 - uVar9;
        }
LAB_001583d1:
        uVar9 = *puVar1;
        uVar9 = uVar9 >> 0x18 | (uVar9 & 0xff0000) >> 8 | (uVar9 & 0xff00) << 8 | uVar9 << 0x18;
        param_3 = uVar9;
        iVar6 = iVar3;
        if (local_48 != 0) goto LAB_00158452;
      }
      if ((param_3 == 0) || (*(int *)((long)param_1 + 0x1c) == 0)) break;
    }
    if ((iVar6 == 0) || ((int)param_1[4] != (int)lVar2)) goto LAB_00158469;
    iVar6 = param_4 - iVar6;
  }
  pcVar7 = "size";
  if (param_2 == 0) {
    pcVar7 = "overflow list length";
  }
  FUN_001580b0(param_1,"%s is %d but should be %d",pcVar7,iVar6,param_4);
LAB_00158469:
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

