
void sqlite3DbFreeNN(sqlite3 *db,void *p)

{
  if (db != (sqlite3 *)0x0) {
    if (db->pnBytesFreed != (int *)0x0) {
      measureAllocationSize(db,p);
      return;
    }
    if (p < (db->lookaside).pEnd) {
      if ((db->lookaside).pMiddle <= p) {
        *(LookasideSlot **)p = (db->lookaside).pSmallFree;
        (db->lookaside).pSmallFree = (LookasideSlot *)p;
        return;
      }
      if ((db->lookaside).pStart <= p) {
        *(LookasideSlot **)p = (db->lookaside).pFree;
        (db->lookaside).pFree = (LookasideSlot *)p;
        return;
      }
    }
  }
  (*(code *)PTR_sqlite3_free_000f639c)(p);
  return;
}



void FUN_0002d060(int param_1,undefined4 *param_2)

{
  if (param_1 != 0) {
    if (*(int *)(param_1 + 0x1f8) != 0) {
      FUN_00016b00();
      return;
    }
    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {
      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {
        *param_2 = *(undefined4 *)(param_1 + 0x140);
        *(undefined4 **)(param_1 + 0x140) = param_2;
        return;
      }
      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {
        *param_2 = *(undefined4 *)(param_1 + 0x138);
        *(undefined4 **)(param_1 + 0x138) = param_2;
        return;
      }
    }
  }
  (*(code *)PTR_sqlite3_free_000f639c)(param_2);
  return;
}


