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

int __regparm3 fts5StorageLoadTotals(Fts5Storage *p,int bCache)

{
  Fts5Index *p_00;
  byte bVar1;
  Fts5Data *pFVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  u64 *v;
  u64 *puVar6;
  undefined4 uVar7;
  
  p_00 = p->pIndex;
  v = (u64 *)p->aTotalSize;
  iVar3 = p_00->pConfig->nCol;
  *(undefined4 *)&p->nTotalRow = 0;
  *(undefined4 *)((int)&p->nTotalRow + 4) = 0;
  uVar7 = 0;
  puVar6 = v;
  memset(v,0,iVar3 << 3);
  pFVar2 = fts5DataRead(p_00,CONCAT44(uVar7,puVar6));
  iVar5 = p_00->rc;
  if (iVar5 == 0) {
    if (pFVar2->nn != 0) {
      bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow);
      uVar4 = (uint)bVar1;
      if (((int)uVar4 < pFVar2->nn) && (0 < iVar3)) {
        iVar5 = 0;
        do {
          iVar5 = iVar5 + 1;
          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);
          uVar4 = uVar4 + bVar1;
          if (pFVar2->nn <= (int)uVar4) break;
          v = v + 1;
        } while (iVar5 < iVar3);
      }
    }
  }
  else if (pFVar2 == (Fts5Data *)0x0) goto LAB_001146d8;
  if (sqlite3Config.bMemstat == 0) {
    (*sqlite3Config.m.xFree)(pFVar2);
    iVar5 = p_00->rc;
  }
  else {
    if (mem0.mutex != (sqlite3_mutex *)0x0) {
      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);
    }
    iVar3 = (*sqlite3Config.m.xSize)(pFVar2);
    sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1;
    sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - iVar3;
    (*sqlite3Config.m.xFree)(pFVar2);
    if (mem0.mutex == (sqlite3_mutex *)0x0) {
      iVar5 = p_00->rc;
    }
    else {
      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);
      iVar5 = p_00->rc;
    }
  }
LAB_001146d8:
  p_00->rc = 0;
  p->bTotalsValid = bCache;
  return iVar5;
}



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

int __regparm3 FUN_00114600(int param_1,undefined4 param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  
  piVar1 = *(int **)(param_1 + 4);
  iVar3 = *(int *)(*piVar1 + 0xc);
  *(undefined4 *)(param_1 + 0xc) = 0;
  *(undefined4 *)(param_1 + 0x10) = 0;
  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);
  iVar2 = FUN_001133e0();
  iVar6 = piVar1[8];
  if (iVar6 == 0) {
    if (*(int *)(iVar2 + 4) != 0) {
      uVar4 = FUN_0003b460();
      uVar4 = uVar4 & 0xff;
      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {
        iVar6 = 0;
        do {
          iVar6 = iVar6 + 1;
          uVar5 = FUN_0003b460();
          uVar4 = uVar4 + (uVar5 & 0xff);
          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;
        } while (iVar6 < iVar3);
      }
    }
  }
  else if (iVar2 == 0) goto LAB_001146d8;
  if (DAT_001bb3e0 == 0) {
    (*DAT_001bb410)(iVar2);
    iVar6 = piVar1[8];
  }
  else {
    if (DAT_001bcdc4 != 0) {
      (*DAT_001bb43c)(DAT_001bcdc4);
    }
    iVar3 = (*DAT_001bb418)(iVar2);
    DAT_001bce04 = DAT_001bce04 + -1;
    DAT_001bcde0 = DAT_001bcde0 - iVar3;
    (*DAT_001bb410)(iVar2);
    if (DAT_001bcdc4 == 0) {
      iVar6 = piVar1[8];
    }
    else {
      (*DAT_001bb444)(DAT_001bcdc4);
      iVar6 = piVar1[8];
    }
  }
LAB_001146d8:
  piVar1[8] = 0;
  *(undefined4 *)(param_1 + 8) = param_2;
  return iVar6;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000172e0
