
int fts3SegReaderIncrRead(Fts3SegReader *pReader)

{
  int iVar1;
  int iVar2;
  int iVar3;
  undefined4 *puVar4;
  int unaff_EDI;
  
  iVar1 = __x86_get_pc_thunk_di();
  iVar2 = *(int *)(iVar1 + 0x30);
  iVar3 = *(int *)(iVar1 + 0x2c) - iVar2;
  if (0x1000 < iVar3) {
    iVar3 = 0x1000;
  }
  iVar2 = blobReadWrite(*(sqlite3_blob **)(iVar1 + 0x34),(void *)(*(int *)(iVar1 + 0x28) + iVar2),
                        iVar3,iVar2,(_func_int_BtCursor_ptr_u32_u32_void_ptr *)(unaff_EDI + -0x7ab6)
                       );
  if (iVar2 == 0) {
    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);
    *(int *)(iVar1 + 0x30) = iVar3;
    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));
    *puVar4 = 0;
    puVar4[1] = 0;
    puVar4[2] = 0;
    puVar4[3] = 0;
    puVar4[4] = 0;
    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {
      sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34));
      *(undefined4 *)(iVar1 + 0x34) = 0;
      *(undefined4 *)(iVar1 + 0x30) = 0;
    }
  }
  return iVar2;
}



int FUN_000ab4c0(void)

{
  int iVar1;
  int iVar2;
  int iVar3;
  undefined4 *puVar4;
  int unaff_EDI;
  
  iVar1 = FUN_00036ac5();
  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);
  if (0x1000 < iVar3) {
    iVar3 = 0x1000;
  }
  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);
  if (iVar2 == 0) {
    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);
    *(int *)(iVar1 + 0x30) = iVar3;
    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));
    *puVar4 = 0;
    puVar4[1] = 0;
    puVar4[2] = 0;
    puVar4[3] = 0;
    puVar4[4] = 0;
    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {
      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));
      *(undefined4 *)(iVar1 + 0x34) = 0;
      *(undefined4 *)(iVar1 + 0x30) = 0;
    }
  }
  return iVar2;
}