lui gp,0xd
addiu gp,gp,0x1240
addu gp,gp,t9
addiu sp,sp,-0x20
sw ra,0x1c(sp)
sw gp,0x10(sp)
beq a0,zero,0x0002d0bc
_nop
lw v0,0x1f8(a0)
bne v0,zero,0x0002d0dc
_lw t9,-0x7fd8(gp)
lw v0,0x14c(a0)
sltu v0,a1,v0
beq v0,zero,0x0002d0bc
_nop
lw v0,0x144(a0)
sltu v0,a1,v0
beq v0,zero,0x0002d0f4
_nop
lw v0,0x148(a0)
sltu v0,a1,v0
beq v0,zero,0x0002d104
_nop
or a0,a1,zero
lw t9,-0x7f04(gp)
jalr t9
_nop
lw gp,0x10(sp)
lw ra,0x1c(sp)
jr ra
_addiu sp,sp,0x20
addiu t9,t9,0x6b00
bal 0x00016b00
_nop
lw gp,0x10(sp)
b 0x0002d0d4
_lw ra,0x1c(sp)
lw v0,0x140(a0)
sw v0,0x0(a1)
b 0x0002d0d0
_sw a1,0x140(a0)
lw v0,0x138(a0)
sw v0,0x0(a1)
b 0x0002d0d0
_sw a1,0x138(a0)
(translation_unit "void FUN_0002d060(int param_1,undefined4 *param_2)\n\n{\n  if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(param_2);\n  return;\n}\n\n" (function_definition "void FUN_0002d060(int param_1,undefined4 *param_2)\n\n{\n  if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(param_2);\n  return;\n}" primitive_type (function_declarator "FUN_0002d060(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 (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(param_2);\n  return;\n}" { (if_statement "if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }" { (if_statement "if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x1f8) != 0)" ( (binary_expression "*(int *)(param_1 + 0x1f8) != 0" (pointer_expression "*(int *)(param_1 + 0x1f8)" * (cast_expression "(int *)(param_1 + 0x1f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1f8)" ( (binary_expression "param_1 + 0x1f8" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      FUN_00016b00();\n      return;\n    }" { (expression_statement "FUN_00016b00();" (call_expression "FUN_00016b00()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (if_statement "if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }" if (parenthesized_expression "(param_2 < *(undefined4 **)(param_1 + 0x14c))" ( (binary_expression "param_2 < *(undefined4 **)(param_1 + 0x14c)" identifier < (pointer_expression "*(undefined4 **)(param_1 + 0x14c)" * (cast_expression "(undefined4 **)(param_1 + 0x14c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x14c)" ( (binary_expression "param_1 + 0x14c" identifier + number_literal) ))))) )) (compound_statement "{\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }" { (if_statement "if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }" if (parenthesized_expression "(*(undefined4 **)(param_1 + 0x144) <= param_2)" ( (binary_expression "*(undefined4 **)(param_1 + 0x144) <= param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x144)" * (cast_expression "(undefined4 **)(param_1 + 0x144)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x144)" ( (binary_expression "param_1 + 0x144" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }" { (expression_statement "*param_2 = *(undefined4 *)(param_1 + 0x140);" (assignment_expression "*param_2 = *(undefined4 *)(param_1 + 0x140)" (pointer_expression "*param_2" * identifier) = (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 **)(param_1 + 0x140) = param_2;" (assignment_expression "*(undefined4 **)(param_1 + 0x140) = param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x140)" * (cast_expression "(undefined4 **)(param_1 + 0x140)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })) (if_statement "if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }" if (parenthesized_expression "(*(undefined4 **)(param_1 + 0x148) <= param_2)" ( (binary_expression "*(undefined4 **)(param_1 + 0x148) <= param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x148)" * (cast_expression "(undefined4 **)(param_1 + 0x148)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x148)" ( (binary_expression "param_1 + 0x148" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }" { (expression_statement "*param_2 = *(undefined4 *)(param_1 + 0x138);" (assignment_expression "*param_2 = *(undefined4 *)(param_1 + 0x138)" (pointer_expression "*param_2" * identifier) = (pointer_expression "*(undefined4 *)(param_1 + 0x138)" * (cast_expression "(undefined4 *)(param_1 + 0x138)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x138)" ( (binary_expression "param_1 + 0x138" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 **)(param_1 + 0x138) = param_2;" (assignment_expression "*(undefined4 **)(param_1 + 0x138) = param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x138)" * (cast_expression "(undefined4 **)(param_1 + 0x138)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x138)" ( (binary_expression "param_1 + 0x138" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })) })) })) (expression_statement "(*(code *)PTR_sqlite3_free_000f639c)(param_2);" (call_expression "(*(code *)PTR_sqlite3_free_000f639c)(param_2)" (parenthesized_expression "(*(code *)PTR_sqlite3_free_000f639c)" ( (pointer_expression "*(code *)PTR_sqlite3_free_000f639c" * (cast_expression "(code *)PTR_sqlite3_free_000f639c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void sqlite3DbFreeNN(sqlite3 *db,void *p)\n\n{\n  if (db != (sqlite3 *)0x0) {\n    if (db->pnBytesFreed != (int *)0x0) {\n      measureAllocationSize(db,p);\n      return;\n    }\n    if (p < (db->lookaside).pEnd) {\n      if ((db->lookaside).pMiddle <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pSmallFree;\n        (db->lookaside).pSmallFree = (LookasideSlot *)p;\n        return;\n      }\n      if ((db->lookaside).pStart <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pFree;\n        (db->lookaside).pFree = (LookasideSlot *)p;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(p);\n  return;\n}\n\n" (function_definition "void sqlite3DbFreeNN(sqlite3 *db,void *p)\n\n{\n  if (db != (sqlite3 *)0x0) {\n    if (db->pnBytesFreed != (int *)0x0) {\n      measureAllocationSize(db,p);\n      return;\n    }\n    if (p < (db->lookaside).pEnd) {\n      if ((db->lookaside).pMiddle <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pSmallFree;\n        (db->lookaside).pSmallFree = (LookasideSlot *)p;\n        return;\n      }\n      if ((db->lookaside).pStart <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pFree;\n        (db->lookaside).pFree = (LookasideSlot *)p;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(p);\n  return;\n}" primitive_type (function_declarator "sqlite3DbFreeNN(sqlite3 *db,void *p)" identifier (parameter_list "(sqlite3 *db,void *p)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  if (db != (sqlite3 *)0x0) {\n    if (db->pnBytesFreed != (int *)0x0) {\n      measureAllocationSize(db,p);\n      return;\n    }\n    if (p < (db->lookaside).pEnd) {\n      if ((db->lookaside).pMiddle <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pSmallFree;\n        (db->lookaside).pSmallFree = (LookasideSlot *)p;\n        return;\n      }\n      if ((db->lookaside).pStart <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pFree;\n        (db->lookaside).pFree = (LookasideSlot *)p;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(p);\n  return;\n}" { (if_statement "if (db != (sqlite3 *)0x0) {\n    if (db->pnBytesFreed != (int *)0x0) {\n      measureAllocationSize(db,p);\n      return;\n    }\n    if (p < (db->lookaside).pEnd) {\n      if ((db->lookaside).pMiddle <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pSmallFree;\n        (db->lookaside).pSmallFree = (LookasideSlot *)p;\n        return;\n      }\n      if ((db->lookaside).pStart <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pFree;\n        (db->lookaside).pFree = (LookasideSlot *)p;\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(db != (sqlite3 *)0x0)" ( (binary_expression "db != (sqlite3 *)0x0" identifier != (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (db->pnBytesFreed != (int *)0x0) {\n      measureAllocationSize(db,p);\n      return;\n    }\n    if (p < (db->lookaside).pEnd) {\n      if ((db->lookaside).pMiddle <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pSmallFree;\n        (db->lookaside).pSmallFree = (LookasideSlot *)p;\n        return;\n      }\n      if ((db->lookaside).pStart <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pFree;\n        (db->lookaside).pFree = (LookasideSlot *)p;\n        return;\n      }\n    }\n  }" { (if_statement "if (db->pnBytesFreed != (int *)0x0) {\n      measureAllocationSize(db,p);\n      return;\n    }" if (parenthesized_expression "(db->pnBytesFreed != (int *)0x0)" ( (binary_expression "db->pnBytesFreed != (int *)0x0" (field_expression "db->pnBytesFreed" identifier -> field_identifier) != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      measureAllocationSize(db,p);\n      return;\n    }" { (expression_statement "measureAllocationSize(db,p);" (call_expression "measureAllocationSize(db,p)" identifier (argument_list "(db,p)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })) (if_statement "if (p < (db->lookaside).pEnd) {\n      if ((db->lookaside).pMiddle <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pSmallFree;\n        (db->lookaside).pSmallFree = (LookasideSlot *)p;\n        return;\n      }\n      if ((db->lookaside).pStart <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pFree;\n        (db->lookaside).pFree = (LookasideSlot *)p;\n        return;\n      }\n    }" if (parenthesized_expression "(p < (db->lookaside).pEnd)" ( (binary_expression "p < (db->lookaside).pEnd" identifier < (field_expression "(db->lookaside).pEnd" (parenthesized_expression "(db->lookaside)" ( (field_expression "db->lookaside" identifier -> field_identifier) )) . field_identifier)) )) (compound_statement "{\n      if ((db->lookaside).pMiddle <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pSmallFree;\n        (db->lookaside).pSmallFree = (LookasideSlot *)p;\n        return;\n      }\n      if ((db->lookaside).pStart <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pFree;\n        (db->lookaside).pFree = (LookasideSlot *)p;\n        return;\n      }\n    }" { (if_statement "if ((db->lookaside).pMiddle <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pSmallFree;\n        (db->lookaside).pSmallFree = (LookasideSlot *)p;\n        return;\n      }" if (parenthesized_expression "((db->lookaside).pMiddle <= p)" ( (binary_expression "(db->lookaside).pMiddle <= p" (field_expression "(db->lookaside).pMiddle" (parenthesized_expression "(db->lookaside)" ( (field_expression "db->lookaside" identifier -> field_identifier) )) . field_identifier) <= identifier) )) (compound_statement "{\n        *(LookasideSlot **)p = (db->lookaside).pSmallFree;\n        (db->lookaside).pSmallFree = (LookasideSlot *)p;\n        return;\n      }" { (expression_statement "*(LookasideSlot **)p = (db->lookaside).pSmallFree;" (assignment_expression "*(LookasideSlot **)p = (db->lookaside).pSmallFree" (pointer_expression "*(LookasideSlot **)p" * (cast_expression "(LookasideSlot **)p" ( (type_descriptor "LookasideSlot **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = (field_expression "(db->lookaside).pSmallFree" (parenthesized_expression "(db->lookaside)" ( (field_expression "db->lookaside" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "(db->lookaside).pSmallFree = (LookasideSlot *)p;" (assignment_expression "(db->lookaside).pSmallFree = (LookasideSlot *)p" (field_expression "(db->lookaside).pSmallFree" (parenthesized_expression "(db->lookaside)" ( (field_expression "db->lookaside" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(LookasideSlot *)p" ( (type_descriptor "LookasideSlot *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (return_statement "return;" return ;) })) (if_statement "if ((db->lookaside).pStart <= p) {\n        *(LookasideSlot **)p = (db->lookaside).pFree;\n        (db->lookaside).pFree = (LookasideSlot *)p;\n        return;\n      }" if (parenthesized_expression "((db->lookaside).pStart <= p)" ( (binary_expression "(db->lookaside).pStart <= p" (field_expression "(db->lookaside).pStart" (parenthesized_expression "(db->lookaside)" ( (field_expression "db->lookaside" identifier -> field_identifier) )) . field_identifier) <= identifier) )) (compound_statement "{\n        *(LookasideSlot **)p = (db->lookaside).pFree;\n        (db->lookaside).pFree = (LookasideSlot *)p;\n        return;\n      }" { (expression_statement "*(LookasideSlot **)p = (db->lookaside).pFree;" (assignment_expression "*(LookasideSlot **)p = (db->lookaside).pFree" (pointer_expression "*(LookasideSlot **)p" * (cast_expression "(LookasideSlot **)p" ( (type_descriptor "LookasideSlot **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = (field_expression "(db->lookaside).pFree" (parenthesized_expression "(db->lookaside)" ( (field_expression "db->lookaside" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "(db->lookaside).pFree = (LookasideSlot *)p;" (assignment_expression "(db->lookaside).pFree = (LookasideSlot *)p" (field_expression "(db->lookaside).pFree" (parenthesized_expression "(db->lookaside)" ( (field_expression "db->lookaside" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(LookasideSlot *)p" ( (type_descriptor "LookasideSlot *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (return_statement "return;" return ;) })) })) })) (expression_statement "(*(code *)PTR_sqlite3_free_000f639c)(p);" (call_expression "(*(code *)PTR_sqlite3_free_000f639c)(p)" (parenthesized_expression "(*(code *)PTR_sqlite3_free_000f639c)" ( (pointer_expression "*(code *)PTR_sqlite3_free_000f639c" * (cast_expression "(code *)PTR_sqlite3_free_000f639c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(p)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0002d060(int param_1,undefined4 *param_2)\n\n{\n  if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(param_2);\n  return;\n}\n\n" (function_definition "void FUN_0002d060(int param_1,undefined4 *param_2)\n\n{\n  if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(param_2);\n  return;\n}" primitive_type (function_declarator "FUN_0002d060(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 (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(param_2);\n  return;\n}" { (if_statement "if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }" { (if_statement "if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x1f8) != 0)" ( (binary_expression "*(int *)(param_1 + 0x1f8) != 0" (pointer_expression "*(int *)(param_1 + 0x1f8)" * (cast_expression "(int *)(param_1 + 0x1f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1f8)" ( (binary_expression "param_1 + 0x1f8" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      FUN_00016b00();\n      return;\n    }" { (expression_statement "FUN_00016b00();" (call_expression "FUN_00016b00()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (if_statement "if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }" if (parenthesized_expression "(param_2 < *(undefined4 **)(param_1 + 0x14c))" ( (binary_expression "param_2 < *(undefined4 **)(param_1 + 0x14c)" identifier < (pointer_expression "*(undefined4 **)(param_1 + 0x14c)" * (cast_expression "(undefined4 **)(param_1 + 0x14c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x14c)" ( (binary_expression "param_1 + 0x14c" identifier + number_literal) ))))) )) (compound_statement "{\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }" { (if_statement "if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }" if (parenthesized_expression "(*(undefined4 **)(param_1 + 0x144) <= param_2)" ( (binary_expression "*(undefined4 **)(param_1 + 0x144) <= param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x144)" * (cast_expression "(undefined4 **)(param_1 + 0x144)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x144)" ( (binary_expression "param_1 + 0x144" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }" { (expression_statement "*param_2 = *(undefined4 *)(param_1 + 0x140);" (assignment_expression "*param_2 = *(undefined4 *)(param_1 + 0x140)" (pointer_expression "*param_2" * identifier) = (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 **)(param_1 + 0x140) = param_2;" (assignment_expression "*(undefined4 **)(param_1 + 0x140) = param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x140)" * (cast_expression "(undefined4 **)(param_1 + 0x140)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })) (if_statement "if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }" if (parenthesized_expression "(*(undefined4 **)(param_1 + 0x148) <= param_2)" ( (binary_expression "*(undefined4 **)(param_1 + 0x148) <= param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x148)" * (cast_expression "(undefined4 **)(param_1 + 0x148)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x148)" ( (binary_expression "param_1 + 0x148" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }" { (expression_statement "*param_2 = *(undefined4 *)(param_1 + 0x138);" (assignment_expression "*param_2 = *(undefined4 *)(param_1 + 0x138)" (pointer_expression "*param_2" * identifier) = (pointer_expression "*(undefined4 *)(param_1 + 0x138)" * (cast_expression "(undefined4 *)(param_1 + 0x138)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x138)" ( (binary_expression "param_1 + 0x138" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 **)(param_1 + 0x138) = param_2;" (assignment_expression "*(undefined4 **)(param_1 + 0x138) = param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x138)" * (cast_expression "(undefined4 **)(param_1 + 0x138)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x138)" ( (binary_expression "param_1 + 0x138" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })) })) })) (expression_statement "(*(code *)PTR_sqlite3_free_000f639c)(param_2);" (call_expression "(*(code *)PTR_sqlite3_free_000f639c)(param_2)" (parenthesized_expression "(*(code *)PTR_sqlite3_free_000f639c)" ( (pointer_expression "*(code *)PTR_sqlite3_free_000f639c" * (cast_expression "(code *)PTR_sqlite3_free_000f639c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (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 (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (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 * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_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 * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_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 * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return ;) })) })) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0002d060(int param_1,undefined4 *param_2)\n\n{\n  if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(param_2);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0002d060(int param_1,undefined4 *param_2)" (identifier "FUN_0002d060") (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") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }\n  (*(code *)PTR_sqlite3_free_000f639c)(param_2);\n  return;\n}" ({ "{") (if_statement "if (param_1 != 0) {\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }\n    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }\n  }" ({ "{") (if_statement "if (*(int *)(param_1 + 0x1f8) != 0) {\n      FUN_00016b00();\n      return;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x1f8) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x1f8) != 0" (pointer_expression "*(int *)(param_1 + 0x1f8)" (* "*") (cast_expression "(int *)(param_1 + 0x1f8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1f8)" (( "(") (binary_expression "param_1 + 0x1f8" (identifier "param_1") (+ "+") (number_literal "0x1f8")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00016b00();\n      return;\n    }" ({ "{") (expression_statement "FUN_00016b00();" (call_expression "FUN_00016b00()" (identifier "FUN_00016b00") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }" (if "if") (parenthesized_expression "(param_2 < *(undefined4 **)(param_1 + 0x14c))" (( "(") (binary_expression "param_2 < *(undefined4 **)(param_1 + 0x14c)" (identifier "param_2") (< "<") (pointer_expression "*(undefined4 **)(param_1 + 0x14c)" (* "*") (cast_expression "(undefined4 **)(param_1 + 0x14c)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x14c)" (( "(") (binary_expression "param_1 + 0x14c" (identifier "param_1") (+ "+") (number_literal "0x14c")) () ")"))))) () ")")) (compound_statement "{\n      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }\n      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }\n    }" ({ "{") (if_statement "if (*(undefined4 **)(param_1 + 0x144) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }" (if "if") (parenthesized_expression "(*(undefined4 **)(param_1 + 0x144) <= param_2)" (( "(") (binary_expression "*(undefined4 **)(param_1 + 0x144) <= param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x144)" (* "*") (cast_expression "(undefined4 **)(param_1 + 0x144)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x144)" (( "(") (binary_expression "param_1 + 0x144" (identifier "param_1") (+ "+") (number_literal "0x144")) () ")")))) (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n        *param_2 = *(undefined4 *)(param_1 + 0x140);\n        *(undefined4 **)(param_1 + 0x140) = param_2;\n        return;\n      }" ({ "{") (expression_statement "*param_2 = *(undefined4 *)(param_1 + 0x140);" (assignment_expression "*param_2 = *(undefined4 *)(param_1 + 0x140)" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x140)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x140)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x140)" (( "(") (binary_expression "param_1 + 0x140" (identifier "param_1") (+ "+") (number_literal "0x140")) () ")"))))) (; ";")) (expression_statement "*(undefined4 **)(param_1 + 0x140) = param_2;" (assignment_expression "*(undefined4 **)(param_1 + 0x140) = param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x140)" (* "*") (cast_expression "(undefined4 **)(param_1 + 0x140)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x140)" (( "(") (binary_expression "param_1 + 0x140" (identifier "param_1") (+ "+") (number_literal "0x140")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (*(undefined4 **)(param_1 + 0x148) <= param_2) {\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }" (if "if") (parenthesized_expression "(*(undefined4 **)(param_1 + 0x148) <= param_2)" (( "(") (binary_expression "*(undefined4 **)(param_1 + 0x148) <= param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x148)" (* "*") (cast_expression "(undefined4 **)(param_1 + 0x148)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x148)" (( "(") (binary_expression "param_1 + 0x148" (identifier "param_1") (+ "+") (number_literal "0x148")) () ")")))) (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n        *param_2 = *(undefined4 *)(param_1 + 0x138);\n        *(undefined4 **)(param_1 + 0x138) = param_2;\n        return;\n      }" ({ "{") (expression_statement "*param_2 = *(undefined4 *)(param_1 + 0x138);" (assignment_expression "*param_2 = *(undefined4 *)(param_1 + 0x138)" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x138)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x138)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x138)" (( "(") (binary_expression "param_1 + 0x138" (identifier "param_1") (+ "+") (number_literal "0x138")) () ")"))))) (; ";")) (expression_statement "*(undefined4 **)(param_1 + 0x138) = param_2;" (assignment_expression "*(undefined4 **)(param_1 + 0x138) = param_2" (pointer_expression "*(undefined4 **)(param_1 + 0x138)" (* "*") (cast_expression "(undefined4 **)(param_1 + 0x138)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x138)" (( "(") (binary_expression "param_1 + 0x138" (identifier "param_1") (+ "+") (number_literal "0x138")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (} "}"))) (expression_statement "(*(code *)PTR_sqlite3_free_000f639c)(param_2);" (call_expression "(*(code *)PTR_sqlite3_free_000f639c)(param_2)" (parenthesized_expression "(*(code *)PTR_sqlite3_free_000f639c)" (( "(") (pointer_expression "*(code *)PTR_sqlite3_free_000f639c" (* "*") (cast_expression "(code *)PTR_sqlite3_free_000f639c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sqlite3_free_000f639c"))) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *var_1,void *var_3)

{
  if (var_1 != (type_1 *)0x0) {
    if (var_1->pnBytesFreed != (int *)0x0) {
      var_2(var_1,var_3);
      return;
    }
    if (var_3 < (var_1->lookaside).pEnd) {
      if ((var_1->lookaside).pMiddle <= var_3) {
        *(type_2 **)var_3 = (var_1->lookaside).pSmallFree;
        (var_1->lookaside).pSmallFree = (type_2 *)var_3;
        return;
      }
      if ((var_1->lookaside).pStart <= var_3) {
        *(type_2 **)var_3 = (var_1->lookaside).pFree;
        (var_1->lookaside).pFree = (type_2 *)var_3;
        return;
      }
    }
  }
  (*(type_3 *)PTR_sqlite3_free_000f639c)(var_3);
  return;
}


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

void MASKED(int param_1,undefined4 *param_2)

{
  if (param_1 != 0) {
    if (*(int *)(param_1 + 0x1f8) != 0) {
      FUN_00016b00();
      return;
    }
    if (param_2 < *(undefined4 **)(param_1 + 0x14c)) {
      if (*(undefined4 **)(param_1 + 0x144) <= param_2) {
        *param_2 = *(undefined4 *)(param_1 + 0x140);
        *(undefined4 **)(param_1 + 0x140) = param_2;
        return;
      }
      if (*(undefined4 **)(param_1 + 0x148) <= param_2) {
        *param_2 = *(undefined4 *)(param_1 + 0x138);
        *(undefined4 **)(param_1 + 0x138) = param_2;
        return;
      }
    }
  }
  (*(code *)PTR_sqlite3_free_000f639c)(param_2);
  return;
}

