
int sqlite3Fts3ReadBlock(Fts3Table *p,sqlite3_int64 iBlockid,char **paBlob,int *pnBlob,int *pnLoad)

{
  int iVar1;
  sqlite3_blob *psVar2;
  int iVar3;
  char *zTable;
  int iVar4;
  undefined4 *in_stack_00000018;
  undefined4 in_stack_ffffffd0;
  undefined4 in_stack_ffffffd4;
  
  if (p->pSegments == (sqlite3_blob *)0x0) {
    zTable = p->zSegmentsTbl;
    if (zTable == (char *)0x0) {
      zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)
                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)
      ;
      p->zSegmentsTbl = zTable;
      if (zTable == (char *)0x0) {
        return 7;
      }
    }
    iVar1 = sqlite3_blob_open(p->db,p->zDb,zTable,
                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,
                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments);
  }
  else {
    iVar1 = sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4));
  }
  if (iVar1 == 0) {
    psVar2 = p->pSegments;
    iVar4 = 0;
    if ((psVar2 != (sqlite3_blob *)0x0) && (*(int *)(psVar2 + 0x10) != 0)) {
      iVar4 = *(int *)psVar2;
    }
    *iBlockid._4_4_ = iVar4;
    if (iBlockid._0_4_ != (int *)0x0) {
      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);
      if (iVar3 == 0) {
        iVar1 = 7;
        *iBlockid._0_4_ = 0;
      }
      else {
        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {
          iVar4 = 0x1000;
          *in_stack_00000018 = 0x1000;
        }
        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))
                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);
        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);
        if (iVar1 == 0) {
          *iBlockid._0_4_ = iVar3;
        }
        else {
          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);
          *iBlockid._0_4_ = 0;
        }
      }
    }
  }
  return iVar1;
}



int FUN_001317e8(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,
                int *param_6,undefined4 *param_7)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  
  if (*(int *)(param_1 + 0xf8) == 0) {
    iVar1 = *(int *)(param_1 + 0xf4);
    if (iVar1 == 0) {
      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)
                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,
                         *(undefined4 *)(param_1 + 0x14));
      *(int *)(param_1 + 0xf4) = iVar1;
      if (iVar1 == 0) {
        return 7;
      }
    }
    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,
                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,
                              param_4,0,param_1 + 0xf8);
  }
  else {
    iVar1 = sqlite3_blob_reopen();
  }
  if (iVar1 == 0) {
    piVar2 = *(int **)(param_1 + 0xf8);
    iVar4 = 0;
    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {
      iVar4 = *piVar2;
    }
    *param_6 = iVar4;
    if (param_5 != (int *)0x0) {
      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);
      if (iVar3 == 0) {
        iVar1 = 7;
        *param_5 = 0;
      }
      else {
        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {
          iVar4 = 0x1000;
          *param_7 = 0x1000;
        }
        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))
                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);
        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);
        if (iVar1 == 0) {
          *param_5 = iVar3;
        }
        else {
          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);
          *param_5 = 0;
        }
      }
    }
  }
  return iVar1;
}


