
void pcache1EnforceMaxPage(PCache1 *pCache)

{
  u16 uVar1;
  PgHdr1 *pPage;
  PgHdr1 *pPVar2;
  PGroup *pPVar3;
  
  pPVar3 = pCache->pGroup;
  if (pPVar3->nMaxPage < pPVar3->nPurgeable) {
    pPage = (pPVar3->lru).pLruPrev;
    uVar1 = pPage->isAnchor;
    while (uVar1 == 0) {
      pPVar2 = pPage->pLruNext;
      pPage->pLruPrev->pLruNext = pPVar2;
      pPVar2->pLruPrev = pPage->pLruPrev;
      pPage->pLruNext = (PgHdr1 *)0x0;
      pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;
      pcache1RemoveFromHash(pPage,1);
      if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;
      pPage = (pPVar3->lru).pLruPrev;
      uVar1 = pPage->isAnchor;
    }
  }
  if ((pCache->nPage == 0) && (pCache->pBulk != (void *)0x0)) {
                    /* WARNING: Subroutine does not return */
    sqlite3_free(pCache->pBulk);
  }
  return;
}



void FUN_00032664(int *param_1)

{
  short sVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = *param_1;
  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {
    iVar2 = *(int *)(iVar4 + 0x30);
    sVar1 = *(short *)(iVar2 + 0xe);
    while (sVar1 == 0) {
      iVar3 = *(int *)(iVar2 + 0x18);
      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;
      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);
      *(undefined4 *)(iVar2 + 0x18) = 0;
      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;
      FUN_00031d64(iVar2,1);
      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;
      iVar2 = *(int *)(iVar4 + 0x30);
      sVar1 = *(short *)(iVar2 + 0xe);
    }
  }
  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {
    sqlite3_free();
    param_1[0xf] = 0;
    param_1[0x10] = 0;
  }
  return;
}