ADD EBX,0xa681f
SUB ESP,0x30
MOV EDI,dword ptr [EAX + 0x4]
MOV ECX,dword ptr [EAX + 0x14]
MOV dword ptr [ESP + 0x10],EAX
MOV dword ptr [ESP + 0x18],EDX
MOV EDX,EAX
MOV EAX,dword ptr [EDI]
MOV dword ptr [ESP + 0x1c],ECX
MOV EAX,dword ptr [EAX + 0xc]
MOV dword ptr [EDX + 0xc],0x0
MOV dword ptr [EDX + 0x10],0x0
MOV dword ptr [ESP + 0x14],EAX
SHL EAX,0x3
PUSH EAX
PUSH 0x0
PUSH ECX
CALL 0x00015440
MOV EDX,0x1
XOR ECX,ECX
MOV EAX,EDI
CALL 0x001133e0
MOV ESI,dword ptr [EDI + 0x20]
ADD ESP,0x10
MOV EBP,EAX
TEST ESI,ESI
JNZ 0x001146f8
MOV ECX,dword ptr [EAX + 0x4]
TEST ECX,ECX
JNZ 0x00114720
MOV EDX,dword ptr [EBX + 0x5b8]
TEST EDX,EDX
JZ 0x0011470a
MOV EAX,dword ptr [EBX + 0x1f9c]
TEST EAX,EAX
JZ 0x00114697
SUB ESP,0xc
PUSH EAX
CALL dword ptr [EBX + 0x614]
ADD ESP,0x10
SUB ESP,0xc
PUSH EBP
CALL dword ptr [EBX + 0x5f0]
SUB dword ptr [EBX + 0x1fdc],0x1
SUB dword ptr [EBX + 0x1fb8],EAX
MOV dword ptr [ESP],EBP
CALL dword ptr [EBX + 0x5e8]
MOV EAX,dword ptr [EBX + 0x1f9c]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x001147a8
SUB ESP,0xc
PUSH EAX
CALL dword ptr [EBX + 0x61c]
MOV ESI,dword ptr [EDI + 0x20]
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
MOV EBX,dword ptr [ESP + 0x14]
MOV dword ptr [EDI + 0x20],0x0
MOV dword ptr [EAX + 0x8],EBX
ADD ESP,0x2c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST EAX,EAX
JZ 0x001146d8
MOV EDX,dword ptr [EBX + 0x5b8]
TEST EDX,EDX
JNZ 0x00114680
SUB ESP,0xc
PUSH EBP
CALL dword ptr [EBX + 0x5e8]
MOV ESI,dword ptr [EDI + 0x20]
ADD ESP,0x10
JMP 0x001146d8
MOV EAX,dword ptr [ESP + 0xc]
LEA EDX,[EAX + 0xc]
MOV EAX,dword ptr [EBP]
CALL 0x0003b460
MOVZX ECX,AL
CMP ECX,dword ptr [EBP + 0x4]
JGE 0x00114672
MOV EAX,dword ptr [ESP + 0x10]
TEST EAX,EAX
JLE 0x00114672
MOV EAX,dword ptr [ESP + 0x18]
MOV dword ptr [ESP + 0x1c],EDI
MOV EDI,ECX
MOV ECX,EBP
MOV EBP,ESI
MOV ESI,EAX
JMP 0x00114766
CMP dword ptr [ESP + 0x10],EBP
JLE 0x00114789
MOV EAX,dword ptr [ECX]
MOV EDX,ESI
MOV dword ptr [ESP + 0x18],ECX
ADD EBP,0x1
ADD ESI,0x8
ADD EAX,EDI
CALL 0x0003b460
MOV ECX,dword ptr [ESP + 0x18]
MOVZX EAX,AL
ADD EDI,EAX
CMP EDI,dword ptr [ECX + 0x4]
JL 0x00114760
MOV EDX,dword ptr [EBX + 0x5b8]
MOV EDI,dword ptr [ESP + 0x1c]
MOV EBP,ECX
TEST EDX,EDX
JNZ 0x00114680
JMP 0x0011470a
MOV ESI,dword ptr [EDI + 0x20]
JMP 0x001146d8
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 FUN_00114600(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  iVar3 = *(int *)(*piVar1 + 0xc);\n  *(undefined4 *)(param_1 + 0xc) = 0;\n  *(undefined4 *)(param_1 + 0x10) = 0;\n  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);\n  iVar2 = FUN_001133e0();\n  iVar6 = piVar1[8];\n  if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;\n  if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }\nLAB_001146d8:\n  piVar1[8] = 0;\n  *(undefined4 *)(param_1 + 8) = param_2;\n  return iVar6;\n}\n\n" comment (function_definition "int __regparm3 FUN_00114600(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  iVar3 = *(int *)(*piVar1 + 0xc);\n  *(undefined4 *)(param_1 + 0xc) = 0;\n  *(undefined4 *)(param_1 + 0x10) = 0;\n  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);\n  iVar2 = FUN_001133e0();\n  iVar6 = piVar1[8];\n  if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;\n  if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }\nLAB_001146d8:\n  piVar1[8] = 0;\n  *(undefined4 *)(param_1 + 8) = param_2;\n  return iVar6;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00114600(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  iVar3 = *(int *)(*piVar1 + 0xc);\n  *(undefined4 *)(param_1 + 0xc) = 0;\n  *(undefined4 *)(param_1 + 0x10) = 0;\n  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);\n  iVar2 = FUN_001133e0();\n  iVar6 = piVar1[8];\n  if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;\n  if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }\nLAB_001146d8:\n  piVar1[8] = 0;\n  *(undefined4 *)(param_1 + 8) = param_2;\n  return iVar6;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (expression_statement "piVar1 = *(int **)(param_1 + 4);" (assignment_expression "piVar1 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = *(int *)(*piVar1 + 0xc);" (assignment_expression "iVar3 = *(int *)(*piVar1 + 0xc)" identifier = (pointer_expression "*(int *)(*piVar1 + 0xc)" * (cast_expression "(int *)(*piVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar1 + 0xc)" ( (binary_expression "*piVar1 + 0xc" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);" (call_expression "memset(*(void **)(param_1 + 0x14),0,iVar3 << 3)" identifier (argument_list "(*(void **)(param_1 + 0x14),0,iVar3 << 3)" ( (pointer_expression "*(void **)(param_1 + 0x14)" * (cast_expression "(void **)(param_1 + 0x14)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) , number_literal , (binary_expression "iVar3 << 3" identifier << number_literal) ))) ;) (expression_statement "iVar2 = FUN_001133e0();" (assignment_expression "iVar2 = FUN_001133e0()" identifier = (call_expression "FUN_001133e0()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" identifier = (subscript_expression "piVar1[8]" identifier [ number_literal ])) ;) (if_statement "if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }" { (if_statement "if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }" if (parenthesized_expression "(*(int *)(iVar2 + 4) != 0)" ( (binary_expression "*(int *)(iVar2 + 4) != 0" (pointer_expression "*(int *)(iVar2 + 4)" * (cast_expression "(int *)(iVar2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 4)" ( (binary_expression "iVar2 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }" { (expression_statement "uVar4 = FUN_0003b460();" (assignment_expression "uVar4 = FUN_0003b460()" identifier = (call_expression "FUN_0003b460()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = uVar4 & 0xff;" (assignment_expression "uVar4 = uVar4 & 0xff" identifier = (binary_expression "uVar4 & 0xff" identifier & number_literal)) ;) (if_statement "if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }" if (parenthesized_expression "(((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3))" ( (binary_expression "((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)" (parenthesized_expression "((int)uVar4 < *(int *)(iVar2 + 4))" ( (binary_expression "(int)uVar4 < *(int *)(iVar2 + 4)" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < (pointer_expression "*(int *)(iVar2 + 4)" * (cast_expression "(int *)(iVar2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 4)" ( (binary_expression "iVar2 + 4" identifier + number_literal) ))))) )) && (parenthesized_expression "(0 < iVar3)" ( (binary_expression "0 < iVar3" number_literal < identifier) ))) )) (compound_statement "{\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (do_statement "do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);" do (compound_statement "{\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = FUN_0003b460();" (assignment_expression "uVar5 = FUN_0003b460()" identifier = (call_expression "FUN_0003b460()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = uVar4 + (uVar5 & 0xff);" (assignment_expression "uVar4 = uVar4 + (uVar5 & 0xff)" identifier = (binary_expression "uVar4 + (uVar5 & 0xff)" identifier + (parenthesized_expression "(uVar5 & 0xff)" ( (binary_expression "uVar5 & 0xff" identifier & number_literal) )))) ;) (if_statement "if (*(int *)(iVar2 + 4) <= (int)uVar4) break;" if (parenthesized_expression "(*(int *)(iVar2 + 4) <= (int)uVar4)" ( (binary_expression "*(int *)(iVar2 + 4) <= (int)uVar4" (pointer_expression "*(int *)(iVar2 + 4)" * (cast_expression "(int *)(iVar2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 4)" ( (binary_expression "iVar2 + 4" identifier + number_literal) )))) <= (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(iVar6 < iVar3)" ( (binary_expression "iVar6 < iVar3" identifier < identifier) )) ;) })) })) }) (else_clause "else if (iVar2 == 0) goto LAB_001146d8;" else (if_statement "if (iVar2 == 0) goto LAB_001146d8;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001146d8;" goto statement_identifier ;)))) (if_statement "if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }" if (parenthesized_expression "(DAT_001bb3e0 == 0)" ( (binary_expression "DAT_001bb3e0 == 0" identifier == number_literal) )) (compound_statement "{\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }" { (expression_statement "(*DAT_001bb410)(iVar2);" (call_expression "(*DAT_001bb410)(iVar2)" (parenthesized_expression "(*DAT_001bb410)" ( (pointer_expression "*DAT_001bb410" * identifier) )) (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" identifier = (subscript_expression "piVar1[8]" identifier [ number_literal ])) ;) }) (else_clause "else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }" else (compound_statement "{\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }" { (if_statement "if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }" if (parenthesized_expression "(DAT_001bcdc4 != 0)" ( (binary_expression "DAT_001bcdc4 != 0" identifier != number_literal) )) (compound_statement "{\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }" { (expression_statement "(*DAT_001bb43c)(DAT_001bcdc4);" (call_expression "(*DAT_001bb43c)(DAT_001bcdc4)" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(DAT_001bcdc4)" ( identifier ))) ;) })) (expression_statement "iVar3 = (*DAT_001bb418)(iVar2);" (assignment_expression "iVar3 = (*DAT_001bb418)(iVar2)" identifier = (call_expression "(*DAT_001bb418)(iVar2)" (parenthesized_expression "(*DAT_001bb418)" ( (pointer_expression "*DAT_001bb418" * identifier) )) (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "DAT_001bce04 = DAT_001bce04 + -1;" (assignment_expression "DAT_001bce04 = DAT_001bce04 + -1" identifier = (binary_expression "DAT_001bce04 + -1" identifier + number_literal)) ;) (expression_statement "DAT_001bcde0 = DAT_001bcde0 - iVar3;" (assignment_expression "DAT_001bcde0 = DAT_001bcde0 - iVar3" identifier = (binary_expression "DAT_001bcde0 - iVar3" identifier - identifier)) ;) (expression_statement "(*DAT_001bb410)(iVar2);" (call_expression "(*DAT_001bb410)(iVar2)" (parenthesized_expression "(*DAT_001bb410)" ( (pointer_expression "*DAT_001bb410" * identifier) )) (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }" if (parenthesized_expression "(DAT_001bcdc4 == 0)" ( (binary_expression "DAT_001bcdc4 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar6 = piVar1[8];\n    }" { (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" identifier = (subscript_expression "piVar1[8]" identifier [ number_literal ])) ;) }) (else_clause "else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }" else (compound_statement "{\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }" { (expression_statement "(*DAT_001bb444)(DAT_001bcdc4);" (call_expression "(*DAT_001bb444)(DAT_001bcdc4)" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(DAT_001bcdc4)" ( identifier ))) ;) (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" identifier = (subscript_expression "piVar1[8]" identifier [ number_literal ])) ;) }))) }))) (labeled_statement "LAB_001146d8:\n  piVar1[8] = 0;" statement_identifier : (expression_statement "piVar1[8] = 0;" (assignment_expression "piVar1[8] = 0" (subscript_expression "piVar1[8]" identifier [ number_literal ]) = number_literal) ;)) (expression_statement "*(undefined4 *)(param_1 + 8) = param_2;" (assignment_expression "*(undefined4 *)(param_1 + 8) = param_2" (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar6;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 fts5StorageLoadTotals(Fts5Storage *p,int bCache)\n\n{\n  Fts5Index *p_00;\n  byte bVar1;\n  Fts5Data *pFVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  u64 *v;\n  u64 *puVar6;\n  undefined4 uVar7;\n  \n  p_00 = p->pIndex;\n  v = (u64 *)p->aTotalSize;\n  iVar3 = p_00->pConfig->nCol;\n  *(undefined4 *)&p->nTotalRow = 0;\n  *(undefined4 *)((int)&p->nTotalRow + 4) = 0;\n  uVar7 = 0;\n  puVar6 = v;\n  memset(v,0,iVar3 << 3);\n  pFVar2 = fts5DataRead(p_00,CONCAT44(uVar7,puVar6));\n  iVar5 = p_00->rc;\n  if (iVar5 == 0) {\n    if (pFVar2->nn != 0) {\n      bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow);\n      uVar4 = (uint)bVar1;\n      if (((int)uVar4 < pFVar2->nn) && (0 < iVar3)) {\n        iVar5 = 0;\n        do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);\n      }\n    }\n  }\n  else if (pFVar2 == (Fts5Data *)0x0) goto LAB_001146d8;\n  if (sqlite3Config.bMemstat == 0) {\n    (*sqlite3Config.m.xFree)(pFVar2);\n    iVar5 = p_00->rc;\n  }\n  else {\n    if (mem0.mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);\n    }\n    iVar3 = (*sqlite3Config.m.xSize)(pFVar2);\n    sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1;\n    sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - iVar3;\n    (*sqlite3Config.m.xFree)(pFVar2);\n    if (mem0.mutex == (sqlite3_mutex *)0x0) {\n      iVar5 = p_00->rc;\n    }\n    else {\n      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);\n      iVar5 = p_00->rc;\n    }\n  }\nLAB_001146d8:\n  p_00->rc = 0;\n  p->bTotalsValid = bCache;\n  return iVar5;\n}\n\n" comment (function_definition "int __regparm3 fts5StorageLoadTotals(Fts5Storage *p,int bCache)\n\n{\n  Fts5Index *p_00;\n  byte bVar1;\n  Fts5Data *pFVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  u64 *v;\n  u64 *puVar6;\n  undefined4 uVar7;\n  \n  p_00 = p->pIndex;\n  v = (u64 *)p->aTotalSize;\n  iVar3 = p_00->pConfig->nCol;\n  *(undefined4 *)&p->nTotalRow = 0;\n  *(undefined4 *)((int)&p->nTotalRow + 4) = 0;\n  uVar7 = 0;\n  puVar6 = v;\n  memset(v,0,iVar3 << 3);\n  pFVar2 = fts5DataRead(p_00,CONCAT44(uVar7,puVar6));\n  iVar5 = p_00->rc;\n  if (iVar5 == 0) {\n    if (pFVar2->nn != 0) {\n      bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow);\n      uVar4 = (uint)bVar1;\n      if (((int)uVar4 < pFVar2->nn) && (0 < iVar3)) {\n        iVar5 = 0;\n        do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);\n      }\n    }\n  }\n  else if (pFVar2 == (Fts5Data *)0x0) goto LAB_001146d8;\n  if (sqlite3Config.bMemstat == 0) {\n    (*sqlite3Config.m.xFree)(pFVar2);\n    iVar5 = p_00->rc;\n  }\n  else {\n    if (mem0.mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);\n    }\n    iVar3 = (*sqlite3Config.m.xSize)(pFVar2);\n    sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1;\n    sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - iVar3;\n    (*sqlite3Config.m.xFree)(pFVar2);\n    if (mem0.mutex == (sqlite3_mutex *)0x0) {\n      iVar5 = p_00->rc;\n    }\n    else {\n      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);\n      iVar5 = p_00->rc;\n    }\n  }\nLAB_001146d8:\n  p_00->rc = 0;\n  p->bTotalsValid = bCache;\n  return iVar5;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "fts5StorageLoadTotals(Fts5Storage *p,int bCache)" identifier (parameter_list "(Fts5Storage *p,int bCache)" ( (parameter_declaration "Fts5Storage *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "int bCache" primitive_type identifier) ))) (compound_statement "{\n  Fts5Index *p_00;\n  byte bVar1;\n  Fts5Data *pFVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  u64 *v;\n  u64 *puVar6;\n  undefined4 uVar7;\n  \n  p_00 = p->pIndex;\n  v = (u64 *)p->aTotalSize;\n  iVar3 = p_00->pConfig->nCol;\n  *(undefined4 *)&p->nTotalRow = 0;\n  *(undefined4 *)((int)&p->nTotalRow + 4) = 0;\n  uVar7 = 0;\n  puVar6 = v;\n  memset(v,0,iVar3 << 3);\n  pFVar2 = fts5DataRead(p_00,CONCAT44(uVar7,puVar6));\n  iVar5 = p_00->rc;\n  if (iVar5 == 0) {\n    if (pFVar2->nn != 0) {\n      bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow);\n      uVar4 = (uint)bVar1;\n      if (((int)uVar4 < pFVar2->nn) && (0 < iVar3)) {\n        iVar5 = 0;\n        do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);\n      }\n    }\n  }\n  else if (pFVar2 == (Fts5Data *)0x0) goto LAB_001146d8;\n  if (sqlite3Config.bMemstat == 0) {\n    (*sqlite3Config.m.xFree)(pFVar2);\n    iVar5 = p_00->rc;\n  }\n  else {\n    if (mem0.mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);\n    }\n    iVar3 = (*sqlite3Config.m.xSize)(pFVar2);\n    sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1;\n    sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - iVar3;\n    (*sqlite3Config.m.xFree)(pFVar2);\n    if (mem0.mutex == (sqlite3_mutex *)0x0) {\n      iVar5 = p_00->rc;\n    }\n    else {\n      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);\n      iVar5 = p_00->rc;\n    }\n  }\nLAB_001146d8:\n  p_00->rc = 0;\n  p->bTotalsValid = bCache;\n  return iVar5;\n}" { (declaration "Fts5Index *p_00;" type_identifier (pointer_declarator "*p_00" * identifier) ;) (declaration "byte bVar1;" type_identifier identifier ;) (declaration "Fts5Data *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "u64 *v;" type_identifier (pointer_declarator "*v" * identifier) ;) (declaration "u64 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (expression_statement "p_00 = p->pIndex;" (assignment_expression "p_00 = p->pIndex" identifier = (field_expression "p->pIndex" identifier -> field_identifier)) ;) (expression_statement "v = (u64 *)p->aTotalSize;" (assignment_expression "v = (u64 *)p->aTotalSize" identifier = (cast_expression "(u64 *)p->aTotalSize" ( (type_descriptor "u64 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "p->aTotalSize" identifier -> field_identifier))) ;) (expression_statement "iVar3 = p_00->pConfig->nCol;" (assignment_expression "iVar3 = p_00->pConfig->nCol" identifier = (field_expression "p_00->pConfig->nCol" (field_expression "p_00->pConfig" identifier -> field_identifier) -> field_identifier)) ;) (expression_statement "*(undefined4 *)&p->nTotalRow = 0;" (assignment_expression "*(undefined4 *)&p->nTotalRow = 0" (pointer_expression "*(undefined4 *)&p->nTotalRow" * (cast_expression "(undefined4 *)&p->nTotalRow" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&p->nTotalRow" & (field_expression "p->nTotalRow" identifier -> field_identifier)))) = number_literal) ;) (expression_statement "*(undefined4 *)((int)&p->nTotalRow + 4) = 0;" (assignment_expression "*(undefined4 *)((int)&p->nTotalRow + 4) = 0" (pointer_expression "*(undefined4 *)((int)&p->nTotalRow + 4)" * (cast_expression "(undefined4 *)((int)&p->nTotalRow + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&p->nTotalRow + 4)" ( (binary_expression "(int)&p->nTotalRow + 4" (cast_expression "(int)&p->nTotalRow" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&p->nTotalRow" & (field_expression "p->nTotalRow" identifier -> field_identifier))) + number_literal) )))) = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (expression_statement "puVar6 = v;" (assignment_expression "puVar6 = v" identifier = identifier) ;) (expression_statement "memset(v,0,iVar3 << 3);" (call_expression "memset(v,0,iVar3 << 3)" identifier (argument_list "(v,0,iVar3 << 3)" ( identifier , number_literal , (binary_expression "iVar3 << 3" identifier << number_literal) ))) ;) (expression_statement "pFVar2 = fts5DataRead(p_00,CONCAT44(uVar7,puVar6));" (assignment_expression "pFVar2 = fts5DataRead(p_00,CONCAT44(uVar7,puVar6))" identifier = (call_expression "fts5DataRead(p_00,CONCAT44(uVar7,puVar6))" identifier (argument_list "(p_00,CONCAT44(uVar7,puVar6))" ( identifier , (call_expression "CONCAT44(uVar7,puVar6)" identifier (argument_list "(uVar7,puVar6)" ( identifier , identifier ))) )))) ;) (expression_statement "iVar5 = p_00->rc;" (assignment_expression "iVar5 = p_00->rc" identifier = (field_expression "p_00->rc" identifier -> field_identifier)) ;) (if_statement "if (iVar5 == 0) {\n    if (pFVar2->nn != 0) {\n      bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow);\n      uVar4 = (uint)bVar1;\n      if (((int)uVar4 < pFVar2->nn) && (0 < iVar3)) {\n        iVar5 = 0;\n        do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);\n      }\n    }\n  }\n  else if (pFVar2 == (Fts5Data *)0x0) goto LAB_001146d8;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    if (pFVar2->nn != 0) {\n      bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow);\n      uVar4 = (uint)bVar1;\n      if (((int)uVar4 < pFVar2->nn) && (0 < iVar3)) {\n        iVar5 = 0;\n        do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);\n      }\n    }\n  }" { (if_statement "if (pFVar2->nn != 0) {\n      bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow);\n      uVar4 = (uint)bVar1;\n      if (((int)uVar4 < pFVar2->nn) && (0 < iVar3)) {\n        iVar5 = 0;\n        do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);\n      }\n    }" if (parenthesized_expression "(pFVar2->nn != 0)" ( (binary_expression "pFVar2->nn != 0" (field_expression "pFVar2->nn" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n      bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow);\n      uVar4 = (uint)bVar1;\n      if (((int)uVar4 < pFVar2->nn) && (0 < iVar3)) {\n        iVar5 = 0;\n        do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);\n      }\n    }" { (expression_statement "bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow);" (assignment_expression "bVar1 = sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow)" identifier = (call_expression "sqlite3GetVarint(pFVar2->p,(u64 *)&p->nTotalRow)" identifier (argument_list "(pFVar2->p,(u64 *)&p->nTotalRow)" ( (field_expression "pFVar2->p" identifier -> field_identifier) , (cast_expression "(u64 *)&p->nTotalRow" ( (type_descriptor "u64 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&p->nTotalRow" & (field_expression "p->nTotalRow" identifier -> field_identifier))) )))) ;) (expression_statement "uVar4 = (uint)bVar1;" (assignment_expression "uVar4 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (((int)uVar4 < pFVar2->nn) && (0 < iVar3)) {\n        iVar5 = 0;\n        do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);\n      }" if (parenthesized_expression "(((int)uVar4 < pFVar2->nn) && (0 < iVar3))" ( (binary_expression "((int)uVar4 < pFVar2->nn) && (0 < iVar3)" (parenthesized_expression "((int)uVar4 < pFVar2->nn)" ( (binary_expression "(int)uVar4 < pFVar2->nn" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < (field_expression "pFVar2->nn" identifier -> field_identifier)) )) && (parenthesized_expression "(0 < iVar3)" ( (binary_expression "0 < iVar3" number_literal < identifier) ))) )) (compound_statement "{\n        iVar5 = 0;\n        do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);\n      }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        } while (iVar5 < iVar3);" do (compound_statement "{\n          iVar5 = iVar5 + 1;\n          bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);\n          uVar4 = uVar4 + bVar1;\n          if (pFVar2->nn <= (int)uVar4) break;\n          v = v + 1;\n        }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v);" (assignment_expression "bVar1 = sqlite3GetVarint(pFVar2->p + uVar4,v)" identifier = (call_expression "sqlite3GetVarint(pFVar2->p + uVar4,v)" identifier (argument_list "(pFVar2->p + uVar4,v)" ( (binary_expression "pFVar2->p + uVar4" (field_expression "pFVar2->p" identifier -> field_identifier) + identifier) , identifier )))) ;) (expression_statement "uVar4 = uVar4 + bVar1;" (assignment_expression "uVar4 = uVar4 + bVar1" identifier = (binary_expression "uVar4 + bVar1" identifier + identifier)) ;) (if_statement "if (pFVar2->nn <= (int)uVar4) break;" if (parenthesized_expression "(pFVar2->nn <= (int)uVar4)" ( (binary_expression "pFVar2->nn <= (int)uVar4" (field_expression "pFVar2->nn" identifier -> field_identifier) <= (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) )) (break_statement "break;" break ;)) (expression_statement "v = v + 1;" (assignment_expression "v = v + 1" identifier = (binary_expression "v + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 < iVar3)" ( (binary_expression "iVar5 < iVar3" identifier < identifier) )) ;) })) })) }) (else_clause "else if (pFVar2 == (Fts5Data *)0x0) goto LAB_001146d8;" else (if_statement "if (pFVar2 == (Fts5Data *)0x0) goto LAB_001146d8;" if (parenthesized_expression "(pFVar2 == (Fts5Data *)0x0)" ( (binary_expression "pFVar2 == (Fts5Data *)0x0" identifier == (cast_expression "(Fts5Data *)0x0" ( (type_descriptor "Fts5Data *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_001146d8;" goto statement_identifier ;)))) (if_statement "if (sqlite3Config.bMemstat == 0) {\n    (*sqlite3Config.m.xFree)(pFVar2);\n    iVar5 = p_00->rc;\n  }\n  else {\n    if (mem0.mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);\n    }\n    iVar3 = (*sqlite3Config.m.xSize)(pFVar2);\n    sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1;\n    sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - iVar3;\n    (*sqlite3Config.m.xFree)(pFVar2);\n    if (mem0.mutex == (sqlite3_mutex *)0x0) {\n      iVar5 = p_00->rc;\n    }\n    else {\n      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);\n      iVar5 = p_00->rc;\n    }\n  }" if (parenthesized_expression "(sqlite3Config.bMemstat == 0)" ( (binary_expression "sqlite3Config.bMemstat == 0" (field_expression "sqlite3Config.bMemstat" identifier . field_identifier) == number_literal) )) (compound_statement "{\n    (*sqlite3Config.m.xFree)(pFVar2);\n    iVar5 = p_00->rc;\n  }" { (expression_statement "(*sqlite3Config.m.xFree)(pFVar2);" (call_expression "(*sqlite3Config.m.xFree)(pFVar2)" (parenthesized_expression "(*sqlite3Config.m.xFree)" ( (pointer_expression "*sqlite3Config.m.xFree" * (field_expression "sqlite3Config.m.xFree" (field_expression "sqlite3Config.m" identifier . field_identifier) . field_identifier)) )) (argument_list "(pFVar2)" ( identifier ))) ;) (expression_statement "iVar5 = p_00->rc;" (assignment_expression "iVar5 = p_00->rc" identifier = (field_expression "p_00->rc" identifier -> field_identifier)) ;) }) (else_clause "else {\n    if (mem0.mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);\n    }\n    iVar3 = (*sqlite3Config.m.xSize)(pFVar2);\n    sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1;\n    sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - iVar3;\n    (*sqlite3Config.m.xFree)(pFVar2);\n    if (mem0.mutex == (sqlite3_mutex *)0x0) {\n      iVar5 = p_00->rc;\n    }\n    else {\n      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);\n      iVar5 = p_00->rc;\n    }\n  }" else (compound_statement "{\n    if (mem0.mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);\n    }\n    iVar3 = (*sqlite3Config.m.xSize)(pFVar2);\n    sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1;\n    sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - iVar3;\n    (*sqlite3Config.m.xFree)(pFVar2);\n    if (mem0.mutex == (sqlite3_mutex *)0x0) {\n      iVar5 = p_00->rc;\n    }\n    else {\n      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);\n      iVar5 = p_00->rc;\n    }\n  }" { (if_statement "if (mem0.mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);\n    }" if (parenthesized_expression "(mem0.mutex != (sqlite3_mutex *)0x0)" ( (binary_expression "mem0.mutex != (sqlite3_mutex *)0x0" (field_expression "mem0.mutex" identifier . field_identifier) != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);\n    }" { (expression_statement "(*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);" (call_expression "(*sqlite3Config.mutex.xMutexEnter)(mem0.mutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexEnter)" ( (pointer_expression "*sqlite3Config.mutex.xMutexEnter" * (field_expression "sqlite3Config.mutex.xMutexEnter" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(mem0.mutex)" ( (field_expression "mem0.mutex" identifier . field_identifier) ))) ;) })) (expression_statement "iVar3 = (*sqlite3Config.m.xSize)(pFVar2);" (assignment_expression "iVar3 = (*sqlite3Config.m.xSize)(pFVar2)" identifier = (call_expression "(*sqlite3Config.m.xSize)(pFVar2)" (parenthesized_expression "(*sqlite3Config.m.xSize)" ( (pointer_expression "*sqlite3Config.m.xSize" * (field_expression "sqlite3Config.m.xSize" (field_expression "sqlite3Config.m" identifier . field_identifier) . field_identifier)) )) (argument_list "(pFVar2)" ( identifier )))) ;) (expression_statement "sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1;" (assignment_expression "sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1" (subscript_expression "sqlite3Stat.nowValue[9]" (field_expression "sqlite3Stat.nowValue" identifier . field_identifier) [ number_literal ]) = (binary_expression "sqlite3Stat.nowValue[9] - 1" (subscript_expression "sqlite3Stat.nowValue[9]" (field_expression "sqlite3Stat.nowValue" identifier . field_identifier) [ number_literal ]) - number_literal)) ;) (expression_statement "sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - iVar3;" (assignment_expression "sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - iVar3" (subscript_expression "sqlite3Stat.nowValue[0]" (field_expression "sqlite3Stat.nowValue" identifier . field_identifier) [ number_literal ]) = (binary_expression "sqlite3Stat.nowValue[0] - iVar3" (subscript_expression "sqlite3Stat.nowValue[0]" (field_expression "sqlite3Stat.nowValue" identifier . field_identifier) [ number_literal ]) - identifier)) ;) (expression_statement "(*sqlite3Config.m.xFree)(pFVar2);" (call_expression "(*sqlite3Config.m.xFree)(pFVar2)" (parenthesized_expression "(*sqlite3Config.m.xFree)" ( (pointer_expression "*sqlite3Config.m.xFree" * (field_expression "sqlite3Config.m.xFree" (field_expression "sqlite3Config.m" identifier . field_identifier) . field_identifier)) )) (argument_list "(pFVar2)" ( identifier ))) ;) (if_statement "if (mem0.mutex == (sqlite3_mutex *)0x0) {\n      iVar5 = p_00->rc;\n    }\n    else {\n      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);\n      iVar5 = p_00->rc;\n    }" if (parenthesized_expression "(mem0.mutex == (sqlite3_mutex *)0x0)" ( (binary_expression "mem0.mutex == (sqlite3_mutex *)0x0" (field_expression "mem0.mutex" identifier . field_identifier) == (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar5 = p_00->rc;\n    }" { (expression_statement "iVar5 = p_00->rc;" (assignment_expression "iVar5 = p_00->rc" identifier = (field_expression "p_00->rc" identifier -> field_identifier)) ;) }) (else_clause "else {\n      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);\n      iVar5 = p_00->rc;\n    }" else (compound_statement "{\n      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);\n      iVar5 = p_00->rc;\n    }" { (expression_statement "(*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);" (call_expression "(*sqlite3Config.mutex.xMutexLeave)(mem0.mutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexLeave)" ( (pointer_expression "*sqlite3Config.mutex.xMutexLeave" * (field_expression "sqlite3Config.mutex.xMutexLeave" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(mem0.mutex)" ( (field_expression "mem0.mutex" identifier . field_identifier) ))) ;) (expression_statement "iVar5 = p_00->rc;" (assignment_expression "iVar5 = p_00->rc" identifier = (field_expression "p_00->rc" identifier -> field_identifier)) ;) }))) }))) (labeled_statement "LAB_001146d8:\n  p_00->rc = 0;" statement_identifier : (expression_statement "p_00->rc = 0;" (assignment_expression "p_00->rc = 0" (field_expression "p_00->rc" identifier -> field_identifier) = number_literal) ;)) (expression_statement "p->bTotalsValid = bCache;" (assignment_expression "p->bTotalsValid = bCache" (field_expression "p->bTotalsValid" identifier -> field_identifier) = identifier) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "int __regparm3 FUN_00114600(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  iVar3 = *(int *)(*piVar1 + 0xc);\n  *(undefined4 *)(param_1 + 0xc) = 0;\n  *(undefined4 *)(param_1 + 0x10) = 0;\n  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);\n  iVar2 = FUN_001133e0();\n  iVar6 = piVar1[8];\n  if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;\n  if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }\nLAB_001146d8:\n  piVar1[8] = 0;\n  *(undefined4 *)(param_1 + 8) = param_2;\n  return iVar6;\n}\n\n" (function_definition "int __regparm3 FUN_00114600(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  iVar3 = *(int *)(*piVar1 + 0xc);\n  *(undefined4 *)(param_1 + 0xc) = 0;\n  *(undefined4 *)(param_1 + 0x10) = 0;\n  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);\n  iVar2 = FUN_001133e0();\n  iVar6 = piVar1[8];\n  if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;\n  if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }\nLAB_001146d8:\n  piVar1[8] = 0;\n  *(undefined4 *)(param_1 + 8) = param_2;\n  return iVar6;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00114600(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  iVar3 = *(int *)(*piVar1 + 0xc);\n  *(undefined4 *)(param_1 + 0xc) = 0;\n  *(undefined4 *)(param_1 + 0x10) = 0;\n  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);\n  iVar2 = FUN_001133e0();\n  iVar6 = piVar1[8];\n  if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;\n  if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }\nLAB_001146d8:\n  piVar1[8] = 0;\n  *(undefined4 *)(param_1 + 8) = param_2;\n  return iVar6;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (expression_statement "piVar1 = *(int **)(param_1 + 4);" (assignment_expression "piVar1 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = *(int *)(*piVar1 + 0xc);" (assignment_expression "iVar3 = *(int *)(*piVar1 + 0xc)" identifier = (pointer_expression "*(int *)(*piVar1 + 0xc)" * (cast_expression "(int *)(*piVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar1 + 0xc)" ( (binary_expression "*piVar1 + 0xc" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);" (call_expression "memset(*(void **)(param_1 + 0x14),0,iVar3 << 3)" identifier (argument_list "(*(void **)(param_1 + 0x14),0,iVar3 << 3)" ( (pointer_expression "*(void **)(param_1 + 0x14)" * (cast_expression "(void **)(param_1 + 0x14)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) , number_literal , (binary_expression "iVar3 << 3" identifier << number_literal) ))) ;) (expression_statement "iVar2 = FUN_001133e0();" (assignment_expression "iVar2 = FUN_001133e0()" identifier = (call_expression "FUN_001133e0()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" identifier = (subscript_expression "piVar1[8]" identifier [ number_literal ])) ;) (if_statement "if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }" { (if_statement "if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }" if (parenthesized_expression "(*(int *)(iVar2 + 4) != 0)" ( (binary_expression "*(int *)(iVar2 + 4) != 0" (pointer_expression "*(int *)(iVar2 + 4)" * (cast_expression "(int *)(iVar2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 4)" ( (binary_expression "iVar2 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }" { (expression_statement "uVar4 = FUN_0003b460();" (assignment_expression "uVar4 = FUN_0003b460()" identifier = (call_expression "FUN_0003b460()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = uVar4 & 0xff;" (assignment_expression "uVar4 = uVar4 & 0xff" identifier = (binary_expression "uVar4 & 0xff" identifier & number_literal)) ;) (if_statement "if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }" if (parenthesized_expression "(((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3))" ( (binary_expression "((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)" (parenthesized_expression "((int)uVar4 < *(int *)(iVar2 + 4))" ( (binary_expression "(int)uVar4 < *(int *)(iVar2 + 4)" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < (pointer_expression "*(int *)(iVar2 + 4)" * (cast_expression "(int *)(iVar2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 4)" ( (binary_expression "iVar2 + 4" identifier + number_literal) ))))) )) && (parenthesized_expression "(0 < iVar3)" ( (binary_expression "0 < iVar3" number_literal < identifier) ))) )) (compound_statement "{\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (do_statement "do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);" do (compound_statement "{\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = FUN_0003b460();" (assignment_expression "uVar5 = FUN_0003b460()" identifier = (call_expression "FUN_0003b460()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = uVar4 + (uVar5 & 0xff);" (assignment_expression "uVar4 = uVar4 + (uVar5 & 0xff)" identifier = (binary_expression "uVar4 + (uVar5 & 0xff)" identifier + (parenthesized_expression "(uVar5 & 0xff)" ( (binary_expression "uVar5 & 0xff" identifier & number_literal) )))) ;) (if_statement "if (*(int *)(iVar2 + 4) <= (int)uVar4) break;" if (parenthesized_expression "(*(int *)(iVar2 + 4) <= (int)uVar4)" ( (binary_expression "*(int *)(iVar2 + 4) <= (int)uVar4" (pointer_expression "*(int *)(iVar2 + 4)" * (cast_expression "(int *)(iVar2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 4)" ( (binary_expression "iVar2 + 4" identifier + number_literal) )))) <= (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(iVar6 < iVar3)" ( (binary_expression "iVar6 < iVar3" identifier < identifier) )) ;) })) })) }) (else_clause "else if (iVar2 == 0) goto LAB_001146d8;" else (if_statement "if (iVar2 == 0) goto LAB_001146d8;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001146d8;" goto statement_identifier ;)))) (if_statement "if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }" if (parenthesized_expression "(DAT_001bb3e0 == 0)" ( (binary_expression "DAT_001bb3e0 == 0" identifier == number_literal) )) (compound_statement "{\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }" { (expression_statement "(*DAT_001bb410)(iVar2);" (call_expression "(*DAT_001bb410)(iVar2)" (parenthesized_expression "(*DAT_001bb410)" ( (pointer_expression "*DAT_001bb410" * identifier) )) (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" identifier = (subscript_expression "piVar1[8]" identifier [ number_literal ])) ;) }) (else_clause "else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }" else (compound_statement "{\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }" { (if_statement "if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }" if (parenthesized_expression "(DAT_001bcdc4 != 0)" ( (binary_expression "DAT_001bcdc4 != 0" identifier != number_literal) )) (compound_statement "{\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }" { (expression_statement "(*DAT_001bb43c)(DAT_001bcdc4);" (call_expression "(*DAT_001bb43c)(DAT_001bcdc4)" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(DAT_001bcdc4)" ( identifier ))) ;) })) (expression_statement "iVar3 = (*DAT_001bb418)(iVar2);" (assignment_expression "iVar3 = (*DAT_001bb418)(iVar2)" identifier = (call_expression "(*DAT_001bb418)(iVar2)" (parenthesized_expression "(*DAT_001bb418)" ( (pointer_expression "*DAT_001bb418" * identifier) )) (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "DAT_001bce04 = DAT_001bce04 + -1;" (assignment_expression "DAT_001bce04 = DAT_001bce04 + -1" identifier = (binary_expression "DAT_001bce04 + -1" identifier + number_literal)) ;) (expression_statement "DAT_001bcde0 = DAT_001bcde0 - iVar3;" (assignment_expression "DAT_001bcde0 = DAT_001bcde0 - iVar3" identifier = (binary_expression "DAT_001bcde0 - iVar3" identifier - identifier)) ;) (expression_statement "(*DAT_001bb410)(iVar2);" (call_expression "(*DAT_001bb410)(iVar2)" (parenthesized_expression "(*DAT_001bb410)" ( (pointer_expression "*DAT_001bb410" * identifier) )) (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }" if (parenthesized_expression "(DAT_001bcdc4 == 0)" ( (binary_expression "DAT_001bcdc4 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar6 = piVar1[8];\n    }" { (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" identifier = (subscript_expression "piVar1[8]" identifier [ number_literal ])) ;) }) (else_clause "else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }" else (compound_statement "{\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }" { (expression_statement "(*DAT_001bb444)(DAT_001bcdc4);" (call_expression "(*DAT_001bb444)(DAT_001bcdc4)" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(DAT_001bcdc4)" ( identifier ))) ;) (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" identifier = (subscript_expression "piVar1[8]" identifier [ number_literal ])) ;) }))) }))) (labeled_statement "LAB_001146d8:\n  piVar1[8] = 0;" statement_identifier : (expression_statement "piVar1[8] = 0;" (assignment_expression "piVar1[8] = 0" (subscript_expression "piVar1[8]" identifier [ number_literal ]) = number_literal) ;)) (expression_statement "*(undefined4 *)(param_1 + 8) = param_2;" (assignment_expression "*(undefined4 *)(param_1 + 8) = param_2" (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar6;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , (binary_expression IDENT << LIT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT & LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (break_statement break ;)) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) })) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }))) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_00114600(int param_1,undefined4 param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  iVar3 = *(int *)(*piVar1 + 0xc);\n  *(undefined4 *)(param_1 + 0xc) = 0;\n  *(undefined4 *)(param_1 + 0x10) = 0;\n  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);\n  iVar2 = FUN_001133e0();\n  iVar6 = piVar1[8];\n  if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;\n  if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }\nLAB_001146d8:\n  piVar1[8] = 0;\n  *(undefined4 *)(param_1 + 8) = param_2;\n  return iVar6;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00114600(int param_1,undefined4 param_2)" (identifier "FUN_00114600") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  piVar1 = *(int **)(param_1 + 4);\n  iVar3 = *(int *)(*piVar1 + 0xc);\n  *(undefined4 *)(param_1 + 0xc) = 0;\n  *(undefined4 *)(param_1 + 0x10) = 0;\n  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);\n  iVar2 = FUN_001133e0();\n  iVar6 = piVar1[8];\n  if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;\n  if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }\nLAB_001146d8:\n  piVar1[8] = 0;\n  *(undefined4 *)(param_1 + 8) = param_2;\n  return iVar6;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (expression_statement "piVar1 = *(int **)(param_1 + 4);" (assignment_expression "piVar1 = *(int **)(param_1 + 4)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(param_1 + 4)" (* "*") (cast_expression "(int **)(param_1 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "iVar3 = *(int *)(*piVar1 + 0xc);" (assignment_expression "iVar3 = *(int *)(*piVar1 + 0xc)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(*piVar1 + 0xc)" (* "*") (cast_expression "(int *)(*piVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar1 + 0xc)" (( "(") (binary_expression "*piVar1 + 0xc" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);" (call_expression "memset(*(void **)(param_1 + 0x14),0,iVar3 << 3)" (identifier "memset") (argument_list "(*(void **)(param_1 + 0x14),0,iVar3 << 3)" (( "(") (pointer_expression "*(void **)(param_1 + 0x14)" (* "*") (cast_expression "(void **)(param_1 + 0x14)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (, ",") (number_literal "0") (, ",") (binary_expression "iVar3 << 3" (identifier "iVar3") (<< "<<") (number_literal "3")) () ")"))) (; ";")) (expression_statement "iVar2 = FUN_001133e0();" (assignment_expression "iVar2 = FUN_001133e0()" (identifier "iVar2") (= "=") (call_expression "FUN_001133e0()" (identifier "FUN_001133e0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" (identifier "iVar6") (= "=") (subscript_expression "piVar1[8]" (identifier "piVar1") ([ "[") (number_literal "8") (] "]"))) (; ";")) (if_statement "if (iVar6 == 0) {\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }\n  else if (iVar2 == 0) goto LAB_001146d8;" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }\n  }" ({ "{") (if_statement "if (*(int *)(iVar2 + 4) != 0) {\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar2 + 4) != 0)" (( "(") (binary_expression "*(int *)(iVar2 + 4) != 0" (pointer_expression "*(int *)(iVar2 + 4)" (* "*") (cast_expression "(int *)(iVar2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 4)" (( "(") (binary_expression "iVar2 + 4" (identifier "iVar2") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar4 = FUN_0003b460();\n      uVar4 = uVar4 & 0xff;\n      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }\n    }" ({ "{") (expression_statement "uVar4 = FUN_0003b460();" (assignment_expression "uVar4 = FUN_0003b460()" (identifier "uVar4") (= "=") (call_expression "FUN_0003b460()" (identifier "FUN_0003b460") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar4 = uVar4 & 0xff;" (assignment_expression "uVar4 = uVar4 & 0xff" (identifier "uVar4") (= "=") (binary_expression "uVar4 & 0xff" (identifier "uVar4") (& "&") (number_literal "0xff"))) (; ";")) (if_statement "if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }" (if "if") (parenthesized_expression "(((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3))" (( "(") (binary_expression "((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)" (parenthesized_expression "((int)uVar4 < *(int *)(iVar2 + 4))" (( "(") (binary_expression "(int)uVar4 < *(int *)(iVar2 + 4)" (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4")) (< "<") (pointer_expression "*(int *)(iVar2 + 4)" (* "*") (cast_expression "(int *)(iVar2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 4)" (( "(") (binary_expression "iVar2 + 4" (identifier "iVar2") (+ "+") (number_literal "4")) () ")"))))) () ")")) (&& "&&") (parenthesized_expression "(0 < iVar3)" (( "(") (binary_expression "0 < iVar3" (number_literal "0") (< "<") (identifier "iVar3")) () ")"))) () ")")) (compound_statement "{\n        iVar6 = 0;\n        do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);\n      }" ({ "{") (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        } while (iVar6 < iVar3);" (do "do") (compound_statement "{\n          iVar6 = iVar6 + 1;\n          uVar5 = FUN_0003b460();\n          uVar4 = uVar4 + (uVar5 & 0xff);\n          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;\n        }" ({ "{") (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar5 = FUN_0003b460();" (assignment_expression "uVar5 = FUN_0003b460()" (identifier "uVar5") (= "=") (call_expression "FUN_0003b460()" (identifier "FUN_0003b460") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar4 = uVar4 + (uVar5 & 0xff);" (assignment_expression "uVar4 = uVar4 + (uVar5 & 0xff)" (identifier "uVar4") (= "=") (binary_expression "uVar4 + (uVar5 & 0xff)" (identifier "uVar4") (+ "+") (parenthesized_expression "(uVar5 & 0xff)" (( "(") (binary_expression "uVar5 & 0xff" (identifier "uVar5") (& "&") (number_literal "0xff")) () ")")))) (; ";")) (if_statement "if (*(int *)(iVar2 + 4) <= (int)uVar4) break;" (if "if") (parenthesized_expression "(*(int *)(iVar2 + 4) <= (int)uVar4)" (( "(") (binary_expression "*(int *)(iVar2 + 4) <= (int)uVar4" (pointer_expression "*(int *)(iVar2 + 4)" (* "*") (cast_expression "(int *)(iVar2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 4)" (( "(") (binary_expression "iVar2 + 4" (identifier "iVar2") (+ "+") (number_literal "4")) () ")")))) (<= "<=") (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(iVar6 < iVar3)" (( "(") (binary_expression "iVar6 < iVar3" (identifier "iVar6") (< "<") (identifier "iVar3")) () ")")) (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else if (iVar2 == 0) goto LAB_001146d8;" (else "else") (if_statement "if (iVar2 == 0) goto LAB_001146d8;" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_001146d8;" (goto "goto") (statement_identifier "LAB_001146d8") (; ";"))))) (if_statement "if (DAT_001bb3e0 == 0) {\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }\n  else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }" (if "if") (parenthesized_expression "(DAT_001bb3e0 == 0)" (( "(") (binary_expression "DAT_001bb3e0 == 0" (identifier "DAT_001bb3e0") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    (*DAT_001bb410)(iVar2);\n    iVar6 = piVar1[8];\n  }" ({ "{") (expression_statement "(*DAT_001bb410)(iVar2);" (call_expression "(*DAT_001bb410)(iVar2)" (parenthesized_expression "(*DAT_001bb410)" (( "(") (pointer_expression "*DAT_001bb410" (* "*") (identifier "DAT_001bb410")) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" (identifier "iVar6") (= "=") (subscript_expression "piVar1[8]" (identifier "piVar1") ([ "[") (number_literal "8") (] "]"))) (; ";")) (} "}")) (else_clause "else {\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }" (else "else") (compound_statement "{\n    if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }\n    iVar3 = (*DAT_001bb418)(iVar2);\n    DAT_001bce04 = DAT_001bce04 + -1;\n    DAT_001bcde0 = DAT_001bcde0 - iVar3;\n    (*DAT_001bb410)(iVar2);\n    if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }\n  }" ({ "{") (if_statement "if (DAT_001bcdc4 != 0) {\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }" (if "if") (parenthesized_expression "(DAT_001bcdc4 != 0)" (( "(") (binary_expression "DAT_001bcdc4 != 0" (identifier "DAT_001bcdc4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (*DAT_001bb43c)(DAT_001bcdc4);\n    }" ({ "{") (expression_statement "(*DAT_001bb43c)(DAT_001bcdc4);" (call_expression "(*DAT_001bb43c)(DAT_001bcdc4)" (parenthesized_expression "(*DAT_001bb43c)" (( "(") (pointer_expression "*DAT_001bb43c" (* "*") (identifier "DAT_001bb43c")) () ")")) (argument_list "(DAT_001bcdc4)" (( "(") (identifier "DAT_001bcdc4") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = (*DAT_001bb418)(iVar2);" (assignment_expression "iVar3 = (*DAT_001bb418)(iVar2)" (identifier "iVar3") (= "=") (call_expression "(*DAT_001bb418)(iVar2)" (parenthesized_expression "(*DAT_001bb418)" (( "(") (pointer_expression "*DAT_001bb418" (* "*") (identifier "DAT_001bb418")) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "DAT_001bce04 = DAT_001bce04 + -1;" (assignment_expression "DAT_001bce04 = DAT_001bce04 + -1" (identifier "DAT_001bce04") (= "=") (binary_expression "DAT_001bce04 + -1" (identifier "DAT_001bce04") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "DAT_001bcde0 = DAT_001bcde0 - iVar3;" (assignment_expression "DAT_001bcde0 = DAT_001bcde0 - iVar3" (identifier "DAT_001bcde0") (= "=") (binary_expression "DAT_001bcde0 - iVar3" (identifier "DAT_001bcde0") (- "-") (identifier "iVar3"))) (; ";")) (expression_statement "(*DAT_001bb410)(iVar2);" (call_expression "(*DAT_001bb410)(iVar2)" (parenthesized_expression "(*DAT_001bb410)" (( "(") (pointer_expression "*DAT_001bb410" (* "*") (identifier "DAT_001bb410")) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (if_statement "if (DAT_001bcdc4 == 0) {\n      iVar6 = piVar1[8];\n    }\n    else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }" (if "if") (parenthesized_expression "(DAT_001bcdc4 == 0)" (( "(") (binary_expression "DAT_001bcdc4 == 0" (identifier "DAT_001bcdc4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar6 = piVar1[8];\n    }" ({ "{") (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" (identifier "iVar6") (= "=") (subscript_expression "piVar1[8]" (identifier "piVar1") ([ "[") (number_literal "8") (] "]"))) (; ";")) (} "}")) (else_clause "else {\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }" (else "else") (compound_statement "{\n      (*DAT_001bb444)(DAT_001bcdc4);\n      iVar6 = piVar1[8];\n    }" ({ "{") (expression_statement "(*DAT_001bb444)(DAT_001bcdc4);" (call_expression "(*DAT_001bb444)(DAT_001bcdc4)" (parenthesized_expression "(*DAT_001bb444)" (( "(") (pointer_expression "*DAT_001bb444" (* "*") (identifier "DAT_001bb444")) () ")")) (argument_list "(DAT_001bcdc4)" (( "(") (identifier "DAT_001bcdc4") () ")"))) (; ";")) (expression_statement "iVar6 = piVar1[8];" (assignment_expression "iVar6 = piVar1[8]" (identifier "iVar6") (= "=") (subscript_expression "piVar1[8]" (identifier "piVar1") ([ "[") (number_literal "8") (] "]"))) (; ";")) (} "}")))) (} "}")))) (labeled_statement "LAB_001146d8:\n  piVar1[8] = 0;" (statement_identifier "LAB_001146d8") (: ":") (expression_statement "piVar1[8] = 0;" (assignment_expression "piVar1[8] = 0" (subscript_expression "piVar1[8]" (identifier "piVar1") ([ "[") (number_literal "8") (] "]")) (= "=") (number_literal "0")) (; ";"))) (expression_statement "*(undefined4 *)(param_1 + 8) = param_2;" (assignment_expression "*(undefined4 *)(param_1 + 8) = param_2" (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (return_statement "return iVar6;" (return "return") (identifier "iVar6") (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *p,int bCache)

{
  type_2 *p_00;
  type_3 var_8;
  type_4 *var_10;
  int var_2;
  type_5 var_7;
  int var_5;
  type_6 *var_9;
  type_6 *puVar6;
  type_7 uVar7;
  
  p_00 = p->pIndex;
  var_9 = (type_6 *)p->aTotalSize;
  var_2 = p_00->pConfig->nCol;
  *(type_7 *)&p->nTotalRow = 0;
  *(type_7 *)((int)&p->nTotalRow + 4) = 0;
  uVar7 = 0;
  puVar6 = var_9;
  var_1(var_9,0,var_2 << 3);
  var_10 = var_3(p_00,var_4(uVar7,puVar6));
  var_5 = p_00->rc;
  if (var_5 == 0) {
    if (var_10->nn != 0) {
      var_8 = var_6(var_10->p,(type_6 *)&p->nTotalRow);
      var_7 = (type_5)var_8;
      if (((int)var_7 < var_10->nn) && (0 < var_2)) {
        var_5 = 0;
        do {
          var_5 = var_5 + 1;
          var_8 = var_6(var_10->p + var_7,var_9);
          var_7 = var_7 + var_8;
          if (var_10->nn <= (int)var_7) break;
          var_9 = var_9 + 1;
        } while (var_5 < var_2);
      }
    }
  }
  else if (var_10 == (type_4 *)0x0) goto LAB_001146d8;
  if (sqlite3Config.bMemstat == 0) {
    (*sqlite3Config.m.xFree)(var_10);
    var_5 = p_00->rc;
  }
  else {
    if (mem0.mutex != (type_8 *)0x0) {
      (*sqlite3Config.mutex.xMutexEnter)(mem0.mutex);
    }
    var_2 = (*sqlite3Config.m.xSize)(var_10);
    sqlite3Stat.nowValue[9] = sqlite3Stat.nowValue[9] - 1;
    sqlite3Stat.nowValue[0] = sqlite3Stat.nowValue[0] - var_2;
    (*sqlite3Config.m.xFree)(var_10);
    if (mem0.mutex == (type_8 *)0x0) {
      var_5 = p_00->rc;
    }
    else {
      (*sqlite3Config.mutex.xMutexLeave)(mem0.mutex);
      var_5 = p_00->rc;
    }
  }
LAB_001146d8:
  p_00->rc = 0;
  p->bTotalsValid = bCache;
  return var_5;
}


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

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

int __regparm3 MASKED(int param_1,undefined4 param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  
  piVar1 = *(int **)(param_1 + 4);
  iVar3 = *(int *)(*piVar1 + 0xc);
  *(undefined4 *)(param_1 + 0xc) = 0;
  *(undefined4 *)(param_1 + 0x10) = 0;
  memset(*(void **)(param_1 + 0x14),0,iVar3 << 3);
  iVar2 = FUN_001133e0();
  iVar6 = piVar1[8];
  if (iVar6 == 0) {
    if (*(int *)(iVar2 + 4) != 0) {
      uVar4 = FUN_0003b460();
      uVar4 = uVar4 & 0xff;
      if (((int)uVar4 < *(int *)(iVar2 + 4)) && (0 < iVar3)) {
        iVar6 = 0;
        do {
          iVar6 = iVar6 + 1;
          uVar5 = FUN_0003b460();
          uVar4 = uVar4 + (uVar5 & 0xff);
          if (*(int *)(iVar2 + 4) <= (int)uVar4) break;
        } while (iVar6 < iVar3);
      }
    }
  }
  else if (iVar2 == 0) goto LAB_001146d8;
  if (DAT_001bb3e0 == 0) {
    (*DAT_001bb410)(iVar2);
    iVar6 = piVar1[8];
  }
  else {
    if (DAT_001bcdc4 != 0) {
      (*DAT_001bb43c)(DAT_001bcdc4);
    }
    iVar3 = (*DAT_001bb418)(iVar2);
    DAT_001bce04 = DAT_001bce04 + -1;
    DAT_001bcde0 = DAT_001bcde0 - iVar3;
    (*DAT_001bb410)(iVar2);
    if (DAT_001bcdc4 == 0) {
      iVar6 = piVar1[8];
    }
    else {
      (*DAT_001bb444)(DAT_001bcdc4);
      iVar6 = piVar1[8];
    }
  }
LAB_001146d8:
  piVar1[8] = 0;
  *(undefined4 *)(param_1 + 8) = param_2;
  return iVar6;
}

