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

int __regparm3 walIndexAppend(Wal *pWal,u32 iFrame,u32 iPage)

{
  int iVar1;
  u32 uVar2;
  u32 *puVar3;
  int iVar4;
  u32 *__s;
  uint uVar5;
  int in_GS_OFFSET;
  WalHashLoc sLoc;
  
  uVar5 = iFrame + 0x21 >> 0xc;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (((pWal->nWiData <= (int)uVar5) ||
      (sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0)) &&
     (iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno), puVar3 = sLoc.aPgno, iVar4 != 0))
  goto LAB_00098e97;
  sLoc.aHash = (ht_slot *)(puVar3 + 0x1000);
  if (uVar5 == 0) {
    sLoc.aPgno = puVar3 + 0x21;
    sLoc.iZero = 0;
    __s = puVar3 + 0x22;
    if (iFrame == 1) {
LAB_00098ece:
      memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));
    }
  }
  else {
    sLoc.iZero = uVar5 * 0x1000 - 0x22;
    sLoc.aPgno = puVar3 + -1;
    iFrame = iFrame - sLoc.iZero;
    __s = puVar3;
    if (iFrame == 1) goto LAB_00098ece;
  }
  if (sLoc.aPgno[iFrame] != 0) {
    walCleanupHash(pWal);
  }
  uVar5 = iPage * 0x17f & 0x1fff;
  uVar2 = iFrame;
  if (sLoc.aHash[uVar5] == 0) {
LAB_00098e80:
    sLoc.aPgno[iFrame] = iPage;
    iVar4 = 0;
    sLoc.aHash[uVar5] = (ht_slot)iFrame;
  }
  else {
    for (; uVar2 != 0; uVar2 = uVar2 - 1) {
      uVar5 = uVar5 + 1 & 0x1fff;
      if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;
    }
    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,
                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    iVar4 = 0xb;
  }
LAB_00098e97:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return iVar4;
}



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

int __regparm3 FUN_00098da0(int param_1,int param_2,int param_3)

{
  int iVar1;
  void *pvVar2;
  int iVar3;
  int iVar4;
  void *__s;
  uint uVar5;
  int in_GS_OFFSET;
  void *local_28;
  
  uVar5 = param_2 + 0x21U >> 0xc;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||
      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,
      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))
  goto LAB_00098e97;
  if (uVar5 == 0) {
    local_28 = (void *)((int)pvVar2 + 0x84);
    __s = (void *)((int)pvVar2 + 0x88);
    if (param_2 == 1) {
LAB_00098ece:
      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));
    }
  }
  else {
    local_28 = (void *)((int)pvVar2 + -4);
    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);
    __s = pvVar2;
    if (param_2 == 1) goto LAB_00098ece;
  }
  if (*(int *)((int)local_28 + param_2 * 4) != 0) {
    FUN_000987e0();
  }
  uVar5 = param_3 * 0x17f & 0x1fff;
  iVar4 = uVar5 * 2;
  iVar3 = param_2;
  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {
LAB_00098e80:
    *(int *)(param_2 * 4 + (int)local_28) = param_3;
    iVar3 = 0;
    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;
  }
  else {
    for (; iVar3 != 0; iVar3 = iVar3 + -1) {
      uVar5 = uVar5 + 1 & 0x1fff;
      iVar4 = uVar5 * 2;
      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;
    }
    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,
                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    iVar3 = 0xb;
  }
LAB_00098e97:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00153870();
  }
  return iVar3;
}