lui gp,0x13
addiu gp,gp,0xf4c
addu gp,gp,t9
addiu sp,sp,-0x28
sw s2,0x20(sp)
sw gp,0x10(sp)
sw ra,0x24(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
lw s0,0x0(a0)
lw v0,0x4(s0)
lw v1,0x10(s0)
sltu v0,v0,v1
beq v0,zero,0x00032718
_or s2,a0,zero
lw v0,0x30(s0)
lhu v1,0xe(v0)
bne v1,zero,0x00032718
_nop
lw s1,-0x7ed8(gp)
b 0x000326cc
_addiu s1,s1,0x1d64
lw v0,0x30(s0)
lhu v1,0xe(v0)
bne v1,zero,0x00032718
_nop
lw a2,0x1c(v0)
or a0,v0,zero
lw v1,0x18(v0)
li a1,0x1
or t9,s1,zero
sw v1,0x18(a2)
lw a2,0x1c(v0)
sw a2,0x1c(v1)
sw zero,0x18(v0)
lw v1,0x14(v0)
lw v0,0x2c(v1)
addiu v0,v0,-0x1
bal 0x00031d64
_sw v0,0x2c(v1)
lw v0,0x10(s0)
lw v1,0x4(s0)
sltu v0,v1,v0
bne v0,zero,0x000326bc
_lw gp,0x10(sp)
lw v0,0x30(s2)
bne v0,zero,0x00032744
_lw ra,0x24(sp)
lw a0,0x40(s2)
beq a0,zero,0x00032744
_lw t9,-0x7f90(gp)
bal 0x0002a7f4
_nop
sw zero,0x3c(s2)
sw zero,0x40(s2)
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "void FUN_00032664(int *param_1)\n\n{\n  short sVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *param_1;\n  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }\n  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00032664(int *param_1)\n\n{\n  short sVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *param_1;\n  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }\n  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00032664(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  short sVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *param_1;\n  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }\n  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }\n  return;\n}" { (declaration "short sVar1;" (sized_type_specifier "short" short) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = *param_1;" (assignment_expression "iVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }" if (parenthesized_expression "(*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10))" ( (binary_expression "*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)" (pointer_expression "*(uint *)(iVar4 + 4)" * (cast_expression "(uint *)(iVar4 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) )))) < (pointer_expression "*(uint *)(iVar4 + 0x10)" * (cast_expression "(uint *)(iVar4 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x10)" ( (binary_expression "iVar4 + 0x10" identifier + number_literal) ))))) )) (compound_statement "{\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }" { (expression_statement "iVar2 = *(int *)(iVar4 + 0x30);" (assignment_expression "iVar2 = *(int *)(iVar4 + 0x30)" identifier = (pointer_expression "*(int *)(iVar4 + 0x30)" * (cast_expression "(int *)(iVar4 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "sVar1 = *(short *)(iVar2 + 0xe);" (assignment_expression "sVar1 = *(short *)(iVar2 + 0xe)" identifier = (pointer_expression "*(short *)(iVar2 + 0xe)" * (cast_expression "(short *)(iVar2 + 0xe)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xe)" ( (binary_expression "iVar2 + 0xe" identifier + number_literal) ))))) ;) (while_statement "while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }" while (parenthesized_expression "(sVar1 == 0)" ( (binary_expression "sVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }" { (expression_statement "iVar3 = *(int *)(iVar2 + 0x18);" (assignment_expression "iVar3 = *(int *)(iVar2 + 0x18)" identifier = (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;" (assignment_expression "*(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3" (pointer_expression "*(int *)(*(int *)(iVar2 + 0x1c) + 0x18)" * (cast_expression "(int *)(*(int *)(iVar2 + 0x1c) + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar2 + 0x1c) + 0x18)" ( (binary_expression "*(int *)(iVar2 + 0x1c) + 0x18" (pointer_expression "*(int *)(iVar2 + 0x1c)" * (cast_expression "(int *)(iVar2 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) )))) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);" (assignment_expression "*(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c)" (pointer_expression "*(undefined4 *)(iVar3 + 0x1c)" * (cast_expression "(undefined4 *)(iVar3 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar2 + 0x1c)" * (cast_expression "(undefined4 *)(iVar2 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x18) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + 0x18) = 0" (pointer_expression "*(undefined4 *)(iVar2 + 0x18)" * (cast_expression "(undefined4 *)(iVar2 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;" (assignment_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1" (pointer_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" * (cast_expression "(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar2 + 0x14) + 0x2c)" ( (binary_expression "*(int *)(iVar2 + 0x14) + 0x2c" (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) + number_literal) )))) = (binary_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1" (pointer_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" * (cast_expression "(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar2 + 0x14) + 0x2c)" ( (binary_expression "*(int *)(iVar2 + 0x14) + 0x2c" (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) + number_literal) )))) + number_literal)) ;) (expression_statement "FUN_00031d64(iVar2,1);" (call_expression "FUN_00031d64(iVar2,1)" identifier (argument_list "(iVar2,1)" ( identifier , number_literal ))) ;) (if_statement "if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;" if (parenthesized_expression "(*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4))" ( (binary_expression "*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)" (pointer_expression "*(uint *)(iVar4 + 0x10)" * (cast_expression "(uint *)(iVar4 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x10)" ( (binary_expression "iVar4 + 0x10" identifier + number_literal) )))) <= (pointer_expression "*(uint *)(iVar4 + 4)" * (cast_expression "(uint *)(iVar4 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) ))))) )) (break_statement "break;" break ;)) (expression_statement "iVar2 = *(int *)(iVar4 + 0x30);" (assignment_expression "iVar2 = *(int *)(iVar4 + 0x30)" identifier = (pointer_expression "*(int *)(iVar4 + 0x30)" * (cast_expression "(int *)(iVar4 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "sVar1 = *(short *)(iVar2 + 0xe);" (assignment_expression "sVar1 = *(short *)(iVar2 + 0xe)" identifier = (pointer_expression "*(short *)(iVar2 + 0xe)" * (cast_expression "(short *)(iVar2 + 0xe)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xe)" ( (binary_expression "iVar2 + 0xe" identifier + number_literal) ))))) ;) })) })) (if_statement "if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }" if (parenthesized_expression "((param_1[0xc] == 0) && (param_1[0x10] != 0))" ( (binary_expression "(param_1[0xc] == 0) && (param_1[0x10] != 0)" (parenthesized_expression "(param_1[0xc] == 0)" ( (binary_expression "param_1[0xc] == 0" (subscript_expression "param_1[0xc]" identifier [ number_literal ]) == number_literal) )) && (parenthesized_expression "(param_1[0x10] != 0)" ( (binary_expression "param_1[0x10] != 0" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) != number_literal) ))) )) (compound_statement "{\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }" { (expression_statement "sqlite3_free();" (call_expression "sqlite3_free()" identifier (argument_list "()" ( ))) ;) (expression_statement "param_1[0xf] = 0;" (assignment_expression "param_1[0xf] = 0" (subscript_expression "param_1[0xf]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[0x10] = 0;" (assignment_expression "param_1[0x10] = 0" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void pcache1EnforceMaxPage(PCache1 *pCache)\n\n{\n  u16 uVar1;\n  PgHdr1 *pPage;\n  PgHdr1 *pPVar2;\n  PGroup *pPVar3;\n  \n  pPVar3 = pCache->pGroup;\n  if (pPVar3->nMaxPage < pPVar3->nPurgeable) {\n    pPage = (pPVar3->lru).pLruPrev;\n    uVar1 = pPage->isAnchor;\n    while (uVar1 == 0) {\n      pPVar2 = pPage->pLruNext;\n      pPage->pLruPrev->pLruNext = pPVar2;\n      pPVar2->pLruPrev = pPage->pLruPrev;\n      pPage->pLruNext = (PgHdr1 *)0x0;\n      pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;\n      pcache1RemoveFromHash(pPage,1);\n      if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;\n      pPage = (pPVar3->lru).pLruPrev;\n      uVar1 = pPage->isAnchor;\n    }\n  }\n  if ((pCache->nPage == 0) && (pCache->pBulk != (void *)0x0)) {\n                    /* WARNING: Subroutine does not return */\n    sqlite3_free(pCache->pBulk);\n  }\n  return;\n}\n\n" (function_definition "void pcache1EnforceMaxPage(PCache1 *pCache)\n\n{\n  u16 uVar1;\n  PgHdr1 *pPage;\n  PgHdr1 *pPVar2;\n  PGroup *pPVar3;\n  \n  pPVar3 = pCache->pGroup;\n  if (pPVar3->nMaxPage < pPVar3->nPurgeable) {\n    pPage = (pPVar3->lru).pLruPrev;\n    uVar1 = pPage->isAnchor;\n    while (uVar1 == 0) {\n      pPVar2 = pPage->pLruNext;\n      pPage->pLruPrev->pLruNext = pPVar2;\n      pPVar2->pLruPrev = pPage->pLruPrev;\n      pPage->pLruNext = (PgHdr1 *)0x0;\n      pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;\n      pcache1RemoveFromHash(pPage,1);\n      if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;\n      pPage = (pPVar3->lru).pLruPrev;\n      uVar1 = pPage->isAnchor;\n    }\n  }\n  if ((pCache->nPage == 0) && (pCache->pBulk != (void *)0x0)) {\n                    /* WARNING: Subroutine does not return */\n    sqlite3_free(pCache->pBulk);\n  }\n  return;\n}" primitive_type (function_declarator "pcache1EnforceMaxPage(PCache1 *pCache)" identifier (parameter_list "(PCache1 *pCache)" ( (parameter_declaration "PCache1 *pCache" type_identifier (pointer_declarator "*pCache" * identifier)) ))) (compound_statement "{\n  u16 uVar1;\n  PgHdr1 *pPage;\n  PgHdr1 *pPVar2;\n  PGroup *pPVar3;\n  \n  pPVar3 = pCache->pGroup;\n  if (pPVar3->nMaxPage < pPVar3->nPurgeable) {\n    pPage = (pPVar3->lru).pLruPrev;\n    uVar1 = pPage->isAnchor;\n    while (uVar1 == 0) {\n      pPVar2 = pPage->pLruNext;\n      pPage->pLruPrev->pLruNext = pPVar2;\n      pPVar2->pLruPrev = pPage->pLruPrev;\n      pPage->pLruNext = (PgHdr1 *)0x0;\n      pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;\n      pcache1RemoveFromHash(pPage,1);\n      if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;\n      pPage = (pPVar3->lru).pLruPrev;\n      uVar1 = pPage->isAnchor;\n    }\n  }\n  if ((pCache->nPage == 0) && (pCache->pBulk != (void *)0x0)) {\n                    /* WARNING: Subroutine does not return */\n    sqlite3_free(pCache->pBulk);\n  }\n  return;\n}" { (declaration "u16 uVar1;" type_identifier identifier ;) (declaration "PgHdr1 *pPage;" type_identifier (pointer_declarator "*pPage" * identifier) ;) (declaration "PgHdr1 *pPVar2;" type_identifier (pointer_declarator "*pPVar2" * identifier) ;) (declaration "PGroup *pPVar3;" type_identifier (pointer_declarator "*pPVar3" * identifier) ;) (expression_statement "pPVar3 = pCache->pGroup;" (assignment_expression "pPVar3 = pCache->pGroup" identifier = (field_expression "pCache->pGroup" identifier -> field_identifier)) ;) (if_statement "if (pPVar3->nMaxPage < pPVar3->nPurgeable) {\n    pPage = (pPVar3->lru).pLruPrev;\n    uVar1 = pPage->isAnchor;\n    while (uVar1 == 0) {\n      pPVar2 = pPage->pLruNext;\n      pPage->pLruPrev->pLruNext = pPVar2;\n      pPVar2->pLruPrev = pPage->pLruPrev;\n      pPage->pLruNext = (PgHdr1 *)0x0;\n      pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;\n      pcache1RemoveFromHash(pPage,1);\n      if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;\n      pPage = (pPVar3->lru).pLruPrev;\n      uVar1 = pPage->isAnchor;\n    }\n  }" if (parenthesized_expression "(pPVar3->nMaxPage < pPVar3->nPurgeable)" ( (binary_expression "pPVar3->nMaxPage < pPVar3->nPurgeable" (field_expression "pPVar3->nMaxPage" identifier -> field_identifier) < (field_expression "pPVar3->nPurgeable" identifier -> field_identifier)) )) (compound_statement "{\n    pPage = (pPVar3->lru).pLruPrev;\n    uVar1 = pPage->isAnchor;\n    while (uVar1 == 0) {\n      pPVar2 = pPage->pLruNext;\n      pPage->pLruPrev->pLruNext = pPVar2;\n      pPVar2->pLruPrev = pPage->pLruPrev;\n      pPage->pLruNext = (PgHdr1 *)0x0;\n      pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;\n      pcache1RemoveFromHash(pPage,1);\n      if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;\n      pPage = (pPVar3->lru).pLruPrev;\n      uVar1 = pPage->isAnchor;\n    }\n  }" { (expression_statement "pPage = (pPVar3->lru).pLruPrev;" (assignment_expression "pPage = (pPVar3->lru).pLruPrev" identifier = (field_expression "(pPVar3->lru).pLruPrev" (parenthesized_expression "(pPVar3->lru)" ( (field_expression "pPVar3->lru" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "uVar1 = pPage->isAnchor;" (assignment_expression "uVar1 = pPage->isAnchor" identifier = (field_expression "pPage->isAnchor" identifier -> field_identifier)) ;) (while_statement "while (uVar1 == 0) {\n      pPVar2 = pPage->pLruNext;\n      pPage->pLruPrev->pLruNext = pPVar2;\n      pPVar2->pLruPrev = pPage->pLruPrev;\n      pPage->pLruNext = (PgHdr1 *)0x0;\n      pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;\n      pcache1RemoveFromHash(pPage,1);\n      if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;\n      pPage = (pPVar3->lru).pLruPrev;\n      uVar1 = pPage->isAnchor;\n    }" while (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      pPVar2 = pPage->pLruNext;\n      pPage->pLruPrev->pLruNext = pPVar2;\n      pPVar2->pLruPrev = pPage->pLruPrev;\n      pPage->pLruNext = (PgHdr1 *)0x0;\n      pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;\n      pcache1RemoveFromHash(pPage,1);\n      if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;\n      pPage = (pPVar3->lru).pLruPrev;\n      uVar1 = pPage->isAnchor;\n    }" { (expression_statement "pPVar2 = pPage->pLruNext;" (assignment_expression "pPVar2 = pPage->pLruNext" identifier = (field_expression "pPage->pLruNext" identifier -> field_identifier)) ;) (expression_statement "pPage->pLruPrev->pLruNext = pPVar2;" (assignment_expression "pPage->pLruPrev->pLruNext = pPVar2" (field_expression "pPage->pLruPrev->pLruNext" (field_expression "pPage->pLruPrev" identifier -> field_identifier) -> field_identifier) = identifier) ;) (expression_statement "pPVar2->pLruPrev = pPage->pLruPrev;" (assignment_expression "pPVar2->pLruPrev = pPage->pLruPrev" (field_expression "pPVar2->pLruPrev" identifier -> field_identifier) = (field_expression "pPage->pLruPrev" identifier -> field_identifier)) ;) (expression_statement "pPage->pLruNext = (PgHdr1 *)0x0;" (assignment_expression "pPage->pLruNext = (PgHdr1 *)0x0" (field_expression "pPage->pLruNext" identifier -> field_identifier) = (cast_expression "(PgHdr1 *)0x0" ( (type_descriptor "PgHdr1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;" (assignment_expression "pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1" (field_expression "pPage->pCache->nRecyclable" (field_expression "pPage->pCache" identifier -> field_identifier) -> field_identifier) = (binary_expression "pPage->pCache->nRecyclable - 1" (field_expression "pPage->pCache->nRecyclable" (field_expression "pPage->pCache" identifier -> field_identifier) -> field_identifier) - number_literal)) ;) (expression_statement "pcache1RemoveFromHash(pPage,1);" (call_expression "pcache1RemoveFromHash(pPage,1)" identifier (argument_list "(pPage,1)" ( identifier , number_literal ))) ;) (if_statement "if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;" if (parenthesized_expression "(pPVar3->nPurgeable <= pPVar3->nMaxPage)" ( (binary_expression "pPVar3->nPurgeable <= pPVar3->nMaxPage" (field_expression "pPVar3->nPurgeable" identifier -> field_identifier) <= (field_expression "pPVar3->nMaxPage" identifier -> field_identifier)) )) (break_statement "break;" break ;)) (expression_statement "pPage = (pPVar3->lru).pLruPrev;" (assignment_expression "pPage = (pPVar3->lru).pLruPrev" identifier = (field_expression "(pPVar3->lru).pLruPrev" (parenthesized_expression "(pPVar3->lru)" ( (field_expression "pPVar3->lru" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "uVar1 = pPage->isAnchor;" (assignment_expression "uVar1 = pPage->isAnchor" identifier = (field_expression "pPage->isAnchor" identifier -> field_identifier)) ;) })) })) (if_statement "if ((pCache->nPage == 0) && (pCache->pBulk != (void *)0x0)) {\n                    /* WARNING: Subroutine does not return */\n    sqlite3_free(pCache->pBulk);\n  }" if (parenthesized_expression "((pCache->nPage == 0) && (pCache->pBulk != (void *)0x0))" ( (binary_expression "(pCache->nPage == 0) && (pCache->pBulk != (void *)0x0)" (parenthesized_expression "(pCache->nPage == 0)" ( (binary_expression "pCache->nPage == 0" (field_expression "pCache->nPage" identifier -> field_identifier) == number_literal) )) && (parenthesized_expression "(pCache->pBulk != (void *)0x0)" ( (binary_expression "pCache->pBulk != (void *)0x0" (field_expression "pCache->pBulk" identifier -> field_identifier) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    sqlite3_free(pCache->pBulk);\n  }" { comment (expression_statement "sqlite3_free(pCache->pBulk);" (call_expression "sqlite3_free(pCache->pBulk)" identifier (argument_list "(pCache->pBulk)" ( (field_expression "pCache->pBulk" identifier -> field_identifier) ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00032664(int *param_1)\n\n{\n  short sVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *param_1;\n  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }\n  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00032664(int *param_1)\n\n{\n  short sVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *param_1;\n  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }\n  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00032664(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  short sVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *param_1;\n  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }\n  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }\n  return;\n}" { (declaration "short sVar1;" (sized_type_specifier "short" short) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = *param_1;" (assignment_expression "iVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }" if (parenthesized_expression "(*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10))" ( (binary_expression "*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)" (pointer_expression "*(uint *)(iVar4 + 4)" * (cast_expression "(uint *)(iVar4 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) )))) < (pointer_expression "*(uint *)(iVar4 + 0x10)" * (cast_expression "(uint *)(iVar4 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x10)" ( (binary_expression "iVar4 + 0x10" identifier + number_literal) ))))) )) (compound_statement "{\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }" { (expression_statement "iVar2 = *(int *)(iVar4 + 0x30);" (assignment_expression "iVar2 = *(int *)(iVar4 + 0x30)" identifier = (pointer_expression "*(int *)(iVar4 + 0x30)" * (cast_expression "(int *)(iVar4 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "sVar1 = *(short *)(iVar2 + 0xe);" (assignment_expression "sVar1 = *(short *)(iVar2 + 0xe)" identifier = (pointer_expression "*(short *)(iVar2 + 0xe)" * (cast_expression "(short *)(iVar2 + 0xe)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xe)" ( (binary_expression "iVar2 + 0xe" identifier + number_literal) ))))) ;) (while_statement "while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }" while (parenthesized_expression "(sVar1 == 0)" ( (binary_expression "sVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }" { (expression_statement "iVar3 = *(int *)(iVar2 + 0x18);" (assignment_expression "iVar3 = *(int *)(iVar2 + 0x18)" identifier = (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;" (assignment_expression "*(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3" (pointer_expression "*(int *)(*(int *)(iVar2 + 0x1c) + 0x18)" * (cast_expression "(int *)(*(int *)(iVar2 + 0x1c) + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar2 + 0x1c) + 0x18)" ( (binary_expression "*(int *)(iVar2 + 0x1c) + 0x18" (pointer_expression "*(int *)(iVar2 + 0x1c)" * (cast_expression "(int *)(iVar2 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) )))) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);" (assignment_expression "*(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c)" (pointer_expression "*(undefined4 *)(iVar3 + 0x1c)" * (cast_expression "(undefined4 *)(iVar3 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar2 + 0x1c)" * (cast_expression "(undefined4 *)(iVar2 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x18) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + 0x18) = 0" (pointer_expression "*(undefined4 *)(iVar2 + 0x18)" * (cast_expression "(undefined4 *)(iVar2 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;" (assignment_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1" (pointer_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" * (cast_expression "(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar2 + 0x14) + 0x2c)" ( (binary_expression "*(int *)(iVar2 + 0x14) + 0x2c" (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) + number_literal) )))) = (binary_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1" (pointer_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" * (cast_expression "(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar2 + 0x14) + 0x2c)" ( (binary_expression "*(int *)(iVar2 + 0x14) + 0x2c" (pointer_expression "*(int *)(iVar2 + 0x14)" * (cast_expression "(int *)(iVar2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) + number_literal) )))) + number_literal)) ;) (expression_statement "FUN_00031d64(iVar2,1);" (call_expression "FUN_00031d64(iVar2,1)" identifier (argument_list "(iVar2,1)" ( identifier , number_literal ))) ;) (if_statement "if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;" if (parenthesized_expression "(*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4))" ( (binary_expression "*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)" (pointer_expression "*(uint *)(iVar4 + 0x10)" * (cast_expression "(uint *)(iVar4 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x10)" ( (binary_expression "iVar4 + 0x10" identifier + number_literal) )))) <= (pointer_expression "*(uint *)(iVar4 + 4)" * (cast_expression "(uint *)(iVar4 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) ))))) )) (break_statement "break;" break ;)) (expression_statement "iVar2 = *(int *)(iVar4 + 0x30);" (assignment_expression "iVar2 = *(int *)(iVar4 + 0x30)" identifier = (pointer_expression "*(int *)(iVar4 + 0x30)" * (cast_expression "(int *)(iVar4 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "sVar1 = *(short *)(iVar2 + 0xe);" (assignment_expression "sVar1 = *(short *)(iVar2 + 0xe)" identifier = (pointer_expression "*(short *)(iVar2 + 0xe)" * (cast_expression "(short *)(iVar2 + 0xe)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xe)" ( (binary_expression "iVar2 + 0xe" identifier + number_literal) ))))) ;) })) })) (if_statement "if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }" if (parenthesized_expression "((param_1[0xc] == 0) && (param_1[0x10] != 0))" ( (binary_expression "(param_1[0xc] == 0) && (param_1[0x10] != 0)" (parenthesized_expression "(param_1[0xc] == 0)" ( (binary_expression "param_1[0xc] == 0" (subscript_expression "param_1[0xc]" identifier [ number_literal ]) == number_literal) )) && (parenthesized_expression "(param_1[0x10] != 0)" ( (binary_expression "param_1[0x10] != 0" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) != number_literal) ))) )) (compound_statement "{\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }" { (expression_statement "sqlite3_free();" (call_expression "sqlite3_free()" identifier (argument_list "()" ( ))) ;) (expression_statement "param_1[0xf] = 0;" (assignment_expression "param_1[0xf] = 0" (subscript_expression "param_1[0xf]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[0x10] = 0;" (assignment_expression "param_1[0x10] = 0" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration (sized_type_specifier short) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( 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) )))) <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00032664(int *param_1)\n\n{\n  short sVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *param_1;\n  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }\n  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00032664(int *param_1)" (identifier "FUN_00032664") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  short sVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *param_1;\n  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }\n  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }\n  return;\n}" ({ "{") (declaration "short sVar1;" (sized_type_specifier "short" (short "short")) (identifier "sVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "iVar4 = *param_1;" (assignment_expression "iVar4 = *param_1" (identifier "iVar4") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }" (if "if") (parenthesized_expression "(*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10))" (( "(") (binary_expression "*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)" (pointer_expression "*(uint *)(iVar4 + 4)" (* "*") (cast_expression "(uint *)(iVar4 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 4)" (( "(") (binary_expression "iVar4 + 4" (identifier "iVar4") (+ "+") (number_literal "4")) () ")")))) (< "<") (pointer_expression "*(uint *)(iVar4 + 0x10)" (* "*") (cast_expression "(uint *)(iVar4 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x10)" (( "(") (binary_expression "iVar4 + 0x10" (identifier "iVar4") (+ "+") (number_literal "0x10")) () ")"))))) () ")")) (compound_statement "{\n    iVar2 = *(int *)(iVar4 + 0x30);\n    sVar1 = *(short *)(iVar2 + 0xe);\n    while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }\n  }" ({ "{") (expression_statement "iVar2 = *(int *)(iVar4 + 0x30);" (assignment_expression "iVar2 = *(int *)(iVar4 + 0x30)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar4 + 0x30)" (* "*") (cast_expression "(int *)(iVar4 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x30)" (( "(") (binary_expression "iVar4 + 0x30" (identifier "iVar4") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (expression_statement "sVar1 = *(short *)(iVar2 + 0xe);" (assignment_expression "sVar1 = *(short *)(iVar2 + 0xe)" (identifier "sVar1") (= "=") (pointer_expression "*(short *)(iVar2 + 0xe)" (* "*") (cast_expression "(short *)(iVar2 + 0xe)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xe)" (( "(") (binary_expression "iVar2 + 0xe" (identifier "iVar2") (+ "+") (number_literal "0xe")) () ")"))))) (; ";")) (while_statement "while (sVar1 == 0) {\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }" (while "while") (parenthesized_expression "(sVar1 == 0)" (( "(") (binary_expression "sVar1 == 0" (identifier "sVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar3 = *(int *)(iVar2 + 0x18);\n      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;\n      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);\n      *(undefined4 *)(iVar2 + 0x18) = 0;\n      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;\n      FUN_00031d64(iVar2,1);\n      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;\n      iVar2 = *(int *)(iVar4 + 0x30);\n      sVar1 = *(short *)(iVar2 + 0xe);\n    }" ({ "{") (expression_statement "iVar3 = *(int *)(iVar2 + 0x18);" (assignment_expression "iVar3 = *(int *)(iVar2 + 0x18)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(iVar2 + 0x18)" (* "*") (cast_expression "(int *)(iVar2 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x18)" (( "(") (binary_expression "iVar2 + 0x18" (identifier "iVar2") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "*(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;" (assignment_expression "*(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3" (pointer_expression "*(int *)(*(int *)(iVar2 + 0x1c) + 0x18)" (* "*") (cast_expression "(int *)(*(int *)(iVar2 + 0x1c) + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar2 + 0x1c) + 0x18)" (( "(") (binary_expression "*(int *)(iVar2 + 0x1c) + 0x18" (pointer_expression "*(int *)(iVar2 + 0x1c)" (* "*") (cast_expression "(int *)(iVar2 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x1c)" (( "(") (binary_expression "iVar2 + 0x1c" (identifier "iVar2") (+ "+") (number_literal "0x1c")) () ")")))) (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);" (assignment_expression "*(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c)" (pointer_expression "*(undefined4 *)(iVar3 + 0x1c)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x1c)" (( "(") (binary_expression "iVar3 + 0x1c" (identifier "iVar3") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(iVar2 + 0x1c)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x1c)" (( "(") (binary_expression "iVar2 + 0x1c" (identifier "iVar2") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + 0x18) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + 0x18) = 0" (pointer_expression "*(undefined4 *)(iVar2 + 0x18)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x18)" (( "(") (binary_expression "iVar2 + 0x18" (identifier "iVar2") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;" (assignment_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1" (pointer_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" (* "*") (cast_expression "(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar2 + 0x14) + 0x2c)" (( "(") (binary_expression "*(int *)(iVar2 + 0x14) + 0x2c" (pointer_expression "*(int *)(iVar2 + 0x14)" (* "*") (cast_expression "(int *)(iVar2 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x14)" (( "(") (binary_expression "iVar2 + 0x14" (identifier "iVar2") (+ "+") (number_literal "0x14")) () ")")))) (+ "+") (number_literal "0x2c")) () ")")))) (= "=") (binary_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1" (pointer_expression "*(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" (* "*") (cast_expression "(int *)(*(int *)(iVar2 + 0x14) + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar2 + 0x14) + 0x2c)" (( "(") (binary_expression "*(int *)(iVar2 + 0x14) + 0x2c" (pointer_expression "*(int *)(iVar2 + 0x14)" (* "*") (cast_expression "(int *)(iVar2 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x14)" (( "(") (binary_expression "iVar2 + 0x14" (identifier "iVar2") (+ "+") (number_literal "0x14")) () ")")))) (+ "+") (number_literal "0x2c")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "FUN_00031d64(iVar2,1);" (call_expression "FUN_00031d64(iVar2,1)" (identifier "FUN_00031d64") (argument_list "(iVar2,1)" (( "(") (identifier "iVar2") (, ",") (number_literal "1") () ")"))) (; ";")) (if_statement "if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;" (if "if") (parenthesized_expression "(*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4))" (( "(") (binary_expression "*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)" (pointer_expression "*(uint *)(iVar4 + 0x10)" (* "*") (cast_expression "(uint *)(iVar4 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x10)" (( "(") (binary_expression "iVar4 + 0x10" (identifier "iVar4") (+ "+") (number_literal "0x10")) () ")")))) (<= "<=") (pointer_expression "*(uint *)(iVar4 + 4)" (* "*") (cast_expression "(uint *)(iVar4 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 4)" (( "(") (binary_expression "iVar4 + 4" (identifier "iVar4") (+ "+") (number_literal "4")) () ")"))))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar2 = *(int *)(iVar4 + 0x30);" (assignment_expression "iVar2 = *(int *)(iVar4 + 0x30)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar4 + 0x30)" (* "*") (cast_expression "(int *)(iVar4 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x30)" (( "(") (binary_expression "iVar4 + 0x30" (identifier "iVar4") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (expression_statement "sVar1 = *(short *)(iVar2 + 0xe);" (assignment_expression "sVar1 = *(short *)(iVar2 + 0xe)" (identifier "sVar1") (= "=") (pointer_expression "*(short *)(iVar2 + 0xe)" (* "*") (cast_expression "(short *)(iVar2 + 0xe)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xe)" (( "(") (binary_expression "iVar2 + 0xe" (identifier "iVar2") (+ "+") (number_literal "0xe")) () ")"))))) (; ";")) (} "}"))) (} "}"))) (if_statement "if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }" (if "if") (parenthesized_expression "((param_1[0xc] == 0) && (param_1[0x10] != 0))" (( "(") (binary_expression "(param_1[0xc] == 0) && (param_1[0x10] != 0)" (parenthesized_expression "(param_1[0xc] == 0)" (( "(") (binary_expression "param_1[0xc] == 0" (subscript_expression "param_1[0xc]" (identifier "param_1") ([ "[") (number_literal "0xc") (] "]")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(param_1[0x10] != 0)" (( "(") (binary_expression "param_1[0x10] != 0" (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    sqlite3_free();\n    param_1[0xf] = 0;\n    param_1[0x10] = 0;\n  }" ({ "{") (expression_statement "sqlite3_free();" (call_expression "sqlite3_free()" (identifier "sqlite3_free") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "param_1[0xf] = 0;" (assignment_expression "param_1[0xf] = 0" (subscript_expression "param_1[0xf]" (identifier "param_1") ([ "[") (number_literal "0xf") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[0x10] = 0;" (assignment_expression "param_1[0x10] = 0" (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *pCache)

{
  type_2 var_1;
  type_3 *pPage;
  type_3 *pPVar2;
  type_4 *pPVar3;
  
  pPVar3 = pCache->pGroup;
  if (pPVar3->nMaxPage < pPVar3->nPurgeable) {
    pPage = (pPVar3->lru).pLruPrev;
    var_1 = pPage->isAnchor;
    while (var_1 == 0) {
      pPVar2 = pPage->pLruNext;
      pPage->pLruPrev->pLruNext = pPVar2;
      pPVar2->pLruPrev = pPage->pLruPrev;
      pPage->pLruNext = (type_3 *)0x0;
      pPage->pCache->nRecyclable = pPage->pCache->nRecyclable - 1;
      var_2(pPage,1);
      if (pPVar3->nPurgeable <= pPVar3->nMaxPage) break;
      pPage = (pPVar3->lru).pLruPrev;
      var_1 = pPage->isAnchor;
    }
  }
  if ((pCache->nPage == 0) && (pCache->pBulk != (void *)0x0)) {
                    /* WARNING: Subroutine does not return */
    var_3(pCache->pBulk);
  }
  return;
}


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

void MASKED(int *param_1)

{
  short sVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = *param_1;
  if (*(uint *)(iVar4 + 4) < *(uint *)(iVar4 + 0x10)) {
    iVar2 = *(int *)(iVar4 + 0x30);
    sVar1 = *(short *)(iVar2 + 0xe);
    while (sVar1 == 0) {
      iVar3 = *(int *)(iVar2 + 0x18);
      *(int *)(*(int *)(iVar2 + 0x1c) + 0x18) = iVar3;
      *(undefined4 *)(iVar3 + 0x1c) = *(undefined4 *)(iVar2 + 0x1c);
      *(undefined4 *)(iVar2 + 0x18) = 0;
      *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) = *(int *)(*(int *)(iVar2 + 0x14) + 0x2c) + -1;
      FUN_00031d64(iVar2,1);
      if (*(uint *)(iVar4 + 0x10) <= *(uint *)(iVar4 + 4)) break;
      iVar2 = *(int *)(iVar4 + 0x30);
      sVar1 = *(short *)(iVar2 + 0xe);
    }
  }
  if ((param_1[0xc] == 0) && (param_1[0x10] != 0)) {
    sqlite3_free();
    param_1[0xf] = 0;
    param_1[0x10] = 0;
  }
  return;
}

