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

int getPageNormal(Pager *pPager,Pgno pgno,DbPage **ppPage,int flags)

{
  int *piVar1;
  byte bVar2;
  sqlite3_pcache_page *pPage;
  PgHdr *pPVar3;
  int iVar4;
  int iVar5;
  PCache *pPVar6;
  
  if (pgno == 0) {
    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,
                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    return 0xb;
  }
  pPage = (*sqlite3Config.pcache2.xFetch)(pPager->pPCache->pCache,pgno,pPager->pPCache->eCreate & 3)
  ;
  if (pPage == (sqlite3_pcache_page *)0x0) {
    pPVar6 = pPager->pPCache;
    if (pPVar6->eCreate == '\x02') {
      iVar5 = 7;
      goto LAB_000adc9d;
    }
    iVar5 = (*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache);
    if (pPVar6->szSpill < iVar5) {
      for (pPVar3 = pPVar6->pSynced; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {
        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {
          pPVar6->pSynced = pPVar3;
          goto LAB_000adbce;
        }
      }
      pPVar3 = pPVar6->pDirtyTail;
      pPVar6->pSynced = (PgHdr *)0x0;
      for (; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {
        if (pPVar3->nRef == 0) goto LAB_000adbce;
      }
    }
    goto LAB_000adc10;
  }
LAB_000ada5a:
  pPVar3 = (PgHdr *)pPage->pExtra;
  if (pPVar3->pPage == (sqlite3_pcache_page *)0x0) {
    pPVar3 = pcacheFetchFinishWithInit(pPager->pPCache,pgno,pPage);
  }
  else {
    piVar1 = &pPager->pPCache->nRefSum;
    *piVar1 = *piVar1 + 1;
    pPVar3->nRef = pPVar3->nRef + 1;
  }
  *ppPage = pPVar3;
  if ((pPVar3->pPager != (Pager *)0x0) && ((flags & 1U) == 0)) {
    pPager->aStat[0] = pPager->aStat[0] + 1;
    return 0;
  }
  if (((int)pgno < 0) || (sqlite3PendingByte / pPager->pageSize + 1U == pgno)) {
    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,
                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    iVar5 = 0xb;
LAB_000adc6c:
    bVar2 = (byte)pPVar3->flags;
  }
  else {
    pPVar3->pPager = pPager;
    if ((pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno)) {
      if (pgno <= pPager->mxPgno) {
        if ((flags & 1U) == 0) goto LAB_000adb38;
LAB_000adada:
        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {
          (*sqlite3Hooks.xBenignBegin)();
        }
        if (pgno <= pPager->dbOrigSize) {
          sqlite3BitvecSet(pPager->pInJournal,pgno);
        }
        iVar5 = pPager->nSavepoint;
        iVar4 = 0;
        if (0 < iVar5) {
          do {
            while (pPager->aSavepoint[iVar4].nOrig < pgno) {
              iVar4 = iVar4 + 1;
              if (iVar5 <= iVar4) goto LAB_000adb16;
            }
            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);
            iVar5 = pPager->nSavepoint;
            iVar4 = iVar4 + 1;
          } while (iVar4 < iVar5);
        }
LAB_000adb16:
        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {
          (*sqlite3Hooks.xBenignEnd)();
        }
LAB_000adb38:
        memset(pPVar3->pData,0,pPager->pageSize);
        return 0;
      }
    }
    else {
      if ((flags & 1U) == 0) {
        pPager->aStat[1] = pPager->aStat[1] + 1;
        iVar5 = readDbPage(pPVar3);
        if (iVar5 == 0) {
          return 0;
        }
        goto LAB_000adc6c;
      }
      if (pgno <= pPager->mxPgno) goto LAB_000adada;
    }
    iVar5 = 0xd;
    bVar2 = (byte)pPVar3->flags;
  }
  if ((bVar2 & 2) != 0) {
    pcacheManageDirtyList(pPVar3,'\x01');
  }
  piVar1 = &pPVar3->pCache->nRefSum;
  *piVar1 = *piVar1 + -1;
  (*sqlite3Config.pcache2.xUnpin)(pPVar3->pCache->pCache,pPVar3->pPage,1);
  pPVar6 = pPager->pPCache;
LAB_000adc9d:
  if (pPVar6->nRefSum == 0) {
    pagerUnlockAndRollback(pPager);
  }
  *ppPage = (DbPage *)0x0;
  return iVar5;
LAB_000adbce:
  iVar5 = (*pPVar6->xStress)(pPVar6->pStress,pPVar3);
  if ((iVar5 != 0) && (iVar5 != 5)) {
    pPVar6 = pPager->pPCache;
    goto LAB_000adc9d;
  }
LAB_000adc10:
  pPage = (*sqlite3Config.pcache2.xFetch)(pPVar6->pCache,pgno,2);
  if (pPage == (sqlite3_pcache_page *)0x0) {
    pPVar6 = pPager->pPCache;
    iVar5 = 7;
    goto LAB_000adc9d;
  }
  goto LAB_000ada5a;
}



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

int FUN_000ada10(int param_1,uint param_2,undefined4 *param_3,uint param_4)

{
  int *piVar1;
  byte bVar2;
  int iVar3;
  int *piVar4;
  int iVar5;
  
  if (param_2 == 0) {
    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,
                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    return 0xb;
  }
  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,
                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);
  if (iVar3 == 0) {
    iVar3 = *(int *)(param_1 + 0xd0);
    if (*(char *)(iVar3 + 0x21) == '\x02') {
      iVar5 = 7;
      goto LAB_000adc9d;
    }
    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));
    if (*(int *)(iVar3 + 0x14) < iVar5) {
      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {
        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {
          *(int *)(iVar3 + 8) = iVar5;
          goto LAB_000adbce;
        }
      }
      iVar5 = *(int *)(iVar3 + 4);
      *(undefined4 *)(iVar3 + 8) = 0;
      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {
        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;
      }
    }
    goto LAB_000adc10;
  }
LAB_000ada5a:
  piVar4 = *(int **)(iVar3 + 4);
  if (*piVar4 == 0) {
    piVar4 = (int *)FUN_0004ac20();
  }
  else {
    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);
    *piVar1 = *piVar1 + 1;
    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;
  }
  *param_3 = piVar4;
  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {
    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;
    return 0;
  }
  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {
    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,
                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    iVar5 = 0xb;
LAB_000adc6c:
    bVar2 = *(byte *)(piVar4 + 7);
  }
  else {
    piVar4[5] = param_1;
    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {
      if (param_2 <= *(uint *)(param_1 + 0x98)) {
        if ((param_4 & 1) == 0) goto LAB_000adb38;
LAB_000adada:
        if (DAT_001bcdd4 != (code *)0x0) {
          (*DAT_001bcdd4)();
        }
        if (param_2 <= *(uint *)(param_1 + 0x1c)) {
          FUN_00058ab0();
        }
        iVar3 = *(int *)(param_1 + 0x60);
        iVar5 = 0;
        if (0 < iVar3) {
          do {
            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {
              iVar5 = iVar5 + 1;
              if (iVar3 <= iVar5) goto LAB_000adb16;
            }
            FUN_00058ab0();
            iVar3 = *(int *)(param_1 + 0x60);
            iVar5 = iVar5 + 1;
          } while (iVar5 < iVar3);
        }
LAB_000adb16:
        if (DAT_001bcdd8 != (code *)0x0) {
          (*DAT_001bcdd8)();
        }
LAB_000adb38:
        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));
        return 0;
      }
    }
    else {
      if ((param_4 & 1) == 0) {
        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;
        iVar5 = FUN_00098af0();
        if (iVar5 == 0) {
          return 0;
        }
        goto LAB_000adc6c;
      }
      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;
    }
    iVar5 = 0xd;
    bVar2 = *(byte *)(piVar4 + 7);
  }
  if ((bVar2 & 2) != 0) {
    FUN_0003ba40();
  }
  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;
  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);
  iVar3 = *(int *)(param_1 + 0xd0);
LAB_000adc9d:
  if (*(int *)(iVar3 + 0xc) == 0) {
    FUN_000ad9a0();
  }
  *param_3 = 0;
  return iVar5;
LAB_000adbce:
  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);
  if ((iVar5 != 0) && (iVar5 != 5)) {
    iVar3 = *(int *)(param_1 + 0xd0);
    goto LAB_000adc9d;
  }
LAB_000adc10:
  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);
  if (iVar3 == 0) {
    iVar3 = *(int *)(param_1 + 0xd0);
    iVar5 = 7;
    goto LAB_000adc9d;
  }
  goto LAB_000ada5a;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000172e0