PUSH EBP
LEA EBP,[EDX + 0x21]
PUSH EDI
MOV EDI,EAX
SHR EBP,0xc
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x000172e0
ADD EBX,0x122075
SUB ESP,0x2c
MOV dword ptr [ESP + 0x8],ECX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
CMP EBP,dword ptr [EDI + 0x18]
JGE 0x00098ef0
MOV EAX,dword ptr [EDI + 0x20]
MOV EAX,dword ptr [EAX + EBP*0x4]
MOV dword ptr [ESP + 0x14],EAX
TEST EAX,EAX
JZ 0x00098ef0
LEA EDX,[EAX + 0x4000]
LEA ECX,[EAX + 0x88]
MOV dword ptr [ESP + 0x10],EDX
TEST EBP,EBP
JNZ 0x00098eb0
LEA EDX,[ECX + -0x4]
MOV dword ptr [ESP + 0x18],EBP
MOV dword ptr [ESP + 0x14],EDX
CMP ESI,0x1
JZ 0x00098ece
LEA EAX,[ESI*0x4 + 0x0]
ADD EDX,EAX
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,dword ptr [EDX]
TEST EAX,EAX
JNZ 0x00098f48
IMUL EAX,dword ptr [ESP + 0x8],0x17f
MOV EBP,dword ptr [ESP + 0x10]
AND EAX,0x1fff
LEA ECX,[EAX + EAX*0x1]
LEA EDX,[EBP + ECX*0x1]
MOVZX EDX,word ptr [EDX]
TEST DX,DX
JZ 0x00098e80
TEST ESI,ESI
JZ 0x00098f10
MOV EDX,ESI
JMP 0x00098e69
SUB EDX,0x1
JZ 0x00098f10
ADD EAX,0x1
AND EAX,0x1fff
LEA ECX,[EAX + EAX*0x1]
LEA EDI,[EBP + ECX*0x1]
MOVZX EDI,word ptr [EDI]
TEST DI,DI
JNZ 0x00098e60
MOV EBX,dword ptr [ESP + 0x8]
MOV EAX,dword ptr [ESP + 0xc]
ADD EAX,dword ptr [ESP + 0x14]
MOV dword ptr [EAX],EBX
ADD ECX,dword ptr [ESP + 0x10]
XOR EAX,EAX
MOV word ptr [ECX],SI
MOV EBX,dword ptr [ESP + 0x1c]
XOR EBX,dword ptr GS:[0x14]
JNZ 0x00098f54
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SHL EBP,0xc
MOV ECX,EAX
SUB EBP,0x22
LEA EDX,[ECX + -0x4]
SUB ESI,EBP
MOV dword ptr [ESP + 0x18],EBP
MOV dword ptr [ESP + 0x14],EDX
CMP ESI,0x1
JNZ 0x00098e13
ADD EAX,0x8000
SUB ESP,0x4
SUB EAX,ECX
PUSH EAX
PUSH 0x0
PUSH ECX
CALL 0x00015440
MOV EDX,dword ptr [ESP + 0x24]
ADD ESP,0x10
JMP 0x00098e13
LEA ECX,[ESP + 0x14]
MOV EDX,EBP
MOV EAX,EDI
CALL 0x000986b0
TEST EAX,EAX
JNZ 0x00098e97
MOV EAX,dword ptr [ESP + 0x14]
JMP 0x00098de7
SUB ESP,0xc
LEA EAX,[EBX + 0xfff9c6d0]
PUSH EAX
LEA EAX,[EBX + 0xfffa1ace]
PUSH 0xe78c
PUSH EAX
LEA EAX,[EBX + 0xfffa1a17]
PUSH EAX
PUSH 0xb
CALL 0x000770e0
ADD ESP,0x20
MOV EAX,0xb
JMP 0x00098e97
MOV EAX,EDI
CALL 0x000987e0
JMP 0x00098e2a
CALL 0x00153870
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 FUN_00098da0(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  void *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  void *local_28;\n  \n  uVar5 = param_2 + 0x21U >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;\n  if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }\n  if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }\n  uVar5 = param_3 * 0x17f & 0x1fff;\n  iVar4 = uVar5 * 2;\n  iVar3 = param_2;\n  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00153870();\n  }\n  return iVar3;\n}\n\n" comment (function_definition "int __regparm3 FUN_00098da0(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  void *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  void *local_28;\n  \n  uVar5 = param_2 + 0x21U >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;\n  if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }\n  if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }\n  uVar5 = param_3 * 0x17f & 0x1fff;\n  iVar4 = uVar5 * 2;\n  iVar3 = param_2;\n  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00153870();\n  }\n  return iVar3;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00098da0(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  void *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  void *local_28;\n  \n  uVar5 = param_2 + 0x21U >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;\n  if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }\n  if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }\n  uVar5 = param_3 * 0x17f & 0x1fff;\n  iVar4 = uVar5 * 2;\n  iVar3 = param_2;\n  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00153870();\n  }\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *local_28;" primitive_type (pointer_declarator "*local_28" * identifier) ;) (expression_statement "uVar5 = param_2 + 0x21U >> 0xc;" (assignment_expression "uVar5 = param_2 + 0x21U >> 0xc" identifier = (binary_expression "param_2 + 0x21U >> 0xc" (binary_expression "param_2 + 0x21U" identifier + number_literal) >> number_literal)) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;" if (parenthesized_expression "(((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))" ( (binary_expression "((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0)" (parenthesized_expression "((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0))" ( (binary_expression "(*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)" (parenthesized_expression "(*(int *)(param_1 + 0x18) <= (int)uVar5)" ( (binary_expression "*(int *)(param_1 + 0x18) <= (int)uVar5" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) <= (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) || (parenthesized_expression "(local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)" ( (comma_expression "local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0" (assignment_expression "local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4)" identifier = (pointer_expression "*(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4)" * (cast_expression "(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_1 + 0x20) + uVar5 * 4)" ( (binary_expression "*(int *)(param_1 + 0x20) + uVar5 * 4" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) + (binary_expression "uVar5 * 4" identifier * number_literal)) ))))) , (comma_expression "pvVar2 = local_28,\n      local_28 == (void *)0x0" (assignment_expression "pvVar2 = local_28" identifier = identifier) , (binary_expression "local_28 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)))) ))) )) && (parenthesized_expression "(iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0)" ( (comma_expression "iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0" (assignment_expression "iVar3 = FUN_000986b0()" identifier = (call_expression "FUN_000986b0()" identifier (argument_list "()" ( )))) , (comma_expression "pvVar2 = local_28, iVar3 != 0" (assignment_expression "pvVar2 = local_28" identifier = identifier) , (binary_expression "iVar3 != 0" identifier != number_literal))) ))) )) (goto_statement "goto LAB_00098e97;" goto statement_identifier ;)) (if_statement "if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }" { (expression_statement "local_28 = (void *)((int)pvVar2 + 0x84);" (assignment_expression "local_28 = (void *)((int)pvVar2 + 0x84)" identifier = (cast_expression "(void *)((int)pvVar2 + 0x84)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + 0x84)" ( (binary_expression "(int)pvVar2 + 0x84" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "__s = (void *)((int)pvVar2 + 0x88);" (assignment_expression "__s = (void *)((int)pvVar2 + 0x88)" identifier = (cast_expression "(void *)((int)pvVar2 + 0x88)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + 0x88)" ( (binary_expression "(int)pvVar2 + 0x88" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (if_statement "if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }" { (labeled_statement "LAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));" statement_identifier : (expression_statement "memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));" (call_expression "memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s))" identifier (argument_list "(__s,0,(int)pvVar2 + (0x8000 - (int)__s))" ( identifier , number_literal , (binary_expression "(int)pvVar2 + (0x8000 - (int)__s)" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x8000 - (int)__s)" ( (binary_expression "0x8000 - (int)__s" number_literal - (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) ;)) })) }) (else_clause "else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }" else (compound_statement "{\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }" { (expression_statement "local_28 = (void *)((int)pvVar2 + -4);" (assignment_expression "local_28 = (void *)((int)pvVar2 + -4)" identifier = (cast_expression "(void *)((int)pvVar2 + -4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + -4)" ( (binary_expression "(int)pvVar2 + -4" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "param_2 = param_2 - (uVar5 * 0x1000 + -0x22);" (assignment_expression "param_2 = param_2 - (uVar5 * 0x1000 + -0x22)" identifier = (binary_expression "param_2 - (uVar5 * 0x1000 + -0x22)" identifier - (parenthesized_expression "(uVar5 * 0x1000 + -0x22)" ( (binary_expression "uVar5 * 0x1000 + -0x22" (binary_expression "uVar5 * 0x1000" identifier * number_literal) + number_literal) )))) ;) (expression_statement "__s = pvVar2;" (assignment_expression "__s = pvVar2" identifier = identifier) ;) (if_statement "if (param_2 == 1) goto LAB_00098ece;" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (goto_statement "goto LAB_00098ece;" goto statement_identifier ;)) }))) (if_statement "if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }" if (parenthesized_expression "(*(int *)((int)local_28 + param_2 * 4) != 0)" ( (binary_expression "*(int *)((int)local_28 + param_2 * 4) != 0" (pointer_expression "*(int *)((int)local_28 + param_2 * 4)" * (cast_expression "(int *)((int)local_28 + param_2 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_28 + param_2 * 4)" ( (binary_expression "(int)local_28 + param_2 * 4" (cast_expression "(int)local_28" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) != number_literal) )) (compound_statement "{\n    FUN_000987e0();\n  }" { (expression_statement "FUN_000987e0();" (call_expression "FUN_000987e0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "uVar5 = param_3 * 0x17f & 0x1fff;" (assignment_expression "uVar5 = param_3 * 0x17f & 0x1fff" identifier = (binary_expression "param_3 * 0x17f & 0x1fff" (binary_expression "param_3 * 0x17f" identifier * number_literal) & number_literal)) ;) (expression_statement "iVar4 = uVar5 * 2;" (assignment_expression "iVar4 = uVar5 * 2" identifier = (binary_expression "uVar5 * 2" identifier * number_literal)) ;) (expression_statement "iVar3 = param_2;" (assignment_expression "iVar3 = param_2" identifier = identifier) ;) (if_statement "if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }" if (parenthesized_expression "(*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0)" ( (binary_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0" (pointer_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000)" * (cast_expression "(short *)((int)pvVar2 + iVar4 + 0x4000)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + iVar4 + 0x4000)" ( (binary_expression "(int)pvVar2 + iVar4 + 0x4000" (binary_expression "(int)pvVar2 + iVar4" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) == number_literal) )) (compound_statement "{\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }" { (labeled_statement "LAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;" statement_identifier : (expression_statement "*(int *)(param_2 * 4 + (int)local_28) = param_3;" (assignment_expression "*(int *)(param_2 * 4 + (int)local_28) = param_3" (pointer_expression "*(int *)(param_2 * 4 + (int)local_28)" * (cast_expression "(int *)(param_2 * 4 + (int)local_28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 * 4 + (int)local_28)" ( (binary_expression "param_2 * 4 + (int)local_28" (binary_expression "param_2 * 4" identifier * number_literal) + (cast_expression "(int)local_28" ( (type_descriptor "int" primitive_type) ) identifier)) )))) = identifier) ;)) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "*(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;" (assignment_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2" (pointer_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000)" * (cast_expression "(short *)((int)pvVar2 + iVar4 + 0x4000)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + iVar4 + 0x4000)" ( (binary_expression "(int)pvVar2 + iVar4 + 0x4000" (binary_expression "(int)pvVar2 + iVar4" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (cast_expression "(short)param_2" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) }) (else_clause "else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }" else (compound_statement "{\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }" { (for_statement "for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }" for ( ; (binary_expression "iVar3 != 0" identifier != number_literal) ; (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ) (compound_statement "{\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }" { (expression_statement "uVar5 = uVar5 + 1 & 0x1fff;" (assignment_expression "uVar5 = uVar5 + 1 & 0x1fff" identifier = (binary_expression "uVar5 + 1 & 0x1fff" (binary_expression "uVar5 + 1" identifier + number_literal) & number_literal)) ;) (expression_statement "iVar4 = uVar5 * 2;" (assignment_expression "iVar4 = uVar5 * 2" identifier = (binary_expression "uVar5 * 2" identifier * number_literal)) ;) (if_statement "if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;" if (parenthesized_expression "(*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0)" ( (binary_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0" (pointer_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000)" * (cast_expression "(short *)((int)pvVar2 + iVar4 + 0x4000)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + iVar4 + 0x4000)" ( (binary_expression "(int)pvVar2 + iVar4 + 0x4000" (binary_expression "(int)pvVar2 + iVar4" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) == number_literal) )) (goto_statement "goto LAB_00098e80;" goto statement_identifier ;)) })) (expression_statement "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\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 "iVar3 = 0xb;" (assignment_expression "iVar3 = 0xb" identifier = number_literal) ;) }))) (labeled_statement "LAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00153870();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00153870();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_00153870();\n  }" { comment (expression_statement "FUN_00153870();" (call_expression "FUN_00153870()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 walIndexAppend(Wal *pWal,u32 iFrame,u32 iPage)\n\n{\n  int iVar1;\n  u32 uVar2;\n  u32 *puVar3;\n  int iVar4;\n  u32 *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  WalHashLoc sLoc;\n  \n  uVar5 = iFrame + 0x21 >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((pWal->nWiData <= (int)uVar5) ||\n      (sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0)) &&\n     (iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno), puVar3 = sLoc.aPgno, iVar4 != 0))\n  goto LAB_00098e97;\n  sLoc.aHash = (ht_slot *)(puVar3 + 0x1000);\n  if (uVar5 == 0) {\n    sLoc.aPgno = puVar3 + 0x21;\n    sLoc.iZero = 0;\n    __s = puVar3 + 0x22;\n    if (iFrame == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    sLoc.iZero = uVar5 * 0x1000 - 0x22;\n    sLoc.aPgno = puVar3 + -1;\n    iFrame = iFrame - sLoc.iZero;\n    __s = puVar3;\n    if (iFrame == 1) goto LAB_00098ece;\n  }\n  if (sLoc.aPgno[iFrame] != 0) {\n    walCleanupHash(pWal);\n  }\n  uVar5 = iPage * 0x17f & 0x1fff;\n  uVar2 = iFrame;\n  if (sLoc.aHash[uVar5] == 0) {\nLAB_00098e80:\n    sLoc.aPgno[iFrame] = iPage;\n    iVar4 = 0;\n    sLoc.aHash[uVar5] = (ht_slot)iFrame;\n  }\n  else {\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;\n    }\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar4 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar4;\n}\n\n" comment (function_definition "int __regparm3 walIndexAppend(Wal *pWal,u32 iFrame,u32 iPage)\n\n{\n  int iVar1;\n  u32 uVar2;\n  u32 *puVar3;\n  int iVar4;\n  u32 *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  WalHashLoc sLoc;\n  \n  uVar5 = iFrame + 0x21 >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((pWal->nWiData <= (int)uVar5) ||\n      (sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0)) &&\n     (iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno), puVar3 = sLoc.aPgno, iVar4 != 0))\n  goto LAB_00098e97;\n  sLoc.aHash = (ht_slot *)(puVar3 + 0x1000);\n  if (uVar5 == 0) {\n    sLoc.aPgno = puVar3 + 0x21;\n    sLoc.iZero = 0;\n    __s = puVar3 + 0x22;\n    if (iFrame == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    sLoc.iZero = uVar5 * 0x1000 - 0x22;\n    sLoc.aPgno = puVar3 + -1;\n    iFrame = iFrame - sLoc.iZero;\n    __s = puVar3;\n    if (iFrame == 1) goto LAB_00098ece;\n  }\n  if (sLoc.aPgno[iFrame] != 0) {\n    walCleanupHash(pWal);\n  }\n  uVar5 = iPage * 0x17f & 0x1fff;\n  uVar2 = iFrame;\n  if (sLoc.aHash[uVar5] == 0) {\nLAB_00098e80:\n    sLoc.aPgno[iFrame] = iPage;\n    iVar4 = 0;\n    sLoc.aHash[uVar5] = (ht_slot)iFrame;\n  }\n  else {\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;\n    }\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar4 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "walIndexAppend(Wal *pWal,u32 iFrame,u32 iPage)" identifier (parameter_list "(Wal *pWal,u32 iFrame,u32 iPage)" ( (parameter_declaration "Wal *pWal" type_identifier (pointer_declarator "*pWal" * identifier)) , (parameter_declaration "u32 iFrame" type_identifier identifier) , (parameter_declaration "u32 iPage" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  u32 uVar2;\n  u32 *puVar3;\n  int iVar4;\n  u32 *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  WalHashLoc sLoc;\n  \n  uVar5 = iFrame + 0x21 >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((pWal->nWiData <= (int)uVar5) ||\n      (sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0)) &&\n     (iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno), puVar3 = sLoc.aPgno, iVar4 != 0))\n  goto LAB_00098e97;\n  sLoc.aHash = (ht_slot *)(puVar3 + 0x1000);\n  if (uVar5 == 0) {\n    sLoc.aPgno = puVar3 + 0x21;\n    sLoc.iZero = 0;\n    __s = puVar3 + 0x22;\n    if (iFrame == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    sLoc.iZero = uVar5 * 0x1000 - 0x22;\n    sLoc.aPgno = puVar3 + -1;\n    iFrame = iFrame - sLoc.iZero;\n    __s = puVar3;\n    if (iFrame == 1) goto LAB_00098ece;\n  }\n  if (sLoc.aPgno[iFrame] != 0) {\n    walCleanupHash(pWal);\n  }\n  uVar5 = iPage * 0x17f & 0x1fff;\n  uVar2 = iFrame;\n  if (sLoc.aHash[uVar5] == 0) {\nLAB_00098e80:\n    sLoc.aPgno[iFrame] = iPage;\n    iVar4 = 0;\n    sLoc.aHash[uVar5] = (ht_slot)iFrame;\n  }\n  else {\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;\n    }\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar4 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "u32 uVar2;" type_identifier identifier ;) (declaration "u32 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "u32 *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "WalHashLoc sLoc;" type_identifier identifier ;) (expression_statement "uVar5 = iFrame + 0x21 >> 0xc;" (assignment_expression "uVar5 = iFrame + 0x21 >> 0xc" identifier = (binary_expression "iFrame + 0x21 >> 0xc" (binary_expression "iFrame + 0x21" identifier + number_literal) >> number_literal)) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (((pWal->nWiData <= (int)uVar5) ||\n      (sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0)) &&\n     (iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno), puVar3 = sLoc.aPgno, iVar4 != 0))\n  goto LAB_00098e97;" if (parenthesized_expression "(((pWal->nWiData <= (int)uVar5) ||\n      (sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0)) &&\n     (iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno), puVar3 = sLoc.aPgno, iVar4 != 0))" ( (binary_expression "((pWal->nWiData <= (int)uVar5) ||\n      (sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0)) &&\n     (iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno), puVar3 = sLoc.aPgno, iVar4 != 0)" (parenthesized_expression "((pWal->nWiData <= (int)uVar5) ||\n      (sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0))" ( (binary_expression "(pWal->nWiData <= (int)uVar5) ||\n      (sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0)" (parenthesized_expression "(pWal->nWiData <= (int)uVar5)" ( (binary_expression "pWal->nWiData <= (int)uVar5" (field_expression "pWal->nWiData" identifier -> field_identifier) <= (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) || (parenthesized_expression "(sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0)" ( (comma_expression "sLoc.aPgno = pWal->apWiData[uVar5], puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0" (assignment_expression "sLoc.aPgno = pWal->apWiData[uVar5]" (field_expression "sLoc.aPgno" identifier . field_identifier) = (subscript_expression "pWal->apWiData[uVar5]" (field_expression "pWal->apWiData" identifier -> field_identifier) [ identifier ])) , (comma_expression "puVar3 = sLoc.aPgno, sLoc.aPgno == (u32 *)0x0" (assignment_expression "puVar3 = sLoc.aPgno" identifier = (field_expression "sLoc.aPgno" identifier . field_identifier)) , (binary_expression "sLoc.aPgno == (u32 *)0x0" (field_expression "sLoc.aPgno" identifier . field_identifier) == (cast_expression "(u32 *)0x0" ( (type_descriptor "u32 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)))) ))) )) && (parenthesized_expression "(iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno), puVar3 = sLoc.aPgno, iVar4 != 0)" ( (comma_expression "iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno), puVar3 = sLoc.aPgno, iVar4 != 0" (assignment_expression "iVar4 = walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno)" identifier = (call_expression "walIndexPageRealloc(pWal,uVar5,&sLoc.aPgno)" identifier (argument_list "(pWal,uVar5,&sLoc.aPgno)" ( identifier , identifier , (pointer_expression "&sLoc.aPgno" & (field_expression "sLoc.aPgno" identifier . field_identifier)) )))) , (comma_expression "puVar3 = sLoc.aPgno, iVar4 != 0" (assignment_expression "puVar3 = sLoc.aPgno" identifier = (field_expression "sLoc.aPgno" identifier . field_identifier)) , (binary_expression "iVar4 != 0" identifier != number_literal))) ))) )) (goto_statement "goto LAB_00098e97;" goto statement_identifier ;)) (expression_statement "sLoc.aHash = (ht_slot *)(puVar3 + 0x1000);" (assignment_expression "sLoc.aHash = (ht_slot *)(puVar3 + 0x1000)" (field_expression "sLoc.aHash" identifier . field_identifier) = (cast_expression "(ht_slot *)(puVar3 + 0x1000)" ( (type_descriptor "ht_slot *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 0x1000)" ( (binary_expression "puVar3 + 0x1000" identifier + number_literal) )))) ;) (if_statement "if (uVar5 == 0) {\n    sLoc.aPgno = puVar3 + 0x21;\n    sLoc.iZero = 0;\n    __s = puVar3 + 0x22;\n    if (iFrame == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    sLoc.iZero = uVar5 * 0x1000 - 0x22;\n    sLoc.aPgno = puVar3 + -1;\n    iFrame = iFrame - sLoc.iZero;\n    __s = puVar3;\n    if (iFrame == 1) goto LAB_00098ece;\n  }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    sLoc.aPgno = puVar3 + 0x21;\n    sLoc.iZero = 0;\n    __s = puVar3 + 0x22;\n    if (iFrame == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));\n    }\n  }" { (expression_statement "sLoc.aPgno = puVar3 + 0x21;" (assignment_expression "sLoc.aPgno = puVar3 + 0x21" (field_expression "sLoc.aPgno" identifier . field_identifier) = (binary_expression "puVar3 + 0x21" identifier + number_literal)) ;) (expression_statement "sLoc.iZero = 0;" (assignment_expression "sLoc.iZero = 0" (field_expression "sLoc.iZero" identifier . field_identifier) = number_literal) ;) (expression_statement "__s = puVar3 + 0x22;" (assignment_expression "__s = puVar3 + 0x22" identifier = (binary_expression "puVar3 + 0x22" identifier + number_literal)) ;) (if_statement "if (iFrame == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));\n    }" if (parenthesized_expression "(iFrame == 1)" ( (binary_expression "iFrame == 1" identifier == number_literal) )) (compound_statement "{\nLAB_00098ece:\n      memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));\n    }" { (labeled_statement "LAB_00098ece:\n      memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));" statement_identifier : (expression_statement "memset(__s,0,(int)puVar3 + (0x8000 - (int)__s));" (call_expression "memset(__s,0,(int)puVar3 + (0x8000 - (int)__s))" identifier (argument_list "(__s,0,(int)puVar3 + (0x8000 - (int)__s))" ( identifier , number_literal , (binary_expression "(int)puVar3 + (0x8000 - (int)__s)" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x8000 - (int)__s)" ( (binary_expression "0x8000 - (int)__s" number_literal - (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) ;)) })) }) (else_clause "else {\n    sLoc.iZero = uVar5 * 0x1000 - 0x22;\n    sLoc.aPgno = puVar3 + -1;\n    iFrame = iFrame - sLoc.iZero;\n    __s = puVar3;\n    if (iFrame == 1) goto LAB_00098ece;\n  }" else (compound_statement "{\n    sLoc.iZero = uVar5 * 0x1000 - 0x22;\n    sLoc.aPgno = puVar3 + -1;\n    iFrame = iFrame - sLoc.iZero;\n    __s = puVar3;\n    if (iFrame == 1) goto LAB_00098ece;\n  }" { (expression_statement "sLoc.iZero = uVar5 * 0x1000 - 0x22;" (assignment_expression "sLoc.iZero = uVar5 * 0x1000 - 0x22" (field_expression "sLoc.iZero" identifier . field_identifier) = (binary_expression "uVar5 * 0x1000 - 0x22" (binary_expression "uVar5 * 0x1000" identifier * number_literal) - number_literal)) ;) (expression_statement "sLoc.aPgno = puVar3 + -1;" (assignment_expression "sLoc.aPgno = puVar3 + -1" (field_expression "sLoc.aPgno" identifier . field_identifier) = (binary_expression "puVar3 + -1" identifier + number_literal)) ;) (expression_statement "iFrame = iFrame - sLoc.iZero;" (assignment_expression "iFrame = iFrame - sLoc.iZero" identifier = (binary_expression "iFrame - sLoc.iZero" identifier - (field_expression "sLoc.iZero" identifier . field_identifier))) ;) (expression_statement "__s = puVar3;" (assignment_expression "__s = puVar3" identifier = identifier) ;) (if_statement "if (iFrame == 1) goto LAB_00098ece;" if (parenthesized_expression "(iFrame == 1)" ( (binary_expression "iFrame == 1" identifier == number_literal) )) (goto_statement "goto LAB_00098ece;" goto statement_identifier ;)) }))) (if_statement "if (sLoc.aPgno[iFrame] != 0) {\n    walCleanupHash(pWal);\n  }" if (parenthesized_expression "(sLoc.aPgno[iFrame] != 0)" ( (binary_expression "sLoc.aPgno[iFrame] != 0" (subscript_expression "sLoc.aPgno[iFrame]" (field_expression "sLoc.aPgno" identifier . field_identifier) [ identifier ]) != number_literal) )) (compound_statement "{\n    walCleanupHash(pWal);\n  }" { (expression_statement "walCleanupHash(pWal);" (call_expression "walCleanupHash(pWal)" identifier (argument_list "(pWal)" ( identifier ))) ;) })) (expression_statement "uVar5 = iPage * 0x17f & 0x1fff;" (assignment_expression "uVar5 = iPage * 0x17f & 0x1fff" identifier = (binary_expression "iPage * 0x17f & 0x1fff" (binary_expression "iPage * 0x17f" identifier * number_literal) & number_literal)) ;) (expression_statement "uVar2 = iFrame;" (assignment_expression "uVar2 = iFrame" identifier = identifier) ;) (if_statement "if (sLoc.aHash[uVar5] == 0) {\nLAB_00098e80:\n    sLoc.aPgno[iFrame] = iPage;\n    iVar4 = 0;\n    sLoc.aHash[uVar5] = (ht_slot)iFrame;\n  }\n  else {\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;\n    }\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar4 = 0xb;\n  }" if (parenthesized_expression "(sLoc.aHash[uVar5] == 0)" ( (binary_expression "sLoc.aHash[uVar5] == 0" (subscript_expression "sLoc.aHash[uVar5]" (field_expression "sLoc.aHash" identifier . field_identifier) [ identifier ]) == number_literal) )) (compound_statement "{\nLAB_00098e80:\n    sLoc.aPgno[iFrame] = iPage;\n    iVar4 = 0;\n    sLoc.aHash[uVar5] = (ht_slot)iFrame;\n  }" { (labeled_statement "LAB_00098e80:\n    sLoc.aPgno[iFrame] = iPage;" statement_identifier : (expression_statement "sLoc.aPgno[iFrame] = iPage;" (assignment_expression "sLoc.aPgno[iFrame] = iPage" (subscript_expression "sLoc.aPgno[iFrame]" (field_expression "sLoc.aPgno" identifier . field_identifier) [ identifier ]) = identifier) ;)) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "sLoc.aHash[uVar5] = (ht_slot)iFrame;" (assignment_expression "sLoc.aHash[uVar5] = (ht_slot)iFrame" (subscript_expression "sLoc.aHash[uVar5]" (field_expression "sLoc.aHash" identifier . field_identifier) [ identifier ]) = (cast_expression "(ht_slot)iFrame" ( (type_descriptor "ht_slot" type_identifier) ) identifier)) ;) }) (else_clause "else {\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;\n    }\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar4 = 0xb;\n  }" else (compound_statement "{\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;\n    }\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar4 = 0xb;\n  }" { (for_statement "for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;\n    }" for ( ; (binary_expression "uVar2 != 0" identifier != number_literal) ; (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ) (compound_statement "{\n      uVar5 = uVar5 + 1 & 0x1fff;\n      if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;\n    }" { (expression_statement "uVar5 = uVar5 + 1 & 0x1fff;" (assignment_expression "uVar5 = uVar5 + 1 & 0x1fff" identifier = (binary_expression "uVar5 + 1 & 0x1fff" (binary_expression "uVar5 + 1" identifier + number_literal) & number_literal)) ;) (if_statement "if (sLoc.aHash[uVar5] == 0) goto LAB_00098e80;" if (parenthesized_expression "(sLoc.aHash[uVar5] == 0)" ( (binary_expression "sLoc.aHash[uVar5] == 0" (subscript_expression "sLoc.aHash[uVar5]" (field_expression "sLoc.aHash" identifier . field_identifier) [ identifier ]) == number_literal) )) (goto_statement "goto LAB_00098e80;" goto statement_identifier ;)) })) (expression_statement "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\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 "iVar4 = 0xb;" (assignment_expression "iVar4 = 0xb" identifier = number_literal) ;) }))) (labeled_statement "LAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "int __regparm3 FUN_00098da0(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  void *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  void *local_28;\n  \n  uVar5 = param_2 + 0x21U >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;\n  if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }\n  if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }\n  uVar5 = param_3 * 0x17f & 0x1fff;\n  iVar4 = uVar5 * 2;\n  iVar3 = param_2;\n  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00153870();\n  }\n  return iVar3;\n}\n\n" (function_definition "int __regparm3 FUN_00098da0(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  void *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  void *local_28;\n  \n  uVar5 = param_2 + 0x21U >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;\n  if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }\n  if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }\n  uVar5 = param_3 * 0x17f & 0x1fff;\n  iVar4 = uVar5 * 2;\n  iVar3 = param_2;\n  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00153870();\n  }\n  return iVar3;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00098da0(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  void *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  void *local_28;\n  \n  uVar5 = param_2 + 0x21U >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;\n  if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }\n  if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }\n  uVar5 = param_3 * 0x17f & 0x1fff;\n  iVar4 = uVar5 * 2;\n  iVar3 = param_2;\n  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00153870();\n  }\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *local_28;" primitive_type (pointer_declarator "*local_28" * identifier) ;) (expression_statement "uVar5 = param_2 + 0x21U >> 0xc;" (assignment_expression "uVar5 = param_2 + 0x21U >> 0xc" identifier = (binary_expression "param_2 + 0x21U >> 0xc" (binary_expression "param_2 + 0x21U" identifier + number_literal) >> number_literal)) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;" if (parenthesized_expression "(((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))" ( (binary_expression "((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0)" (parenthesized_expression "((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0))" ( (binary_expression "(*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)" (parenthesized_expression "(*(int *)(param_1 + 0x18) <= (int)uVar5)" ( (binary_expression "*(int *)(param_1 + 0x18) <= (int)uVar5" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) <= (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) || (parenthesized_expression "(local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)" ( (comma_expression "local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0" (assignment_expression "local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4)" identifier = (pointer_expression "*(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4)" * (cast_expression "(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_1 + 0x20) + uVar5 * 4)" ( (binary_expression "*(int *)(param_1 + 0x20) + uVar5 * 4" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) + (binary_expression "uVar5 * 4" identifier * number_literal)) ))))) , (comma_expression "pvVar2 = local_28,\n      local_28 == (void *)0x0" (assignment_expression "pvVar2 = local_28" identifier = identifier) , (binary_expression "local_28 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)))) ))) )) && (parenthesized_expression "(iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0)" ( (comma_expression "iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0" (assignment_expression "iVar3 = FUN_000986b0()" identifier = (call_expression "FUN_000986b0()" identifier (argument_list "()" ( )))) , (comma_expression "pvVar2 = local_28, iVar3 != 0" (assignment_expression "pvVar2 = local_28" identifier = identifier) , (binary_expression "iVar3 != 0" identifier != number_literal))) ))) )) (goto_statement "goto LAB_00098e97;" goto statement_identifier ;)) (if_statement "if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }" { (expression_statement "local_28 = (void *)((int)pvVar2 + 0x84);" (assignment_expression "local_28 = (void *)((int)pvVar2 + 0x84)" identifier = (cast_expression "(void *)((int)pvVar2 + 0x84)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + 0x84)" ( (binary_expression "(int)pvVar2 + 0x84" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "__s = (void *)((int)pvVar2 + 0x88);" (assignment_expression "__s = (void *)((int)pvVar2 + 0x88)" identifier = (cast_expression "(void *)((int)pvVar2 + 0x88)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + 0x88)" ( (binary_expression "(int)pvVar2 + 0x88" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (if_statement "if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }" { (labeled_statement "LAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));" statement_identifier : (expression_statement "memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));" (call_expression "memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s))" identifier (argument_list "(__s,0,(int)pvVar2 + (0x8000 - (int)__s))" ( identifier , number_literal , (binary_expression "(int)pvVar2 + (0x8000 - (int)__s)" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x8000 - (int)__s)" ( (binary_expression "0x8000 - (int)__s" number_literal - (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) ;)) })) }) (else_clause "else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }" else (compound_statement "{\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }" { (expression_statement "local_28 = (void *)((int)pvVar2 + -4);" (assignment_expression "local_28 = (void *)((int)pvVar2 + -4)" identifier = (cast_expression "(void *)((int)pvVar2 + -4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + -4)" ( (binary_expression "(int)pvVar2 + -4" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "param_2 = param_2 - (uVar5 * 0x1000 + -0x22);" (assignment_expression "param_2 = param_2 - (uVar5 * 0x1000 + -0x22)" identifier = (binary_expression "param_2 - (uVar5 * 0x1000 + -0x22)" identifier - (parenthesized_expression "(uVar5 * 0x1000 + -0x22)" ( (binary_expression "uVar5 * 0x1000 + -0x22" (binary_expression "uVar5 * 0x1000" identifier * number_literal) + number_literal) )))) ;) (expression_statement "__s = pvVar2;" (assignment_expression "__s = pvVar2" identifier = identifier) ;) (if_statement "if (param_2 == 1) goto LAB_00098ece;" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (goto_statement "goto LAB_00098ece;" goto statement_identifier ;)) }))) (if_statement "if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }" if (parenthesized_expression "(*(int *)((int)local_28 + param_2 * 4) != 0)" ( (binary_expression "*(int *)((int)local_28 + param_2 * 4) != 0" (pointer_expression "*(int *)((int)local_28 + param_2 * 4)" * (cast_expression "(int *)((int)local_28 + param_2 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_28 + param_2 * 4)" ( (binary_expression "(int)local_28 + param_2 * 4" (cast_expression "(int)local_28" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) != number_literal) )) (compound_statement "{\n    FUN_000987e0();\n  }" { (expression_statement "FUN_000987e0();" (call_expression "FUN_000987e0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "uVar5 = param_3 * 0x17f & 0x1fff;" (assignment_expression "uVar5 = param_3 * 0x17f & 0x1fff" identifier = (binary_expression "param_3 * 0x17f & 0x1fff" (binary_expression "param_3 * 0x17f" identifier * number_literal) & number_literal)) ;) (expression_statement "iVar4 = uVar5 * 2;" (assignment_expression "iVar4 = uVar5 * 2" identifier = (binary_expression "uVar5 * 2" identifier * number_literal)) ;) (expression_statement "iVar3 = param_2;" (assignment_expression "iVar3 = param_2" identifier = identifier) ;) (if_statement "if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }" if (parenthesized_expression "(*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0)" ( (binary_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0" (pointer_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000)" * (cast_expression "(short *)((int)pvVar2 + iVar4 + 0x4000)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + iVar4 + 0x4000)" ( (binary_expression "(int)pvVar2 + iVar4 + 0x4000" (binary_expression "(int)pvVar2 + iVar4" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) == number_literal) )) (compound_statement "{\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }" { (labeled_statement "LAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;" statement_identifier : (expression_statement "*(int *)(param_2 * 4 + (int)local_28) = param_3;" (assignment_expression "*(int *)(param_2 * 4 + (int)local_28) = param_3" (pointer_expression "*(int *)(param_2 * 4 + (int)local_28)" * (cast_expression "(int *)(param_2 * 4 + (int)local_28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 * 4 + (int)local_28)" ( (binary_expression "param_2 * 4 + (int)local_28" (binary_expression "param_2 * 4" identifier * number_literal) + (cast_expression "(int)local_28" ( (type_descriptor "int" primitive_type) ) identifier)) )))) = identifier) ;)) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "*(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;" (assignment_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2" (pointer_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000)" * (cast_expression "(short *)((int)pvVar2 + iVar4 + 0x4000)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + iVar4 + 0x4000)" ( (binary_expression "(int)pvVar2 + iVar4 + 0x4000" (binary_expression "(int)pvVar2 + iVar4" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (cast_expression "(short)param_2" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) }) (else_clause "else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }" else (compound_statement "{\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }" { (for_statement "for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }" for ( ; (binary_expression "iVar3 != 0" identifier != number_literal) ; (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ) (compound_statement "{\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }" { (expression_statement "uVar5 = uVar5 + 1 & 0x1fff;" (assignment_expression "uVar5 = uVar5 + 1 & 0x1fff" identifier = (binary_expression "uVar5 + 1 & 0x1fff" (binary_expression "uVar5 + 1" identifier + number_literal) & number_literal)) ;) (expression_statement "iVar4 = uVar5 * 2;" (assignment_expression "iVar4 = uVar5 * 2" identifier = (binary_expression "uVar5 * 2" identifier * number_literal)) ;) (if_statement "if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;" if (parenthesized_expression "(*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0)" ( (binary_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0" (pointer_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000)" * (cast_expression "(short *)((int)pvVar2 + iVar4 + 0x4000)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar2 + iVar4 + 0x4000)" ( (binary_expression "(int)pvVar2 + iVar4 + 0x4000" (binary_expression "(int)pvVar2 + iVar4" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) == number_literal) )) (goto_statement "goto LAB_00098e80;" goto statement_identifier ;)) })) (expression_statement "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\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 "iVar3 = 0xb;" (assignment_expression "iVar3 = 0xb" identifier = number_literal) ;) }))) (labeled_statement "LAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00153870();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00153870();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_00153870();\n  }" { (expression_statement "FUN_00153870();" (call_expression "FUN_00153870()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) >> LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) ))))) , (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)))) ))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT != LIT))) ))) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) ))) ;)) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (parenthesized_expression ( (binary_expression (binary_expression IDENT * LIT) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) }))) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression IDENT * LIT)) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * LIT) & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT * LIT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) = IDENT) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT)) ;) }) (else_clause else (compound_statement { (for_statement for ( ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) == LIT) )) (goto_statement goto statement_identifier ;)) })) (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 : (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 ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_00098da0(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  void *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  void *local_28;\n  \n  uVar5 = param_2 + 0x21U >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;\n  if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }\n  if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }\n  uVar5 = param_3 * 0x17f & 0x1fff;\n  iVar4 = uVar5 * 2;\n  iVar3 = param_2;\n  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00153870();\n  }\n  return iVar3;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00098da0(int param_1,int param_2,int param_3)" (identifier "FUN_00098da0") (parameter_list "(int param_1,int param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  void *__s;\n  uint uVar5;\n  int in_GS_OFFSET;\n  void *local_28;\n  \n  uVar5 = param_2 + 0x21U >> 0xc;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;\n  if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }\n  if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }\n  uVar5 = param_3 * 0x17f & 0x1fff;\n  iVar4 = uVar5 * 2;\n  iVar3 = param_2;\n  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }\nLAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00153870();\n  }\n  return iVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "void *pvVar2;" (primitive_type "void") (pointer_declarator "*pvVar2" (* "*") (identifier "pvVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "void *__s;" (primitive_type "void") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "void *local_28;" (primitive_type "void") (pointer_declarator "*local_28" (* "*") (identifier "local_28")) (; ";")) (expression_statement "uVar5 = param_2 + 0x21U >> 0xc;" (assignment_expression "uVar5 = param_2 + 0x21U >> 0xc" (identifier "uVar5") (= "=") (binary_expression "param_2 + 0x21U >> 0xc" (binary_expression "param_2 + 0x21U" (identifier "param_2") (+ "+") (number_literal "0x21U")) (>> ">>") (number_literal "0xc"))) (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))\n  goto LAB_00098e97;" (if "if") (parenthesized_expression "(((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))" (( "(") (binary_expression "((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0)" (parenthesized_expression "((*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0))" (( "(") (binary_expression "(*(int *)(param_1 + 0x18) <= (int)uVar5) ||\n      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)" (parenthesized_expression "(*(int *)(param_1 + 0x18) <= (int)uVar5)" (( "(") (binary_expression "*(int *)(param_1 + 0x18) <= (int)uVar5" (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (<= "<=") (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5"))) () ")")) (|| "||") (parenthesized_expression "(local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0)" (( "(") (comma_expression "local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,\n      local_28 == (void *)0x0" (assignment_expression "local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4)" (identifier "local_28") (= "=") (pointer_expression "*(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4)" (* "*") (cast_expression "(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x20) + uVar5 * 4)" (( "(") (binary_expression "*(int *)(param_1 + 0x20) + uVar5 * 4" (pointer_expression "*(int *)(param_1 + 0x20)" (* "*") (cast_expression "(int *)(param_1 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (+ "+") (binary_expression "uVar5 * 4" (identifier "uVar5") (* "*") (number_literal "4"))) () ")"))))) (, ",") (comma_expression "pvVar2 = local_28,\n      local_28 == (void *)0x0" (assignment_expression "pvVar2 = local_28" (identifier "pvVar2") (= "=") (identifier "local_28")) (, ",") (binary_expression "local_28 == (void *)0x0" (identifier "local_28") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0)" (( "(") (comma_expression "iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0" (assignment_expression "iVar3 = FUN_000986b0()" (identifier "iVar3") (= "=") (call_expression "FUN_000986b0()" (identifier "FUN_000986b0") (argument_list "()" (( "(") () ")")))) (, ",") (comma_expression "pvVar2 = local_28, iVar3 != 0" (assignment_expression "pvVar2 = local_28" (identifier "pvVar2") (= "=") (identifier "local_28")) (, ",") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")))) () ")"))) () ")")) (goto_statement "goto LAB_00098e97;" (goto "goto") (statement_identifier "LAB_00098e97") (; ";"))) (if_statement "if (uVar5 == 0) {\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }\n  else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }" (if "if") (parenthesized_expression "(uVar5 == 0)" (( "(") (binary_expression "uVar5 == 0" (identifier "uVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    local_28 = (void *)((int)pvVar2 + 0x84);\n    __s = (void *)((int)pvVar2 + 0x88);\n    if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }\n  }" ({ "{") (expression_statement "local_28 = (void *)((int)pvVar2 + 0x84);" (assignment_expression "local_28 = (void *)((int)pvVar2 + 0x84)" (identifier "local_28") (= "=") (cast_expression "(void *)((int)pvVar2 + 0x84)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar2 + 0x84)" (( "(") (binary_expression "(int)pvVar2 + 0x84" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (+ "+") (number_literal "0x84")) () ")")))) (; ";")) (expression_statement "__s = (void *)((int)pvVar2 + 0x88);" (assignment_expression "__s = (void *)((int)pvVar2 + 0x88)" (identifier "__s") (= "=") (cast_expression "(void *)((int)pvVar2 + 0x88)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar2 + 0x88)" (( "(") (binary_expression "(int)pvVar2 + 0x88" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (+ "+") (number_literal "0x88")) () ")")))) (; ";")) (if_statement "if (param_2 == 1) {\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\nLAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));\n    }" ({ "{") (labeled_statement "LAB_00098ece:\n      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));" (statement_identifier "LAB_00098ece") (: ":") (expression_statement "memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));" (call_expression "memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s))" (identifier "memset") (argument_list "(__s,0,(int)pvVar2 + (0x8000 - (int)__s))" (( "(") (identifier "__s") (, ",") (number_literal "0") (, ",") (binary_expression "(int)pvVar2 + (0x8000 - (int)__s)" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (+ "+") (parenthesized_expression "(0x8000 - (int)__s)" (( "(") (binary_expression "0x8000 - (int)__s" (number_literal "0x8000") (- "-") (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s"))) () ")"))) () ")"))) (; ";"))) (} "}"))) (} "}")) (else_clause "else {\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }" (else "else") (compound_statement "{\n    local_28 = (void *)((int)pvVar2 + -4);\n    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);\n    __s = pvVar2;\n    if (param_2 == 1) goto LAB_00098ece;\n  }" ({ "{") (expression_statement "local_28 = (void *)((int)pvVar2 + -4);" (assignment_expression "local_28 = (void *)((int)pvVar2 + -4)" (identifier "local_28") (= "=") (cast_expression "(void *)((int)pvVar2 + -4)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar2 + -4)" (( "(") (binary_expression "(int)pvVar2 + -4" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (+ "+") (number_literal "-4")) () ")")))) (; ";")) (expression_statement "param_2 = param_2 - (uVar5 * 0x1000 + -0x22);" (assignment_expression "param_2 = param_2 - (uVar5 * 0x1000 + -0x22)" (identifier "param_2") (= "=") (binary_expression "param_2 - (uVar5 * 0x1000 + -0x22)" (identifier "param_2") (- "-") (parenthesized_expression "(uVar5 * 0x1000 + -0x22)" (( "(") (binary_expression "uVar5 * 0x1000 + -0x22" (binary_expression "uVar5 * 0x1000" (identifier "uVar5") (* "*") (number_literal "0x1000")) (+ "+") (number_literal "-0x22")) () ")")))) (; ";")) (expression_statement "__s = pvVar2;" (assignment_expression "__s = pvVar2" (identifier "__s") (= "=") (identifier "pvVar2")) (; ";")) (if_statement "if (param_2 == 1) goto LAB_00098ece;" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (goto_statement "goto LAB_00098ece;" (goto "goto") (statement_identifier "LAB_00098ece") (; ";"))) (} "}")))) (if_statement "if (*(int *)((int)local_28 + param_2 * 4) != 0) {\n    FUN_000987e0();\n  }" (if "if") (parenthesized_expression "(*(int *)((int)local_28 + param_2 * 4) != 0)" (( "(") (binary_expression "*(int *)((int)local_28 + param_2 * 4) != 0" (pointer_expression "*(int *)((int)local_28 + param_2 * 4)" (* "*") (cast_expression "(int *)((int)local_28 + param_2 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)local_28 + param_2 * 4)" (( "(") (binary_expression "(int)local_28 + param_2 * 4" (cast_expression "(int)local_28" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_28")) (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4"))) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_000987e0();\n  }" ({ "{") (expression_statement "FUN_000987e0();" (call_expression "FUN_000987e0()" (identifier "FUN_000987e0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar5 = param_3 * 0x17f & 0x1fff;" (assignment_expression "uVar5 = param_3 * 0x17f & 0x1fff" (identifier "uVar5") (= "=") (binary_expression "param_3 * 0x17f & 0x1fff" (binary_expression "param_3 * 0x17f" (identifier "param_3") (* "*") (number_literal "0x17f")) (& "&") (number_literal "0x1fff"))) (; ";")) (expression_statement "iVar4 = uVar5 * 2;" (assignment_expression "iVar4 = uVar5 * 2" (identifier "iVar4") (= "=") (binary_expression "uVar5 * 2" (identifier "uVar5") (* "*") (number_literal "2"))) (; ";")) (expression_statement "iVar3 = param_2;" (assignment_expression "iVar3 = param_2" (identifier "iVar3") (= "=") (identifier "param_2")) (; ";")) (if_statement "if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }\n  else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }" (if "if") (parenthesized_expression "(*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0)" (( "(") (binary_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0" (pointer_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000)" (* "*") (cast_expression "(short *)((int)pvVar2 + iVar4 + 0x4000)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar2 + iVar4 + 0x4000)" (( "(") (binary_expression "(int)pvVar2 + iVar4 + 0x4000" (binary_expression "(int)pvVar2 + iVar4" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (+ "+") (identifier "iVar4")) (+ "+") (number_literal "0x4000")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;\n    iVar3 = 0;\n    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;\n  }" ({ "{") (labeled_statement "LAB_00098e80:\n    *(int *)(param_2 * 4 + (int)local_28) = param_3;" (statement_identifier "LAB_00098e80") (: ":") (expression_statement "*(int *)(param_2 * 4 + (int)local_28) = param_3;" (assignment_expression "*(int *)(param_2 * 4 + (int)local_28) = param_3" (pointer_expression "*(int *)(param_2 * 4 + (int)local_28)" (* "*") (cast_expression "(int *)(param_2 * 4 + (int)local_28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 * 4 + (int)local_28)" (( "(") (binary_expression "param_2 * 4 + (int)local_28" (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4")) (+ "+") (cast_expression "(int)local_28" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_28"))) () ")")))) (= "=") (identifier "param_3")) (; ";"))) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "*(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;" (assignment_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2" (pointer_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000)" (* "*") (cast_expression "(short *)((int)pvVar2 + iVar4 + 0x4000)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar2 + iVar4 + 0x4000)" (( "(") (binary_expression "(int)pvVar2 + iVar4 + 0x4000" (binary_expression "(int)pvVar2 + iVar4" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (+ "+") (identifier "iVar4")) (+ "+") (number_literal "0x4000")) () ")")))) (= "=") (cast_expression "(short)param_2" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "param_2"))) (; ";")) (} "}")) (else_clause "else {\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }" (else "else") (compound_statement "{\n    for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }\n    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    iVar3 = 0xb;\n  }" ({ "{") (for_statement "for (; iVar3 != 0; iVar3 = iVar3 + -1) {\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }" (for "for") (( "(") (; ";") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar3 = iVar3 + -1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n      uVar5 = uVar5 + 1 & 0x1fff;\n      iVar4 = uVar5 * 2;\n      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;\n    }" ({ "{") (expression_statement "uVar5 = uVar5 + 1 & 0x1fff;" (assignment_expression "uVar5 = uVar5 + 1 & 0x1fff" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1 & 0x1fff" (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1")) (& "&") (number_literal "0x1fff"))) (; ";")) (expression_statement "iVar4 = uVar5 * 2;" (assignment_expression "iVar4 = uVar5 * 2" (identifier "iVar4") (= "=") (binary_expression "uVar5 * 2" (identifier "uVar5") (* "*") (number_literal "2"))) (; ";")) (if_statement "if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;" (if "if") (parenthesized_expression "(*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0)" (( "(") (binary_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0" (pointer_expression "*(short *)((int)pvVar2 + iVar4 + 0x4000)" (* "*") (cast_expression "(short *)((int)pvVar2 + iVar4 + 0x4000)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar2 + iVar4 + 0x4000)" (( "(") (binary_expression "(int)pvVar2 + iVar4 + 0x4000" (binary_expression "(int)pvVar2 + iVar4" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (+ "+") (identifier "iVar4")) (+ "+") (number_literal "0x4000")) () ")")))) (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00098e80;" (goto "goto") (statement_identifier "LAB_00098e80") (; ";"))) (} "}"))) (expression_statement "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" (identifier "FUN_000770e0") (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,\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 "0xe78c") (, ",") (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" (" """) (string_content "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1") (" """)) () ")"))) (; ";")) (expression_statement "iVar3 = 0xb;" (assignment_expression "iVar3 = 0xb" (identifier "iVar3") (= "=") (number_literal "0xb")) (; ";")) (} "}")))) (labeled_statement "LAB_00098e97:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00153870();\n  }" (statement_identifier "LAB_00098e97") (: ":") (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00153870();\n  }" (if "if") (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_00153870();\n  }" ({ "{") (expression_statement "FUN_00153870();" (call_expression "FUN_00153870()" (identifier "FUN_00153870") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *pWal,type_2 var_1,type_2 var_9)

{
  int var_12;
  type_2 var_10;
  type_2 *var_5;
  int var_4;
  type_2 *__s;
  type_3 var_6;
  int var_2;
  type_4 sLoc;
  
  var_6 = var_1 + 0x21 >> 0xc;
  var_12 = *(int *)(var_2 + 0x14);
  if (((pWal->nWiData <= (int)var_6) ||
      (sLoc.aPgno = pWal->apWiData[var_6], var_5 = sLoc.aPgno, sLoc.aPgno == (type_2 *)0x0)) &&
     (var_4 = var_3(pWal,var_6,&sLoc.aPgno), var_5 = sLoc.aPgno, var_4 != 0))
  goto LAB_00098e97;
  sLoc.aHash = (type_5 *)(var_5 + 0x1000);
  if (var_6 == 0) {
    sLoc.aPgno = var_5 + 0x21;
    sLoc.iZero = 0;
    __s = var_5 + 0x22;
    if (var_1 == 1) {
LAB_00098ece:
      var_7(__s,0,(int)var_5 + (0x8000 - (int)__s));
    }
  }
  else {
    sLoc.iZero = var_6 * 0x1000 - 0x22;
    sLoc.aPgno = var_5 + -1;
    var_1 = var_1 - sLoc.iZero;
    __s = var_5;
    if (var_1 == 1) goto LAB_00098ece;
  }
  if (sLoc.aPgno[var_1] != 0) {
    var_8(pWal);
  }
  var_6 = var_9 * 0x17f & 0x1fff;
  var_10 = var_1;
  if (sLoc.aHash[var_6] == 0) {
LAB_00098e80:
    sLoc.aPgno[var_1] = var_9;
    var_4 = 0;
    sLoc.aHash[var_6] = (type_5)var_1;
  }
  else {
    for (; var_10 != 0; var_10 = var_10 - 1) {
      var_6 = var_6 + 1 & 0x1fff;
      if (sLoc.aHash[var_6] == 0) goto LAB_00098e80;
    }
    var_11(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,
                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    var_4 = 0xb;
  }
LAB_00098e97:
  if (var_12 != *(int *)(var_2 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_13();
  }
  return var_4;
}


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

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

int __regparm3 MASKED(int param_1,int param_2,int param_3)

{
  int iVar1;
  void *pvVar2;
  int iVar3;
  int iVar4;
  void *__s;
  uint uVar5;
  int in_GS_OFFSET;
  void *local_28;
  
  uVar5 = param_2 + 0x21U >> 0xc;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (((*(int *)(param_1 + 0x18) <= (int)uVar5) ||
      (local_28 = *(void **)(*(int *)(param_1 + 0x20) + uVar5 * 4), pvVar2 = local_28,
      local_28 == (void *)0x0)) && (iVar3 = FUN_000986b0(), pvVar2 = local_28, iVar3 != 0))
  goto LAB_00098e97;
  if (uVar5 == 0) {
    local_28 = (void *)((int)pvVar2 + 0x84);
    __s = (void *)((int)pvVar2 + 0x88);
    if (param_2 == 1) {
LAB_00098ece:
      memset(__s,0,(int)pvVar2 + (0x8000 - (int)__s));
    }
  }
  else {
    local_28 = (void *)((int)pvVar2 + -4);
    param_2 = param_2 - (uVar5 * 0x1000 + -0x22);
    __s = pvVar2;
    if (param_2 == 1) goto LAB_00098ece;
  }
  if (*(int *)((int)local_28 + param_2 * 4) != 0) {
    FUN_000987e0();
  }
  uVar5 = param_3 * 0x17f & 0x1fff;
  iVar4 = uVar5 * 2;
  iVar3 = param_2;
  if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) {
LAB_00098e80:
    *(int *)(param_2 * 4 + (int)local_28) = param_3;
    iVar3 = 0;
    *(short *)((int)pvVar2 + iVar4 + 0x4000) = (short)param_2;
  }
  else {
    for (; iVar3 != 0; iVar3 = iVar3 + -1) {
      uVar5 = uVar5 + 1 & 0x1fff;
      iVar4 = uVar5 * 2;
      if (*(short *)((int)pvVar2 + iVar4 + 0x4000) == 0) goto LAB_00098e80;
    }
    FUN_000770e0(0xb,"%s at line %d of [%.10s]","database corruption",0xe78c,
                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    iVar3 = 0xb;
  }
LAB_00098e97:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00153870();
  }
  return iVar3;
}