PUSH EDI
CALL 0x00036ac5
ADD EDI,0xd0962
PUSH ESI
MOV ESI,EAX
PUSH EBX
MOV ECX,dword ptr [EAX + 0x30]
MOV EBX,dword ptr [EAX + 0x2c]
MOV EAX,0x1000
MOV EDX,dword ptr [ESI + 0x28]
SUB EBX,ECX
CMP EBX,0x1000
CMOVG EBX,EAX
LEA EDI,[EDI + 0xfff27be8]
SUB ESP,0x8
MOV EAX,dword ptr [ESI + 0x34]
PUSH EDI
ADD EDX,ECX
PUSH ECX
MOV ECX,EBX
CALL 0x000ab210
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JZ 0x000ab510
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
RET
ADD EBX,dword ptr [ESI + 0x30]
MOV dword ptr [ESI + 0x30],EBX
ADD EBX,dword ptr [ESI + 0x28]
MOV dword ptr [EBX],0x0
MOV dword ptr [EBX + 0x4],0x0
MOV dword ptr [EBX + 0x8],0x0
MOV dword ptr [EBX + 0xc],0x0
MOV dword ptr [EBX + 0x10],0x0
MOV EAX,dword ptr [ESI + 0x2c]
CMP dword ptr [ESI + 0x30],EAX
JNZ 0x000ab509
SUB ESP,0xc
PUSH dword ptr [ESI + 0x34]
CALL 0x000a9830
MOV dword ptr [ESI + 0x34],0x0
ADD ESP,0x10
MOV dword ptr [ESI + 0x30],0x0
JMP 0x000ab509
(translation_unit "int FUN_000ab4c0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = FUN_00036ac5();\n  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}\n\n" (function_definition "int FUN_000ab4c0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = FUN_00036ac5();\n  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}" primitive_type (function_declarator "FUN_000ab4c0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = FUN_00036ac5();\n  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00036ac5();" (assignment_expression "iVar1 = FUN_00036ac5()" identifier = (call_expression "FUN_00036ac5()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);" (assignment_expression "iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30)" identifier = (binary_expression "*(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30)" (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) )))) - (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))))) ;) (if_statement "if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }" if (parenthesized_expression "(0x1000 < iVar3)" ( (binary_expression "0x1000 < iVar3" number_literal < identifier) )) (compound_statement "{\n    iVar3 = 0x1000;\n  }" { (expression_statement "iVar3 = 0x1000;" (assignment_expression "iVar3 = 0x1000" identifier = number_literal) ;) })) (expression_statement "iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);" (assignment_expression "iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6)" identifier = (call_expression "FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6)" identifier (argument_list "(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6)" ( (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) , (binary_expression "unaff_EDI + -0x7ab6" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }" { (expression_statement "iVar3 = iVar3 + *(int *)(iVar1 + 0x30);" (assignment_expression "iVar3 = iVar3 + *(int *)(iVar1 + 0x30)" identifier = (binary_expression "iVar3 + *(int *)(iVar1 + 0x30)" identifier + (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))))) ;) (expression_statement "*(int *)(iVar1 + 0x30) = iVar3;" (assignment_expression "*(int *)(iVar1 + 0x30) = iVar3" (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));" (assignment_expression "puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28))" identifier = (cast_expression "(undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + *(int *)(iVar1 + 0x28))" ( (binary_expression "iVar3 + *(int *)(iVar1 + 0x28)" identifier + (pointer_expression "*(int *)(iVar1 + 0x28)" * (cast_expression "(int *)(iVar1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x28)" ( (binary_expression "iVar1 + 0x28" identifier + number_literal) ))))) )))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4[1] = 0;" (assignment_expression "puVar4[1] = 0" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[2] = 0;" (assignment_expression "puVar4[2] = 0" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[3] = 0;" (assignment_expression "puVar4[3] = 0" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[4] = 0;" (assignment_expression "puVar4[4] = 0" (subscript_expression "puVar4[4]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c))" ( (binary_expression "*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)" (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) == (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) ))))) )) (compound_statement "{\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }" { (expression_statement "FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));" (call_expression "FUN_000a9830(*(undefined4 *)(iVar1 + 0x34))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x34))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x34)" * (cast_expression "(undefined4 *)(iVar1 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x34)" ( (binary_expression "iVar1 + 0x34" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x34)" * (cast_expression "(undefined4 *)(iVar1 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x34)" ( (binary_expression "iVar1 + 0x34" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x30)" * (cast_expression "(undefined4 *)(iVar1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) = number_literal) ;) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int fts3SegReaderIncrRead(Fts3SegReader *pReader)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = __x86_get_pc_thunk_di();\n  iVar2 = *(int *)(iVar1 + 0x30);\n  iVar3 = *(int *)(iVar1 + 0x2c) - iVar2;\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = blobReadWrite(*(sqlite3_blob **)(iVar1 + 0x34),(void *)(*(int *)(iVar1 + 0x28) + iVar2),\n                        iVar3,iVar2,(_func_int_BtCursor_ptr_u32_u32_void_ptr *)(unaff_EDI + -0x7ab6)\n                       );\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}\n\n" (function_definition "int fts3SegReaderIncrRead(Fts3SegReader *pReader)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = __x86_get_pc_thunk_di();\n  iVar2 = *(int *)(iVar1 + 0x30);\n  iVar3 = *(int *)(iVar1 + 0x2c) - iVar2;\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = blobReadWrite(*(sqlite3_blob **)(iVar1 + 0x34),(void *)(*(int *)(iVar1 + 0x28) + iVar2),\n                        iVar3,iVar2,(_func_int_BtCursor_ptr_u32_u32_void_ptr *)(unaff_EDI + -0x7ab6)\n                       );\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}" primitive_type (function_declarator "fts3SegReaderIncrRead(Fts3SegReader *pReader)" identifier (parameter_list "(Fts3SegReader *pReader)" ( (parameter_declaration "Fts3SegReader *pReader" type_identifier (pointer_declarator "*pReader" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = __x86_get_pc_thunk_di();\n  iVar2 = *(int *)(iVar1 + 0x30);\n  iVar3 = *(int *)(iVar1 + 0x2c) - iVar2;\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = blobReadWrite(*(sqlite3_blob **)(iVar1 + 0x34),(void *)(*(int *)(iVar1 + 0x28) + iVar2),\n                        iVar3,iVar2,(_func_int_BtCursor_ptr_u32_u32_void_ptr *)(unaff_EDI + -0x7ab6)\n                       );\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "iVar1 = __x86_get_pc_thunk_di();" (assignment_expression "iVar1 = __x86_get_pc_thunk_di()" identifier = (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = *(int *)(iVar1 + 0x30);" (assignment_expression "iVar2 = *(int *)(iVar1 + 0x30)" identifier = (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = *(int *)(iVar1 + 0x2c) - iVar2;" (assignment_expression "iVar3 = *(int *)(iVar1 + 0x2c) - iVar2" identifier = (binary_expression "*(int *)(iVar1 + 0x2c) - iVar2" (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) )))) - identifier)) ;) (if_statement "if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }" if (parenthesized_expression "(0x1000 < iVar3)" ( (binary_expression "0x1000 < iVar3" number_literal < identifier) )) (compound_statement "{\n    iVar3 = 0x1000;\n  }" { (expression_statement "iVar3 = 0x1000;" (assignment_expression "iVar3 = 0x1000" identifier = number_literal) ;) })) (expression_statement "iVar2 = blobReadWrite(*(sqlite3_blob **)(iVar1 + 0x34),(void *)(*(int *)(iVar1 + 0x28) + iVar2),\n                        iVar3,iVar2,(_func_int_BtCursor_ptr_u32_u32_void_ptr *)(unaff_EDI + -0x7ab6)\n                       );" (assignment_expression "iVar2 = blobReadWrite(*(sqlite3_blob **)(iVar1 + 0x34),(void *)(*(int *)(iVar1 + 0x28) + iVar2),\n                        iVar3,iVar2,(_func_int_BtCursor_ptr_u32_u32_void_ptr *)(unaff_EDI + -0x7ab6)\n                       )" identifier = (call_expression "blobReadWrite(*(sqlite3_blob **)(iVar1 + 0x34),(void *)(*(int *)(iVar1 + 0x28) + iVar2),\n                        iVar3,iVar2,(_func_int_BtCursor_ptr_u32_u32_void_ptr *)(unaff_EDI + -0x7ab6)\n                       )" identifier (argument_list "(*(sqlite3_blob **)(iVar1 + 0x34),(void *)(*(int *)(iVar1 + 0x28) + iVar2),\n                        iVar3,iVar2,(_func_int_BtCursor_ptr_u32_u32_void_ptr *)(unaff_EDI + -0x7ab6)\n                       )" ( (pointer_expression "*(sqlite3_blob **)(iVar1 + 0x34)" * (cast_expression "(sqlite3_blob **)(iVar1 + 0x34)" ( (type_descriptor "sqlite3_blob **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x34)" ( (binary_expression "iVar1 + 0x34" identifier + number_literal) )))) , (cast_expression "(void *)(*(int *)(iVar1 + 0x28) + iVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0x28) + iVar2)" ( (binary_expression "*(int *)(iVar1 + 0x28) + iVar2" (pointer_expression "*(int *)(iVar1 + 0x28)" * (cast_expression "(int *)(iVar1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x28)" ( (binary_expression "iVar1 + 0x28" identifier + number_literal) )))) + identifier) ))) , identifier , identifier , (cast_expression "(_func_int_BtCursor_ptr_u32_u32_void_ptr *)(unaff_EDI + -0x7ab6)" ( (type_descriptor "_func_int_BtCursor_ptr_u32_u32_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + -0x7ab6)" ( (binary_expression "unaff_EDI + -0x7ab6" identifier + number_literal) ))) )))) ;) (if_statement "if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }" { (expression_statement "iVar3 = iVar3 + *(int *)(iVar1 + 0x30);" (assignment_expression "iVar3 = iVar3 + *(int *)(iVar1 + 0x30)" identifier = (binary_expression "iVar3 + *(int *)(iVar1 + 0x30)" identifier + (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))))) ;) (expression_statement "*(int *)(iVar1 + 0x30) = iVar3;" (assignment_expression "*(int *)(iVar1 + 0x30) = iVar3" (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));" (assignment_expression "puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28))" identifier = (cast_expression "(undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + *(int *)(iVar1 + 0x28))" ( (binary_expression "iVar3 + *(int *)(iVar1 + 0x28)" identifier + (pointer_expression "*(int *)(iVar1 + 0x28)" * (cast_expression "(int *)(iVar1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x28)" ( (binary_expression "iVar1 + 0x28" identifier + number_literal) ))))) )))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4[1] = 0;" (assignment_expression "puVar4[1] = 0" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[2] = 0;" (assignment_expression "puVar4[2] = 0" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[3] = 0;" (assignment_expression "puVar4[3] = 0" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[4] = 0;" (assignment_expression "puVar4[4] = 0" (subscript_expression "puVar4[4]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c))" ( (binary_expression "*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)" (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) == (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) ))))) )) (compound_statement "{\n      sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }" { (expression_statement "sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34));" (call_expression "sqlite3_blob_close(*(sqlite3_blob **)(iVar1 + 0x34))" identifier (argument_list "(*(sqlite3_blob **)(iVar1 + 0x34))" ( (pointer_expression "*(sqlite3_blob **)(iVar1 + 0x34)" * (cast_expression "(sqlite3_blob **)(iVar1 + 0x34)" ( (type_descriptor "sqlite3_blob **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x34)" ( (binary_expression "iVar1 + 0x34" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x34)" * (cast_expression "(undefined4 *)(iVar1 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x34)" ( (binary_expression "iVar1 + 0x34" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x30)" * (cast_expression "(undefined4 *)(iVar1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) = number_literal) ;) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int FUN_000ab4c0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = FUN_00036ac5();\n  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}\n\n" (function_definition "int FUN_000ab4c0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = FUN_00036ac5();\n  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}" primitive_type (function_declarator "FUN_000ab4c0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = FUN_00036ac5();\n  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00036ac5();" (assignment_expression "iVar1 = FUN_00036ac5()" identifier = (call_expression "FUN_00036ac5()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);" (assignment_expression "iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30)" identifier = (binary_expression "*(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30)" (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) )))) - (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))))) ;) (if_statement "if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }" if (parenthesized_expression "(0x1000 < iVar3)" ( (binary_expression "0x1000 < iVar3" number_literal < identifier) )) (compound_statement "{\n    iVar3 = 0x1000;\n  }" { (expression_statement "iVar3 = 0x1000;" (assignment_expression "iVar3 = 0x1000" identifier = number_literal) ;) })) (expression_statement "iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);" (assignment_expression "iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6)" identifier = (call_expression "FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6)" identifier (argument_list "(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6)" ( (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) , (binary_expression "unaff_EDI + -0x7ab6" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }" { (expression_statement "iVar3 = iVar3 + *(int *)(iVar1 + 0x30);" (assignment_expression "iVar3 = iVar3 + *(int *)(iVar1 + 0x30)" identifier = (binary_expression "iVar3 + *(int *)(iVar1 + 0x30)" identifier + (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))))) ;) (expression_statement "*(int *)(iVar1 + 0x30) = iVar3;" (assignment_expression "*(int *)(iVar1 + 0x30) = iVar3" (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));" (assignment_expression "puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28))" identifier = (cast_expression "(undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + *(int *)(iVar1 + 0x28))" ( (binary_expression "iVar3 + *(int *)(iVar1 + 0x28)" identifier + (pointer_expression "*(int *)(iVar1 + 0x28)" * (cast_expression "(int *)(iVar1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x28)" ( (binary_expression "iVar1 + 0x28" identifier + number_literal) ))))) )))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4[1] = 0;" (assignment_expression "puVar4[1] = 0" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[2] = 0;" (assignment_expression "puVar4[2] = 0" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[3] = 0;" (assignment_expression "puVar4[3] = 0" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[4] = 0;" (assignment_expression "puVar4[4] = 0" (subscript_expression "puVar4[4]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c))" ( (binary_expression "*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)" (pointer_expression "*(int *)(iVar1 + 0x30)" * (cast_expression "(int *)(iVar1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) == (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) ))))) )) (compound_statement "{\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }" { (expression_statement "FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));" (call_expression "FUN_000a9830(*(undefined4 *)(iVar1 + 0x34))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x34))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x34)" * (cast_expression "(undefined4 *)(iVar1 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x34)" ( (binary_expression "iVar1 + 0x34" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x34)" * (cast_expression "(undefined4 *)(iVar1 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x34)" ( (binary_expression "iVar1 + 0x34" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x30)" * (cast_expression "(undefined4 *)(iVar1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) = number_literal) ;) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = 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) )))) , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_000ab4c0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = FUN_00036ac5();\n  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}" (primitive_type "int") (function_declarator "FUN_000ab4c0(void)" (identifier "FUN_000ab4c0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int unaff_EDI;\n  \n  iVar1 = FUN_00036ac5();\n  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);\n  if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }\n  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);\n  if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }\n  return iVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (expression_statement "iVar1 = FUN_00036ac5();" (assignment_expression "iVar1 = FUN_00036ac5()" (identifier "iVar1") (= "=") (call_expression "FUN_00036ac5()" (identifier "FUN_00036ac5") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);" (assignment_expression "iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30)" (identifier "iVar3") (= "=") (binary_expression "*(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30)" (pointer_expression "*(int *)(iVar1 + 0x2c)" (* "*") (cast_expression "(int *)(iVar1 + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x2c)" (( "(") (binary_expression "iVar1 + 0x2c" (identifier "iVar1") (+ "+") (number_literal "0x2c")) () ")")))) (- "-") (pointer_expression "*(int *)(iVar1 + 0x30)" (* "*") (cast_expression "(int *)(iVar1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x30)" (( "(") (binary_expression "iVar1 + 0x30" (identifier "iVar1") (+ "+") (number_literal "0x30")) () ")")))))) (; ";")) (if_statement "if (0x1000 < iVar3) {\n    iVar3 = 0x1000;\n  }" (if "if") (parenthesized_expression "(0x1000 < iVar3)" (( "(") (binary_expression "0x1000 < iVar3" (number_literal "0x1000") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n    iVar3 = 0x1000;\n  }" ({ "{") (expression_statement "iVar3 = 0x1000;" (assignment_expression "iVar3 = 0x1000" (identifier "iVar3") (= "=") (number_literal "0x1000")) (; ";")) (} "}"))) (expression_statement "iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);" (assignment_expression "iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6)" (identifier "iVar2") (= "=") (call_expression "FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6)" (identifier "FUN_000ab210") (argument_list "(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6)" (( "(") (pointer_expression "*(int *)(iVar1 + 0x30)" (* "*") (cast_expression "(int *)(iVar1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x30)" (( "(") (binary_expression "iVar1 + 0x30" (identifier "iVar1") (+ "+") (number_literal "0x30")) () ")")))) (, ",") (binary_expression "unaff_EDI + -0x7ab6" (identifier "unaff_EDI") (+ "+") (number_literal "-0x7ab6")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);\n    *(int *)(iVar1 + 0x30) = iVar3;\n    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));\n    *puVar4 = 0;\n    puVar4[1] = 0;\n    puVar4[2] = 0;\n    puVar4[3] = 0;\n    puVar4[4] = 0;\n    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }\n  }" ({ "{") (expression_statement "iVar3 = iVar3 + *(int *)(iVar1 + 0x30);" (assignment_expression "iVar3 = iVar3 + *(int *)(iVar1 + 0x30)" (identifier "iVar3") (= "=") (binary_expression "iVar3 + *(int *)(iVar1 + 0x30)" (identifier "iVar3") (+ "+") (pointer_expression "*(int *)(iVar1 + 0x30)" (* "*") (cast_expression "(int *)(iVar1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x30)" (( "(") (binary_expression "iVar1 + 0x30" (identifier "iVar1") (+ "+") (number_literal "0x30")) () ")")))))) (; ";")) (expression_statement "*(int *)(iVar1 + 0x30) = iVar3;" (assignment_expression "*(int *)(iVar1 + 0x30) = iVar3" (pointer_expression "*(int *)(iVar1 + 0x30)" (* "*") (cast_expression "(int *)(iVar1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x30)" (( "(") (binary_expression "iVar1 + 0x30" (identifier "iVar1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));" (assignment_expression "puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28))" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28))" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + *(int *)(iVar1 + 0x28))" (( "(") (binary_expression "iVar3 + *(int *)(iVar1 + 0x28)" (identifier "iVar3") (+ "+") (pointer_expression "*(int *)(iVar1 + 0x28)" (* "*") (cast_expression "(int *)(iVar1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x28)" (( "(") (binary_expression "iVar1 + 0x28" (identifier "iVar1") (+ "+") (number_literal "0x28")) () ")"))))) () ")")))) (; ";")) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4[1] = 0;" (assignment_expression "puVar4[1] = 0" (subscript_expression "puVar4[1]" (identifier "puVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4[2] = 0;" (assignment_expression "puVar4[2] = 0" (subscript_expression "puVar4[2]" (identifier "puVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4[3] = 0;" (assignment_expression "puVar4[3] = 0" (subscript_expression "puVar4[3]" (identifier "puVar4") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4[4] = 0;" (assignment_expression "puVar4[4] = 0" (subscript_expression "puVar4[4]" (identifier "puVar4") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c))" (( "(") (binary_expression "*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)" (pointer_expression "*(int *)(iVar1 + 0x30)" (* "*") (cast_expression "(int *)(iVar1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x30)" (( "(") (binary_expression "iVar1 + 0x30" (identifier "iVar1") (+ "+") (number_literal "0x30")) () ")")))) (== "==") (pointer_expression "*(int *)(iVar1 + 0x2c)" (* "*") (cast_expression "(int *)(iVar1 + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x2c)" (( "(") (binary_expression "iVar1 + 0x2c" (identifier "iVar1") (+ "+") (number_literal "0x2c")) () ")"))))) () ")")) (compound_statement "{\n      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));\n      *(undefined4 *)(iVar1 + 0x34) = 0;\n      *(undefined4 *)(iVar1 + 0x30) = 0;\n    }" ({ "{") (expression_statement "FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));" (call_expression "FUN_000a9830(*(undefined4 *)(iVar1 + 0x34))" (identifier "FUN_000a9830") (argument_list "(*(undefined4 *)(iVar1 + 0x34))" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0x34)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x34)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x34)" (( "(") (binary_expression "iVar1 + 0x34" (identifier "iVar1") (+ "+") (number_literal "0x34")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x34)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x34)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x34)" (( "(") (binary_expression "iVar1 + 0x34" (identifier "iVar1") (+ "+") (number_literal "0x34")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x30)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x30)" (( "(") (binary_expression "iVar1 + 0x30" (identifier "iVar1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}"))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

int function_1(type_1 *pReader)

{
  int var_2;
  int var_3;
  int var_4;
  type_2 *puVar4;
  int var_6;
  
  var_2 = var_1();
  var_3 = *(int *)(var_2 + 0x30);
  var_4 = *(int *)(var_2 + 0x2c) - var_3;
  if (0x1000 < var_4) {
    var_4 = 0x1000;
  }
  var_3 = var_5(*(type_3 **)(var_2 + 0x34),(void *)(*(int *)(var_2 + 0x28) + var_3),
                        var_4,var_3,(type_4 *)(var_6 + -0x7ab6)
                       );
  if (var_3 == 0) {
    var_4 = var_4 + *(int *)(var_2 + 0x30);
    *(int *)(var_2 + 0x30) = var_4;
    puVar4 = (type_2 *)(var_4 + *(int *)(var_2 + 0x28));
    *puVar4 = 0;
    puVar4[1] = 0;
    puVar4[2] = 0;
    puVar4[3] = 0;
    puVar4[4] = 0;
    if (*(int *)(var_2 + 0x30) == *(int *)(var_2 + 0x2c)) {
      var_7(*(type_3 **)(var_2 + 0x34));
      *(type_2 *)(var_2 + 0x34) = 0;
      *(type_2 *)(var_2 + 0x30) = 0;
    }
  }
  return var_3;
}


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

int MASKED(void)

{
  int iVar1;
  int iVar2;
  int iVar3;
  undefined4 *puVar4;
  int unaff_EDI;
  
  iVar1 = FUN_00036ac5();
  iVar3 = *(int *)(iVar1 + 0x2c) - *(int *)(iVar1 + 0x30);
  if (0x1000 < iVar3) {
    iVar3 = 0x1000;
  }
  iVar2 = FUN_000ab210(*(int *)(iVar1 + 0x30),unaff_EDI + -0x7ab6);
  if (iVar2 == 0) {
    iVar3 = iVar3 + *(int *)(iVar1 + 0x30);
    *(int *)(iVar1 + 0x30) = iVar3;
    puVar4 = (undefined4 *)(iVar3 + *(int *)(iVar1 + 0x28));
    *puVar4 = 0;
    puVar4[1] = 0;
    puVar4[2] = 0;
    puVar4[3] = 0;
    puVar4[4] = 0;
    if (*(int *)(iVar1 + 0x30) == *(int *)(iVar1 + 0x2c)) {
      FUN_000a9830(*(undefined4 *)(iVar1 + 0x34));
      *(undefined4 *)(iVar1 + 0x34) = 0;
      *(undefined4 *)(iVar1 + 0x30) = 0;
    }
  }
  return iVar2;
}