lui gp,0x6
addiu gp,gp,0x7138
addu gp,gp,t9
addiu sp,sp,-0x40
sw s0,0x2c(sp)
or s0,a0,zero
sw gp,0x20(sp)
sw ra,0x3c(sp)
sw s3,0x38(sp)
sw s2,0x34(sp)
sw s1,0x30(sp)
lw a0,0xf8(a0)
beq a0,zero,0x00131914
_lw t9,-0x7ca8(gp)
bal 0x00131628
_nop
lw gp,0x20(sp)
or s1,v0,zero
bne s1,zero,0x001318f8
_lw ra,0x3c(sp)
lw v0,0xf8(s0)
beq v0,zero,0x00131854
_or s2,zero,zero
lw v1,0x10(v0)
beq v1,zero,0x00131854
_nop
lw s2,0x0(v0)
lw v0,0x54(sp)
sw s2,0x0(v0)
lw v0,0x50(sp)
beq v0,zero,0x001318f4
_lw t9,-0x7f3c(gp)
jalr t9
_addiu a0,s2,0x14
lw gp,0x20(sp)
beq v0,zero,0x0013195c
_or s3,v0,zero
lw v0,0x58(sp)
beq v0,zero,0x001319b4
_slti v0,s2,0x4001
bne v0,zero,0x001319b4
_lw v1,0x58(sp)
li v0,0x1000
li s1,0x1000
li s2,0x1000
sw v0,0x0(v1)
lw v0,-0x7d64(gp)
or a3,zero,zero
lw t9,-0x7d50(gp)
or a2,s2,zero
lw a0,0xf8(s0)
or a1,s3,zero
addiu v0,v0,0x1b24
addiu t9,t9,-0x471c
jalr t9
_sw v0,0x10(sp)
addu a0,s3,s1
lw gp,0x20(sp)
li a2,0x14
or a1,zero,zero
lw t9,-0x7bc8(gp)
jalr t9
_or s1,v0,zero
bne s1,zero,0x0013196c
_lw gp,0x20(sp)
lw v0,0x50(sp)
sw s3,0x0(v0)
lw ra,0x3c(sp)
or v0,s1,zero
lw s3,0x38(sp)
lw s2,0x34(sp)
lw s1,0x30(sp)
lw s0,0x2c(sp)
jr ra
_addiu sp,sp,0x40
or s2,a2,zero
lw a2,0xf4(s0)
beq a2,zero,0x00131988
_or s3,a3,zero
lw a3,-0x7fc4(gp)
addiu v0,s0,0xf8
lw a1,0x10(s0)
lw a0,0xc(s0)
lw t9,-0x7ca4(gp)
addiu a3,a3,-0x3b8
sw v0,0x1c(sp)
sw zero,0x18(sp)
sw s3,0x14(sp)
bal 0x00130da4
_sw s2,0x10(sp)
lw gp,0x20(sp)
b 0x00131830
_or s1,v0,zero
lw v0,0x50(sp)
li s1,0x7
b 0x001318f4
_sw s3,0x0(v0)
lw t9,-0x7fb4(gp)
or a0,s3,zero
jalr t9
_or s3,zero,zero
lw v0,0x50(sp)
b 0x001318f4
_sw s3,0x0(v0)
lw a0,-0x7fc4(gp)
lw t9,-0x7fbc(gp)
lw a1,0x14(s0)
jalr t9
_addiu a0,a0,-0x3c4
lw gp,0x20(sp)
or a2,v0,zero
bne v0,zero,0x00131924
_sw v0,0xf4(s0)
b 0x001318f4
_li s1,0x7
b 0x001318a0
_or s1,s2,zero
(translation_unit "int FUN_001317e8(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }\n  if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_001317e8(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }\n  if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_001317e8(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "int *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "undefined4 *param_7" type_identifier (pointer_declarator "*param_7" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }\n  if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xf8) == 0)" ( (binary_expression "*(int *)(param_1 + 0xf8) == 0" (pointer_expression "*(int *)(param_1 + 0xf8)" * (cast_expression "(int *)(param_1 + 0xf8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0xf4);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xf4)" identifier = (pointer_expression "*(int *)(param_1 + 0xf4)" * (cast_expression "(int *)(param_1 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }" { (expression_statement "iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));" (assignment_expression "iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14))" identifier = (call_expression "(*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14))" (parenthesized_expression "(*(code *)PTR_sqlite3_mprintf_00190964)" ( (pointer_expression "*(code *)PTR_sqlite3_mprintf_00190964" * (cast_expression "(code *)PTR_sqlite3_mprintf_00190964" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14))" ( (binary_expression "PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4" identifier + number_literal) , (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) )))) ;) (expression_statement "*(int *)(param_1 + 0xf4) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xf4) = iVar1" (pointer_expression "*(int *)(param_1 + 0xf4)" * (cast_expression "(int *)(param_1 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar1 == 0) {\n        return 7;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        return 7;\n      }" { (return_statement "return 7;" return number_literal ;) })) })) (expression_statement "iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);" (assignment_expression "iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8)" identifier = (call_expression "sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8)" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , identifier , (binary_expression "PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8" identifier + number_literal) , identifier , identifier , number_literal , (binary_expression "param_1 + 0xf8" identifier + number_literal) )))) ;) }) (else_clause "else {\n    iVar1 = sqlite3_blob_reopen();\n  }" else (compound_statement "{\n    iVar1 = sqlite3_blob_reopen();\n  }" { (expression_statement "iVar1 = sqlite3_blob_reopen();" (assignment_expression "iVar1 = sqlite3_blob_reopen()" identifier = (call_expression "sqlite3_blob_reopen()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }" { (expression_statement "piVar2 = *(int **)(param_1 + 0xf8);" (assignment_expression "piVar2 = *(int **)(param_1 + 0xf8)" identifier = (pointer_expression "*(int **)(param_1 + 0xf8)" * (cast_expression "(int **)(param_1 + 0xf8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }" if (parenthesized_expression "((piVar2 != (int *)0x0) && (piVar2[4] != 0))" ( (binary_expression "(piVar2 != (int *)0x0) && (piVar2[4] != 0)" (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(piVar2[4] != 0)" ( (binary_expression "piVar2[4] != 0" (subscript_expression "piVar2[4]" identifier [ number_literal ]) != number_literal) ))) )) (compound_statement "{\n      iVar4 = *piVar2;\n    }" { (expression_statement "iVar4 = *piVar2;" (assignment_expression "iVar4 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) })) (expression_statement "*param_6 = iVar4;" (assignment_expression "*param_6 = iVar4" (pointer_expression "*param_6" * identifier) = identifier) ;) (if_statement "if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }" if (parenthesized_expression "(param_5 != (int *)0x0)" ( (binary_expression "param_5 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }" { (expression_statement "iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);" (assignment_expression "iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14)" identifier = (call_expression "(*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14)" (parenthesized_expression "(*(code *)PTR_sqlite3_malloc_001909e4)" ( (pointer_expression "*(code *)PTR_sqlite3_malloc_001909e4" * (cast_expression "(code *)PTR_sqlite3_malloc_001909e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) )))) ;) (if_statement "if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar1 = 7;\n        *param_5 = 0;\n      }" { (expression_statement "iVar1 = 7;" (assignment_expression "iVar1 = 7" identifier = number_literal) ;) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" * identifier) = number_literal) ;) }) (else_clause "else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }" else (compound_statement "{\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }" { (if_statement "if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }" if (parenthesized_expression "((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4))" ( (binary_expression "(param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)" (parenthesized_expression "(param_7 != (undefined4 *)0x0)" ( (binary_expression "param_7 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(0x4000 < iVar4)" ( (binary_expression "0x4000 < iVar4" number_literal < identifier) ))) )) (compound_statement "{\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }" { (expression_statement "iVar4 = 0x1000;" (assignment_expression "iVar4 = 0x1000" identifier = number_literal) ;) (expression_statement "*param_7 = 0x1000;" (assignment_expression "*param_7 = 0x1000" (pointer_expression "*param_7" * identifier) = number_literal) ;) })) (expression_statement "iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);" (assignment_expression "iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" identifier = (call_expression "(*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" (parenthesized_expression "(*(code *)(PTR_LAB_00190bd0 + -0x471c))" ( (pointer_expression "*(code *)(PTR_LAB_00190bd0 + -0x471c)" * (cast_expression "(code *)(PTR_LAB_00190bd0 + -0x471c)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_00190bd0 + -0x471c)" ( (binary_expression "PTR_LAB_00190bd0 + -0x471c" identifier + number_literal) )))) )) (argument_list "(*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xf8)" * (cast_expression "(undefined4 *)(param_1 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) )))) , identifier , identifier , number_literal , (binary_expression "PTR_LAB_00190bbc + 0x1b24" identifier + number_literal) )))) ;) (expression_statement "(*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);" (call_expression "(*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14)" (parenthesized_expression "(*(code *)PTR_memset_00190d58)" ( (pointer_expression "*(code *)PTR_memset_00190d58" * (cast_expression "(code *)PTR_memset_00190d58" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 + iVar4,0,0x14)" ( (binary_expression "iVar3 + iVar4" identifier + identifier) , number_literal , number_literal ))) ;) (if_statement "if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          *param_5 = iVar3;\n        }" { (expression_statement "*param_5 = iVar3;" (assignment_expression "*param_5 = iVar3" (pointer_expression "*param_5" * identifier) = identifier) ;) }) (else_clause "else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }" else (compound_statement "{\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }" { (expression_statement "(*(code *)PTR_sqlite3_free_0019096c)(iVar3);" (call_expression "(*(code *)PTR_sqlite3_free_0019096c)(iVar3)" (parenthesized_expression "(*(code *)PTR_sqlite3_free_0019096c)" ( (pointer_expression "*(code *)PTR_sqlite3_free_0019096c" * (cast_expression "(code *)PTR_sqlite3_free_0019096c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" * identifier) = number_literal) ;) }))) }))) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int sqlite3Fts3ReadBlock(Fts3Table *p,sqlite3_int64 iBlockid,char **paBlob,int *pnBlob,int *pnLoad)\n\n{\n  int iVar1;\n  sqlite3_blob *psVar2;\n  int iVar3;\n  char *zTable;\n  int iVar4;\n  undefined4 *in_stack_00000018;\n  undefined4 in_stack_ffffffd0;\n  undefined4 in_stack_ffffffd4;\n  \n  if (p->pSegments == (sqlite3_blob *)0x0) {\n    zTable = p->zSegmentsTbl;\n    if (zTable == (char *)0x0) {\n      zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)\n      ;\n      p->zSegmentsTbl = zTable;\n      if (zTable == (char *)0x0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(p->db,p->zDb,zTable,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,\n                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4));\n  }\n  if (iVar1 == 0) {\n    psVar2 = p->pSegments;\n    iVar4 = 0;\n    if ((psVar2 != (sqlite3_blob *)0x0) && (*(int *)(psVar2 + 0x10) != 0)) {\n      iVar4 = *(int *)psVar2;\n    }\n    *iBlockid._4_4_ = iVar4;\n    if (iBlockid._0_4_ != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *iBlockid._0_4_ = 0;\n      }\n      else {\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int sqlite3Fts3ReadBlock(Fts3Table *p,sqlite3_int64 iBlockid,char **paBlob,int *pnBlob,int *pnLoad)\n\n{\n  int iVar1;\n  sqlite3_blob *psVar2;\n  int iVar3;\n  char *zTable;\n  int iVar4;\n  undefined4 *in_stack_00000018;\n  undefined4 in_stack_ffffffd0;\n  undefined4 in_stack_ffffffd4;\n  \n  if (p->pSegments == (sqlite3_blob *)0x0) {\n    zTable = p->zSegmentsTbl;\n    if (zTable == (char *)0x0) {\n      zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)\n      ;\n      p->zSegmentsTbl = zTable;\n      if (zTable == (char *)0x0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(p->db,p->zDb,zTable,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,\n                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4));\n  }\n  if (iVar1 == 0) {\n    psVar2 = p->pSegments;\n    iVar4 = 0;\n    if ((psVar2 != (sqlite3_blob *)0x0) && (*(int *)(psVar2 + 0x10) != 0)) {\n      iVar4 = *(int *)psVar2;\n    }\n    *iBlockid._4_4_ = iVar4;\n    if (iBlockid._0_4_ != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *iBlockid._0_4_ = 0;\n      }\n      else {\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "sqlite3Fts3ReadBlock(Fts3Table *p,sqlite3_int64 iBlockid,char **paBlob,int *pnBlob,int *pnLoad)" identifier (parameter_list "(Fts3Table *p,sqlite3_int64 iBlockid,char **paBlob,int *pnBlob,int *pnLoad)" ( (parameter_declaration "Fts3Table *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "sqlite3_int64 iBlockid" type_identifier identifier) , (parameter_declaration "char **paBlob" primitive_type (pointer_declarator "**paBlob" * (pointer_declarator "*paBlob" * identifier))) , (parameter_declaration "int *pnBlob" primitive_type (pointer_declarator "*pnBlob" * identifier)) , (parameter_declaration "int *pnLoad" primitive_type (pointer_declarator "*pnLoad" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  sqlite3_blob *psVar2;\n  int iVar3;\n  char *zTable;\n  int iVar4;\n  undefined4 *in_stack_00000018;\n  undefined4 in_stack_ffffffd0;\n  undefined4 in_stack_ffffffd4;\n  \n  if (p->pSegments == (sqlite3_blob *)0x0) {\n    zTable = p->zSegmentsTbl;\n    if (zTable == (char *)0x0) {\n      zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)\n      ;\n      p->zSegmentsTbl = zTable;\n      if (zTable == (char *)0x0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(p->db,p->zDb,zTable,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,\n                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4));\n  }\n  if (iVar1 == 0) {\n    psVar2 = p->pSegments;\n    iVar4 = 0;\n    if ((psVar2 != (sqlite3_blob *)0x0) && (*(int *)(psVar2 + 0x10) != 0)) {\n      iVar4 = *(int *)psVar2;\n    }\n    *iBlockid._4_4_ = iVar4;\n    if (iBlockid._0_4_ != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *iBlockid._0_4_ = 0;\n      }\n      else {\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "sqlite3_blob *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *zTable;" primitive_type (pointer_declarator "*zTable" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 *in_stack_00000018;" type_identifier (pointer_declarator "*in_stack_00000018" * identifier) ;) (declaration "undefined4 in_stack_ffffffd0;" type_identifier identifier ;) (declaration "undefined4 in_stack_ffffffd4;" type_identifier identifier ;) (if_statement "if (p->pSegments == (sqlite3_blob *)0x0) {\n    zTable = p->zSegmentsTbl;\n    if (zTable == (char *)0x0) {\n      zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)\n      ;\n      p->zSegmentsTbl = zTable;\n      if (zTable == (char *)0x0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(p->db,p->zDb,zTable,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,\n                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4));\n  }" if (parenthesized_expression "(p->pSegments == (sqlite3_blob *)0x0)" ( (binary_expression "p->pSegments == (sqlite3_blob *)0x0" (field_expression "p->pSegments" identifier -> field_identifier) == (cast_expression "(sqlite3_blob *)0x0" ( (type_descriptor "sqlite3_blob *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    zTable = p->zSegmentsTbl;\n    if (zTable == (char *)0x0) {\n      zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)\n      ;\n      p->zSegmentsTbl = zTable;\n      if (zTable == (char *)0x0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(p->db,p->zDb,zTable,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,\n                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments);\n  }" { (expression_statement "zTable = p->zSegmentsTbl;" (assignment_expression "zTable = p->zSegmentsTbl" identifier = (field_expression "p->zSegmentsTbl" identifier -> field_identifier)) ;) (if_statement "if (zTable == (char *)0x0) {\n      zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)\n      ;\n      p->zSegmentsTbl = zTable;\n      if (zTable == (char *)0x0) {\n        return 7;\n      }\n    }" if (parenthesized_expression "(zTable == (char *)0x0)" ( (binary_expression "zTable == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)\n      ;\n      p->zSegmentsTbl = zTable;\n      if (zTable == (char *)0x0) {\n        return 7;\n      }\n    }" { (expression_statement "zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)\n      ;" (assignment_expression "zTable = (char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)" identifier = (cast_expression "(char *)(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_sqlite3_mprintf_00190964)\n                                 (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)" (parenthesized_expression "(*(code *)PTR_sqlite3_mprintf_00190964)" ( (pointer_expression "*(code *)PTR_sqlite3_mprintf_00190964" * (cast_expression "(code *)PTR_sqlite3_mprintf_00190964" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,p->zName)" ( (binary_expression "PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4" identifier + number_literal) , (field_expression "p->zName" identifier -> field_identifier) ))))) ;) (expression_statement "p->zSegmentsTbl = zTable;" (assignment_expression "p->zSegmentsTbl = zTable" (field_expression "p->zSegmentsTbl" identifier -> field_identifier) = identifier) ;) (if_statement "if (zTable == (char *)0x0) {\n        return 7;\n      }" if (parenthesized_expression "(zTable == (char *)0x0)" ( (binary_expression "zTable == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 7;\n      }" { (return_statement "return 7;" return number_literal ;) })) })) (expression_statement "iVar1 = sqlite3_blob_open(p->db,p->zDb,zTable,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,\n                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments);" (assignment_expression "iVar1 = sqlite3_blob_open(p->db,p->zDb,zTable,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,\n                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments)" identifier = (call_expression "sqlite3_blob_open(p->db,p->zDb,zTable,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,\n                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments)" identifier (argument_list "(p->db,p->zDb,zTable,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,\n                              CONCAT44(pnBlob,pnLoad),0,&p->pSegments)" ( (field_expression "p->db" identifier -> field_identifier) , (field_expression "p->zDb" identifier -> field_identifier) , identifier , (binary_expression "PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8" identifier + number_literal) , (call_expression "CONCAT44(pnBlob,pnLoad)" identifier (argument_list "(pnBlob,pnLoad)" ( identifier , identifier ))) , number_literal , (pointer_expression "&p->pSegments" & (field_expression "p->pSegments" identifier -> field_identifier)) )))) ;) }) (else_clause "else {\n    iVar1 = sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4));\n  }" else (compound_statement "{\n    iVar1 = sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4));\n  }" { (expression_statement "iVar1 = sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4));" (assignment_expression "iVar1 = sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4))" identifier = (call_expression "sqlite3_blob_reopen(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4))" identifier (argument_list "(p->pSegments,CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4))" ( (field_expression "p->pSegments" identifier -> field_identifier) , (call_expression "CONCAT44(in_stack_ffffffd0,in_stack_ffffffd4)" identifier (argument_list "(in_stack_ffffffd0,in_stack_ffffffd4)" ( identifier , identifier ))) )))) ;) }))) (if_statement "if (iVar1 == 0) {\n    psVar2 = p->pSegments;\n    iVar4 = 0;\n    if ((psVar2 != (sqlite3_blob *)0x0) && (*(int *)(psVar2 + 0x10) != 0)) {\n      iVar4 = *(int *)psVar2;\n    }\n    *iBlockid._4_4_ = iVar4;\n    if (iBlockid._0_4_ != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *iBlockid._0_4_ = 0;\n      }\n      else {\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    psVar2 = p->pSegments;\n    iVar4 = 0;\n    if ((psVar2 != (sqlite3_blob *)0x0) && (*(int *)(psVar2 + 0x10) != 0)) {\n      iVar4 = *(int *)psVar2;\n    }\n    *iBlockid._4_4_ = iVar4;\n    if (iBlockid._0_4_ != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *iBlockid._0_4_ = 0;\n      }\n      else {\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }\n    }\n  }" { (expression_statement "psVar2 = p->pSegments;" (assignment_expression "psVar2 = p->pSegments" identifier = (field_expression "p->pSegments" identifier -> field_identifier)) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if ((psVar2 != (sqlite3_blob *)0x0) && (*(int *)(psVar2 + 0x10) != 0)) {\n      iVar4 = *(int *)psVar2;\n    }" if (parenthesized_expression "((psVar2 != (sqlite3_blob *)0x0) && (*(int *)(psVar2 + 0x10) != 0))" ( (binary_expression "(psVar2 != (sqlite3_blob *)0x0) && (*(int *)(psVar2 + 0x10) != 0)" (parenthesized_expression "(psVar2 != (sqlite3_blob *)0x0)" ( (binary_expression "psVar2 != (sqlite3_blob *)0x0" identifier != (cast_expression "(sqlite3_blob *)0x0" ( (type_descriptor "sqlite3_blob *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*(int *)(psVar2 + 0x10) != 0)" ( (binary_expression "*(int *)(psVar2 + 0x10) != 0" (pointer_expression "*(int *)(psVar2 + 0x10)" * (cast_expression "(int *)(psVar2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar2 + 0x10)" ( (binary_expression "psVar2 + 0x10" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n      iVar4 = *(int *)psVar2;\n    }" { (expression_statement "iVar4 = *(int *)psVar2;" (assignment_expression "iVar4 = *(int *)psVar2" identifier = (pointer_expression "*(int *)psVar2" * (cast_expression "(int *)psVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) })) (expression_statement "*iBlockid._4_4_ = iVar4;" (assignment_expression "*iBlockid._4_4_ = iVar4" (pointer_expression "*iBlockid._4_4_" * (field_expression "iBlockid._4_4_" identifier . field_identifier)) = identifier) ;) (if_statement "if (iBlockid._0_4_ != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *iBlockid._0_4_ = 0;\n      }\n      else {\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }\n    }" if (parenthesized_expression "(iBlockid._0_4_ != (int *)0x0)" ( (binary_expression "iBlockid._0_4_ != (int *)0x0" (field_expression "iBlockid._0_4_" identifier . field_identifier) != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *iBlockid._0_4_ = 0;\n      }\n      else {\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }\n    }" { (expression_statement "iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);" (assignment_expression "iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14)" identifier = (call_expression "(*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14)" (parenthesized_expression "(*(code *)PTR_sqlite3_malloc_001909e4)" ( (pointer_expression "*(code *)PTR_sqlite3_malloc_001909e4" * (cast_expression "(code *)PTR_sqlite3_malloc_001909e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) )))) ;) (if_statement "if (iVar3 == 0) {\n        iVar1 = 7;\n        *iBlockid._0_4_ = 0;\n      }\n      else {\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar1 = 7;\n        *iBlockid._0_4_ = 0;\n      }" { (expression_statement "iVar1 = 7;" (assignment_expression "iVar1 = 7" identifier = number_literal) ;) (expression_statement "*iBlockid._0_4_ = 0;" (assignment_expression "*iBlockid._0_4_ = 0" (pointer_expression "*iBlockid._0_4_" * (field_expression "iBlockid._0_4_" identifier . field_identifier)) = number_literal) ;) }) (else_clause "else {\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }" else (compound_statement "{\n        if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }\n      }" { (if_statement "if ((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }" if (parenthesized_expression "((in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4))" ( (binary_expression "(in_stack_00000018 != (undefined4 *)0x0) && (0x4000 < iVar4)" (parenthesized_expression "(in_stack_00000018 != (undefined4 *)0x0)" ( (binary_expression "in_stack_00000018 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(0x4000 < iVar4)" ( (binary_expression "0x4000 < iVar4" number_literal < identifier) ))) )) (compound_statement "{\n          iVar4 = 0x1000;\n          *in_stack_00000018 = 0x1000;\n        }" { (expression_statement "iVar4 = 0x1000;" (assignment_expression "iVar4 = 0x1000" identifier = number_literal) ;) (expression_statement "*in_stack_00000018 = 0x1000;" (assignment_expression "*in_stack_00000018 = 0x1000" (pointer_expression "*in_stack_00000018" * identifier) = number_literal) ;) })) (expression_statement "iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);" (assignment_expression "iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" identifier = (call_expression "(*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" (parenthesized_expression "(*(code *)(PTR_LAB_00190bd0 + -0x471c))" ( (pointer_expression "*(code *)(PTR_LAB_00190bd0 + -0x471c)" * (cast_expression "(code *)(PTR_LAB_00190bd0 + -0x471c)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_00190bd0 + -0x471c)" ( (binary_expression "PTR_LAB_00190bd0 + -0x471c" identifier + number_literal) )))) )) (argument_list "(p->pSegments,iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" ( (field_expression "p->pSegments" identifier -> field_identifier) , identifier , identifier , number_literal , (binary_expression "PTR_LAB_00190bbc + 0x1b24" identifier + number_literal) )))) ;) (expression_statement "(*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);" (call_expression "(*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14)" (parenthesized_expression "(*(code *)PTR_memset_00190d58)" ( (pointer_expression "*(code *)PTR_memset_00190d58" * (cast_expression "(code *)PTR_memset_00190d58" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 + iVar4,0,0x14)" ( (binary_expression "iVar3 + iVar4" identifier + identifier) , number_literal , number_literal ))) ;) (if_statement "if (iVar1 == 0) {\n          *iBlockid._0_4_ = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          *iBlockid._0_4_ = iVar3;\n        }" { (expression_statement "*iBlockid._0_4_ = iVar3;" (assignment_expression "*iBlockid._0_4_ = iVar3" (pointer_expression "*iBlockid._0_4_" * (field_expression "iBlockid._0_4_" identifier . field_identifier)) = identifier) ;) }) (else_clause "else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }" else (compound_statement "{\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *iBlockid._0_4_ = 0;\n        }" { (expression_statement "(*(code *)PTR_sqlite3_free_0019096c)(iVar3);" (call_expression "(*(code *)PTR_sqlite3_free_0019096c)(iVar3)" (parenthesized_expression "(*(code *)PTR_sqlite3_free_0019096c)" ( (pointer_expression "*(code *)PTR_sqlite3_free_0019096c" * (cast_expression "(code *)PTR_sqlite3_free_0019096c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "*iBlockid._0_4_ = 0;" (assignment_expression "*iBlockid._0_4_ = 0" (pointer_expression "*iBlockid._0_4_" * (field_expression "iBlockid._0_4_" identifier . field_identifier)) = number_literal) ;) }))) }))) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_001317e8(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }\n  if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_001317e8(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }\n  if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_001317e8(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "int *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "undefined4 *param_7" type_identifier (pointer_declarator "*param_7" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }\n  if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xf8) == 0)" ( (binary_expression "*(int *)(param_1 + 0xf8) == 0" (pointer_expression "*(int *)(param_1 + 0xf8)" * (cast_expression "(int *)(param_1 + 0xf8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0xf4);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xf4)" identifier = (pointer_expression "*(int *)(param_1 + 0xf4)" * (cast_expression "(int *)(param_1 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }" { (expression_statement "iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));" (assignment_expression "iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14))" identifier = (call_expression "(*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14))" (parenthesized_expression "(*(code *)PTR_sqlite3_mprintf_00190964)" ( (pointer_expression "*(code *)PTR_sqlite3_mprintf_00190964" * (cast_expression "(code *)PTR_sqlite3_mprintf_00190964" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14))" ( (binary_expression "PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4" identifier + number_literal) , (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) )))) ;) (expression_statement "*(int *)(param_1 + 0xf4) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xf4) = iVar1" (pointer_expression "*(int *)(param_1 + 0xf4)" * (cast_expression "(int *)(param_1 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar1 == 0) {\n        return 7;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        return 7;\n      }" { (return_statement "return 7;" return number_literal ;) })) })) (expression_statement "iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);" (assignment_expression "iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8)" identifier = (call_expression "sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8)" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , identifier , (binary_expression "PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8" identifier + number_literal) , identifier , identifier , number_literal , (binary_expression "param_1 + 0xf8" identifier + number_literal) )))) ;) }) (else_clause "else {\n    iVar1 = sqlite3_blob_reopen();\n  }" else (compound_statement "{\n    iVar1 = sqlite3_blob_reopen();\n  }" { (expression_statement "iVar1 = sqlite3_blob_reopen();" (assignment_expression "iVar1 = sqlite3_blob_reopen()" identifier = (call_expression "sqlite3_blob_reopen()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }" { (expression_statement "piVar2 = *(int **)(param_1 + 0xf8);" (assignment_expression "piVar2 = *(int **)(param_1 + 0xf8)" identifier = (pointer_expression "*(int **)(param_1 + 0xf8)" * (cast_expression "(int **)(param_1 + 0xf8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }" if (parenthesized_expression "((piVar2 != (int *)0x0) && (piVar2[4] != 0))" ( (binary_expression "(piVar2 != (int *)0x0) && (piVar2[4] != 0)" (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(piVar2[4] != 0)" ( (binary_expression "piVar2[4] != 0" (subscript_expression "piVar2[4]" identifier [ number_literal ]) != number_literal) ))) )) (compound_statement "{\n      iVar4 = *piVar2;\n    }" { (expression_statement "iVar4 = *piVar2;" (assignment_expression "iVar4 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) })) (expression_statement "*param_6 = iVar4;" (assignment_expression "*param_6 = iVar4" (pointer_expression "*param_6" * identifier) = identifier) ;) (if_statement "if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }" if (parenthesized_expression "(param_5 != (int *)0x0)" ( (binary_expression "param_5 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }" { (expression_statement "iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);" (assignment_expression "iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14)" identifier = (call_expression "(*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14)" (parenthesized_expression "(*(code *)PTR_sqlite3_malloc_001909e4)" ( (pointer_expression "*(code *)PTR_sqlite3_malloc_001909e4" * (cast_expression "(code *)PTR_sqlite3_malloc_001909e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4 + 0x14)" ( (binary_expression "iVar4 + 0x14" identifier + number_literal) )))) ;) (if_statement "if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar1 = 7;\n        *param_5 = 0;\n      }" { (expression_statement "iVar1 = 7;" (assignment_expression "iVar1 = 7" identifier = number_literal) ;) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" * identifier) = number_literal) ;) }) (else_clause "else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }" else (compound_statement "{\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }" { (if_statement "if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }" if (parenthesized_expression "((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4))" ( (binary_expression "(param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)" (parenthesized_expression "(param_7 != (undefined4 *)0x0)" ( (binary_expression "param_7 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(0x4000 < iVar4)" ( (binary_expression "0x4000 < iVar4" number_literal < identifier) ))) )) (compound_statement "{\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }" { (expression_statement "iVar4 = 0x1000;" (assignment_expression "iVar4 = 0x1000" identifier = number_literal) ;) (expression_statement "*param_7 = 0x1000;" (assignment_expression "*param_7 = 0x1000" (pointer_expression "*param_7" * identifier) = number_literal) ;) })) (expression_statement "iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);" (assignment_expression "iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" identifier = (call_expression "(*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" (parenthesized_expression "(*(code *)(PTR_LAB_00190bd0 + -0x471c))" ( (pointer_expression "*(code *)(PTR_LAB_00190bd0 + -0x471c)" * (cast_expression "(code *)(PTR_LAB_00190bd0 + -0x471c)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_00190bd0 + -0x471c)" ( (binary_expression "PTR_LAB_00190bd0 + -0x471c" identifier + number_literal) )))) )) (argument_list "(*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xf8)" * (cast_expression "(undefined4 *)(param_1 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf8)" ( (binary_expression "param_1 + 0xf8" identifier + number_literal) )))) , identifier , identifier , number_literal , (binary_expression "PTR_LAB_00190bbc + 0x1b24" identifier + number_literal) )))) ;) (expression_statement "(*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);" (call_expression "(*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14)" (parenthesized_expression "(*(code *)PTR_memset_00190d58)" ( (pointer_expression "*(code *)PTR_memset_00190d58" * (cast_expression "(code *)PTR_memset_00190d58" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 + iVar4,0,0x14)" ( (binary_expression "iVar3 + iVar4" identifier + identifier) , number_literal , number_literal ))) ;) (if_statement "if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          *param_5 = iVar3;\n        }" { (expression_statement "*param_5 = iVar3;" (assignment_expression "*param_5 = iVar3" (pointer_expression "*param_5" * identifier) = identifier) ;) }) (else_clause "else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }" else (compound_statement "{\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }" { (expression_statement "(*(code *)PTR_sqlite3_free_0019096c)(iVar3);" (call_expression "(*(code *)PTR_sqlite3_free_0019096c)(iVar3)" (parenthesized_expression "(*(code *)PTR_sqlite3_free_0019096c)" ( (pointer_expression "*(code *)PTR_sqlite3_free_0019096c" * (cast_expression "(code *)PTR_sqlite3_free_0019096c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" * identifier) = number_literal) ;) }))) }))) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (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) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (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) )))) , IDENT , (binary_expression IDENT + LIT) , IDENT , IDENT , LIT , (binary_expression IDENT + LIT) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT , LIT , (binary_expression IDENT + LIT) )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + IDENT) , LIT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }))) }))) })) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_001317e8(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }\n  if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_001317e8(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)" (identifier "FUN_001317e8") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,\n                int *param_6,undefined4 *param_7)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "int *param_5" (primitive_type "int") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "int *param_6" (primitive_type "int") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) (, ",") (parameter_declaration "undefined4 *param_7" (type_identifier "undefined4") (pointer_declarator "*param_7" (* "*") (identifier "param_7"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }\n  if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (if_statement "if (*(int *)(param_1 + 0xf8) == 0) {\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }\n  else {\n    iVar1 = sqlite3_blob_reopen();\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xf8) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xf8) == 0" (pointer_expression "*(int *)(param_1 + 0xf8)" (* "*") (cast_expression "(int *)(param_1 + 0xf8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf8)" (( "(") (binary_expression "param_1 + 0xf8" (identifier "param_1") (+ "+") (number_literal "0xf8")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0xf4);\n    if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }\n    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);\n  }" ({ "{") (expression_statement "iVar1 = *(int *)(param_1 + 0xf4);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xf4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0xf4)" (* "*") (cast_expression "(int *)(param_1 + 0xf4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf4)" (( "(") (binary_expression "param_1 + 0xf4" (identifier "param_1") (+ "+") (number_literal "0xf4")) () ")"))))) (; ";")) (if_statement "if (iVar1 == 0) {\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));\n      *(int *)(param_1 + 0xf4) = iVar1;\n      if (iVar1 == 0) {\n        return 7;\n      }\n    }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14));" (assignment_expression "iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14))" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_sqlite3_mprintf_00190964)\n                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14))" (parenthesized_expression "(*(code *)PTR_sqlite3_mprintf_00190964)" (( "(") (pointer_expression "*(code *)PTR_sqlite3_mprintf_00190964" (* "*") (cast_expression "(code *)PTR_sqlite3_mprintf_00190964" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sqlite3_mprintf_00190964"))) () ")")) (argument_list "(PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,\n                         *(undefined4 *)(param_1 + 0x14))" (( "(") (binary_expression "PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4" (identifier "PTR_s_o_page_from_root____pageno_INTEG_0019095c") (+ "+") (number_literal "-0x3c4")) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) () ")")))) (; ";")) (expression_statement "*(int *)(param_1 + 0xf4) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xf4) = iVar1" (pointer_expression "*(int *)(param_1 + 0xf4)" (* "*") (cast_expression "(int *)(param_1 + 0xf4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf4)" (( "(") (binary_expression "param_1 + 0xf4" (identifier "param_1") (+ "+") (number_literal "0xf4")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 == 0) {\n        return 7;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 7;\n      }" ({ "{") (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8);" (assignment_expression "iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8)" (identifier "iVar1") (= "=") (call_expression "sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8)" (identifier "sqlite3_blob_open") (argument_list "(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,\n                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,\n                              param_4,0,param_1 + 0xf8)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (identifier "iVar1") (, ",") (binary_expression "PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8" (identifier "PTR_s_o_page_from_root____pageno_INTEG_0019095c") (+ "+") (number_literal "-0x3b8")) (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (number_literal "0") (, ",") (binary_expression "param_1 + 0xf8" (identifier "param_1") (+ "+") (number_literal "0xf8")) () ")")))) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = sqlite3_blob_reopen();\n  }" (else "else") (compound_statement "{\n    iVar1 = sqlite3_blob_reopen();\n  }" ({ "{") (expression_statement "iVar1 = sqlite3_blob_reopen();" (assignment_expression "iVar1 = sqlite3_blob_reopen()" (identifier "iVar1") (= "=") (call_expression "sqlite3_blob_reopen()" (identifier "sqlite3_blob_reopen") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar1 == 0) {\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    piVar2 = *(int **)(param_1 + 0xf8);\n    iVar4 = 0;\n    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }\n    *param_6 = iVar4;\n    if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }\n  }" ({ "{") (expression_statement "piVar2 = *(int **)(param_1 + 0xf8);" (assignment_expression "piVar2 = *(int **)(param_1 + 0xf8)" (identifier "piVar2") (= "=") (pointer_expression "*(int **)(param_1 + 0xf8)" (* "*") (cast_expression "(int **)(param_1 + 0xf8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xf8)" (( "(") (binary_expression "param_1 + 0xf8" (identifier "param_1") (+ "+") (number_literal "0xf8")) () ")"))))) (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {\n      iVar4 = *piVar2;\n    }" (if "if") (parenthesized_expression "((piVar2 != (int *)0x0) && (piVar2[4] != 0))" (( "(") (binary_expression "(piVar2 != (int *)0x0) && (piVar2[4] != 0)" (parenthesized_expression "(piVar2 != (int *)0x0)" (( "(") (binary_expression "piVar2 != (int *)0x0" (identifier "piVar2") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(piVar2[4] != 0)" (( "(") (binary_expression "piVar2[4] != 0" (subscript_expression "piVar2[4]" (identifier "piVar2") ([ "[") (number_literal "4") (] "]")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      iVar4 = *piVar2;\n    }" ({ "{") (expression_statement "iVar4 = *piVar2;" (assignment_expression "iVar4 = *piVar2" (identifier "iVar4") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (} "}"))) (expression_statement "*param_6 = iVar4;" (assignment_expression "*param_6 = iVar4" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (identifier "iVar4")) (; ";")) (if_statement "if (param_5 != (int *)0x0) {\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }" (if "if") (parenthesized_expression "(param_5 != (int *)0x0)" (( "(") (binary_expression "param_5 != (int *)0x0" (identifier "param_5") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);\n      if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }\n    }" ({ "{") (expression_statement "iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);" (assignment_expression "iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14)" (parenthesized_expression "(*(code *)PTR_sqlite3_malloc_001909e4)" (( "(") (pointer_expression "*(code *)PTR_sqlite3_malloc_001909e4" (* "*") (cast_expression "(code *)PTR_sqlite3_malloc_001909e4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sqlite3_malloc_001909e4"))) () ")")) (argument_list "(iVar4 + 0x14)" (( "(") (binary_expression "iVar4 + 0x14" (identifier "iVar4") (+ "+") (number_literal "0x14")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n        iVar1 = 7;\n        *param_5 = 0;\n      }\n      else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        iVar1 = 7;\n        *param_5 = 0;\n      }" ({ "{") (expression_statement "iVar1 = 7;" (assignment_expression "iVar1 = 7" (identifier "iVar1") (= "=") (number_literal "7")) (; ";")) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }" (else "else") (compound_statement "{\n        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }\n        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);\n        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);\n        if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }\n      }" ({ "{") (if_statement "if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }" (if "if") (parenthesized_expression "((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4))" (( "(") (binary_expression "(param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)" (parenthesized_expression "(param_7 != (undefined4 *)0x0)" (( "(") (binary_expression "param_7 != (undefined4 *)0x0" (identifier "param_7") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(0x4000 < iVar4)" (( "(") (binary_expression "0x4000 < iVar4" (number_literal "0x4000") (< "<") (identifier "iVar4")) () ")"))) () ")")) (compound_statement "{\n          iVar4 = 0x1000;\n          *param_7 = 0x1000;\n        }" ({ "{") (expression_statement "iVar4 = 0x1000;" (assignment_expression "iVar4 = 0x1000" (identifier "iVar4") (= "=") (number_literal "0x1000")) (; ";")) (expression_statement "*param_7 = 0x1000;" (assignment_expression "*param_7 = 0x1000" (pointer_expression "*param_7" (* "*") (identifier "param_7")) (= "=") (number_literal "0x1000")) (; ";")) (} "}"))) (expression_statement "iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);" (assignment_expression "iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" (identifier "iVar1") (= "=") (call_expression "(*(code *)(PTR_LAB_00190bd0 + -0x471c))\n                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" (parenthesized_expression "(*(code *)(PTR_LAB_00190bd0 + -0x471c))" (( "(") (pointer_expression "*(code *)(PTR_LAB_00190bd0 + -0x471c)" (* "*") (cast_expression "(code *)(PTR_LAB_00190bd0 + -0x471c)" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_LAB_00190bd0 + -0x471c)" (( "(") (binary_expression "PTR_LAB_00190bd0 + -0x471c" (identifier "PTR_LAB_00190bd0") (+ "+") (number_literal "-0x471c")) () ")")))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xf8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xf8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf8)" (( "(") (binary_expression "param_1 + 0xf8" (identifier "param_1") (+ "+") (number_literal "0xf8")) () ")")))) (, ",") (identifier "iVar3") (, ",") (identifier "iVar4") (, ",") (number_literal "0") (, ",") (binary_expression "PTR_LAB_00190bbc + 0x1b24" (identifier "PTR_LAB_00190bbc") (+ "+") (number_literal "0x1b24")) () ")")))) (; ";")) (expression_statement "(*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);" (call_expression "(*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14)" (parenthesized_expression "(*(code *)PTR_memset_00190d58)" (( "(") (pointer_expression "*(code *)PTR_memset_00190d58" (* "*") (cast_expression "(code *)PTR_memset_00190d58" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memset_00190d58"))) () ")")) (argument_list "(iVar3 + iVar4,0,0x14)" (( "(") (binary_expression "iVar3 + iVar4" (identifier "iVar3") (+ "+") (identifier "iVar4")) (, ",") (number_literal "0") (, ",") (number_literal "0x14") () ")"))) (; ";")) (if_statement "if (iVar1 == 0) {\n          *param_5 = iVar3;\n        }\n        else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          *param_5 = iVar3;\n        }" ({ "{") (expression_statement "*param_5 = iVar3;" (assignment_expression "*param_5 = iVar3" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "iVar3")) (; ";")) (} "}")) (else_clause "else {\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }" (else "else") (compound_statement "{\n          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);\n          *param_5 = 0;\n        }" ({ "{") (expression_statement "(*(code *)PTR_sqlite3_free_0019096c)(iVar3);" (call_expression "(*(code *)PTR_sqlite3_free_0019096c)(iVar3)" (parenthesized_expression "(*(code *)PTR_sqlite3_free_0019096c)" (( "(") (pointer_expression "*(code *)PTR_sqlite3_free_0019096c" (* "*") (cast_expression "(code *)PTR_sqlite3_free_0019096c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sqlite3_free_0019096c"))) () ")")) (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "*param_5 = 0;" (assignment_expression "*param_5 = 0" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}")))) (} "}"))) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

int function_1(type_1 *p,type_2 iBlockid,char **paBlob,int *pnBlob,int *pnLoad)

{
  int var_6;
  type_3 *var_7;
  int var_9;
  char *var_1;
  int var_8;
  type_4 *var_10;
  type_4 in_stack_ffffffd0;
  type_4 in_stack_ffffffd4;
  
  if (p->pSegments == (type_3 *)0x0) {
    var_1 = p->zSegmentsTbl;
    if (var_1 == (char *)0x0) {
      var_1 = (char *)(*(type_5 *)PTR_sqlite3_mprintf_00190964)
                                 (var_2 + -0x3c4,p->zName)
      ;
      p->zSegmentsTbl = var_1;
      if (var_1 == (char *)0x0) {
        return 7;
      }
    }
    var_6 = var_3(p->db,p->zDb,var_1,
                              var_2 + -0x3b8,
                              var_4(pnBlob,pnLoad),0,&p->pSegments);
  }
  else {
    var_6 = var_5(p->pSegments,var_4(in_stack_ffffffd0,in_stack_ffffffd4));
  }
  if (var_6 == 0) {
    var_7 = p->pSegments;
    var_8 = 0;
    if ((var_7 != (type_3 *)0x0) && (*(int *)(var_7 + 0x10) != 0)) {
      var_8 = *(int *)var_7;
    }
    *iBlockid._4_4_ = var_8;
    if (iBlockid._0_4_ != (int *)0x0) {
      var_9 = (*(type_5 *)PTR_sqlite3_malloc_001909e4)(var_8 + 0x14);
      if (var_9 == 0) {
        var_6 = 7;
        *iBlockid._0_4_ = 0;
      }
      else {
        if ((var_10 != (type_4 *)0x0) && (0x4000 < var_8)) {
          var_8 = 0x1000;
          *var_10 = 0x1000;
        }
        var_6 = (*(type_5 *)(var_11 + -0x471c))
                          (p->pSegments,var_9,var_8,0,var_12 + 0x1b24);
        (*(type_5 *)PTR_memset_00190d58)(var_9 + var_8,0,0x14);
        if (var_6 == 0) {
          *iBlockid._0_4_ = var_9;
        }
        else {
          (*(type_5 *)PTR_sqlite3_free_0019096c)(var_9);
          *iBlockid._0_4_ = 0;
        }
      }
    }
  }
  return var_6;
}


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

int MASKED(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,int *param_5,
                int *param_6,undefined4 *param_7)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  
  if (*(int *)(param_1 + 0xf8) == 0) {
    iVar1 = *(int *)(param_1 + 0xf4);
    if (iVar1 == 0) {
      iVar1 = (*(code *)PTR_sqlite3_mprintf_00190964)
                        (PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3c4,
                         *(undefined4 *)(param_1 + 0x14));
      *(int *)(param_1 + 0xf4) = iVar1;
      if (iVar1 == 0) {
        return 7;
      }
    }
    iVar1 = sqlite3_blob_open(*(undefined4 *)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x10),iVar1,
                              PTR_s_o_page_from_root____pageno_INTEG_0019095c + -0x3b8,param_3,
                              param_4,0,param_1 + 0xf8);
  }
  else {
    iVar1 = sqlite3_blob_reopen();
  }
  if (iVar1 == 0) {
    piVar2 = *(int **)(param_1 + 0xf8);
    iVar4 = 0;
    if ((piVar2 != (int *)0x0) && (piVar2[4] != 0)) {
      iVar4 = *piVar2;
    }
    *param_6 = iVar4;
    if (param_5 != (int *)0x0) {
      iVar3 = (*(code *)PTR_sqlite3_malloc_001909e4)(iVar4 + 0x14);
      if (iVar3 == 0) {
        iVar1 = 7;
        *param_5 = 0;
      }
      else {
        if ((param_7 != (undefined4 *)0x0) && (0x4000 < iVar4)) {
          iVar4 = 0x1000;
          *param_7 = 0x1000;
        }
        iVar1 = (*(code *)(PTR_LAB_00190bd0 + -0x471c))
                          (*(undefined4 *)(param_1 + 0xf8),iVar3,iVar4,0,PTR_LAB_00190bbc + 0x1b24);
        (*(code *)PTR_memset_00190d58)(iVar3 + iVar4,0,0x14);
        if (iVar1 == 0) {
          *param_5 = iVar3;
        }
        else {
          (*(code *)PTR_sqlite3_free_0019096c)(iVar3);
          *param_5 = 0;
        }
      }
    }
  }
  return iVar1;
}