ADD EBX,0x10d40f
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x34]
MOV ESI,dword ptr [ESP + 0x30]
TEST EBP,EBP
JZ 0x000add28
MOV EDX,dword ptr [ESI + 0xd0]
SUB ESP,0x4
MOVZX EAX,byte ptr [EDX + 0x21]
AND EAX,0x3
PUSH EAX
PUSH EBP
PUSH dword ptr [EDX + 0x2c]
CALL dword ptr [EBX + 0x644]
MOV ECX,EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000adb60
MOV EDI,dword ptr [ECX + 0x4]
MOV EAX,dword ptr [ESI + 0xd0]
MOV EDX,dword ptr [EDI]
TEST EDX,EDX
JZ 0x000add60
ADD dword ptr [EAX + 0xc],0x1
ADD word ptr [EDI + 0x1e],0x1
MOV EAX,dword ptr [ESP + 0x38]
MOV ECX,dword ptr [ESP + 0x3c]
MOV dword ptr [EAX],EDI
MOV EAX,dword ptr [EDI + 0x14]
AND ECX,0x1
TEST EAX,EAX
JZ 0x000ada95
TEST byte ptr [ESP + 0x3c],0x1
JZ 0x000adbf8
TEST EBP,EBP
JS 0x000adc40
MOV EAX,dword ptr [EBX + 0x59c]
CDQ
IDIV dword ptr [ESI + 0x94]
ADD EAX,0x1
CMP EAX,EBP
JZ 0x000adc40
MOV dword ptr [EDI + 0x14],ESI
MOV EAX,dword ptr [ESI + 0x3c]
MOV EDX,dword ptr [EAX]
TEST EDX,EDX
JZ 0x000adb28
CMP dword ptr [ESI + 0x18],EBP
JC 0x000adb28
TEST ECX,ECX
JZ 0x000add80
CMP EBP,dword ptr [ESI + 0x98]
JA 0x000adcc0
MOV EAX,dword ptr [EBX + 0x1fac]
TEST EAX,EAX
JZ 0x000adae6
CALL EAX
CMP dword ptr [ESI + 0x1c],EBP
JNC 0x000adda0
MOV EDX,dword ptr [ESI + 0x60]
XOR ECX,ECX
TEST EDX,EDX
JLE 0x000adb16
MOV EAX,dword ptr [ESI + 0x5c]
MOV dword ptr [ESP + 0xc],EAX
IMUL EAX,ECX,0x2c
ADD EAX,dword ptr [ESP + 0xc]
CMP EBP,dword ptr [EAX + 0x14]
JBE 0x000adce8
ADD ECX,0x1
CMP ECX,EDX
JL 0x000adaff
MOV EAX,dword ptr [EBX + 0x1fb0]
TEST EAX,EAX
JZ 0x000adb38
CALL EAX
JMP 0x000adb38
CMP dword ptr [ESI + 0x98],EBP
JC 0x000adcc0
TEST ECX,ECX
JNZ 0x000adada
MOV EAX,dword ptr [EDI + 0x4]
SUB ESP,0x4
PUSH dword ptr [ESI + 0x94]
PUSH 0x0
PUSH EAX
CALL 0x00015440
ADD ESP,0x10
XOR ECX,ECX
ADD ESP,0x1c
MOV EAX,ECX
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDI,dword ptr [ESI + 0xd0]
CMP byte ptr [EDI + 0x21],0x2
JZ 0x000add70
SUB ESP,0xc
PUSH dword ptr [EDI + 0x2c]
CALL dword ptr [EBX + 0x640]
ADD ESP,0x10
CMP EAX,dword ptr [EDI + 0x14]
JLE 0x000adc10
MOV EAX,dword ptr [EDI + 0x8]
TEST EAX,EAX
JZ 0x000adba8
NOP
CMP word ptr [EAX + 0x1e],0x0
JNZ 0x000adba1
TEST byte ptr [EAX + 0x1c],0x8
JZ 0x000addb0
MOV EAX,dword ptr [EAX + 0x24]
TEST EAX,EAX
JNZ 0x000adb90
MOV EAX,dword ptr [EDI + 0x4]
MOV dword ptr [EDI + 0x8],0x0
TEST EAX,EAX
JNZ 0x000adbc7
JMP 0x000adc10
MOV EAX,dword ptr [EAX + 0x24]
TEST EAX,EAX
JZ 0x000adc10
CMP word ptr [EAX + 0x1e],0x0
JNZ 0x000adbc0
SUB ESP,0x8
PUSH EAX
PUSH dword ptr [EDI + 0x28]
CALL dword ptr [EDI + 0x24]
MOV ECX,EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000adc10
CMP EAX,0x5
JZ 0x000adc10
MOV EDI,dword ptr [ESI + 0xd0]
JMP 0x000adc9d
ADD dword ptr [ESI + 0xb4],0x1
XOR ECX,ECX
ADD ESP,0x1c
MOV EAX,ECX
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH 0x2
PUSH EBP
PUSH dword ptr [EDI + 0x2c]
CALL dword ptr [EBX + 0x644]
MOV ECX,EAX
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000ada5a
MOV EDI,dword ptr [ESI + 0xd0]
MOV ECX,0x7
JMP 0x000adc9d
SUB ESP,0xc
LEA EAX,[EBX + 0xfff9c6d0]
PUSH EAX
LEA EAX,[EBX + 0xfffa1ace]
PUSH 0xdaa4
PUSH EAX
LEA EAX,[EBX + 0xfffa1a17]
PUSH EAX
PUSH 0xb
CALL 0x000770e0
ADD ESP,0x20
MOV ECX,0xb
TEST byte ptr [EDI + 0x1c],0x2
JNZ 0x000adccb
MOV EAX,dword ptr [EDI + 0xc]
MOV dword ptr [ESP + 0xc],ECX
SUB ESP,0x4
SUB dword ptr [EAX + 0xc],0x1
PUSH 0x1
PUSH dword ptr [EDI]
MOV EAX,dword ptr [EDI + 0xc]
PUSH dword ptr [EAX + 0x2c]
CALL dword ptr [EBX + 0x648]
MOV EDI,dword ptr [ESI + 0xd0]
MOV ECX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV EAX,dword ptr [EDI + 0xc]
TEST EAX,EAX
JZ 0x000add10
MOV EAX,dword ptr [ESP + 0x38]
MOV dword ptr [EAX],0x0
ADD ESP,0x1c
MOV EAX,ECX
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,0xd
TEST byte ptr [EDI + 0x1c],0x2
JZ 0x000adc72
MOV EDX,0x1
MOV EAX,EDI
MOV dword ptr [ESP + 0xc],ECX
CALL 0x0003ba40
MOV ECX,dword ptr [ESP + 0xc]
JMP 0x000adc72
MOV EAX,dword ptr [EAX + 0x10]
MOV EDX,EBP
MOV dword ptr [ESP + 0xc],ECX
CALL 0x00058ab0
MOV ECX,dword ptr [ESP + 0xc]
MOV EDX,dword ptr [ESI + 0x60]
ADD ECX,0x1
CMP EDX,ECX
JG 0x000adaf8
JMP 0x000adb16
MOV EAX,ESI
MOV dword ptr [ESP + 0xc],ECX
CALL 0x000ad9a0
MOV ECX,dword ptr [ESP + 0xc]
JMP 0x000adca4
SUB ESP,0xc
LEA EAX,[EBX + 0xfff9c6d0]
PUSH EAX
LEA EAX,[EBX + 0xfffa1ace]
PUSH 0xda84
PUSH EAX
LEA EAX,[EBX + 0xfffa1a17]
PUSH EAX
PUSH 0xb
CALL 0x000770e0
ADD ESP,0x20
MOV ECX,0xb
ADD ESP,0x1c
MOV EAX,ECX
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,EBP
CALL 0x0004ac20
MOV EDI,EAX
JMP 0x000ada76
MOV ECX,0x7
JMP 0x000adc9d
ADD dword ptr [ESI + 0xb8],0x1
MOV EAX,EDI
CALL 0x00098af0
MOV ECX,EAX
TEST EAX,EAX
JZ 0x000adc01
JMP 0x000adc6c
MOV EAX,dword ptr [ESI + 0x38]
MOV EDX,EBP
CALL 0x00058ab0
JMP 0x000adaef
MOV dword ptr [EDI + 0x8],EAX
JMP 0x000adbce
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_000ada10(int param_1,uint param_2,undefined4 *param_3,uint param_4)\n\n{\n  int *piVar1;\n  byte bVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  \n  if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);\n  if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }\n  *param_3 = piVar4;\n  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }\n  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }\n  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;\n  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);\n  iVar3 = *(int *)(param_1 + 0xd0);\nLAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }\n  *param_3 = 0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}\n\n" comment (function_definition "int FUN_000ada10(int param_1,uint param_2,undefined4 *param_3,uint param_4)\n\n{\n  int *piVar1;\n  byte bVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  \n  if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);\n  if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }\n  *param_3 = piVar4;\n  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }\n  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }\n  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;\n  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);\n  iVar3 = *(int *)(param_1 + 0xd0);\nLAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }\n  *param_3 = 0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}" primitive_type (function_declarator "FUN_000ada10(int param_1,uint param_2,undefined4 *param_3,uint param_4)" identifier (parameter_list "(int param_1,uint param_2,undefined4 *param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  byte bVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  \n  if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);\n  if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }\n  *param_3 = piVar4;\n  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }\n  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }\n  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;\n  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);\n  iVar3 = *(int *)(param_1 + 0xd0);\nLAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }\n  *param_3 = 0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }" { (expression_statement "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , number_literal , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (return_statement "return 0xb;" return number_literal ;) })) (expression_statement "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);" (assignment_expression "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3)" identifier = (call_expression "(*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3)" (parenthesized_expression "(*DAT_001bb46c)" ( (pointer_expression "*DAT_001bb46c" * identifier) )) (argument_list "(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3)" ( (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xd0) + 0x2c)" ( (binary_expression "*(int *)(param_1 + 0xd0) + 0x2c" (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) + number_literal) )))) , identifier , (binary_expression "*(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3" (pointer_expression "*(byte *)(*(int *)(param_1 + 0xd0) + 0x21)" * (cast_expression "(byte *)(*(int *)(param_1 + 0xd0) + 0x21)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xd0) + 0x21)" ( (binary_expression "*(int *)(param_1 + 0xd0) + 0x21" (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) + number_literal) )))) & number_literal) )))) ;) (if_statement "if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }" { (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" identifier = (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) ))))) ;) (if_statement "if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }" if (parenthesized_expression "(*(char *)(iVar3 + 0x21) == '\x02')" ( (binary_expression "*(char *)(iVar3 + 0x21) == '\x02'" (pointer_expression "*(char *)(iVar3 + 0x21)" * (cast_expression "(char *)(iVar3 + 0x21)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x21)" ( (binary_expression "iVar3 + 0x21" identifier + number_literal) )))) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }" { (expression_statement "iVar5 = 7;" (assignment_expression "iVar5 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_000adc9d;" goto statement_identifier ;) })) (expression_statement "iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));" (assignment_expression "iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c))" identifier = (call_expression "(*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c))" (parenthesized_expression "(*DAT_001bb468)" ( (pointer_expression "*DAT_001bb468" * identifier) )) (argument_list "(*(undefined4 *)(iVar3 + 0x2c))" ( (pointer_expression "*(undefined4 *)(iVar3 + 0x2c)" * (cast_expression "(undefined4 *)(iVar3 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x2c)" ( (binary_expression "iVar3 + 0x2c" identifier + number_literal) )))) )))) ;) (if_statement "if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }" if (parenthesized_expression "(*(int *)(iVar3 + 0x14) < iVar5)" ( (binary_expression "*(int *)(iVar3 + 0x14) < iVar5" (pointer_expression "*(int *)(iVar3 + 0x14)" * (cast_expression "(int *)(iVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }" { (for_statement "for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }" for ( (assignment_expression "iVar5 = *(int *)(iVar3 + 8)" identifier = (pointer_expression "*(int *)(iVar3 + 8)" * (cast_expression "(int *)(iVar3 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) ))))) ; (binary_expression "iVar5 != 0" identifier != number_literal) ; (assignment_expression "iVar5 = *(int *)(iVar5 + 0x24)" identifier = (pointer_expression "*(int *)(iVar5 + 0x24)" * (cast_expression "(int *)(iVar5 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x24)" ( (binary_expression "iVar5 + 0x24" identifier + number_literal) ))))) ) (compound_statement "{\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }" { (if_statement "if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }" if (parenthesized_expression "((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0))" ( (binary_expression "(*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)" (parenthesized_expression "(*(short *)(iVar5 + 0x1e) == 0)" ( (binary_expression "*(short *)(iVar5 + 0x1e) == 0" (pointer_expression "*(short *)(iVar5 + 0x1e)" * (cast_expression "(short *)(iVar5 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x1e)" ( (binary_expression "iVar5 + 0x1e" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "((*(byte *)(iVar5 + 0x1c) & 8) == 0)" ( (binary_expression "(*(byte *)(iVar5 + 0x1c) & 8) == 0" (parenthesized_expression "(*(byte *)(iVar5 + 0x1c) & 8)" ( (binary_expression "*(byte *)(iVar5 + 0x1c) & 8" (pointer_expression "*(byte *)(iVar5 + 0x1c)" * (cast_expression "(byte *)(iVar5 + 0x1c)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x1c)" ( (binary_expression "iVar5 + 0x1c" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }" { (expression_statement "*(int *)(iVar3 + 8) = iVar5;" (assignment_expression "*(int *)(iVar3 + 8) = iVar5" (pointer_expression "*(int *)(iVar3 + 8)" * (cast_expression "(int *)(iVar3 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_000adbce;" goto statement_identifier ;) })) })) (expression_statement "iVar5 = *(int *)(iVar3 + 4);" (assignment_expression "iVar5 = *(int *)(iVar3 + 4)" identifier = (pointer_expression "*(int *)(iVar3 + 4)" * (cast_expression "(int *)(iVar3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(iVar3 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 8)" * (cast_expression "(undefined4 *)(iVar3 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = number_literal) ;) (for_statement "for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }" for ( ; (binary_expression "iVar5 != 0" identifier != number_literal) ; (assignment_expression "iVar5 = *(int *)(iVar5 + 0x24)" identifier = (pointer_expression "*(int *)(iVar5 + 0x24)" * (cast_expression "(int *)(iVar5 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x24)" ( (binary_expression "iVar5 + 0x24" identifier + number_literal) ))))) ) (compound_statement "{\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }" { (if_statement "if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;" if (parenthesized_expression "(*(short *)(iVar5 + 0x1e) == 0)" ( (binary_expression "*(short *)(iVar5 + 0x1e) == 0" (pointer_expression "*(short *)(iVar5 + 0x1e)" * (cast_expression "(short *)(iVar5 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x1e)" ( (binary_expression "iVar5 + 0x1e" identifier + number_literal) )))) == number_literal) )) (goto_statement "goto LAB_000adbce;" goto statement_identifier ;)) })) })) (goto_statement "goto LAB_000adc10;" goto statement_identifier ;) })) (labeled_statement "LAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);" statement_identifier : (expression_statement "piVar4 = *(int **)(iVar3 + 4);" (assignment_expression "piVar4 = *(int **)(iVar3 + 4)" identifier = (pointer_expression "*(int **)(iVar3 + 4)" * (cast_expression "(int **)(iVar3 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) ))))) ;)) (if_statement "if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }" if (parenthesized_expression "(*piVar4 == 0)" ( (binary_expression "*piVar4 == 0" (pointer_expression "*piVar4" * identifier) == number_literal) )) (compound_statement "{\n    piVar4 = (int *)FUN_0004ac20();\n  }" { (expression_statement "piVar4 = (int *)FUN_0004ac20();" (assignment_expression "piVar4 = (int *)FUN_0004ac20()" identifier = (cast_expression "(int *)FUN_0004ac20()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0004ac20()" identifier (argument_list "()" ( ))))) ;) }) (else_clause "else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }" else (compound_statement "{\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }" { (expression_statement "piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);" (assignment_expression "piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc)" identifier = (cast_expression "(int *)(*(int *)(param_1 + 0xd0) + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xd0) + 0xc)" ( (binary_expression "*(int *)(param_1 + 0xd0) + 0xc" (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) + number_literal) )))) ;) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "*(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;" (assignment_expression "*(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1" (pointer_expression "*(short *)((int)piVar4 + 0x1e)" * (cast_expression "(short *)((int)piVar4 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar4 + 0x1e)" ( (binary_expression "(int)piVar4 + 0x1e" (cast_expression "(int)piVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "*(short *)((int)piVar4 + 0x1e) + 1" (pointer_expression "*(short *)((int)piVar4 + 0x1e)" * (cast_expression "(short *)((int)piVar4 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar4 + 0x1e)" ( (binary_expression "(int)piVar4 + 0x1e" (cast_expression "(int)piVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) + number_literal)) ;) }))) (expression_statement "*param_3 = piVar4;" (assignment_expression "*param_3 = piVar4" (pointer_expression "*param_3" * identifier) = identifier) ;) (if_statement "if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }" if (parenthesized_expression "((piVar4[5] != 0) && ((param_4 & 1) == 0))" ( (binary_expression "(piVar4[5] != 0) && ((param_4 & 1) == 0)" (parenthesized_expression "(piVar4[5] != 0)" ( (binary_expression "piVar4[5] != 0" (subscript_expression "piVar4[5]" identifier [ number_literal ]) != number_literal) )) && (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }" { (expression_statement "*(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;" (assignment_expression "*(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1" (pointer_expression "*(int *)(param_1 + 0xb4)" * (cast_expression "(int *)(param_1 + 0xb4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0xb4) + 1" (pointer_expression "*(int *)(param_1 + 0xb4)" * (cast_expression "(int *)(param_1 + 0xb4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) + number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" if (parenthesized_expression "(((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2))" ( (binary_expression "((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)" (parenthesized_expression "((int)param_2 < 0)" ( (binary_expression "(int)param_2 < 0" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "(DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)" ( (binary_expression "DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2" (binary_expression "DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U" (binary_expression "DAT_001bb3c4 / *(int *)(param_1 + 0x94)" identifier / (pointer_expression "*(int *)(param_1 + 0x94)" * (cast_expression "(int *)(param_1 + 0x94)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) ))))) + number_literal) == identifier) ))) )) (compound_statement "{\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" { (expression_statement "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , number_literal , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (expression_statement "iVar5 = 0xb;" (assignment_expression "iVar5 = 0xb" identifier = number_literal) ;) (labeled_statement "LAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);" statement_identifier : (expression_statement "bVar2 = *(byte *)(piVar4 + 7);" (assignment_expression "bVar2 = *(byte *)(piVar4 + 7)" identifier = (pointer_expression "*(byte *)(piVar4 + 7)" * (cast_expression "(byte *)(piVar4 + 7)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 7)" ( (binary_expression "piVar4 + 7" identifier + number_literal) ))))) ;)) }) (else_clause "else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" else (compound_statement "{\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" { (expression_statement "piVar4[5] = param_1;" (assignment_expression "piVar4[5] = param_1" (subscript_expression "piVar4[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }" if (parenthesized_expression "((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2))" ( (binary_expression "(**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)" (parenthesized_expression "(**(int **)(param_1 + 0x3c) == 0)" ( (binary_expression "**(int **)(param_1 + 0x3c) == 0" (pointer_expression "**(int **)(param_1 + 0x3c)" * (pointer_expression "*(int **)(param_1 + 0x3c)" * (cast_expression "(int **)(param_1 + 0x3c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))))) == number_literal) )) || (parenthesized_expression "(*(uint *)(param_1 + 0x18) < param_2)" ( (binary_expression "*(uint *)(param_1 + 0x18) < param_2" (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) < identifier) ))) )) (compound_statement "{\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }" { (if_statement "if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }" if (parenthesized_expression "(param_2 <= *(uint *)(param_1 + 0x98))" ( (binary_expression "param_2 <= *(uint *)(param_1 + 0x98)" identifier <= (pointer_expression "*(uint *)(param_1 + 0x98)" * (cast_expression "(uint *)(param_1 + 0x98)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) ))))) )) (compound_statement "{\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }" { (if_statement "if ((param_4 & 1) == 0) goto LAB_000adb38;" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_000adb38;" goto statement_identifier ;)) (labeled_statement "LAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }" statement_identifier : (if_statement "if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }" if (parenthesized_expression "(DAT_001bcdd4 != (code *)0x0)" ( (binary_expression "DAT_001bcdd4 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          (*DAT_001bcdd4)();\n        }" { (expression_statement "(*DAT_001bcdd4)();" (call_expression "(*DAT_001bcdd4)()" (parenthesized_expression "(*DAT_001bcdd4)" ( (pointer_expression "*DAT_001bcdd4" * identifier) )) (argument_list "()" ( ))) ;) }))) (if_statement "if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }" if (parenthesized_expression "(param_2 <= *(uint *)(param_1 + 0x1c))" ( (binary_expression "param_2 <= *(uint *)(param_1 + 0x1c)" identifier <= (pointer_expression "*(uint *)(param_1 + 0x1c)" * (cast_expression "(uint *)(param_1 + 0x1c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) )) (compound_statement "{\n          FUN_00058ab0();\n        }" { (expression_statement "FUN_00058ab0();" (call_expression "FUN_00058ab0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar3 = *(int *)(param_1 + 0x60);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x60)" identifier = (pointer_expression "*(int *)(param_1 + 0x60)" * (cast_expression "(int *)(param_1 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (if_statement "if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }" if (parenthesized_expression "(0 < iVar3)" ( (binary_expression "0 < iVar3" number_literal < identifier) )) (compound_statement "{\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }" { (do_statement "do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);" do (compound_statement "{\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          }" { (while_statement "while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }" while (parenthesized_expression "(*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2)" ( (binary_expression "*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2" (pointer_expression "*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14)" * (cast_expression "(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14)" ( (binary_expression "iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14" (binary_expression "iVar5 * 0x2c + *(int *)(param_1 + 0x5c)" (binary_expression "iVar5 * 0x2c" identifier * number_literal) + (pointer_expression "*(int *)(param_1 + 0x5c)" * (cast_expression "(int *)(param_1 + 0x5c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) ))))) + number_literal) )))) < identifier) )) (compound_statement "{\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 <= iVar5) goto LAB_000adb16;" if (parenthesized_expression "(iVar3 <= iVar5)" ( (binary_expression "iVar3 <= iVar5" identifier <= identifier) )) (goto_statement "goto LAB_000adb16;" goto statement_identifier ;)) })) (expression_statement "FUN_00058ab0();" (call_expression "FUN_00058ab0()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x60);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x60)" identifier = (pointer_expression "*(int *)(param_1 + 0x60)" * (cast_expression "(int *)(param_1 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 < iVar3)" ( (binary_expression "iVar5 < iVar3" identifier < identifier) )) ;) })) (labeled_statement "LAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }" statement_identifier : (if_statement "if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }" if (parenthesized_expression "(DAT_001bcdd8 != (code *)0x0)" ( (binary_expression "DAT_001bcdd8 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          (*DAT_001bcdd8)();\n        }" { (expression_statement "(*DAT_001bcdd8)();" (call_expression "(*DAT_001bcdd8)()" (parenthesized_expression "(*DAT_001bcdd8)" ( (pointer_expression "*DAT_001bcdd8" * identifier) )) (argument_list "()" ( ))) ;) }))) (labeled_statement "LAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));" statement_identifier : (expression_statement "memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));" (call_expression "memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94))" identifier (argument_list "((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94))" ( (cast_expression "(void *)piVar4[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar4[1]" identifier [ number_literal ])) , number_literal , (pointer_expression "*(size_t *)(param_1 + 0x94)" * (cast_expression "(size_t *)(param_1 + 0x94)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) )))) ))) ;)) (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }" else (compound_statement "{\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }" { (if_statement "if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }" { (expression_statement "*(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;" (assignment_expression "*(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1" (pointer_expression "*(int *)(param_1 + 0xb8)" * (cast_expression "(int *)(param_1 + 0xb8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb8)" ( (binary_expression "param_1 + 0xb8" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0xb8) + 1" (pointer_expression "*(int *)(param_1 + 0xb8)" * (cast_expression "(int *)(param_1 + 0xb8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb8)" ( (binary_expression "param_1 + 0xb8" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "iVar5 = FUN_00098af0();" (assignment_expression "iVar5 = FUN_00098af0()" identifier = (call_expression "FUN_00098af0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar5 == 0) {\n          return 0;\n        }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (goto_statement "goto LAB_000adc6c;" goto statement_identifier ;) })) (if_statement "if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;" if (parenthesized_expression "(param_2 <= *(uint *)(param_1 + 0x98))" ( (binary_expression "param_2 <= *(uint *)(param_1 + 0x98)" identifier <= (pointer_expression "*(uint *)(param_1 + 0x98)" * (cast_expression "(uint *)(param_1 + 0x98)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) ))))) )) (goto_statement "goto LAB_000adada;" goto statement_identifier ;)) }))) (expression_statement "iVar5 = 0xd;" (assignment_expression "iVar5 = 0xd" identifier = number_literal) ;) (expression_statement "bVar2 = *(byte *)(piVar4 + 7);" (assignment_expression "bVar2 = *(byte *)(piVar4 + 7)" identifier = (pointer_expression "*(byte *)(piVar4 + 7)" * (cast_expression "(byte *)(piVar4 + 7)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 7)" ( (binary_expression "piVar4 + 7" identifier + number_literal) ))))) ;) }))) (if_statement "if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }" if (parenthesized_expression "((bVar2 & 2) != 0)" ( (binary_expression "(bVar2 & 2) != 0" (parenthesized_expression "(bVar2 & 2)" ( (binary_expression "bVar2 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0003ba40();\n  }" { (expression_statement "FUN_0003ba40();" (call_expression "FUN_0003ba40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;" (assignment_expression "*(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1" (pointer_expression "*(int *)(piVar4[3] + 0xc)" * (cast_expression "(int *)(piVar4[3] + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[3] + 0xc)" ( (binary_expression "piVar4[3] + 0xc" (subscript_expression "piVar4[3]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "*(int *)(piVar4[3] + 0xc) + -1" (pointer_expression "*(int *)(piVar4[3] + 0xc)" * (cast_expression "(int *)(piVar4[3] + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[3] + 0xc)" ( (binary_expression "piVar4[3] + 0xc" (subscript_expression "piVar4[3]" identifier [ number_literal ]) + number_literal) )))) + number_literal)) ;) (expression_statement "(*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);" (call_expression "(*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1)" (parenthesized_expression "(*DAT_001bb470)" ( (pointer_expression "*DAT_001bb470" * identifier) )) (argument_list "(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1)" ( (pointer_expression "*(undefined4 *)(piVar4[3] + 0x2c)" * (cast_expression "(undefined4 *)(piVar4[3] + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[3] + 0x2c)" ( (binary_expression "piVar4[3] + 0x2c" (subscript_expression "piVar4[3]" identifier [ number_literal ]) + number_literal) )))) , (pointer_expression "*piVar4" * identifier) , number_literal ))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" identifier = (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) ))))) ;) (labeled_statement "LAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }" statement_identifier : (if_statement "if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }" if (parenthesized_expression "(*(int *)(iVar3 + 0xc) == 0)" ( (binary_expression "*(int *)(iVar3 + 0xc) == 0" (pointer_expression "*(int *)(iVar3 + 0xc)" * (cast_expression "(int *)(iVar3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    FUN_000ad9a0();\n  }" { (expression_statement "FUN_000ad9a0();" (call_expression "FUN_000ad9a0()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (return_statement "return iVar5;" return identifier ;) (labeled_statement "LAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);" statement_identifier : (expression_statement "iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);" (assignment_expression "iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5)" identifier = (call_expression "(**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5)" (parenthesized_expression "(**(code **)(iVar3 + 0x24))" ( (pointer_expression "**(code **)(iVar3 + 0x24)" * (pointer_expression "*(code **)(iVar3 + 0x24)" * (cast_expression "(code **)(iVar3 + 0x24)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x24)" ( (binary_expression "iVar3 + 0x24" identifier + number_literal) ))))) )) (argument_list "(*(undefined4 *)(iVar3 + 0x28),iVar5)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0x28)" * (cast_expression "(undefined4 *)(iVar3 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x28)" ( (binary_expression "iVar3 + 0x28" identifier + number_literal) )))) , identifier )))) ;)) (if_statement "if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }" if (parenthesized_expression "((iVar5 != 0) && (iVar5 != 5))" ( (binary_expression "(iVar5 != 0) && (iVar5 != 5)" (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar5 != 5)" ( (binary_expression "iVar5 != 5" identifier != number_literal) ))) )) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }" { (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" identifier = (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000adc9d;" goto statement_identifier ;) })) (labeled_statement "LAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);" statement_identifier : (expression_statement "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);" (assignment_expression "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2)" identifier = (call_expression "(*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2)" (parenthesized_expression "(*DAT_001bb46c)" ( (pointer_expression "*DAT_001bb46c" * identifier) )) (argument_list "(*(undefined4 *)(iVar3 + 0x2c),param_2,2)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0x2c)" * (cast_expression "(undefined4 *)(iVar3 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x2c)" ( (binary_expression "iVar3 + 0x2c" identifier + number_literal) )))) , identifier , number_literal )))) ;)) (if_statement "if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }" { (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" identifier = (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = 7;" (assignment_expression "iVar5 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_000adc9d;" goto statement_identifier ;) })) (goto_statement "goto LAB_000ada5a;" goto statement_identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint getPageNormal(Pager *pPager,Pgno pgno,DbPage **ppPage,int flags)\n\n{\n  int *piVar1;\n  byte bVar2;\n  sqlite3_pcache_page *pPage;\n  PgHdr *pPVar3;\n  int iVar4;\n  int iVar5;\n  PCache *pPVar6;\n  \n  if (pgno == 0) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  pPage = (*sqlite3Config.pcache2.xFetch)(pPager->pPCache->pCache,pgno,pPager->pPCache->eCreate & 3)\n  ;\n  if (pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar6 = pPager->pPCache;\n    if (pPVar6->eCreate == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache);\n    if (pPVar6->szSpill < iVar5) {\n      for (pPVar3 = pPVar6->pSynced; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }\n      }\n      pPVar3 = pPVar6->pDirtyTail;\n      pPVar6->pSynced = (PgHdr *)0x0;\n      for (; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if (pPVar3->nRef == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  pPVar3 = (PgHdr *)pPage->pExtra;\n  if (pPVar3->pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar3 = pcacheFetchFinishWithInit(pPager->pPCache,pgno,pPage);\n  }\n  else {\n    piVar1 = &pPager->pPCache->nRefSum;\n    *piVar1 = *piVar1 + 1;\n    pPVar3->nRef = pPVar3->nRef + 1;\n  }\n  *ppPage = pPVar3;\n  if ((pPVar3->pPager != (Pager *)0x0) && ((flags & 1U) == 0)) {\n    pPager->aStat[0] = pPager->aStat[0] + 1;\n    return 0;\n  }\n  if (((int)pgno < 0) || (sqlite3PendingByte / pPager->pageSize + 1U == pgno)) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = (byte)pPVar3->flags;\n  }\n  else {\n    pPVar3->pPager = pPager;\n    if ((pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno)) {\n      if (pgno <= pPager->mxPgno) {\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }\n    }\n    else {\n      if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (pgno <= pPager->mxPgno) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = (byte)pPVar3->flags;\n  }\n  if ((bVar2 & 2) != 0) {\n    pcacheManageDirtyList(pPVar3,'\x01');\n  }\n  piVar1 = &pPVar3->pCache->nRefSum;\n  *piVar1 = *piVar1 + -1;\n  (*sqlite3Config.pcache2.xUnpin)(pPVar3->pCache->pCache,pPVar3->pPage,1);\n  pPVar6 = pPager->pPCache;\nLAB_000adc9d:\n  if (pPVar6->nRefSum == 0) {\n    pagerUnlockAndRollback(pPager);\n  }\n  *ppPage = (DbPage *)0x0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (*pPVar6->xStress)(pPVar6->pStress,pPVar3);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    pPVar6 = pPager->pPCache;\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  pPage = (*sqlite3Config.pcache2.xFetch)(pPVar6->pCache,pgno,2);\n  if (pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar6 = pPager->pPCache;\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}\n\n" comment comment (function_definition "int getPageNormal(Pager *pPager,Pgno pgno,DbPage **ppPage,int flags)\n\n{\n  int *piVar1;\n  byte bVar2;\n  sqlite3_pcache_page *pPage;\n  PgHdr *pPVar3;\n  int iVar4;\n  int iVar5;\n  PCache *pPVar6;\n  \n  if (pgno == 0) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  pPage = (*sqlite3Config.pcache2.xFetch)(pPager->pPCache->pCache,pgno,pPager->pPCache->eCreate & 3)\n  ;\n  if (pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar6 = pPager->pPCache;\n    if (pPVar6->eCreate == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache);\n    if (pPVar6->szSpill < iVar5) {\n      for (pPVar3 = pPVar6->pSynced; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }\n      }\n      pPVar3 = pPVar6->pDirtyTail;\n      pPVar6->pSynced = (PgHdr *)0x0;\n      for (; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if (pPVar3->nRef == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  pPVar3 = (PgHdr *)pPage->pExtra;\n  if (pPVar3->pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar3 = pcacheFetchFinishWithInit(pPager->pPCache,pgno,pPage);\n  }\n  else {\n    piVar1 = &pPager->pPCache->nRefSum;\n    *piVar1 = *piVar1 + 1;\n    pPVar3->nRef = pPVar3->nRef + 1;\n  }\n  *ppPage = pPVar3;\n  if ((pPVar3->pPager != (Pager *)0x0) && ((flags & 1U) == 0)) {\n    pPager->aStat[0] = pPager->aStat[0] + 1;\n    return 0;\n  }\n  if (((int)pgno < 0) || (sqlite3PendingByte / pPager->pageSize + 1U == pgno)) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = (byte)pPVar3->flags;\n  }\n  else {\n    pPVar3->pPager = pPager;\n    if ((pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno)) {\n      if (pgno <= pPager->mxPgno) {\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }\n    }\n    else {\n      if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (pgno <= pPager->mxPgno) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = (byte)pPVar3->flags;\n  }\n  if ((bVar2 & 2) != 0) {\n    pcacheManageDirtyList(pPVar3,'\x01');\n  }\n  piVar1 = &pPVar3->pCache->nRefSum;\n  *piVar1 = *piVar1 + -1;\n  (*sqlite3Config.pcache2.xUnpin)(pPVar3->pCache->pCache,pPVar3->pPage,1);\n  pPVar6 = pPager->pPCache;\nLAB_000adc9d:\n  if (pPVar6->nRefSum == 0) {\n    pagerUnlockAndRollback(pPager);\n  }\n  *ppPage = (DbPage *)0x0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (*pPVar6->xStress)(pPVar6->pStress,pPVar3);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    pPVar6 = pPager->pPCache;\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  pPage = (*sqlite3Config.pcache2.xFetch)(pPVar6->pCache,pgno,2);\n  if (pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar6 = pPager->pPCache;\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}" primitive_type (function_declarator "getPageNormal(Pager *pPager,Pgno pgno,DbPage **ppPage,int flags)" identifier (parameter_list "(Pager *pPager,Pgno pgno,DbPage **ppPage,int flags)" ( (parameter_declaration "Pager *pPager" type_identifier (pointer_declarator "*pPager" * identifier)) , (parameter_declaration "Pgno pgno" type_identifier identifier) , (parameter_declaration "DbPage **ppPage" type_identifier (pointer_declarator "**ppPage" * (pointer_declarator "*ppPage" * identifier))) , (parameter_declaration "int flags" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  byte bVar2;\n  sqlite3_pcache_page *pPage;\n  PgHdr *pPVar3;\n  int iVar4;\n  int iVar5;\n  PCache *pPVar6;\n  \n  if (pgno == 0) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  pPage = (*sqlite3Config.pcache2.xFetch)(pPager->pPCache->pCache,pgno,pPager->pPCache->eCreate & 3)\n  ;\n  if (pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar6 = pPager->pPCache;\n    if (pPVar6->eCreate == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache);\n    if (pPVar6->szSpill < iVar5) {\n      for (pPVar3 = pPVar6->pSynced; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }\n      }\n      pPVar3 = pPVar6->pDirtyTail;\n      pPVar6->pSynced = (PgHdr *)0x0;\n      for (; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if (pPVar3->nRef == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  pPVar3 = (PgHdr *)pPage->pExtra;\n  if (pPVar3->pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar3 = pcacheFetchFinishWithInit(pPager->pPCache,pgno,pPage);\n  }\n  else {\n    piVar1 = &pPager->pPCache->nRefSum;\n    *piVar1 = *piVar1 + 1;\n    pPVar3->nRef = pPVar3->nRef + 1;\n  }\n  *ppPage = pPVar3;\n  if ((pPVar3->pPager != (Pager *)0x0) && ((flags & 1U) == 0)) {\n    pPager->aStat[0] = pPager->aStat[0] + 1;\n    return 0;\n  }\n  if (((int)pgno < 0) || (sqlite3PendingByte / pPager->pageSize + 1U == pgno)) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = (byte)pPVar3->flags;\n  }\n  else {\n    pPVar3->pPager = pPager;\n    if ((pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno)) {\n      if (pgno <= pPager->mxPgno) {\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }\n    }\n    else {\n      if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (pgno <= pPager->mxPgno) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = (byte)pPVar3->flags;\n  }\n  if ((bVar2 & 2) != 0) {\n    pcacheManageDirtyList(pPVar3,'\x01');\n  }\n  piVar1 = &pPVar3->pCache->nRefSum;\n  *piVar1 = *piVar1 + -1;\n  (*sqlite3Config.pcache2.xUnpin)(pPVar3->pCache->pCache,pPVar3->pPage,1);\n  pPVar6 = pPager->pPCache;\nLAB_000adc9d:\n  if (pPVar6->nRefSum == 0) {\n    pagerUnlockAndRollback(pPager);\n  }\n  *ppPage = (DbPage *)0x0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (*pPVar6->xStress)(pPVar6->pStress,pPVar3);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    pPVar6 = pPager->pPCache;\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  pPage = (*sqlite3Config.pcache2.xFetch)(pPVar6->pCache,pgno,2);\n  if (pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar6 = pPager->pPCache;\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "sqlite3_pcache_page *pPage;" type_identifier (pointer_declarator "*pPage" * identifier) ;) (declaration "PgHdr *pPVar3;" type_identifier (pointer_declarator "*pPVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "PCache *pPVar6;" type_identifier (pointer_declarator "*pPVar6" * identifier) ;) (if_statement "if (pgno == 0) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }" if (parenthesized_expression "(pgno == 0)" ( (binary_expression "pgno == 0" identifier == number_literal) )) (compound_statement "{\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }" { (expression_statement "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , number_literal , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (return_statement "return 0xb;" return number_literal ;) })) (expression_statement "pPage = (*sqlite3Config.pcache2.xFetch)(pPager->pPCache->pCache,pgno,pPager->pPCache->eCreate & 3)\n  ;" (assignment_expression "pPage = (*sqlite3Config.pcache2.xFetch)(pPager->pPCache->pCache,pgno,pPager->pPCache->eCreate & 3)" identifier = (call_expression "(*sqlite3Config.pcache2.xFetch)(pPager->pPCache->pCache,pgno,pPager->pPCache->eCreate & 3)" (parenthesized_expression "(*sqlite3Config.pcache2.xFetch)" ( (pointer_expression "*sqlite3Config.pcache2.xFetch" * (field_expression "sqlite3Config.pcache2.xFetch" (field_expression "sqlite3Config.pcache2" identifier . field_identifier) . field_identifier)) )) (argument_list "(pPager->pPCache->pCache,pgno,pPager->pPCache->eCreate & 3)" ( (field_expression "pPager->pPCache->pCache" (field_expression "pPager->pPCache" identifier -> field_identifier) -> field_identifier) , identifier , (binary_expression "pPager->pPCache->eCreate & 3" (field_expression "pPager->pPCache->eCreate" (field_expression "pPager->pPCache" identifier -> field_identifier) -> field_identifier) & number_literal) )))) ;) (if_statement "if (pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar6 = pPager->pPCache;\n    if (pPVar6->eCreate == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache);\n    if (pPVar6->szSpill < iVar5) {\n      for (pPVar3 = pPVar6->pSynced; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }\n      }\n      pPVar3 = pPVar6->pDirtyTail;\n      pPVar6->pSynced = (PgHdr *)0x0;\n      for (; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if (pPVar3->nRef == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }" if (parenthesized_expression "(pPage == (sqlite3_pcache_page *)0x0)" ( (binary_expression "pPage == (sqlite3_pcache_page *)0x0" identifier == (cast_expression "(sqlite3_pcache_page *)0x0" ( (type_descriptor "sqlite3_pcache_page *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pPVar6 = pPager->pPCache;\n    if (pPVar6->eCreate == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache);\n    if (pPVar6->szSpill < iVar5) {\n      for (pPVar3 = pPVar6->pSynced; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }\n      }\n      pPVar3 = pPVar6->pDirtyTail;\n      pPVar6->pSynced = (PgHdr *)0x0;\n      for (; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if (pPVar3->nRef == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }" { (expression_statement "pPVar6 = pPager->pPCache;" (assignment_expression "pPVar6 = pPager->pPCache" identifier = (field_expression "pPager->pPCache" identifier -> field_identifier)) ;) (if_statement "if (pPVar6->eCreate == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }" if (parenthesized_expression "(pPVar6->eCreate == '\x02')" ( (binary_expression "pPVar6->eCreate == '\x02'" (field_expression "pPVar6->eCreate" identifier -> field_identifier) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }" { (expression_statement "iVar5 = 7;" (assignment_expression "iVar5 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_000adc9d;" goto statement_identifier ;) })) (expression_statement "iVar5 = (*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache);" (assignment_expression "iVar5 = (*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache)" identifier = (call_expression "(*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache)" (parenthesized_expression "(*sqlite3Config.pcache2.xPagecount)" ( (pointer_expression "*sqlite3Config.pcache2.xPagecount" * (field_expression "sqlite3Config.pcache2.xPagecount" (field_expression "sqlite3Config.pcache2" identifier . field_identifier) . field_identifier)) )) (argument_list "(pPVar6->pCache)" ( (field_expression "pPVar6->pCache" identifier -> field_identifier) )))) ;) (if_statement "if (pPVar6->szSpill < iVar5) {\n      for (pPVar3 = pPVar6->pSynced; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }\n      }\n      pPVar3 = pPVar6->pDirtyTail;\n      pPVar6->pSynced = (PgHdr *)0x0;\n      for (; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if (pPVar3->nRef == 0) goto LAB_000adbce;\n      }\n    }" if (parenthesized_expression "(pPVar6->szSpill < iVar5)" ( (binary_expression "pPVar6->szSpill < iVar5" (field_expression "pPVar6->szSpill" identifier -> field_identifier) < identifier) )) (compound_statement "{\n      for (pPVar3 = pPVar6->pSynced; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }\n      }\n      pPVar3 = pPVar6->pDirtyTail;\n      pPVar6->pSynced = (PgHdr *)0x0;\n      for (; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if (pPVar3->nRef == 0) goto LAB_000adbce;\n      }\n    }" { (for_statement "for (pPVar3 = pPVar6->pSynced; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }\n      }" for ( (assignment_expression "pPVar3 = pPVar6->pSynced" identifier = (field_expression "pPVar6->pSynced" identifier -> field_identifier)) ; (binary_expression "pPVar3 != (PgHdr *)0x0" identifier != (cast_expression "(PgHdr *)0x0" ( (type_descriptor "PgHdr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "pPVar3 = pPVar3->pDirtyPrev" identifier = (field_expression "pPVar3->pDirtyPrev" identifier -> field_identifier)) ) (compound_statement "{\n        if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }\n      }" { (if_statement "if ((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)) {\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }" if (parenthesized_expression "((pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0))" ( (binary_expression "(pPVar3->nRef == 0) && ((pPVar3->flags & 8) == 0)" (parenthesized_expression "(pPVar3->nRef == 0)" ( (binary_expression "pPVar3->nRef == 0" (field_expression "pPVar3->nRef" identifier -> field_identifier) == number_literal) )) && (parenthesized_expression "((pPVar3->flags & 8) == 0)" ( (binary_expression "(pPVar3->flags & 8) == 0" (parenthesized_expression "(pPVar3->flags & 8)" ( (binary_expression "pPVar3->flags & 8" (field_expression "pPVar3->flags" identifier -> field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n          pPVar6->pSynced = pPVar3;\n          goto LAB_000adbce;\n        }" { (expression_statement "pPVar6->pSynced = pPVar3;" (assignment_expression "pPVar6->pSynced = pPVar3" (field_expression "pPVar6->pSynced" identifier -> field_identifier) = identifier) ;) (goto_statement "goto LAB_000adbce;" goto statement_identifier ;) })) })) (expression_statement "pPVar3 = pPVar6->pDirtyTail;" (assignment_expression "pPVar3 = pPVar6->pDirtyTail" identifier = (field_expression "pPVar6->pDirtyTail" identifier -> field_identifier)) ;) (expression_statement "pPVar6->pSynced = (PgHdr *)0x0;" (assignment_expression "pPVar6->pSynced = (PgHdr *)0x0" (field_expression "pPVar6->pSynced" identifier -> field_identifier) = (cast_expression "(PgHdr *)0x0" ( (type_descriptor "PgHdr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (for_statement "for (; pPVar3 != (PgHdr *)0x0; pPVar3 = pPVar3->pDirtyPrev) {\n        if (pPVar3->nRef == 0) goto LAB_000adbce;\n      }" for ( ; (binary_expression "pPVar3 != (PgHdr *)0x0" identifier != (cast_expression "(PgHdr *)0x0" ( (type_descriptor "PgHdr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "pPVar3 = pPVar3->pDirtyPrev" identifier = (field_expression "pPVar3->pDirtyPrev" identifier -> field_identifier)) ) (compound_statement "{\n        if (pPVar3->nRef == 0) goto LAB_000adbce;\n      }" { (if_statement "if (pPVar3->nRef == 0) goto LAB_000adbce;" if (parenthesized_expression "(pPVar3->nRef == 0)" ( (binary_expression "pPVar3->nRef == 0" (field_expression "pPVar3->nRef" identifier -> field_identifier) == number_literal) )) (goto_statement "goto LAB_000adbce;" goto statement_identifier ;)) })) })) (goto_statement "goto LAB_000adc10;" goto statement_identifier ;) })) (labeled_statement "LAB_000ada5a:\n  pPVar3 = (PgHdr *)pPage->pExtra;" statement_identifier : (expression_statement "pPVar3 = (PgHdr *)pPage->pExtra;" (assignment_expression "pPVar3 = (PgHdr *)pPage->pExtra" identifier = (cast_expression "(PgHdr *)pPage->pExtra" ( (type_descriptor "PgHdr *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pPage->pExtra" identifier -> field_identifier))) ;)) (if_statement "if (pPVar3->pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar3 = pcacheFetchFinishWithInit(pPager->pPCache,pgno,pPage);\n  }\n  else {\n    piVar1 = &pPager->pPCache->nRefSum;\n    *piVar1 = *piVar1 + 1;\n    pPVar3->nRef = pPVar3->nRef + 1;\n  }" if (parenthesized_expression "(pPVar3->pPage == (sqlite3_pcache_page *)0x0)" ( (binary_expression "pPVar3->pPage == (sqlite3_pcache_page *)0x0" (field_expression "pPVar3->pPage" identifier -> field_identifier) == (cast_expression "(sqlite3_pcache_page *)0x0" ( (type_descriptor "sqlite3_pcache_page *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pPVar3 = pcacheFetchFinishWithInit(pPager->pPCache,pgno,pPage);\n  }" { (expression_statement "pPVar3 = pcacheFetchFinishWithInit(pPager->pPCache,pgno,pPage);" (assignment_expression "pPVar3 = pcacheFetchFinishWithInit(pPager->pPCache,pgno,pPage)" identifier = (call_expression "pcacheFetchFinishWithInit(pPager->pPCache,pgno,pPage)" identifier (argument_list "(pPager->pPCache,pgno,pPage)" ( (field_expression "pPager->pPCache" identifier -> field_identifier) , identifier , identifier )))) ;) }) (else_clause "else {\n    piVar1 = &pPager->pPCache->nRefSum;\n    *piVar1 = *piVar1 + 1;\n    pPVar3->nRef = pPVar3->nRef + 1;\n  }" else (compound_statement "{\n    piVar1 = &pPager->pPCache->nRefSum;\n    *piVar1 = *piVar1 + 1;\n    pPVar3->nRef = pPVar3->nRef + 1;\n  }" { (expression_statement "piVar1 = &pPager->pPCache->nRefSum;" (assignment_expression "piVar1 = &pPager->pPCache->nRefSum" identifier = (pointer_expression "&pPager->pPCache->nRefSum" & (field_expression "pPager->pPCache->nRefSum" (field_expression "pPager->pPCache" identifier -> field_identifier) -> field_identifier))) ;) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "pPVar3->nRef = pPVar3->nRef + 1;" (assignment_expression "pPVar3->nRef = pPVar3->nRef + 1" (field_expression "pPVar3->nRef" identifier -> field_identifier) = (binary_expression "pPVar3->nRef + 1" (field_expression "pPVar3->nRef" identifier -> field_identifier) + number_literal)) ;) }))) (expression_statement "*ppPage = pPVar3;" (assignment_expression "*ppPage = pPVar3" (pointer_expression "*ppPage" * identifier) = identifier) ;) (if_statement "if ((pPVar3->pPager != (Pager *)0x0) && ((flags & 1U) == 0)) {\n    pPager->aStat[0] = pPager->aStat[0] + 1;\n    return 0;\n  }" if (parenthesized_expression "((pPVar3->pPager != (Pager *)0x0) && ((flags & 1U) == 0))" ( (binary_expression "(pPVar3->pPager != (Pager *)0x0) && ((flags & 1U) == 0)" (parenthesized_expression "(pPVar3->pPager != (Pager *)0x0)" ( (binary_expression "pPVar3->pPager != (Pager *)0x0" (field_expression "pPVar3->pPager" identifier -> field_identifier) != (cast_expression "(Pager *)0x0" ( (type_descriptor "Pager *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "((flags & 1U) == 0)" ( (binary_expression "(flags & 1U) == 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    pPager->aStat[0] = pPager->aStat[0] + 1;\n    return 0;\n  }" { (expression_statement "pPager->aStat[0] = pPager->aStat[0] + 1;" (assignment_expression "pPager->aStat[0] = pPager->aStat[0] + 1" (subscript_expression "pPager->aStat[0]" (field_expression "pPager->aStat" identifier -> field_identifier) [ number_literal ]) = (binary_expression "pPager->aStat[0] + 1" (subscript_expression "pPager->aStat[0]" (field_expression "pPager->aStat" identifier -> field_identifier) [ number_literal ]) + number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (((int)pgno < 0) || (sqlite3PendingByte / pPager->pageSize + 1U == pgno)) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = (byte)pPVar3->flags;\n  }\n  else {\n    pPVar3->pPager = pPager;\n    if ((pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno)) {\n      if (pgno <= pPager->mxPgno) {\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }\n    }\n    else {\n      if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (pgno <= pPager->mxPgno) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = (byte)pPVar3->flags;\n  }" if (parenthesized_expression "(((int)pgno < 0) || (sqlite3PendingByte / pPager->pageSize + 1U == pgno))" ( (binary_expression "((int)pgno < 0) || (sqlite3PendingByte / pPager->pageSize + 1U == pgno)" (parenthesized_expression "((int)pgno < 0)" ( (binary_expression "(int)pgno < 0" (cast_expression "(int)pgno" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "(sqlite3PendingByte / pPager->pageSize + 1U == pgno)" ( (binary_expression "sqlite3PendingByte / pPager->pageSize + 1U == pgno" (binary_expression "sqlite3PendingByte / pPager->pageSize + 1U" (binary_expression "sqlite3PendingByte / pPager->pageSize" identifier / (field_expression "pPager->pageSize" identifier -> field_identifier)) + number_literal) == identifier) ))) )) (compound_statement "{\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = (byte)pPVar3->flags;\n  }" { (expression_statement "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , number_literal , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (expression_statement "iVar5 = 0xb;" (assignment_expression "iVar5 = 0xb" identifier = number_literal) ;) (labeled_statement "LAB_000adc6c:\n    bVar2 = (byte)pPVar3->flags;" statement_identifier : (expression_statement "bVar2 = (byte)pPVar3->flags;" (assignment_expression "bVar2 = (byte)pPVar3->flags" identifier = (cast_expression "(byte)pPVar3->flags" ( (type_descriptor "byte" type_identifier) ) (field_expression "pPVar3->flags" identifier -> field_identifier))) ;)) }) (else_clause "else {\n    pPVar3->pPager = pPager;\n    if ((pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno)) {\n      if (pgno <= pPager->mxPgno) {\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }\n    }\n    else {\n      if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (pgno <= pPager->mxPgno) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = (byte)pPVar3->flags;\n  }" else (compound_statement "{\n    pPVar3->pPager = pPager;\n    if ((pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno)) {\n      if (pgno <= pPager->mxPgno) {\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }\n    }\n    else {\n      if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (pgno <= pPager->mxPgno) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = (byte)pPVar3->flags;\n  }" { (expression_statement "pPVar3->pPager = pPager;" (assignment_expression "pPVar3->pPager = pPager" (field_expression "pPVar3->pPager" identifier -> field_identifier) = identifier) ;) (if_statement "if ((pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno)) {\n      if (pgno <= pPager->mxPgno) {\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }\n    }\n    else {\n      if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (pgno <= pPager->mxPgno) goto LAB_000adada;\n    }" if (parenthesized_expression "((pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno))" ( (binary_expression "(pPager->fd->pMethods == (sqlite3_io_methods *)0x0) || (pPager->dbSize < pgno)" (parenthesized_expression "(pPager->fd->pMethods == (sqlite3_io_methods *)0x0)" ( (binary_expression "pPager->fd->pMethods == (sqlite3_io_methods *)0x0" (field_expression "pPager->fd->pMethods" (field_expression "pPager->fd" identifier -> field_identifier) -> field_identifier) == (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(pPager->dbSize < pgno)" ( (binary_expression "pPager->dbSize < pgno" (field_expression "pPager->dbSize" identifier -> field_identifier) < identifier) ))) )) (compound_statement "{\n      if (pgno <= pPager->mxPgno) {\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }\n    }" { (if_statement "if (pgno <= pPager->mxPgno) {\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }" if (parenthesized_expression "(pgno <= pPager->mxPgno)" ( (binary_expression "pgno <= pPager->mxPgno" identifier <= (field_expression "pPager->mxPgno" identifier -> field_identifier)) )) (compound_statement "{\n        if ((flags & 1U) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }\n        if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }\n        iVar5 = pPager->nSavepoint;\n        iVar4 = 0;\n        if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }\nLAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }\nLAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);\n        return 0;\n      }" { (if_statement "if ((flags & 1U) == 0) goto LAB_000adb38;" if (parenthesized_expression "((flags & 1U) == 0)" ( (binary_expression "(flags & 1U) == 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_000adb38;" goto statement_identifier ;)) (labeled_statement "LAB_000adada:\n        if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }" statement_identifier : (if_statement "if (sqlite3Hooks.xBenignBegin != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignBegin)();\n        }" if (parenthesized_expression "(sqlite3Hooks.xBenignBegin != (_func_void *)0x0)" ( (binary_expression "sqlite3Hooks.xBenignBegin != (_func_void *)0x0" (field_expression "sqlite3Hooks.xBenignBegin" identifier . field_identifier) != (cast_expression "(_func_void *)0x0" ( (type_descriptor "_func_void *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          (*sqlite3Hooks.xBenignBegin)();\n        }" { (expression_statement "(*sqlite3Hooks.xBenignBegin)();" (call_expression "(*sqlite3Hooks.xBenignBegin)()" (parenthesized_expression "(*sqlite3Hooks.xBenignBegin)" ( (pointer_expression "*sqlite3Hooks.xBenignBegin" * (field_expression "sqlite3Hooks.xBenignBegin" identifier . field_identifier)) )) (argument_list "()" ( ))) ;) }))) (if_statement "if (pgno <= pPager->dbOrigSize) {\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }" if (parenthesized_expression "(pgno <= pPager->dbOrigSize)" ( (binary_expression "pgno <= pPager->dbOrigSize" identifier <= (field_expression "pPager->dbOrigSize" identifier -> field_identifier)) )) (compound_statement "{\n          sqlite3BitvecSet(pPager->pInJournal,pgno);\n        }" { (expression_statement "sqlite3BitvecSet(pPager->pInJournal,pgno);" (call_expression "sqlite3BitvecSet(pPager->pInJournal,pgno)" identifier (argument_list "(pPager->pInJournal,pgno)" ( (field_expression "pPager->pInJournal" identifier -> field_identifier) , identifier ))) ;) })) (expression_statement "iVar5 = pPager->nSavepoint;" (assignment_expression "iVar5 = pPager->nSavepoint" identifier = (field_expression "pPager->nSavepoint" identifier -> field_identifier)) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if (0 < iVar5) {\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }" if (parenthesized_expression "(0 < iVar5)" ( (binary_expression "0 < iVar5" number_literal < identifier) )) (compound_statement "{\n          do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);\n        }" { (do_statement "do {\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          } while (iVar4 < iVar5);" do (compound_statement "{\n            while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }\n            sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);\n            iVar5 = pPager->nSavepoint;\n            iVar4 = iVar4 + 1;\n          }" { (while_statement "while (pPager->aSavepoint[iVar4].nOrig < pgno) {\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }" while (parenthesized_expression "(pPager->aSavepoint[iVar4].nOrig < pgno)" ( (binary_expression "pPager->aSavepoint[iVar4].nOrig < pgno" (field_expression "pPager->aSavepoint[iVar4].nOrig" (subscript_expression "pPager->aSavepoint[iVar4]" (field_expression "pPager->aSavepoint" identifier -> field_identifier) [ identifier ]) . field_identifier) < identifier) )) (compound_statement "{\n              iVar4 = iVar4 + 1;\n              if (iVar5 <= iVar4) goto LAB_000adb16;\n            }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar5 <= iVar4) goto LAB_000adb16;" if (parenthesized_expression "(iVar5 <= iVar4)" ( (binary_expression "iVar5 <= iVar4" identifier <= identifier) )) (goto_statement "goto LAB_000adb16;" goto statement_identifier ;)) })) (expression_statement "sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno);" (call_expression "sqlite3BitvecSet(pPager->aSavepoint[iVar4].pInSavepoint,pgno)" identifier (argument_list "(pPager->aSavepoint[iVar4].pInSavepoint,pgno)" ( (field_expression "pPager->aSavepoint[iVar4].pInSavepoint" (subscript_expression "pPager->aSavepoint[iVar4]" (field_expression "pPager->aSavepoint" identifier -> field_identifier) [ identifier ]) . field_identifier) , identifier ))) ;) (expression_statement "iVar5 = pPager->nSavepoint;" (assignment_expression "iVar5 = pPager->nSavepoint" identifier = (field_expression "pPager->nSavepoint" identifier -> field_identifier)) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 < iVar5)" ( (binary_expression "iVar4 < iVar5" identifier < identifier) )) ;) })) (labeled_statement "LAB_000adb16:\n        if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }" statement_identifier : (if_statement "if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n          (*sqlite3Hooks.xBenignEnd)();\n        }" if (parenthesized_expression "(sqlite3Hooks.xBenignEnd != (_func_void *)0x0)" ( (binary_expression "sqlite3Hooks.xBenignEnd != (_func_void *)0x0" (field_expression "sqlite3Hooks.xBenignEnd" identifier . field_identifier) != (cast_expression "(_func_void *)0x0" ( (type_descriptor "_func_void *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          (*sqlite3Hooks.xBenignEnd)();\n        }" { (expression_statement "(*sqlite3Hooks.xBenignEnd)();" (call_expression "(*sqlite3Hooks.xBenignEnd)()" (parenthesized_expression "(*sqlite3Hooks.xBenignEnd)" ( (pointer_expression "*sqlite3Hooks.xBenignEnd" * (field_expression "sqlite3Hooks.xBenignEnd" identifier . field_identifier)) )) (argument_list "()" ( ))) ;) }))) (labeled_statement "LAB_000adb38:\n        memset(pPVar3->pData,0,pPager->pageSize);" statement_identifier : (expression_statement "memset(pPVar3->pData,0,pPager->pageSize);" (call_expression "memset(pPVar3->pData,0,pPager->pageSize)" identifier (argument_list "(pPVar3->pData,0,pPager->pageSize)" ( (field_expression "pPVar3->pData" identifier -> field_identifier) , number_literal , (field_expression "pPager->pageSize" identifier -> field_identifier) ))) ;)) (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else {\n      if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (pgno <= pPager->mxPgno) goto LAB_000adada;\n    }" else (compound_statement "{\n      if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (pgno <= pPager->mxPgno) goto LAB_000adada;\n    }" { (if_statement "if ((flags & 1U) == 0) {\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }" if (parenthesized_expression "((flags & 1U) == 0)" ( (binary_expression "(flags & 1U) == 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        pPager->aStat[1] = pPager->aStat[1] + 1;\n        iVar5 = readDbPage(pPVar3);\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }" { (expression_statement "pPager->aStat[1] = pPager->aStat[1] + 1;" (assignment_expression "pPager->aStat[1] = pPager->aStat[1] + 1" (subscript_expression "pPager->aStat[1]" (field_expression "pPager->aStat" identifier -> field_identifier) [ number_literal ]) = (binary_expression "pPager->aStat[1] + 1" (subscript_expression "pPager->aStat[1]" (field_expression "pPager->aStat" identifier -> field_identifier) [ number_literal ]) + number_literal)) ;) (expression_statement "iVar5 = readDbPage(pPVar3);" (assignment_expression "iVar5 = readDbPage(pPVar3)" identifier = (call_expression "readDbPage(pPVar3)" identifier (argument_list "(pPVar3)" ( identifier )))) ;) (if_statement "if (iVar5 == 0) {\n          return 0;\n        }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (goto_statement "goto LAB_000adc6c;" goto statement_identifier ;) })) (if_statement "if (pgno <= pPager->mxPgno) goto LAB_000adada;" if (parenthesized_expression "(pgno <= pPager->mxPgno)" ( (binary_expression "pgno <= pPager->mxPgno" identifier <= (field_expression "pPager->mxPgno" identifier -> field_identifier)) )) (goto_statement "goto LAB_000adada;" goto statement_identifier ;)) }))) (expression_statement "iVar5 = 0xd;" (assignment_expression "iVar5 = 0xd" identifier = number_literal) ;) (expression_statement "bVar2 = (byte)pPVar3->flags;" (assignment_expression "bVar2 = (byte)pPVar3->flags" identifier = (cast_expression "(byte)pPVar3->flags" ( (type_descriptor "byte" type_identifier) ) (field_expression "pPVar3->flags" identifier -> field_identifier))) ;) }))) (if_statement "if ((bVar2 & 2) != 0) {\n    pcacheManageDirtyList(pPVar3,'\x01');\n  }" if (parenthesized_expression "((bVar2 & 2) != 0)" ( (binary_expression "(bVar2 & 2) != 0" (parenthesized_expression "(bVar2 & 2)" ( (binary_expression "bVar2 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    pcacheManageDirtyList(pPVar3,'\x01');\n  }" { (expression_statement "pcacheManageDirtyList(pPVar3,'\x01');" (call_expression "pcacheManageDirtyList(pPVar3,'\x01')" identifier (argument_list "(pPVar3,'\x01')" ( identifier , (char_literal "'\x01'" ' escape_sequence ') ))) ;) })) (expression_statement "piVar1 = &pPVar3->pCache->nRefSum;" (assignment_expression "piVar1 = &pPVar3->pCache->nRefSum" identifier = (pointer_expression "&pPVar3->pCache->nRefSum" & (field_expression "pPVar3->pCache->nRefSum" (field_expression "pPVar3->pCache" identifier -> field_identifier) -> field_identifier))) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "(*sqlite3Config.pcache2.xUnpin)(pPVar3->pCache->pCache,pPVar3->pPage,1);" (call_expression "(*sqlite3Config.pcache2.xUnpin)(pPVar3->pCache->pCache,pPVar3->pPage,1)" (parenthesized_expression "(*sqlite3Config.pcache2.xUnpin)" ( (pointer_expression "*sqlite3Config.pcache2.xUnpin" * (field_expression "sqlite3Config.pcache2.xUnpin" (field_expression "sqlite3Config.pcache2" identifier . field_identifier) . field_identifier)) )) (argument_list "(pPVar3->pCache->pCache,pPVar3->pPage,1)" ( (field_expression "pPVar3->pCache->pCache" (field_expression "pPVar3->pCache" identifier -> field_identifier) -> field_identifier) , (field_expression "pPVar3->pPage" identifier -> field_identifier) , number_literal ))) ;) (expression_statement "pPVar6 = pPager->pPCache;" (assignment_expression "pPVar6 = pPager->pPCache" identifier = (field_expression "pPager->pPCache" identifier -> field_identifier)) ;) (labeled_statement "LAB_000adc9d:\n  if (pPVar6->nRefSum == 0) {\n    pagerUnlockAndRollback(pPager);\n  }" statement_identifier : (if_statement "if (pPVar6->nRefSum == 0) {\n    pagerUnlockAndRollback(pPager);\n  }" if (parenthesized_expression "(pPVar6->nRefSum == 0)" ( (binary_expression "pPVar6->nRefSum == 0" (field_expression "pPVar6->nRefSum" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    pagerUnlockAndRollback(pPager);\n  }" { (expression_statement "pagerUnlockAndRollback(pPager);" (call_expression "pagerUnlockAndRollback(pPager)" identifier (argument_list "(pPager)" ( identifier ))) ;) }))) (expression_statement "*ppPage = (DbPage *)0x0;" (assignment_expression "*ppPage = (DbPage *)0x0" (pointer_expression "*ppPage" * identifier) = (cast_expression "(DbPage *)0x0" ( (type_descriptor "DbPage *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (return_statement "return iVar5;" return identifier ;) (labeled_statement "LAB_000adbce:\n  iVar5 = (*pPVar6->xStress)(pPVar6->pStress,pPVar3);" statement_identifier : (expression_statement "iVar5 = (*pPVar6->xStress)(pPVar6->pStress,pPVar3);" (assignment_expression "iVar5 = (*pPVar6->xStress)(pPVar6->pStress,pPVar3)" identifier = (call_expression "(*pPVar6->xStress)(pPVar6->pStress,pPVar3)" (parenthesized_expression "(*pPVar6->xStress)" ( (pointer_expression "*pPVar6->xStress" * (field_expression "pPVar6->xStress" identifier -> field_identifier)) )) (argument_list "(pPVar6->pStress,pPVar3)" ( (field_expression "pPVar6->pStress" identifier -> field_identifier) , identifier )))) ;)) (if_statement "if ((iVar5 != 0) && (iVar5 != 5)) {\n    pPVar6 = pPager->pPCache;\n    goto LAB_000adc9d;\n  }" if (parenthesized_expression "((iVar5 != 0) && (iVar5 != 5))" ( (binary_expression "(iVar5 != 0) && (iVar5 != 5)" (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar5 != 5)" ( (binary_expression "iVar5 != 5" identifier != number_literal) ))) )) (compound_statement "{\n    pPVar6 = pPager->pPCache;\n    goto LAB_000adc9d;\n  }" { (expression_statement "pPVar6 = pPager->pPCache;" (assignment_expression "pPVar6 = pPager->pPCache" identifier = (field_expression "pPager->pPCache" identifier -> field_identifier)) ;) (goto_statement "goto LAB_000adc9d;" goto statement_identifier ;) })) (labeled_statement "LAB_000adc10:\n  pPage = (*sqlite3Config.pcache2.xFetch)(pPVar6->pCache,pgno,2);" statement_identifier : (expression_statement "pPage = (*sqlite3Config.pcache2.xFetch)(pPVar6->pCache,pgno,2);" (assignment_expression "pPage = (*sqlite3Config.pcache2.xFetch)(pPVar6->pCache,pgno,2)" identifier = (call_expression "(*sqlite3Config.pcache2.xFetch)(pPVar6->pCache,pgno,2)" (parenthesized_expression "(*sqlite3Config.pcache2.xFetch)" ( (pointer_expression "*sqlite3Config.pcache2.xFetch" * (field_expression "sqlite3Config.pcache2.xFetch" (field_expression "sqlite3Config.pcache2" identifier . field_identifier) . field_identifier)) )) (argument_list "(pPVar6->pCache,pgno,2)" ( (field_expression "pPVar6->pCache" identifier -> field_identifier) , identifier , number_literal )))) ;)) (if_statement "if (pPage == (sqlite3_pcache_page *)0x0) {\n    pPVar6 = pPager->pPCache;\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }" if (parenthesized_expression "(pPage == (sqlite3_pcache_page *)0x0)" ( (binary_expression "pPage == (sqlite3_pcache_page *)0x0" identifier == (cast_expression "(sqlite3_pcache_page *)0x0" ( (type_descriptor "sqlite3_pcache_page *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pPVar6 = pPager->pPCache;\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }" { (expression_statement "pPVar6 = pPager->pPCache;" (assignment_expression "pPVar6 = pPager->pPCache" identifier = (field_expression "pPager->pPCache" identifier -> field_identifier)) ;) (expression_statement "iVar5 = 7;" (assignment_expression "iVar5 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_000adc9d;" goto statement_identifier ;) })) (goto_statement "goto LAB_000ada5a;" goto statement_identifier ;) })))
(translation_unit "int FUN_000ada10(int param_1,uint param_2,undefined4 *param_3,uint param_4)\n\n{\n  int *piVar1;\n  byte bVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  \n  if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);\n  if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }\n  *param_3 = piVar4;\n  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }\n  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }\n  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;\n  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);\n  iVar3 = *(int *)(param_1 + 0xd0);\nLAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }\n  *param_3 = 0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}\n\n" (function_definition "int FUN_000ada10(int param_1,uint param_2,undefined4 *param_3,uint param_4)\n\n{\n  int *piVar1;\n  byte bVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  \n  if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);\n  if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }\n  *param_3 = piVar4;\n  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }\n  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }\n  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;\n  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);\n  iVar3 = *(int *)(param_1 + 0xd0);\nLAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }\n  *param_3 = 0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}" primitive_type (function_declarator "FUN_000ada10(int param_1,uint param_2,undefined4 *param_3,uint param_4)" identifier (parameter_list "(int param_1,uint param_2,undefined4 *param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  byte bVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  \n  if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);\n  if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }\n  *param_3 = piVar4;\n  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }\n  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }\n  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;\n  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);\n  iVar3 = *(int *)(param_1 + 0xd0);\nLAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }\n  *param_3 = 0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }" { (expression_statement "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , number_literal , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (return_statement "return 0xb;" return number_literal ;) })) (expression_statement "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);" (assignment_expression "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3)" identifier = (call_expression "(*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3)" (parenthesized_expression "(*DAT_001bb46c)" ( (pointer_expression "*DAT_001bb46c" * identifier) )) (argument_list "(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3)" ( (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xd0) + 0x2c)" ( (binary_expression "*(int *)(param_1 + 0xd0) + 0x2c" (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) + number_literal) )))) , identifier , (binary_expression "*(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3" (pointer_expression "*(byte *)(*(int *)(param_1 + 0xd0) + 0x21)" * (cast_expression "(byte *)(*(int *)(param_1 + 0xd0) + 0x21)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xd0) + 0x21)" ( (binary_expression "*(int *)(param_1 + 0xd0) + 0x21" (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) + number_literal) )))) & number_literal) )))) ;) (if_statement "if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }" { (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" identifier = (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) ))))) ;) (if_statement "if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }" if (parenthesized_expression "(*(char *)(iVar3 + 0x21) == '\x02')" ( (binary_expression "*(char *)(iVar3 + 0x21) == '\x02'" (pointer_expression "*(char *)(iVar3 + 0x21)" * (cast_expression "(char *)(iVar3 + 0x21)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x21)" ( (binary_expression "iVar3 + 0x21" identifier + number_literal) )))) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }" { (expression_statement "iVar5 = 7;" (assignment_expression "iVar5 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_000adc9d;" goto statement_identifier ;) })) (expression_statement "iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));" (assignment_expression "iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c))" identifier = (call_expression "(*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c))" (parenthesized_expression "(*DAT_001bb468)" ( (pointer_expression "*DAT_001bb468" * identifier) )) (argument_list "(*(undefined4 *)(iVar3 + 0x2c))" ( (pointer_expression "*(undefined4 *)(iVar3 + 0x2c)" * (cast_expression "(undefined4 *)(iVar3 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x2c)" ( (binary_expression "iVar3 + 0x2c" identifier + number_literal) )))) )))) ;) (if_statement "if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }" if (parenthesized_expression "(*(int *)(iVar3 + 0x14) < iVar5)" ( (binary_expression "*(int *)(iVar3 + 0x14) < iVar5" (pointer_expression "*(int *)(iVar3 + 0x14)" * (cast_expression "(int *)(iVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }" { (for_statement "for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }" for ( (assignment_expression "iVar5 = *(int *)(iVar3 + 8)" identifier = (pointer_expression "*(int *)(iVar3 + 8)" * (cast_expression "(int *)(iVar3 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) ))))) ; (binary_expression "iVar5 != 0" identifier != number_literal) ; (assignment_expression "iVar5 = *(int *)(iVar5 + 0x24)" identifier = (pointer_expression "*(int *)(iVar5 + 0x24)" * (cast_expression "(int *)(iVar5 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x24)" ( (binary_expression "iVar5 + 0x24" identifier + number_literal) ))))) ) (compound_statement "{\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }" { (if_statement "if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }" if (parenthesized_expression "((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0))" ( (binary_expression "(*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)" (parenthesized_expression "(*(short *)(iVar5 + 0x1e) == 0)" ( (binary_expression "*(short *)(iVar5 + 0x1e) == 0" (pointer_expression "*(short *)(iVar5 + 0x1e)" * (cast_expression "(short *)(iVar5 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x1e)" ( (binary_expression "iVar5 + 0x1e" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "((*(byte *)(iVar5 + 0x1c) & 8) == 0)" ( (binary_expression "(*(byte *)(iVar5 + 0x1c) & 8) == 0" (parenthesized_expression "(*(byte *)(iVar5 + 0x1c) & 8)" ( (binary_expression "*(byte *)(iVar5 + 0x1c) & 8" (pointer_expression "*(byte *)(iVar5 + 0x1c)" * (cast_expression "(byte *)(iVar5 + 0x1c)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x1c)" ( (binary_expression "iVar5 + 0x1c" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }" { (expression_statement "*(int *)(iVar3 + 8) = iVar5;" (assignment_expression "*(int *)(iVar3 + 8) = iVar5" (pointer_expression "*(int *)(iVar3 + 8)" * (cast_expression "(int *)(iVar3 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_000adbce;" goto statement_identifier ;) })) })) (expression_statement "iVar5 = *(int *)(iVar3 + 4);" (assignment_expression "iVar5 = *(int *)(iVar3 + 4)" identifier = (pointer_expression "*(int *)(iVar3 + 4)" * (cast_expression "(int *)(iVar3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(iVar3 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 8)" * (cast_expression "(undefined4 *)(iVar3 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = number_literal) ;) (for_statement "for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }" for ( ; (binary_expression "iVar5 != 0" identifier != number_literal) ; (assignment_expression "iVar5 = *(int *)(iVar5 + 0x24)" identifier = (pointer_expression "*(int *)(iVar5 + 0x24)" * (cast_expression "(int *)(iVar5 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x24)" ( (binary_expression "iVar5 + 0x24" identifier + number_literal) ))))) ) (compound_statement "{\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }" { (if_statement "if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;" if (parenthesized_expression "(*(short *)(iVar5 + 0x1e) == 0)" ( (binary_expression "*(short *)(iVar5 + 0x1e) == 0" (pointer_expression "*(short *)(iVar5 + 0x1e)" * (cast_expression "(short *)(iVar5 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x1e)" ( (binary_expression "iVar5 + 0x1e" identifier + number_literal) )))) == number_literal) )) (goto_statement "goto LAB_000adbce;" goto statement_identifier ;)) })) })) (goto_statement "goto LAB_000adc10;" goto statement_identifier ;) })) (labeled_statement "LAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);" statement_identifier : (expression_statement "piVar4 = *(int **)(iVar3 + 4);" (assignment_expression "piVar4 = *(int **)(iVar3 + 4)" identifier = (pointer_expression "*(int **)(iVar3 + 4)" * (cast_expression "(int **)(iVar3 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) ))))) ;)) (if_statement "if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }" if (parenthesized_expression "(*piVar4 == 0)" ( (binary_expression "*piVar4 == 0" (pointer_expression "*piVar4" * identifier) == number_literal) )) (compound_statement "{\n    piVar4 = (int *)FUN_0004ac20();\n  }" { (expression_statement "piVar4 = (int *)FUN_0004ac20();" (assignment_expression "piVar4 = (int *)FUN_0004ac20()" identifier = (cast_expression "(int *)FUN_0004ac20()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0004ac20()" identifier (argument_list "()" ( ))))) ;) }) (else_clause "else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }" else (compound_statement "{\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }" { (expression_statement "piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);" (assignment_expression "piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc)" identifier = (cast_expression "(int *)(*(int *)(param_1 + 0xd0) + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xd0) + 0xc)" ( (binary_expression "*(int *)(param_1 + 0xd0) + 0xc" (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) + number_literal) )))) ;) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "*(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;" (assignment_expression "*(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1" (pointer_expression "*(short *)((int)piVar4 + 0x1e)" * (cast_expression "(short *)((int)piVar4 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar4 + 0x1e)" ( (binary_expression "(int)piVar4 + 0x1e" (cast_expression "(int)piVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "*(short *)((int)piVar4 + 0x1e) + 1" (pointer_expression "*(short *)((int)piVar4 + 0x1e)" * (cast_expression "(short *)((int)piVar4 + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar4 + 0x1e)" ( (binary_expression "(int)piVar4 + 0x1e" (cast_expression "(int)piVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) + number_literal)) ;) }))) (expression_statement "*param_3 = piVar4;" (assignment_expression "*param_3 = piVar4" (pointer_expression "*param_3" * identifier) = identifier) ;) (if_statement "if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }" if (parenthesized_expression "((piVar4[5] != 0) && ((param_4 & 1) == 0))" ( (binary_expression "(piVar4[5] != 0) && ((param_4 & 1) == 0)" (parenthesized_expression "(piVar4[5] != 0)" ( (binary_expression "piVar4[5] != 0" (subscript_expression "piVar4[5]" identifier [ number_literal ]) != number_literal) )) && (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }" { (expression_statement "*(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;" (assignment_expression "*(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1" (pointer_expression "*(int *)(param_1 + 0xb4)" * (cast_expression "(int *)(param_1 + 0xb4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0xb4) + 1" (pointer_expression "*(int *)(param_1 + 0xb4)" * (cast_expression "(int *)(param_1 + 0xb4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb4)" ( (binary_expression "param_1 + 0xb4" identifier + number_literal) )))) + number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" if (parenthesized_expression "(((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2))" ( (binary_expression "((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)" (parenthesized_expression "((int)param_2 < 0)" ( (binary_expression "(int)param_2 < 0" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "(DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)" ( (binary_expression "DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2" (binary_expression "DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U" (binary_expression "DAT_001bb3c4 / *(int *)(param_1 + 0x94)" identifier / (pointer_expression "*(int *)(param_1 + 0x94)" * (cast_expression "(int *)(param_1 + 0x94)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) ))))) + number_literal) == identifier) ))) )) (compound_statement "{\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" { (expression_statement "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , number_literal , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (expression_statement "iVar5 = 0xb;" (assignment_expression "iVar5 = 0xb" identifier = number_literal) ;) (labeled_statement "LAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);" statement_identifier : (expression_statement "bVar2 = *(byte *)(piVar4 + 7);" (assignment_expression "bVar2 = *(byte *)(piVar4 + 7)" identifier = (pointer_expression "*(byte *)(piVar4 + 7)" * (cast_expression "(byte *)(piVar4 + 7)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 7)" ( (binary_expression "piVar4 + 7" identifier + number_literal) ))))) ;)) }) (else_clause "else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" else (compound_statement "{\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" { (expression_statement "piVar4[5] = param_1;" (assignment_expression "piVar4[5] = param_1" (subscript_expression "piVar4[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }" if (parenthesized_expression "((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2))" ( (binary_expression "(**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)" (parenthesized_expression "(**(int **)(param_1 + 0x3c) == 0)" ( (binary_expression "**(int **)(param_1 + 0x3c) == 0" (pointer_expression "**(int **)(param_1 + 0x3c)" * (pointer_expression "*(int **)(param_1 + 0x3c)" * (cast_expression "(int **)(param_1 + 0x3c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))))) == number_literal) )) || (parenthesized_expression "(*(uint *)(param_1 + 0x18) < param_2)" ( (binary_expression "*(uint *)(param_1 + 0x18) < param_2" (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) < identifier) ))) )) (compound_statement "{\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }" { (if_statement "if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }" if (parenthesized_expression "(param_2 <= *(uint *)(param_1 + 0x98))" ( (binary_expression "param_2 <= *(uint *)(param_1 + 0x98)" identifier <= (pointer_expression "*(uint *)(param_1 + 0x98)" * (cast_expression "(uint *)(param_1 + 0x98)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) ))))) )) (compound_statement "{\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }" { (if_statement "if ((param_4 & 1) == 0) goto LAB_000adb38;" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_000adb38;" goto statement_identifier ;)) (labeled_statement "LAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }" statement_identifier : (if_statement "if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }" if (parenthesized_expression "(DAT_001bcdd4 != (code *)0x0)" ( (binary_expression "DAT_001bcdd4 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          (*DAT_001bcdd4)();\n        }" { (expression_statement "(*DAT_001bcdd4)();" (call_expression "(*DAT_001bcdd4)()" (parenthesized_expression "(*DAT_001bcdd4)" ( (pointer_expression "*DAT_001bcdd4" * identifier) )) (argument_list "()" ( ))) ;) }))) (if_statement "if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }" if (parenthesized_expression "(param_2 <= *(uint *)(param_1 + 0x1c))" ( (binary_expression "param_2 <= *(uint *)(param_1 + 0x1c)" identifier <= (pointer_expression "*(uint *)(param_1 + 0x1c)" * (cast_expression "(uint *)(param_1 + 0x1c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) )) (compound_statement "{\n          FUN_00058ab0();\n        }" { (expression_statement "FUN_00058ab0();" (call_expression "FUN_00058ab0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar3 = *(int *)(param_1 + 0x60);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x60)" identifier = (pointer_expression "*(int *)(param_1 + 0x60)" * (cast_expression "(int *)(param_1 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (if_statement "if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }" if (parenthesized_expression "(0 < iVar3)" ( (binary_expression "0 < iVar3" number_literal < identifier) )) (compound_statement "{\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }" { (do_statement "do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);" do (compound_statement "{\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          }" { (while_statement "while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }" while (parenthesized_expression "(*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2)" ( (binary_expression "*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2" (pointer_expression "*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14)" * (cast_expression "(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14)" ( (binary_expression "iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14" (binary_expression "iVar5 * 0x2c + *(int *)(param_1 + 0x5c)" (binary_expression "iVar5 * 0x2c" identifier * number_literal) + (pointer_expression "*(int *)(param_1 + 0x5c)" * (cast_expression "(int *)(param_1 + 0x5c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) ))))) + number_literal) )))) < identifier) )) (compound_statement "{\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 <= iVar5) goto LAB_000adb16;" if (parenthesized_expression "(iVar3 <= iVar5)" ( (binary_expression "iVar3 <= iVar5" identifier <= identifier) )) (goto_statement "goto LAB_000adb16;" goto statement_identifier ;)) })) (expression_statement "FUN_00058ab0();" (call_expression "FUN_00058ab0()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x60);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x60)" identifier = (pointer_expression "*(int *)(param_1 + 0x60)" * (cast_expression "(int *)(param_1 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 < iVar3)" ( (binary_expression "iVar5 < iVar3" identifier < identifier) )) ;) })) (labeled_statement "LAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }" statement_identifier : (if_statement "if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }" if (parenthesized_expression "(DAT_001bcdd8 != (code *)0x0)" ( (binary_expression "DAT_001bcdd8 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          (*DAT_001bcdd8)();\n        }" { (expression_statement "(*DAT_001bcdd8)();" (call_expression "(*DAT_001bcdd8)()" (parenthesized_expression "(*DAT_001bcdd8)" ( (pointer_expression "*DAT_001bcdd8" * identifier) )) (argument_list "()" ( ))) ;) }))) (labeled_statement "LAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));" statement_identifier : (expression_statement "memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));" (call_expression "memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94))" identifier (argument_list "((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94))" ( (cast_expression "(void *)piVar4[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar4[1]" identifier [ number_literal ])) , number_literal , (pointer_expression "*(size_t *)(param_1 + 0x94)" * (cast_expression "(size_t *)(param_1 + 0x94)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) )))) ))) ;)) (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }" else (compound_statement "{\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }" { (if_statement "if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }" { (expression_statement "*(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;" (assignment_expression "*(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1" (pointer_expression "*(int *)(param_1 + 0xb8)" * (cast_expression "(int *)(param_1 + 0xb8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb8)" ( (binary_expression "param_1 + 0xb8" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0xb8) + 1" (pointer_expression "*(int *)(param_1 + 0xb8)" * (cast_expression "(int *)(param_1 + 0xb8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb8)" ( (binary_expression "param_1 + 0xb8" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "iVar5 = FUN_00098af0();" (assignment_expression "iVar5 = FUN_00098af0()" identifier = (call_expression "FUN_00098af0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar5 == 0) {\n          return 0;\n        }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (goto_statement "goto LAB_000adc6c;" goto statement_identifier ;) })) (if_statement "if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;" if (parenthesized_expression "(param_2 <= *(uint *)(param_1 + 0x98))" ( (binary_expression "param_2 <= *(uint *)(param_1 + 0x98)" identifier <= (pointer_expression "*(uint *)(param_1 + 0x98)" * (cast_expression "(uint *)(param_1 + 0x98)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) ))))) )) (goto_statement "goto LAB_000adada;" goto statement_identifier ;)) }))) (expression_statement "iVar5 = 0xd;" (assignment_expression "iVar5 = 0xd" identifier = number_literal) ;) (expression_statement "bVar2 = *(byte *)(piVar4 + 7);" (assignment_expression "bVar2 = *(byte *)(piVar4 + 7)" identifier = (pointer_expression "*(byte *)(piVar4 + 7)" * (cast_expression "(byte *)(piVar4 + 7)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 7)" ( (binary_expression "piVar4 + 7" identifier + number_literal) ))))) ;) }))) (if_statement "if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }" if (parenthesized_expression "((bVar2 & 2) != 0)" ( (binary_expression "(bVar2 & 2) != 0" (parenthesized_expression "(bVar2 & 2)" ( (binary_expression "bVar2 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0003ba40();\n  }" { (expression_statement "FUN_0003ba40();" (call_expression "FUN_0003ba40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;" (assignment_expression "*(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1" (pointer_expression "*(int *)(piVar4[3] + 0xc)" * (cast_expression "(int *)(piVar4[3] + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[3] + 0xc)" ( (binary_expression "piVar4[3] + 0xc" (subscript_expression "piVar4[3]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "*(int *)(piVar4[3] + 0xc) + -1" (pointer_expression "*(int *)(piVar4[3] + 0xc)" * (cast_expression "(int *)(piVar4[3] + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[3] + 0xc)" ( (binary_expression "piVar4[3] + 0xc" (subscript_expression "piVar4[3]" identifier [ number_literal ]) + number_literal) )))) + number_literal)) ;) (expression_statement "(*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);" (call_expression "(*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1)" (parenthesized_expression "(*DAT_001bb470)" ( (pointer_expression "*DAT_001bb470" * identifier) )) (argument_list "(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1)" ( (pointer_expression "*(undefined4 *)(piVar4[3] + 0x2c)" * (cast_expression "(undefined4 *)(piVar4[3] + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[3] + 0x2c)" ( (binary_expression "piVar4[3] + 0x2c" (subscript_expression "piVar4[3]" identifier [ number_literal ]) + number_literal) )))) , (pointer_expression "*piVar4" * identifier) , number_literal ))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" identifier = (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) ))))) ;) (labeled_statement "LAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }" statement_identifier : (if_statement "if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }" if (parenthesized_expression "(*(int *)(iVar3 + 0xc) == 0)" ( (binary_expression "*(int *)(iVar3 + 0xc) == 0" (pointer_expression "*(int *)(iVar3 + 0xc)" * (cast_expression "(int *)(iVar3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    FUN_000ad9a0();\n  }" { (expression_statement "FUN_000ad9a0();" (call_expression "FUN_000ad9a0()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (return_statement "return iVar5;" return identifier ;) (labeled_statement "LAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);" statement_identifier : (expression_statement "iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);" (assignment_expression "iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5)" identifier = (call_expression "(**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5)" (parenthesized_expression "(**(code **)(iVar3 + 0x24))" ( (pointer_expression "**(code **)(iVar3 + 0x24)" * (pointer_expression "*(code **)(iVar3 + 0x24)" * (cast_expression "(code **)(iVar3 + 0x24)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x24)" ( (binary_expression "iVar3 + 0x24" identifier + number_literal) ))))) )) (argument_list "(*(undefined4 *)(iVar3 + 0x28),iVar5)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0x28)" * (cast_expression "(undefined4 *)(iVar3 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x28)" ( (binary_expression "iVar3 + 0x28" identifier + number_literal) )))) , identifier )))) ;)) (if_statement "if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }" if (parenthesized_expression "((iVar5 != 0) && (iVar5 != 5))" ( (binary_expression "(iVar5 != 0) && (iVar5 != 5)" (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar5 != 5)" ( (binary_expression "iVar5 != 5" identifier != number_literal) ))) )) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }" { (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" identifier = (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000adc9d;" goto statement_identifier ;) })) (labeled_statement "LAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);" statement_identifier : (expression_statement "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);" (assignment_expression "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2)" identifier = (call_expression "(*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2)" (parenthesized_expression "(*DAT_001bb46c)" ( (pointer_expression "*DAT_001bb46c" * identifier) )) (argument_list "(*(undefined4 *)(iVar3 + 0x2c),param_2,2)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0x2c)" * (cast_expression "(undefined4 *)(iVar3 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x2c)" ( (binary_expression "iVar3 + 0x2c" identifier + number_literal) )))) , identifier , number_literal )))) ;)) (if_statement "if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }" { (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" identifier = (pointer_expression "*(int *)(param_1 + 0xd0)" * (cast_expression "(int *)(param_1 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = 7;" (assignment_expression "iVar5 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_000adc9d;" goto statement_identifier ;) })) (goto_statement "goto LAB_000ada5a;" goto statement_identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) , IDENT , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) & LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (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 (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )) (compound_statement { (for_statement for ( (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (for_statement for ( ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (goto_statement goto statement_identifier ;)) })) })) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) + LIT)) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) || (parenthesized_expression ( (binary_expression (binary_expression (binary_expression IDENT / (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) == IDENT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (binary_expression IDENT * LIT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) )))) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( ))) ;) }))) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;)) (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (goto_statement goto statement_identifier ;)) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) + LIT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) , (pointer_expression * IDENT) , LIT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return IDENT ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , LIT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;) })))
(function_definition "int FUN_000ada10(int param_1,uint param_2,undefined4 *param_3,uint param_4)\n\n{\n  int *piVar1;\n  byte bVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  \n  if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);\n  if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }\n  *param_3 = piVar4;\n  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }\n  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }\n  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;\n  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);\n  iVar3 = *(int *)(param_1 + 0xd0);\nLAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }\n  *param_3 = 0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}" (primitive_type "int") (function_declarator "FUN_000ada10(int param_1,uint param_2,undefined4 *param_3,uint param_4)" (identifier "FUN_000ada10") (parameter_list "(int param_1,uint param_2,undefined4 *param_3,uint param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")"))) (compound_statement "{\n  int *piVar1;\n  byte bVar2;\n  int iVar3;\n  int *piVar4;\n  int iVar5;\n  \n  if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }\nLAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);\n  if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }\n  *param_3 = piVar4;\n  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }\n  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }\n  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;\n  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);\n  iVar3 = *(int *)(param_1 + 0xd0);\nLAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }\n  *param_3 = 0;\n  return iVar5;\nLAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);\n  if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }\nLAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }\n  goto LAB_000ada5a;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (if_statement "if (param_2 == 0) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    return 0xb;\n  }" ({ "{") (expression_statement "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" (identifier "FUN_000770e0") (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" (( "(") (number_literal "0xb") (, ",") (string_literal ""%s at line %d of [%.10s]"" (" """) (string_content "%s at line %d of [%.10s]") (" """)) (, ",") (string_literal ""database corruption"" (" """) (string_content "database corruption") (" """)) (, ",") (number_literal "0xda84") (, ",") (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" (" """) (string_content "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1") (" """)) () ")"))) (; ";")) (return_statement "return 0xb;" (return "return") (number_literal "0xb") (; ";")) (} "}"))) (expression_statement "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);" (assignment_expression "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3)" (identifier "iVar3") (= "=") (call_expression "(*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3)" (parenthesized_expression "(*DAT_001bb46c)" (( "(") (pointer_expression "*DAT_001bb46c" (* "*") (identifier "DAT_001bb46c")) () ")")) (argument_list "(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,\n                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3)" (( "(") (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0xd0) + 0x2c)" (( "(") (binary_expression "*(int *)(param_1 + 0xd0) + 0x2c" (pointer_expression "*(int *)(param_1 + 0xd0)" (* "*") (cast_expression "(int *)(param_1 + 0xd0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")")))) (+ "+") (number_literal "0x2c")) () ")")))) (, ",") (identifier "param_2") (, ",") (binary_expression "*(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3" (pointer_expression "*(byte *)(*(int *)(param_1 + 0xd0) + 0x21)" (* "*") (cast_expression "(byte *)(*(int *)(param_1 + 0xd0) + 0x21)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0xd0) + 0x21)" (( "(") (binary_expression "*(int *)(param_1 + 0xd0) + 0x21" (pointer_expression "*(int *)(param_1 + 0xd0)" (* "*") (cast_expression "(int *)(param_1 + 0xd0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")")))) (+ "+") (number_literal "0x21")) () ")")))) (& "&") (number_literal "3")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0xd0);\n    if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }\n    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));\n    if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }\n    goto LAB_000adc10;\n  }" ({ "{") (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0xd0)" (* "*") (cast_expression "(int *)(param_1 + 0xd0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")"))))) (; ";")) (if_statement "if (*(char *)(iVar3 + 0x21) == '\x02') {\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }" (if "if") (parenthesized_expression "(*(char *)(iVar3 + 0x21) == '\x02')" (( "(") (binary_expression "*(char *)(iVar3 + 0x21) == '\x02'" (pointer_expression "*(char *)(iVar3 + 0x21)" (* "*") (cast_expression "(char *)(iVar3 + 0x21)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x21)" (( "(") (binary_expression "iVar3 + 0x21" (identifier "iVar3") (+ "+") (number_literal "0x21")) () ")")))) (== "==") (char_literal "'\x02'" (' "'") (escape_sequence "\x02") (' "'"))) () ")")) (compound_statement "{\n      iVar5 = 7;\n      goto LAB_000adc9d;\n    }" ({ "{") (expression_statement "iVar5 = 7;" (assignment_expression "iVar5 = 7" (identifier "iVar5") (= "=") (number_literal "7")) (; ";")) (goto_statement "goto LAB_000adc9d;" (goto "goto") (statement_identifier "LAB_000adc9d") (; ";")) (} "}"))) (expression_statement "iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));" (assignment_expression "iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c))" (identifier "iVar5") (= "=") (call_expression "(*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c))" (parenthesized_expression "(*DAT_001bb468)" (( "(") (pointer_expression "*DAT_001bb468" (* "*") (identifier "DAT_001bb468")) () ")")) (argument_list "(*(undefined4 *)(iVar3 + 0x2c))" (( "(") (pointer_expression "*(undefined4 *)(iVar3 + 0x2c)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x2c)" (( "(") (binary_expression "iVar3 + 0x2c" (identifier "iVar3") (+ "+") (number_literal "0x2c")) () ")")))) () ")")))) (; ";")) (if_statement "if (*(int *)(iVar3 + 0x14) < iVar5) {\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar3 + 0x14) < iVar5)" (( "(") (binary_expression "*(int *)(iVar3 + 0x14) < iVar5" (pointer_expression "*(int *)(iVar3 + 0x14)" (* "*") (cast_expression "(int *)(iVar3 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x14)" (( "(") (binary_expression "iVar3 + 0x14" (identifier "iVar3") (+ "+") (number_literal "0x14")) () ")")))) (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }\n      iVar5 = *(int *)(iVar3 + 4);\n      *(undefined4 *)(iVar3 + 8) = 0;\n      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }\n    }" ({ "{") (for_statement "for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }" (for "for") (( "(") (assignment_expression "iVar5 = *(int *)(iVar3 + 8)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar3 + 8)" (* "*") (cast_expression "(int *)(iVar3 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 8)" (( "(") (binary_expression "iVar3 + 8" (identifier "iVar3") (+ "+") (number_literal "8")) () ")"))))) (; ";") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar5 = *(int *)(iVar5 + 0x24)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar5 + 0x24)" (* "*") (cast_expression "(int *)(iVar5 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x24)" (( "(") (binary_expression "iVar5 + 0x24" (identifier "iVar5") (+ "+") (number_literal "0x24")) () ")"))))) () ")") (compound_statement "{\n        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }\n      }" ({ "{") (if_statement "if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }" (if "if") (parenthesized_expression "((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0))" (( "(") (binary_expression "(*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)" (parenthesized_expression "(*(short *)(iVar5 + 0x1e) == 0)" (( "(") (binary_expression "*(short *)(iVar5 + 0x1e) == 0" (pointer_expression "*(short *)(iVar5 + 0x1e)" (* "*") (cast_expression "(short *)(iVar5 + 0x1e)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x1e)" (( "(") (binary_expression "iVar5 + 0x1e" (identifier "iVar5") (+ "+") (number_literal "0x1e")) () ")")))) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(byte *)(iVar5 + 0x1c) & 8) == 0)" (( "(") (binary_expression "(*(byte *)(iVar5 + 0x1c) & 8) == 0" (parenthesized_expression "(*(byte *)(iVar5 + 0x1c) & 8)" (( "(") (binary_expression "*(byte *)(iVar5 + 0x1c) & 8" (pointer_expression "*(byte *)(iVar5 + 0x1c)" (* "*") (cast_expression "(byte *)(iVar5 + 0x1c)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x1c)" (( "(") (binary_expression "iVar5 + 0x1c" (identifier "iVar5") (+ "+") (number_literal "0x1c")) () ")")))) (& "&") (number_literal "8")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n          *(int *)(iVar3 + 8) = iVar5;\n          goto LAB_000adbce;\n        }" ({ "{") (expression_statement "*(int *)(iVar3 + 8) = iVar5;" (assignment_expression "*(int *)(iVar3 + 8) = iVar5" (pointer_expression "*(int *)(iVar3 + 8)" (* "*") (cast_expression "(int *)(iVar3 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 8)" (( "(") (binary_expression "iVar3 + 8" (identifier "iVar3") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "iVar5")) (; ";")) (goto_statement "goto LAB_000adbce;" (goto "goto") (statement_identifier "LAB_000adbce") (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar5 = *(int *)(iVar3 + 4);" (assignment_expression "iVar5 = *(int *)(iVar3 + 4)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar3 + 4)" (* "*") (cast_expression "(int *)(iVar3 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 8)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 8)" (( "(") (binary_expression "iVar3 + 8" (identifier "iVar3") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (for_statement "for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }" (for "for") (( "(") (; ";") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar5 = *(int *)(iVar5 + 0x24)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar5 + 0x24)" (* "*") (cast_expression "(int *)(iVar5 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x24)" (( "(") (binary_expression "iVar5 + 0x24" (identifier "iVar5") (+ "+") (number_literal "0x24")) () ")"))))) () ")") (compound_statement "{\n        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;\n      }" ({ "{") (if_statement "if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;" (if "if") (parenthesized_expression "(*(short *)(iVar5 + 0x1e) == 0)" (( "(") (binary_expression "*(short *)(iVar5 + 0x1e) == 0" (pointer_expression "*(short *)(iVar5 + 0x1e)" (* "*") (cast_expression "(short *)(iVar5 + 0x1e)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x1e)" (( "(") (binary_expression "iVar5 + 0x1e" (identifier "iVar5") (+ "+") (number_literal "0x1e")) () ")")))) (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_000adbce;" (goto "goto") (statement_identifier "LAB_000adbce") (; ";"))) (} "}"))) (} "}"))) (goto_statement "goto LAB_000adc10;" (goto "goto") (statement_identifier "LAB_000adc10") (; ";")) (} "}"))) (labeled_statement "LAB_000ada5a:\n  piVar4 = *(int **)(iVar3 + 4);" (statement_identifier "LAB_000ada5a") (: ":") (expression_statement "piVar4 = *(int **)(iVar3 + 4);" (assignment_expression "piVar4 = *(int **)(iVar3 + 4)" (identifier "piVar4") (= "=") (pointer_expression "*(int **)(iVar3 + 4)" (* "*") (cast_expression "(int **)(iVar3 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")"))))) (; ";"))) (if_statement "if (*piVar4 == 0) {\n    piVar4 = (int *)FUN_0004ac20();\n  }\n  else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }" (if "if") (parenthesized_expression "(*piVar4 == 0)" (( "(") (binary_expression "*piVar4 == 0" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    piVar4 = (int *)FUN_0004ac20();\n  }" ({ "{") (expression_statement "piVar4 = (int *)FUN_0004ac20();" (assignment_expression "piVar4 = (int *)FUN_0004ac20()" (identifier "piVar4") (= "=") (cast_expression "(int *)FUN_0004ac20()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0004ac20()" (identifier "FUN_0004ac20") (argument_list "()" (( "(") () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }" (else "else") (compound_statement "{\n    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);\n    *piVar1 = *piVar1 + 1;\n    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;\n  }" ({ "{") (expression_statement "piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);" (assignment_expression "piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc)" (identifier "piVar1") (= "=") (cast_expression "(int *)(*(int *)(param_1 + 0xd0) + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0xd0) + 0xc)" (( "(") (binary_expression "*(int *)(param_1 + 0xd0) + 0xc" (pointer_expression "*(int *)(param_1 + 0xd0)" (* "*") (cast_expression "(int *)(param_1 + 0xd0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")")))) (+ "+") (number_literal "0xc")) () ")")))) (; ";")) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;" (assignment_expression "*(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1" (pointer_expression "*(short *)((int)piVar4 + 0x1e)" (* "*") (cast_expression "(short *)((int)piVar4 + 0x1e)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar4 + 0x1e)" (( "(") (binary_expression "(int)piVar4 + 0x1e" (cast_expression "(int)piVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar4")) (+ "+") (number_literal "0x1e")) () ")")))) (= "=") (binary_expression "*(short *)((int)piVar4 + 0x1e) + 1" (pointer_expression "*(short *)((int)piVar4 + 0x1e)" (* "*") (cast_expression "(short *)((int)piVar4 + 0x1e)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar4 + 0x1e)" (( "(") (binary_expression "(int)piVar4 + 0x1e" (cast_expression "(int)piVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar4")) (+ "+") (number_literal "0x1e")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (expression_statement "*param_3 = piVar4;" (assignment_expression "*param_3 = piVar4" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "piVar4")) (; ";")) (if_statement "if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }" (if "if") (parenthesized_expression "((piVar4[5] != 0) && ((param_4 & 1) == 0))" (( "(") (binary_expression "(piVar4[5] != 0) && ((param_4 & 1) == 0)" (parenthesized_expression "(piVar4[5] != 0)" (( "(") (binary_expression "piVar4[5] != 0" (subscript_expression "piVar4[5]" (identifier "piVar4") ([ "[") (number_literal "5") (] "]")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((param_4 & 1) == 0)" (( "(") (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" (( "(") (binary_expression "param_4 & 1" (identifier "param_4") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;\n    return 0;\n  }" ({ "{") (expression_statement "*(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;" (assignment_expression "*(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1" (pointer_expression "*(int *)(param_1 + 0xb4)" (* "*") (cast_expression "(int *)(param_1 + 0xb4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xb4)" (( "(") (binary_expression "param_1 + 0xb4" (identifier "param_1") (+ "+") (number_literal "0xb4")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0xb4) + 1" (pointer_expression "*(int *)(param_1 + 0xb4)" (* "*") (cast_expression "(int *)(param_1 + 0xb4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xb4)" (( "(") (binary_expression "param_1 + 0xb4" (identifier "param_1") (+ "+") (number_literal "0xb4")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }\n  else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" (if "if") (parenthesized_expression "(((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2))" (( "(") (binary_expression "((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)" (parenthesized_expression "((int)param_2 < 0)" (( "(") (binary_expression "(int)param_2 < 0" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (< "<") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)" (( "(") (binary_expression "DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2" (binary_expression "DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U" (binary_expression "DAT_001bb3c4 / *(int *)(param_1 + 0x94)" (identifier "DAT_001bb3c4") (/ "/") (pointer_expression "*(int *)(param_1 + 0x94)" (* "*") (cast_expression "(int *)(param_1 + 0x94)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x94)" (( "(") (binary_expression "param_1 + 0x94" (identifier "param_1") (+ "+") (number_literal "0x94")) () ")"))))) (+ "+") (number_literal "1U")) (== "==") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar5 = 0xb;\nLAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" ({ "{") (expression_statement "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" (identifier "FUN_000770e0") (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" (( "(") (number_literal "0xb") (, ",") (string_literal ""%s at line %d of [%.10s]"" (" """) (string_content "%s at line %d of [%.10s]") (" """)) (, ",") (string_literal ""database corruption"" (" """) (string_content "database corruption") (" """)) (, ",") (number_literal "0xdaa4") (, ",") (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" (" """) (string_content "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1") (" """)) () ")"))) (; ";")) (expression_statement "iVar5 = 0xb;" (assignment_expression "iVar5 = 0xb" (identifier "iVar5") (= "=") (number_literal "0xb")) (; ";")) (labeled_statement "LAB_000adc6c:\n    bVar2 = *(byte *)(piVar4 + 7);" (statement_identifier "LAB_000adc6c") (: ":") (expression_statement "bVar2 = *(byte *)(piVar4 + 7);" (assignment_expression "bVar2 = *(byte *)(piVar4 + 7)" (identifier "bVar2") (= "=") (pointer_expression "*(byte *)(piVar4 + 7)" (* "*") (cast_expression "(byte *)(piVar4 + 7)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4 + 7)" (( "(") (binary_expression "piVar4 + 7" (identifier "piVar4") (+ "+") (number_literal "7")) () ")"))))) (; ";"))) (} "}")) (else_clause "else {\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" (else "else") (compound_statement "{\n    piVar4[5] = param_1;\n    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }\n    iVar5 = 0xd;\n    bVar2 = *(byte *)(piVar4 + 7);\n  }" ({ "{") (expression_statement "piVar4[5] = param_1;" (assignment_expression "piVar4[5] = param_1" (subscript_expression "piVar4[5]" (identifier "piVar4") ([ "[") (number_literal "5") (] "]")) (= "=") (identifier "param_1")) (; ";")) (if_statement "if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }\n    else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }" (if "if") (parenthesized_expression "((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2))" (( "(") (binary_expression "(**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)" (parenthesized_expression "(**(int **)(param_1 + 0x3c) == 0)" (( "(") (binary_expression "**(int **)(param_1 + 0x3c) == 0" (pointer_expression "**(int **)(param_1 + 0x3c)" (* "*") (pointer_expression "*(int **)(param_1 + 0x3c)" (* "*") (cast_expression "(int **)(param_1 + 0x3c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")"))))) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*(uint *)(param_1 + 0x18) < param_2)" (( "(") (binary_expression "*(uint *)(param_1 + 0x18) < param_2" (pointer_expression "*(uint *)(param_1 + 0x18)" (* "*") (cast_expression "(uint *)(param_1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (< "<") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n      if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }\n    }" ({ "{") (if_statement "if (param_2 <= *(uint *)(param_1 + 0x98)) {\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }" (if "if") (parenthesized_expression "(param_2 <= *(uint *)(param_1 + 0x98))" (( "(") (binary_expression "param_2 <= *(uint *)(param_1 + 0x98)" (identifier "param_2") (<= "<=") (pointer_expression "*(uint *)(param_1 + 0x98)" (* "*") (cast_expression "(uint *)(param_1 + 0x98)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x98)" (( "(") (binary_expression "param_1 + 0x98" (identifier "param_1") (+ "+") (number_literal "0x98")) () ")"))))) () ")")) (compound_statement "{\n        if ((param_4 & 1) == 0) goto LAB_000adb38;\nLAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }\n        if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }\n        iVar3 = *(int *)(param_1 + 0x60);\n        iVar5 = 0;\n        if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }\nLAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }\nLAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));\n        return 0;\n      }" ({ "{") (if_statement "if ((param_4 & 1) == 0) goto LAB_000adb38;" (if "if") (parenthesized_expression "((param_4 & 1) == 0)" (( "(") (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" (( "(") (binary_expression "param_4 & 1" (identifier "param_4") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_000adb38;" (goto "goto") (statement_identifier "LAB_000adb38") (; ";"))) (labeled_statement "LAB_000adada:\n        if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }" (statement_identifier "LAB_000adada") (: ":") (if_statement "if (DAT_001bcdd4 != (code *)0x0) {\n          (*DAT_001bcdd4)();\n        }" (if "if") (parenthesized_expression "(DAT_001bcdd4 != (code *)0x0)" (( "(") (binary_expression "DAT_001bcdd4 != (code *)0x0" (identifier "DAT_001bcdd4") (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          (*DAT_001bcdd4)();\n        }" ({ "{") (expression_statement "(*DAT_001bcdd4)();" (call_expression "(*DAT_001bcdd4)()" (parenthesized_expression "(*DAT_001bcdd4)" (( "(") (pointer_expression "*DAT_001bcdd4" (* "*") (identifier "DAT_001bcdd4")) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (if_statement "if (param_2 <= *(uint *)(param_1 + 0x1c)) {\n          FUN_00058ab0();\n        }" (if "if") (parenthesized_expression "(param_2 <= *(uint *)(param_1 + 0x1c))" (( "(") (binary_expression "param_2 <= *(uint *)(param_1 + 0x1c)" (identifier "param_2") (<= "<=") (pointer_expression "*(uint *)(param_1 + 0x1c)" (* "*") (cast_expression "(uint *)(param_1 + 0x1c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) () ")")) (compound_statement "{\n          FUN_00058ab0();\n        }" ({ "{") (expression_statement "FUN_00058ab0();" (call_expression "FUN_00058ab0()" (identifier "FUN_00058ab0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = *(int *)(param_1 + 0x60);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x60)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x60)" (* "*") (cast_expression "(int *)(param_1 + 0x60)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x60)" (( "(") (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) () ")"))))) (; ";")) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (if_statement "if (0 < iVar3) {\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }" (if "if") (parenthesized_expression "(0 < iVar3)" (( "(") (binary_expression "0 < iVar3" (number_literal "0") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n          do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);\n        }" ({ "{") (do_statement "do {\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          } while (iVar5 < iVar3);" (do "do") (compound_statement "{\n            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }\n            FUN_00058ab0();\n            iVar3 = *(int *)(param_1 + 0x60);\n            iVar5 = iVar5 + 1;\n          }" ({ "{") (while_statement "while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }" (while "while") (parenthesized_expression "(*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2)" (( "(") (binary_expression "*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2" (pointer_expression "*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14)" (* "*") (cast_expression "(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14)" (( "(") (binary_expression "iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14" (binary_expression "iVar5 * 0x2c + *(int *)(param_1 + 0x5c)" (binary_expression "iVar5 * 0x2c" (identifier "iVar5") (* "*") (number_literal "0x2c")) (+ "+") (pointer_expression "*(int *)(param_1 + 0x5c)" (* "*") (cast_expression "(int *)(param_1 + 0x5c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x5c)" (( "(") (binary_expression "param_1 + 0x5c" (identifier "param_1") (+ "+") (number_literal "0x5c")) () ")"))))) (+ "+") (number_literal "0x14")) () ")")))) (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n              iVar5 = iVar5 + 1;\n              if (iVar3 <= iVar5) goto LAB_000adb16;\n            }" ({ "{") (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar3 <= iVar5) goto LAB_000adb16;" (if "if") (parenthesized_expression "(iVar3 <= iVar5)" (( "(") (binary_expression "iVar3 <= iVar5" (identifier "iVar3") (<= "<=") (identifier "iVar5")) () ")")) (goto_statement "goto LAB_000adb16;" (goto "goto") (statement_identifier "LAB_000adb16") (; ";"))) (} "}"))) (expression_statement "FUN_00058ab0();" (call_expression "FUN_00058ab0()" (identifier "FUN_00058ab0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x60);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x60)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x60)" (* "*") (cast_expression "(int *)(param_1 + 0x60)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x60)" (( "(") (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) () ")"))))) (; ";")) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar5 < iVar3)" (( "(") (binary_expression "iVar5 < iVar3" (identifier "iVar5") (< "<") (identifier "iVar3")) () ")")) (; ";")) (} "}"))) (labeled_statement "LAB_000adb16:\n        if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }" (statement_identifier "LAB_000adb16") (: ":") (if_statement "if (DAT_001bcdd8 != (code *)0x0) {\n          (*DAT_001bcdd8)();\n        }" (if "if") (parenthesized_expression "(DAT_001bcdd8 != (code *)0x0)" (( "(") (binary_expression "DAT_001bcdd8 != (code *)0x0" (identifier "DAT_001bcdd8") (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          (*DAT_001bcdd8)();\n        }" ({ "{") (expression_statement "(*DAT_001bcdd8)();" (call_expression "(*DAT_001bcdd8)()" (parenthesized_expression "(*DAT_001bcdd8)" (( "(") (pointer_expression "*DAT_001bcdd8" (* "*") (identifier "DAT_001bcdd8")) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (labeled_statement "LAB_000adb38:\n        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));" (statement_identifier "LAB_000adb38") (: ":") (expression_statement "memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));" (call_expression "memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94))" (identifier "memset") (argument_list "((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94))" (( "(") (cast_expression "(void *)piVar4[1]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]"))) (, ",") (number_literal "0") (, ",") (pointer_expression "*(size_t *)(param_1 + 0x94)" (* "*") (cast_expression "(size_t *)(param_1 + 0x94)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x94)" (( "(") (binary_expression "param_1 + 0x94" (identifier "param_1") (+ "+") (number_literal "0x94")) () ")")))) () ")"))) (; ";"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }" (else "else") (compound_statement "{\n      if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }\n      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;\n    }" ({ "{") (if_statement "if ((param_4 & 1) == 0) {\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }" (if "if") (parenthesized_expression "((param_4 & 1) == 0)" (( "(") (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" (( "(") (binary_expression "param_4 & 1" (identifier "param_4") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;\n        iVar5 = FUN_00098af0();\n        if (iVar5 == 0) {\n          return 0;\n        }\n        goto LAB_000adc6c;\n      }" ({ "{") (expression_statement "*(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;" (assignment_expression "*(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1" (pointer_expression "*(int *)(param_1 + 0xb8)" (* "*") (cast_expression "(int *)(param_1 + 0xb8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xb8)" (( "(") (binary_expression "param_1 + 0xb8" (identifier "param_1") (+ "+") (number_literal "0xb8")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0xb8) + 1" (pointer_expression "*(int *)(param_1 + 0xb8)" (* "*") (cast_expression "(int *)(param_1 + 0xb8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xb8)" (( "(") (binary_expression "param_1 + 0xb8" (identifier "param_1") (+ "+") (number_literal "0xb8")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar5 = FUN_00098af0();" (assignment_expression "iVar5 = FUN_00098af0()" (identifier "iVar5") (= "=") (call_expression "FUN_00098af0()" (identifier "FUN_00098af0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar5 == 0) {\n          return 0;\n        }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (goto_statement "goto LAB_000adc6c;" (goto "goto") (statement_identifier "LAB_000adc6c") (; ";")) (} "}"))) (if_statement "if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;" (if "if") (parenthesized_expression "(param_2 <= *(uint *)(param_1 + 0x98))" (( "(") (binary_expression "param_2 <= *(uint *)(param_1 + 0x98)" (identifier "param_2") (<= "<=") (pointer_expression "*(uint *)(param_1 + 0x98)" (* "*") (cast_expression "(uint *)(param_1 + 0x98)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x98)" (( "(") (binary_expression "param_1 + 0x98" (identifier "param_1") (+ "+") (number_literal "0x98")) () ")"))))) () ")")) (goto_statement "goto LAB_000adada;" (goto "goto") (statement_identifier "LAB_000adada") (; ";"))) (} "}")))) (expression_statement "iVar5 = 0xd;" (assignment_expression "iVar5 = 0xd" (identifier "iVar5") (= "=") (number_literal "0xd")) (; ";")) (expression_statement "bVar2 = *(byte *)(piVar4 + 7);" (assignment_expression "bVar2 = *(byte *)(piVar4 + 7)" (identifier "bVar2") (= "=") (pointer_expression "*(byte *)(piVar4 + 7)" (* "*") (cast_expression "(byte *)(piVar4 + 7)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4 + 7)" (( "(") (binary_expression "piVar4 + 7" (identifier "piVar4") (+ "+") (number_literal "7")) () ")"))))) (; ";")) (} "}")))) (if_statement "if ((bVar2 & 2) != 0) {\n    FUN_0003ba40();\n  }" (if "if") (parenthesized_expression "((bVar2 & 2) != 0)" (( "(") (binary_expression "(bVar2 & 2) != 0" (parenthesized_expression "(bVar2 & 2)" (( "(") (binary_expression "bVar2 & 2" (identifier "bVar2") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0003ba40();\n  }" ({ "{") (expression_statement "FUN_0003ba40();" (call_expression "FUN_0003ba40()" (identifier "FUN_0003ba40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "*(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;" (assignment_expression "*(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1" (pointer_expression "*(int *)(piVar4[3] + 0xc)" (* "*") (cast_expression "(int *)(piVar4[3] + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4[3] + 0xc)" (( "(") (binary_expression "piVar4[3] + 0xc" (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]")) (+ "+") (number_literal "0xc")) () ")")))) (= "=") (binary_expression "*(int *)(piVar4[3] + 0xc) + -1" (pointer_expression "*(int *)(piVar4[3] + 0xc)" (* "*") (cast_expression "(int *)(piVar4[3] + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4[3] + 0xc)" (( "(") (binary_expression "piVar4[3] + 0xc" (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]")) (+ "+") (number_literal "0xc")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "(*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);" (call_expression "(*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1)" (parenthesized_expression "(*DAT_001bb470)" (( "(") (pointer_expression "*DAT_001bb470" (* "*") (identifier "DAT_001bb470")) () ")")) (argument_list "(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1)" (( "(") (pointer_expression "*(undefined4 *)(piVar4[3] + 0x2c)" (* "*") (cast_expression "(undefined4 *)(piVar4[3] + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4[3] + 0x2c)" (( "(") (binary_expression "piVar4[3] + 0x2c" (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]")) (+ "+") (number_literal "0x2c")) () ")")))) (, ",") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0xd0)" (* "*") (cast_expression "(int *)(param_1 + 0xd0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")"))))) (; ";")) (labeled_statement "LAB_000adc9d:\n  if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }" (statement_identifier "LAB_000adc9d") (: ":") (if_statement "if (*(int *)(iVar3 + 0xc) == 0) {\n    FUN_000ad9a0();\n  }" (if "if") (parenthesized_expression "(*(int *)(iVar3 + 0xc) == 0)" (( "(") (binary_expression "*(int *)(iVar3 + 0xc) == 0" (pointer_expression "*(int *)(iVar3 + 0xc)" (* "*") (cast_expression "(int *)(iVar3 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc)" (( "(") (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_000ad9a0();\n  }" ({ "{") (expression_statement "FUN_000ad9a0();" (call_expression "FUN_000ad9a0()" (identifier "FUN_000ad9a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (return_statement "return iVar5;" (return "return") (identifier "iVar5") (; ";")) (labeled_statement "LAB_000adbce:\n  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);" (statement_identifier "LAB_000adbce") (: ":") (expression_statement "iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);" (assignment_expression "iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5)" (identifier "iVar5") (= "=") (call_expression "(**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5)" (parenthesized_expression "(**(code **)(iVar3 + 0x24))" (( "(") (pointer_expression "**(code **)(iVar3 + 0x24)" (* "*") (pointer_expression "*(code **)(iVar3 + 0x24)" (* "*") (cast_expression "(code **)(iVar3 + 0x24)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 0x24)" (( "(") (binary_expression "iVar3 + 0x24" (identifier "iVar3") (+ "+") (number_literal "0x24")) () ")"))))) () ")")) (argument_list "(*(undefined4 *)(iVar3 + 0x28),iVar5)" (( "(") (pointer_expression "*(undefined4 *)(iVar3 + 0x28)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x28)" (( "(") (binary_expression "iVar3 + 0x28" (identifier "iVar3") (+ "+") (number_literal "0x28")) () ")")))) (, ",") (identifier "iVar5") () ")")))) (; ";"))) (if_statement "if ((iVar5 != 0) && (iVar5 != 5)) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }" (if "if") (parenthesized_expression "((iVar5 != 0) && (iVar5 != 5))" (( "(") (binary_expression "(iVar5 != 0) && (iVar5 != 5)" (parenthesized_expression "(iVar5 != 0)" (( "(") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar5 != 5)" (( "(") (binary_expression "iVar5 != 5" (identifier "iVar5") (!= "!=") (number_literal "5")) () ")"))) () ")")) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0xd0);\n    goto LAB_000adc9d;\n  }" ({ "{") (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0xd0)" (* "*") (cast_expression "(int *)(param_1 + 0xd0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")"))))) (; ";")) (goto_statement "goto LAB_000adc9d;" (goto "goto") (statement_identifier "LAB_000adc9d") (; ";")) (} "}"))) (labeled_statement "LAB_000adc10:\n  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);" (statement_identifier "LAB_000adc10") (: ":") (expression_statement "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);" (assignment_expression "iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2)" (identifier "iVar3") (= "=") (call_expression "(*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2)" (parenthesized_expression "(*DAT_001bb46c)" (( "(") (pointer_expression "*DAT_001bb46c" (* "*") (identifier "DAT_001bb46c")) () ")")) (argument_list "(*(undefined4 *)(iVar3 + 0x2c),param_2,2)" (( "(") (pointer_expression "*(undefined4 *)(iVar3 + 0x2c)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x2c)" (( "(") (binary_expression "iVar3 + 0x2c" (identifier "iVar3") (+ "+") (number_literal "0x2c")) () ")")))) (, ",") (identifier "param_2") (, ",") (number_literal "2") () ")")))) (; ";"))) (if_statement "if (iVar3 == 0) {\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0xd0);\n    iVar5 = 7;\n    goto LAB_000adc9d;\n  }" ({ "{") (expression_statement "iVar3 = *(int *)(param_1 + 0xd0);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xd0)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0xd0)" (* "*") (cast_expression "(int *)(param_1 + 0xd0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")"))))) (; ";")) (expression_statement "iVar5 = 7;" (assignment_expression "iVar5 = 7" (identifier "iVar5") (= "=") (number_literal "7")) (; ";")) (goto_statement "goto LAB_000adc9d;" (goto "goto") (statement_identifier "LAB_000adc9d") (; ";")) (} "}"))) (goto_statement "goto LAB_000ada5a;" (goto "goto") (statement_identifier "LAB_000ada5a") (; ";")) (} "}")))

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

int function_1(type_1 *pPager,type_2 var_1,type_3 **ppPage,int var_7)

{
  int *piVar1;
  type_4 var_13;
  type_5 *var_3;
  type_6 *var_5;
  int var_10;
  int var_4;
  type_7 *pPVar6;
  
  if (var_1 == 0) {
    var_2(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,
                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    return 0xb;
  }
  var_3 = (*sqlite3Config.pcache2.xFetch)(pPager->pPCache->pCache,var_1,pPager->pPCache->eCreate & 3)
  ;
  if (var_3 == (type_5 *)0x0) {
    pPVar6 = pPager->pPCache;
    if (pPVar6->eCreate == '\x02') {
      var_4 = 7;
      goto LAB_000adc9d;
    }
    var_4 = (*sqlite3Config.pcache2.xPagecount)(pPVar6->pCache);
    if (pPVar6->szSpill < var_4) {
      for (var_5 = pPVar6->pSynced; var_5 != (type_6 *)0x0; var_5 = var_5->pDirtyPrev) {
        if ((var_5->nRef == 0) && ((var_5->var_7 & 8) == 0)) {
          pPVar6->pSynced = var_5;
          goto LAB_000adbce;
        }
      }
      var_5 = pPVar6->pDirtyTail;
      pPVar6->pSynced = (type_6 *)0x0;
      for (; var_5 != (type_6 *)0x0; var_5 = var_5->pDirtyPrev) {
        if (var_5->nRef == 0) goto LAB_000adbce;
      }
    }
    goto LAB_000adc10;
  }
LAB_000ada5a:
  var_5 = (type_6 *)var_3->pExtra;
  if (var_5->var_3 == (type_5 *)0x0) {
    var_5 = var_6(pPager->pPCache,var_1,var_3);
  }
  else {
    piVar1 = &pPager->pPCache->nRefSum;
    *piVar1 = *piVar1 + 1;
    var_5->nRef = var_5->nRef + 1;
  }
  *ppPage = var_5;
  if ((var_5->pPager != (type_1 *)0x0) && ((var_7 & 1U) == 0)) {
    pPager->aStat[0] = pPager->aStat[0] + 1;
    return 0;
  }
  if (((int)var_1 < 0) || (var_8 / pPager->pageSize + 1U == var_1)) {
    var_2(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,
                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    var_4 = 0xb;
LAB_000adc6c:
    var_13 = (type_4)var_5->var_7;
  }
  else {
    var_5->pPager = pPager;
    if ((pPager->fd->pMethods == (type_8 *)0x0) || (pPager->dbSize < var_1)) {
      if (var_1 <= pPager->mxPgno) {
        if ((var_7 & 1U) == 0) goto LAB_000adb38;
LAB_000adada:
        if (sqlite3Hooks.xBenignBegin != (type_9 *)0x0) {
          (*sqlite3Hooks.xBenignBegin)();
        }
        if (var_1 <= pPager->dbOrigSize) {
          var_9(pPager->pInJournal,var_1);
        }
        var_4 = pPager->nSavepoint;
        var_10 = 0;
        if (0 < var_4) {
          do {
            while (pPager->aSavepoint[var_10].nOrig < var_1) {
              var_10 = var_10 + 1;
              if (var_4 <= var_10) goto LAB_000adb16;
            }
            var_9(pPager->aSavepoint[var_10].pInSavepoint,var_1);
            var_4 = pPager->nSavepoint;
            var_10 = var_10 + 1;
          } while (var_10 < var_4);
        }
LAB_000adb16:
        if (sqlite3Hooks.xBenignEnd != (type_9 *)0x0) {
          (*sqlite3Hooks.xBenignEnd)();
        }
LAB_000adb38:
        var_11(var_5->pData,0,pPager->pageSize);
        return 0;
      }
    }
    else {
      if ((var_7 & 1U) == 0) {
        pPager->aStat[1] = pPager->aStat[1] + 1;
        var_4 = var_12(var_5);
        if (var_4 == 0) {
          return 0;
        }
        goto LAB_000adc6c;
      }
      if (var_1 <= pPager->mxPgno) goto LAB_000adada;
    }
    var_4 = 0xd;
    var_13 = (type_4)var_5->var_7;
  }
  if ((var_13 & 2) != 0) {
    var_14(var_5,'\x01');
  }
  piVar1 = &var_5->pCache->nRefSum;
  *piVar1 = *piVar1 + -1;
  (*sqlite3Config.pcache2.xUnpin)(var_5->pCache->pCache,var_5->var_3,1);
  pPVar6 = pPager->pPCache;
LAB_000adc9d:
  if (pPVar6->nRefSum == 0) {
    var_15(pPager);
  }
  *ppPage = (type_3 *)0x0;
  return var_4;
LAB_000adbce:
  var_4 = (*pPVar6->xStress)(pPVar6->pStress,var_5);
  if ((var_4 != 0) && (var_4 != 5)) {
    pPVar6 = pPager->pPCache;
    goto LAB_000adc9d;
  }
LAB_000adc10:
  var_3 = (*sqlite3Config.pcache2.xFetch)(pPVar6->pCache,var_1,2);
  if (var_3 == (type_5 *)0x0) {
    pPVar6 = pPager->pPCache;
    var_4 = 7;
    goto LAB_000adc9d;
  }
  goto LAB_000ada5a;
}


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

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

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

{
  int *piVar1;
  byte bVar2;
  int iVar3;
  int *piVar4;
  int iVar5;
  
  if (param_2 == 0) {
    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xda84,
                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    return 0xb;
  }
  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(*(int *)(param_1 + 0xd0) + 0x2c),param_2,
                          *(byte *)(*(int *)(param_1 + 0xd0) + 0x21) & 3);
  if (iVar3 == 0) {
    iVar3 = *(int *)(param_1 + 0xd0);
    if (*(char *)(iVar3 + 0x21) == '\x02') {
      iVar5 = 7;
      goto LAB_000adc9d;
    }
    iVar5 = (*DAT_001bb468)(*(undefined4 *)(iVar3 + 0x2c));
    if (*(int *)(iVar3 + 0x14) < iVar5) {
      for (iVar5 = *(int *)(iVar3 + 8); iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {
        if ((*(short *)(iVar5 + 0x1e) == 0) && ((*(byte *)(iVar5 + 0x1c) & 8) == 0)) {
          *(int *)(iVar3 + 8) = iVar5;
          goto LAB_000adbce;
        }
      }
      iVar5 = *(int *)(iVar3 + 4);
      *(undefined4 *)(iVar3 + 8) = 0;
      for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x24)) {
        if (*(short *)(iVar5 + 0x1e) == 0) goto LAB_000adbce;
      }
    }
    goto LAB_000adc10;
  }
LAB_000ada5a:
  piVar4 = *(int **)(iVar3 + 4);
  if (*piVar4 == 0) {
    piVar4 = (int *)FUN_0004ac20();
  }
  else {
    piVar1 = (int *)(*(int *)(param_1 + 0xd0) + 0xc);
    *piVar1 = *piVar1 + 1;
    *(short *)((int)piVar4 + 0x1e) = *(short *)((int)piVar4 + 0x1e) + 1;
  }
  *param_3 = piVar4;
  if ((piVar4[5] != 0) && ((param_4 & 1) == 0)) {
    *(int *)(param_1 + 0xb4) = *(int *)(param_1 + 0xb4) + 1;
    return 0;
  }
  if (((int)param_2 < 0) || (DAT_001bb3c4 / *(int *)(param_1 + 0x94) + 1U == param_2)) {
    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xdaa4,
                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    iVar5 = 0xb;
LAB_000adc6c:
    bVar2 = *(byte *)(piVar4 + 7);
  }
  else {
    piVar4[5] = param_1;
    if ((**(int **)(param_1 + 0x3c) == 0) || (*(uint *)(param_1 + 0x18) < param_2)) {
      if (param_2 <= *(uint *)(param_1 + 0x98)) {
        if ((param_4 & 1) == 0) goto LAB_000adb38;
LAB_000adada:
        if (DAT_001bcdd4 != (code *)0x0) {
          (*DAT_001bcdd4)();
        }
        if (param_2 <= *(uint *)(param_1 + 0x1c)) {
          FUN_00058ab0();
        }
        iVar3 = *(int *)(param_1 + 0x60);
        iVar5 = 0;
        if (0 < iVar3) {
          do {
            while (*(uint *)(iVar5 * 0x2c + *(int *)(param_1 + 0x5c) + 0x14) < param_2) {
              iVar5 = iVar5 + 1;
              if (iVar3 <= iVar5) goto LAB_000adb16;
            }
            FUN_00058ab0();
            iVar3 = *(int *)(param_1 + 0x60);
            iVar5 = iVar5 + 1;
          } while (iVar5 < iVar3);
        }
LAB_000adb16:
        if (DAT_001bcdd8 != (code *)0x0) {
          (*DAT_001bcdd8)();
        }
LAB_000adb38:
        memset((void *)piVar4[1],0,*(size_t *)(param_1 + 0x94));
        return 0;
      }
    }
    else {
      if ((param_4 & 1) == 0) {
        *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + 1;
        iVar5 = FUN_00098af0();
        if (iVar5 == 0) {
          return 0;
        }
        goto LAB_000adc6c;
      }
      if (param_2 <= *(uint *)(param_1 + 0x98)) goto LAB_000adada;
    }
    iVar5 = 0xd;
    bVar2 = *(byte *)(piVar4 + 7);
  }
  if ((bVar2 & 2) != 0) {
    FUN_0003ba40();
  }
  *(int *)(piVar4[3] + 0xc) = *(int *)(piVar4[3] + 0xc) + -1;
  (*DAT_001bb470)(*(undefined4 *)(piVar4[3] + 0x2c),*piVar4,1);
  iVar3 = *(int *)(param_1 + 0xd0);
LAB_000adc9d:
  if (*(int *)(iVar3 + 0xc) == 0) {
    FUN_000ad9a0();
  }
  *param_3 = 0;
  return iVar5;
LAB_000adbce:
  iVar5 = (**(code **)(iVar3 + 0x24))(*(undefined4 *)(iVar3 + 0x28),iVar5);
  if ((iVar5 != 0) && (iVar5 != 5)) {
    iVar3 = *(int *)(param_1 + 0xd0);
    goto LAB_000adc9d;
  }
LAB_000adc10:
  iVar3 = (*DAT_001bb46c)(*(undefined4 *)(iVar3 + 0x2c),param_2,2);
  if (iVar3 == 0) {
    iVar3 = *(int *)(param_1 + 0xd0);
    iVar5 = 7;
    goto LAB_000adc9d;
  }
  goto LAB_000ada5a;
}

