
int fts3SegReaderCursorAppend(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew)

{
  int iVar1;
  Fts3SegReader **ppFVar2;
  
  if ((pCsr->nSegment & 0xfU) == 0) {
    ppFVar2 = (Fts3SegReader **)
              (*(code *)PTR_sqlite3_realloc64_0018f9ec)
                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4);
    if (ppFVar2 == (Fts3SegReader **)0x0) {
      sqlite3Fts3SegReaderFree(pNew);
      return 7;
    }
    pCsr->apSegment = ppFVar2;
  }
  iVar1 = pCsr->nSegment;
  pCsr->nSegment = iVar1 + 1;
  pCsr->apSegment[iVar1] = pNew;
  return 0;
}



undefined4 FUN_000ded08(int *param_1,undefined4 param_2)

{
  int iVar1;
  
  if ((param_1[1] & 0xfU) == 0) {
    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);
    if (iVar1 == 0) {
      FUN_000dec64(param_2);
      return 7;
    }
    *param_1 = iVar1;
  }
  iVar1 = param_1[1];
  param_1[1] = iVar1 + 1;
  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;
  return 0;
}


lui gp,0xc
addiu gp,gp,-0x73e8
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
or s0,a0,zero
lw a3,0x4(a0)
andi v0,a3,0xf
beq v0,zero,0x000ded70
_or s1,a1,zero
lw v1,0x0(s0)
lw v0,0x4(s0)
addiu a0,v0,0x1
sw a0,0x4(s0)
sll v0,v0,0x2
addu v0,v1,v0
sw s1,0x0(v0)
or v0,zero,zero
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
addiu a3,a3,0x10
or a2,zero,zero
sll a3,a3,0x2
lw a0,0x0(a0)
lw t9,-0x7f34(gp)
jalr t9
_nop
lw gp,0x10(sp)
beq v0,zero,0x000deda0
_or a0,s1,zero
b 0x000ded3c
_sw v0,0x0(s0)
lw t9,-0x7d48(gp)
addiu t9,t9,-0x139c
bal 0x000dec64
_nop
lw gp,0x10(sp)
b 0x000ded5c
_li v0,0x7
(translation_unit "undefined4 FUN_000ded08(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  \n  if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }\n  iVar1 = param_1[1];\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_000ded08(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  \n  if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }\n  iVar1 = param_1[1];\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;\n  return 0;\n}" type_identifier (function_declarator "FUN_000ded08(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }\n  iVar1 = param_1[1];\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }" if (parenthesized_expression "((param_1[1] & 0xfU) == 0)" ( (binary_expression "(param_1[1] & 0xfU) == 0" (parenthesized_expression "(param_1[1] & 0xfU)" ( (binary_expression "param_1[1] & 0xfU" (subscript_expression "param_1[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }" { (expression_statement "iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);" (assignment_expression "iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4)" identifier = (call_expression "(*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4)" (parenthesized_expression "(*(code *)PTR_sqlite3_realloc64_0018f9ec)" ( (pointer_expression "*(code *)PTR_sqlite3_realloc64_0018f9ec" * (cast_expression "(code *)PTR_sqlite3_realloc64_0018f9ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_1,param_2,0,(param_1[1] + 0x10U) * 4)" ( (pointer_expression "*param_1" * identifier) , identifier , number_literal , (binary_expression "(param_1[1] + 0x10U) * 4" (parenthesized_expression "(param_1[1] + 0x10U)" ( (binary_expression "param_1[1] + 0x10U" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )) * number_literal) )))) ;) (if_statement "if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_000dec64(param_2);\n      return 7;\n    }" { (expression_statement "FUN_000dec64(param_2);" (call_expression "FUN_000dec64(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (return_statement "return 7;" return number_literal ;) })) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "param_1[1] = iVar1 + 1;" (assignment_expression "param_1[1] = iVar1 + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(*param_1 + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)(*param_1 + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)(*param_1 + iVar1 * 4)" * (cast_expression "(undefined4 *)(*param_1 + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + iVar1 * 4)" ( (binary_expression "*param_1 + iVar1 * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int fts3SegReaderCursorAppend(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew)\n\n{\n  int iVar1;\n  Fts3SegReader **ppFVar2;\n  \n  if ((pCsr->nSegment & 0xfU) == 0) {\n    ppFVar2 = (Fts3SegReader **)\n              (*(code *)PTR_sqlite3_realloc64_0018f9ec)\n                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4);\n    if (ppFVar2 == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree(pNew);\n      return 7;\n    }\n    pCsr->apSegment = ppFVar2;\n  }\n  iVar1 = pCsr->nSegment;\n  pCsr->nSegment = iVar1 + 1;\n  pCsr->apSegment[iVar1] = pNew;\n  return 0;\n}\n\n" (function_definition "int fts3SegReaderCursorAppend(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew)\n\n{\n  int iVar1;\n  Fts3SegReader **ppFVar2;\n  \n  if ((pCsr->nSegment & 0xfU) == 0) {\n    ppFVar2 = (Fts3SegReader **)\n              (*(code *)PTR_sqlite3_realloc64_0018f9ec)\n                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4);\n    if (ppFVar2 == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree(pNew);\n      return 7;\n    }\n    pCsr->apSegment = ppFVar2;\n  }\n  iVar1 = pCsr->nSegment;\n  pCsr->nSegment = iVar1 + 1;\n  pCsr->apSegment[iVar1] = pNew;\n  return 0;\n}" primitive_type (function_declarator "fts3SegReaderCursorAppend(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew)" identifier (parameter_list "(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew)" ( (parameter_declaration "Fts3MultiSegReader *pCsr" type_identifier (pointer_declarator "*pCsr" * identifier)) , (parameter_declaration "Fts3SegReader *pNew" type_identifier (pointer_declarator "*pNew" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  Fts3SegReader **ppFVar2;\n  \n  if ((pCsr->nSegment & 0xfU) == 0) {\n    ppFVar2 = (Fts3SegReader **)\n              (*(code *)PTR_sqlite3_realloc64_0018f9ec)\n                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4);\n    if (ppFVar2 == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree(pNew);\n      return 7;\n    }\n    pCsr->apSegment = ppFVar2;\n  }\n  iVar1 = pCsr->nSegment;\n  pCsr->nSegment = iVar1 + 1;\n  pCsr->apSegment[iVar1] = pNew;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "Fts3SegReader **ppFVar2;" type_identifier (pointer_declarator "**ppFVar2" * (pointer_declarator "*ppFVar2" * identifier)) ;) (if_statement "if ((pCsr->nSegment & 0xfU) == 0) {\n    ppFVar2 = (Fts3SegReader **)\n              (*(code *)PTR_sqlite3_realloc64_0018f9ec)\n                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4);\n    if (ppFVar2 == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree(pNew);\n      return 7;\n    }\n    pCsr->apSegment = ppFVar2;\n  }" if (parenthesized_expression "((pCsr->nSegment & 0xfU) == 0)" ( (binary_expression "(pCsr->nSegment & 0xfU) == 0" (parenthesized_expression "(pCsr->nSegment & 0xfU)" ( (binary_expression "pCsr->nSegment & 0xfU" (field_expression "pCsr->nSegment" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    ppFVar2 = (Fts3SegReader **)\n              (*(code *)PTR_sqlite3_realloc64_0018f9ec)\n                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4);\n    if (ppFVar2 == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree(pNew);\n      return 7;\n    }\n    pCsr->apSegment = ppFVar2;\n  }" { (expression_statement "ppFVar2 = (Fts3SegReader **)\n              (*(code *)PTR_sqlite3_realloc64_0018f9ec)\n                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4);" (assignment_expression "ppFVar2 = (Fts3SegReader **)\n              (*(code *)PTR_sqlite3_realloc64_0018f9ec)\n                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4)" identifier = (cast_expression "(Fts3SegReader **)\n              (*(code *)PTR_sqlite3_realloc64_0018f9ec)\n                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4)" ( (type_descriptor "Fts3SegReader **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "(*(code *)PTR_sqlite3_realloc64_0018f9ec)\n                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4)" (parenthesized_expression "(*(code *)PTR_sqlite3_realloc64_0018f9ec)" ( (pointer_expression "*(code *)PTR_sqlite3_realloc64_0018f9ec" * (cast_expression "(code *)PTR_sqlite3_realloc64_0018f9ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4)" ( (field_expression "pCsr->apSegment" identifier -> field_identifier) , identifier , number_literal , (binary_expression "(pCsr->nSegment + 0x10U) * 4" (parenthesized_expression "(pCsr->nSegment + 0x10U)" ( (binary_expression "pCsr->nSegment + 0x10U" (field_expression "pCsr->nSegment" identifier -> field_identifier) + number_literal) )) * number_literal) ))))) ;) (if_statement "if (ppFVar2 == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree(pNew);\n      return 7;\n    }" if (parenthesized_expression "(ppFVar2 == (Fts3SegReader **)0x0)" ( (binary_expression "ppFVar2 == (Fts3SegReader **)0x0" identifier == (cast_expression "(Fts3SegReader **)0x0" ( (type_descriptor "Fts3SegReader **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n      sqlite3Fts3SegReaderFree(pNew);\n      return 7;\n    }" { (expression_statement "sqlite3Fts3SegReaderFree(pNew);" (call_expression "sqlite3Fts3SegReaderFree(pNew)" identifier (argument_list "(pNew)" ( identifier ))) ;) (return_statement "return 7;" return number_literal ;) })) (expression_statement "pCsr->apSegment = ppFVar2;" (assignment_expression "pCsr->apSegment = ppFVar2" (field_expression "pCsr->apSegment" identifier -> field_identifier) = identifier) ;) })) (expression_statement "iVar1 = pCsr->nSegment;" (assignment_expression "iVar1 = pCsr->nSegment" identifier = (field_expression "pCsr->nSegment" identifier -> field_identifier)) ;) (expression_statement "pCsr->nSegment = iVar1 + 1;" (assignment_expression "pCsr->nSegment = iVar1 + 1" (field_expression "pCsr->nSegment" identifier -> field_identifier) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "pCsr->apSegment[iVar1] = pNew;" (assignment_expression "pCsr->apSegment[iVar1] = pNew" (subscript_expression "pCsr->apSegment[iVar1]" (field_expression "pCsr->apSegment" identifier -> field_identifier) [ identifier ]) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_000ded08(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  \n  if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }\n  iVar1 = param_1[1];\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_000ded08(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  \n  if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }\n  iVar1 = param_1[1];\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;\n  return 0;\n}" type_identifier (function_declarator "FUN_000ded08(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }\n  iVar1 = param_1[1];\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }" if (parenthesized_expression "((param_1[1] & 0xfU) == 0)" ( (binary_expression "(param_1[1] & 0xfU) == 0" (parenthesized_expression "(param_1[1] & 0xfU)" ( (binary_expression "param_1[1] & 0xfU" (subscript_expression "param_1[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }" { (expression_statement "iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);" (assignment_expression "iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4)" identifier = (call_expression "(*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4)" (parenthesized_expression "(*(code *)PTR_sqlite3_realloc64_0018f9ec)" ( (pointer_expression "*(code *)PTR_sqlite3_realloc64_0018f9ec" * (cast_expression "(code *)PTR_sqlite3_realloc64_0018f9ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_1,param_2,0,(param_1[1] + 0x10U) * 4)" ( (pointer_expression "*param_1" * identifier) , identifier , number_literal , (binary_expression "(param_1[1] + 0x10U) * 4" (parenthesized_expression "(param_1[1] + 0x10U)" ( (binary_expression "param_1[1] + 0x10U" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal) )) * number_literal) )))) ;) (if_statement "if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_000dec64(param_2);\n      return 7;\n    }" { (expression_statement "FUN_000dec64(param_2);" (call_expression "FUN_000dec64(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (return_statement "return 7;" return number_literal ;) })) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "param_1[1] = iVar1 + 1;" (assignment_expression "param_1[1] = iVar1 + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(*param_1 + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)(*param_1 + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)(*param_1 + iVar1 * 4)" * (cast_expression "(undefined4 *)(*param_1 + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + iVar1 * 4)" ( (binary_expression "*param_1 + iVar1 * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) & LIT) )) == 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 ( (pointer_expression * IDENT) , IDENT , LIT , (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )) * LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_000ded08(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  \n  if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }\n  iVar1 = param_1[1];\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_000ded08(int *param_1,undefined4 param_2)" (identifier "FUN_000ded08") (parameter_list "(int *param_1,undefined4 param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }\n  iVar1 = param_1[1];\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if ((param_1[1] & 0xfU) == 0) {\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }" (if "if") (parenthesized_expression "((param_1[1] & 0xfU) == 0)" (( "(") (binary_expression "(param_1[1] & 0xfU) == 0" (parenthesized_expression "(param_1[1] & 0xfU)" (( "(") (binary_expression "param_1[1] & 0xfU" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (& "&") (number_literal "0xfU")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);\n    if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }\n    *param_1 = iVar1;\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);" (assignment_expression "iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4)" (parenthesized_expression "(*(code *)PTR_sqlite3_realloc64_0018f9ec)" (( "(") (pointer_expression "*(code *)PTR_sqlite3_realloc64_0018f9ec" (* "*") (cast_expression "(code *)PTR_sqlite3_realloc64_0018f9ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sqlite3_realloc64_0018f9ec"))) () ")")) (argument_list "(*param_1,param_2,0,(param_1[1] + 0x10U) * 4)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (identifier "param_2") (, ",") (number_literal "0") (, ",") (binary_expression "(param_1[1] + 0x10U) * 4" (parenthesized_expression "(param_1[1] + 0x10U)" (( "(") (binary_expression "param_1[1] + 0x10U" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "0x10U")) () ")")) (* "*") (number_literal "4")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      FUN_000dec64(param_2);\n      return 7;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_000dec64(param_2);\n      return 7;\n    }" ({ "{") (expression_statement "FUN_000dec64(param_2);" (call_expression "FUN_000dec64(param_2)" (identifier "FUN_000dec64") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" (identifier "iVar1") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "param_1[1] = iVar1 + 1;" (assignment_expression "param_1[1] = iVar1 + 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(undefined4 *)(*param_1 + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)(*param_1 + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)(*param_1 + iVar1 * 4)" (* "*") (cast_expression "(undefined4 *)(*param_1 + iVar1 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + iVar1 * 4)" (( "(") (binary_expression "*param_1 + iVar1 * 4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "param_2")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(type_1 *pCsr,type_2 *pNew)

{
  int var_3;
  type_2 **var_1;
  
  if ((pCsr->nSegment & 0xfU) == 0) {
    var_1 = (type_2 **)
              (*(type_3 *)PTR_sqlite3_realloc64_0018f9ec)
                        (pCsr->apSegment,pNew,0,(pCsr->nSegment + 0x10U) * 4);
    if (var_1 == (type_2 **)0x0) {
      var_2(pNew);
      return 7;
    }
    pCsr->apSegment = var_1;
  }
  var_3 = pCsr->nSegment;
  pCsr->nSegment = var_3 + 1;
  pCsr->apSegment[var_3] = pNew;
  return 0;
}


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

undefined4 MASKED(int *param_1,undefined4 param_2)

{
  int iVar1;
  
  if ((param_1[1] & 0xfU) == 0) {
    iVar1 = (*(code *)PTR_sqlite3_realloc64_0018f9ec)(*param_1,param_2,0,(param_1[1] + 0x10U) * 4);
    if (iVar1 == 0) {
      FUN_000dec64(param_2);
      return 7;
    }
    *param_1 = iVar1;
  }
  iVar1 = param_1[1];
  param_1[1] = iVar1 + 1;
  *(undefined4 *)(*param_1 + iVar1 * 4) = param_2;
  return 0;
}

