
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 vdbeIncrFree(IncrMerger *pIncr)

{
  SortSubtask *pSVar1;
  sqlite3_file *psVar2;
  int in_GS_OFFSET;
  void *pRet;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (pIncr != (IncrMerger *)0x0) {
    if (pIncr->bUseThread != 0) {
      pSVar1 = pIncr->pTask;
      if (pSVar1->pThread != (SQLiteThread *)0x0) {
        pRet = (void *)0x1;
        sqlite3ThreadJoin(pSVar1->pThread,&pRet);
        pSVar1->bDone = 0;
        pSVar1->pThread = (SQLiteThread *)0x0;
      }
      psVar2 = pIncr->aFile[0].pFd;
      if (psVar2 != (sqlite3_file *)0x0) {
        sqlite3OsCloseFree(psVar2);
      }
      psVar2 = pIncr->aFile[1].pFd;
      if (psVar2 != (sqlite3_file *)0x0) {
        sqlite3OsCloseFree(psVar2);
      }
    }
    vdbeMergeEngineFree(pIncr->pMerger);
    sqlite3_free(pIncr);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 FUN_00034820(undefined4 *param_1)

{
  int iVar1;
  int *piVar2;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 != (undefined4 *)0x0) {
    if (param_1[6] != 0) {
      piVar2 = (int *)*param_1;
      if (*piVar2 != 0) {
        FUN_000347b0();
        piVar2[1] = 0;
        *piVar2 = 0;
      }
      if (param_1[7] != 0) {
        FUN_000246e0();
      }
      if (param_1[10] != 0) {
        FUN_000246e0();
      }
    }
    FUN_00034930();
    sqlite3_free(param_1);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a9ea0();
}


PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x0001d810
ADD EBX,0xa97d6
SUB ESP,0x10
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
TEST ESI,ESI
JZ 0x0003485e
MOV EAX,dword ptr [ESI + 0x18]
TEST EAX,EAX
JNZ 0x00034878
MOV EAX,dword ptr [ESI + 0x4]
CALL 0x00034930
SUB ESP,0xc
PUSH ESI
CALL 0x00016d30
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x000348b8
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
MOV EDI,dword ptr [ESI]
MOV EAX,dword ptr [EDI]
TEST EAX,EAX
JZ 0x0003489e
LEA EDX,[ESP + 0x8]
MOV dword ptr [ESP + 0x8],0x1
CALL 0x000347b0
MOV dword ptr [EDI + 0x4],0x0
MOV dword ptr [EDI],0x0
MOV EAX,dword ptr [ESI + 0x1c]
TEST EAX,EAX
JZ 0x000348aa
CALL 0x000246e0
MOV EAX,dword ptr [ESI + 0x28]
TEST EAX,EAX
JZ 0x0003484a
CALL 0x000246e0
JMP 0x0003484a
CALL 0x000a9ea0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00034820(undefined4 *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a9ea0();\n}\n\n" comment (function_definition "void __regparm3 FUN_00034820(undefined4 *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a9ea0();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00034820(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a9ea0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }" if (parenthesized_expression "(param_1 != (undefined4 *)0x0)" ( (binary_expression "param_1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }" { (if_statement "if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }" if (parenthesized_expression "(param_1[6] != 0)" ( (binary_expression "param_1[6] != 0" (subscript_expression "param_1[6]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }" { (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }" if (parenthesized_expression "(*piVar2 != 0)" ( (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" * identifier) != number_literal) )) (compound_statement "{\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }" { (expression_statement "FUN_000347b0();" (call_expression "FUN_000347b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar2[1] = 0;" (assignment_expression "piVar2[1] = 0" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) })) (if_statement "if (param_1[7] != 0) {\n        FUN_000246e0();\n      }" if (parenthesized_expression "(param_1[7] != 0)" ( (binary_expression "param_1[7] != 0" (subscript_expression "param_1[7]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        FUN_000246e0();\n      }" { (expression_statement "FUN_000246e0();" (call_expression "FUN_000246e0()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (param_1[10] != 0) {\n        FUN_000246e0();\n      }" if (parenthesized_expression "(param_1[10] != 0)" ( (binary_expression "param_1[10] != 0" (subscript_expression "param_1[10]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        FUN_000246e0();\n      }" { (expression_statement "FUN_000246e0();" (call_expression "FUN_000246e0()" identifier (argument_list "()" ( ))) ;) })) })) (expression_statement "FUN_00034930();" (call_expression "FUN_00034930()" identifier (argument_list "()" ( ))) ;) (expression_statement "sqlite3_free(param_1);" (call_expression "sqlite3_free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 vdbeIncrFree(IncrMerger *pIncr)\n\n{\n  SortSubtask *pSVar1;\n  sqlite3_file *psVar2;\n  int in_GS_OFFSET;\n  void *pRet;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (pIncr != (IncrMerger *)0x0) {\n    if (pIncr->bUseThread != 0) {\n      pSVar1 = pIncr->pTask;\n      if (pSVar1->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n        pSVar1->bDone = 0;\n        pSVar1->pThread = (SQLiteThread *)0x0;\n      }\n      psVar2 = pIncr->aFile[0].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n      psVar2 = pIncr->aFile[1].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n    }\n    vdbeMergeEngineFree(pIncr->pMerger);\n    sqlite3_free(pIncr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void __regparm3 vdbeIncrFree(IncrMerger *pIncr)\n\n{\n  SortSubtask *pSVar1;\n  sqlite3_file *psVar2;\n  int in_GS_OFFSET;\n  void *pRet;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (pIncr != (IncrMerger *)0x0) {\n    if (pIncr->bUseThread != 0) {\n      pSVar1 = pIncr->pTask;\n      if (pSVar1->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n        pSVar1->bDone = 0;\n        pSVar1->pThread = (SQLiteThread *)0x0;\n      }\n      psVar2 = pIncr->aFile[0].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n      psVar2 = pIncr->aFile[1].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n    }\n    vdbeMergeEngineFree(pIncr->pMerger);\n    sqlite3_free(pIncr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "vdbeIncrFree(IncrMerger *pIncr)" identifier (parameter_list "(IncrMerger *pIncr)" ( (parameter_declaration "IncrMerger *pIncr" type_identifier (pointer_declarator "*pIncr" * identifier)) ))) (compound_statement "{\n  SortSubtask *pSVar1;\n  sqlite3_file *psVar2;\n  int in_GS_OFFSET;\n  void *pRet;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (pIncr != (IncrMerger *)0x0) {\n    if (pIncr->bUseThread != 0) {\n      pSVar1 = pIncr->pTask;\n      if (pSVar1->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n        pSVar1->bDone = 0;\n        pSVar1->pThread = (SQLiteThread *)0x0;\n      }\n      psVar2 = pIncr->aFile[0].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n      psVar2 = pIncr->aFile[1].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n    }\n    vdbeMergeEngineFree(pIncr->pMerger);\n    sqlite3_free(pIncr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "SortSubtask *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "sqlite3_file *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *pRet;" primitive_type (pointer_declarator "*pRet" * identifier) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (pIncr != (IncrMerger *)0x0) {\n    if (pIncr->bUseThread != 0) {\n      pSVar1 = pIncr->pTask;\n      if (pSVar1->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n        pSVar1->bDone = 0;\n        pSVar1->pThread = (SQLiteThread *)0x0;\n      }\n      psVar2 = pIncr->aFile[0].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n      psVar2 = pIncr->aFile[1].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n    }\n    vdbeMergeEngineFree(pIncr->pMerger);\n    sqlite3_free(pIncr);\n  }" if (parenthesized_expression "(pIncr != (IncrMerger *)0x0)" ( (binary_expression "pIncr != (IncrMerger *)0x0" identifier != (cast_expression "(IncrMerger *)0x0" ( (type_descriptor "IncrMerger *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (pIncr->bUseThread != 0) {\n      pSVar1 = pIncr->pTask;\n      if (pSVar1->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n        pSVar1->bDone = 0;\n        pSVar1->pThread = (SQLiteThread *)0x0;\n      }\n      psVar2 = pIncr->aFile[0].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n      psVar2 = pIncr->aFile[1].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n    }\n    vdbeMergeEngineFree(pIncr->pMerger);\n    sqlite3_free(pIncr);\n  }" { (if_statement "if (pIncr->bUseThread != 0) {\n      pSVar1 = pIncr->pTask;\n      if (pSVar1->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n        pSVar1->bDone = 0;\n        pSVar1->pThread = (SQLiteThread *)0x0;\n      }\n      psVar2 = pIncr->aFile[0].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n      psVar2 = pIncr->aFile[1].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n    }" if (parenthesized_expression "(pIncr->bUseThread != 0)" ( (binary_expression "pIncr->bUseThread != 0" (field_expression "pIncr->bUseThread" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n      pSVar1 = pIncr->pTask;\n      if (pSVar1->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n        pSVar1->bDone = 0;\n        pSVar1->pThread = (SQLiteThread *)0x0;\n      }\n      psVar2 = pIncr->aFile[0].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n      psVar2 = pIncr->aFile[1].pFd;\n      if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }\n    }" { (expression_statement "pSVar1 = pIncr->pTask;" (assignment_expression "pSVar1 = pIncr->pTask" identifier = (field_expression "pIncr->pTask" identifier -> field_identifier)) ;) (if_statement "if (pSVar1->pThread != (SQLiteThread *)0x0) {\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n        pSVar1->bDone = 0;\n        pSVar1->pThread = (SQLiteThread *)0x0;\n      }" if (parenthesized_expression "(pSVar1->pThread != (SQLiteThread *)0x0)" ( (binary_expression "pSVar1->pThread != (SQLiteThread *)0x0" (field_expression "pSVar1->pThread" identifier -> field_identifier) != (cast_expression "(SQLiteThread *)0x0" ( (type_descriptor "SQLiteThread *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        pRet = (void *)0x1;\n        sqlite3ThreadJoin(pSVar1->pThread,&pRet);\n        pSVar1->bDone = 0;\n        pSVar1->pThread = (SQLiteThread *)0x0;\n      }" { (expression_statement "pRet = (void *)0x1;" (assignment_expression "pRet = (void *)0x1" identifier = (cast_expression "(void *)0x1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "sqlite3ThreadJoin(pSVar1->pThread,&pRet);" (call_expression "sqlite3ThreadJoin(pSVar1->pThread,&pRet)" identifier (argument_list "(pSVar1->pThread,&pRet)" ( (field_expression "pSVar1->pThread" identifier -> field_identifier) , (pointer_expression "&pRet" & identifier) ))) ;) (expression_statement "pSVar1->bDone = 0;" (assignment_expression "pSVar1->bDone = 0" (field_expression "pSVar1->bDone" identifier -> field_identifier) = number_literal) ;) (expression_statement "pSVar1->pThread = (SQLiteThread *)0x0;" (assignment_expression "pSVar1->pThread = (SQLiteThread *)0x0" (field_expression "pSVar1->pThread" identifier -> field_identifier) = (cast_expression "(SQLiteThread *)0x0" ( (type_descriptor "SQLiteThread *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "psVar2 = pIncr->aFile[0].pFd;" (assignment_expression "psVar2 = pIncr->aFile[0].pFd" identifier = (field_expression "pIncr->aFile[0].pFd" (subscript_expression "pIncr->aFile[0]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (if_statement "if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }" if (parenthesized_expression "(psVar2 != (sqlite3_file *)0x0)" ( (binary_expression "psVar2 != (sqlite3_file *)0x0" identifier != (cast_expression "(sqlite3_file *)0x0" ( (type_descriptor "sqlite3_file *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sqlite3OsCloseFree(psVar2);\n      }" { (expression_statement "sqlite3OsCloseFree(psVar2);" (call_expression "sqlite3OsCloseFree(psVar2)" identifier (argument_list "(psVar2)" ( identifier ))) ;) })) (expression_statement "psVar2 = pIncr->aFile[1].pFd;" (assignment_expression "psVar2 = pIncr->aFile[1].pFd" identifier = (field_expression "pIncr->aFile[1].pFd" (subscript_expression "pIncr->aFile[1]" (field_expression "pIncr->aFile" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (if_statement "if (psVar2 != (sqlite3_file *)0x0) {\n        sqlite3OsCloseFree(psVar2);\n      }" if (parenthesized_expression "(psVar2 != (sqlite3_file *)0x0)" ( (binary_expression "psVar2 != (sqlite3_file *)0x0" identifier != (cast_expression "(sqlite3_file *)0x0" ( (type_descriptor "sqlite3_file *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sqlite3OsCloseFree(psVar2);\n      }" { (expression_statement "sqlite3OsCloseFree(psVar2);" (call_expression "sqlite3OsCloseFree(psVar2)" identifier (argument_list "(psVar2)" ( identifier ))) ;) })) })) (expression_statement "vdbeMergeEngineFree(pIncr->pMerger);" (call_expression "vdbeMergeEngineFree(pIncr->pMerger)" identifier (argument_list "(pIncr->pMerger)" ( (field_expression "pIncr->pMerger" identifier -> field_identifier) ))) ;) (expression_statement "sqlite3_free(pIncr);" (call_expression "sqlite3_free(pIncr)" identifier (argument_list "(pIncr)" ( identifier ))) ;) })) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void __regparm3 FUN_00034820(undefined4 *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}\n\n" (function_definition "void __regparm3 FUN_00034820(undefined4 *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00034820(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }" if (parenthesized_expression "(param_1 != (undefined4 *)0x0)" ( (binary_expression "param_1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }" { (if_statement "if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }" if (parenthesized_expression "(param_1[6] != 0)" ( (binary_expression "param_1[6] != 0" (subscript_expression "param_1[6]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }" { (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }" if (parenthesized_expression "(*piVar2 != 0)" ( (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" * identifier) != number_literal) )) (compound_statement "{\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }" { (expression_statement "FUN_000347b0();" (call_expression "FUN_000347b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar2[1] = 0;" (assignment_expression "piVar2[1] = 0" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) })) (if_statement "if (param_1[7] != 0) {\n        FUN_000246e0();\n      }" if (parenthesized_expression "(param_1[7] != 0)" ( (binary_expression "param_1[7] != 0" (subscript_expression "param_1[7]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        FUN_000246e0();\n      }" { (expression_statement "FUN_000246e0();" (call_expression "FUN_000246e0()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (param_1[10] != 0) {\n        FUN_000246e0();\n      }" if (parenthesized_expression "(param_1[10] != 0)" ( (binary_expression "param_1[10] != 0" (subscript_expression "param_1[10]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        FUN_000246e0();\n      }" { (expression_statement "FUN_000246e0();" (call_expression "FUN_000246e0()" identifier (argument_list "()" ( ))) ;) })) })) (expression_statement "FUN_00034930();" (call_expression "FUN_00034930()" identifier (argument_list "()" ( ))) ;) (expression_statement "sqlite3_free(param_1);" (call_expression "sqlite3_free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (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 != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void __regparm3 FUN_00034820(undefined4 *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00034820(undefined4 *param_1)" (identifier "FUN_00034820") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (param_1 != (undefined4 *)0x0) {\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }" (if "if") (parenthesized_expression "(param_1 != (undefined4 *)0x0)" (( "(") (binary_expression "param_1 != (undefined4 *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }\n    FUN_00034930();\n    sqlite3_free(param_1);\n  }" ({ "{") (if_statement "if (param_1[6] != 0) {\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }" (if "if") (parenthesized_expression "(param_1[6] != 0)" (( "(") (binary_expression "param_1[6] != 0" (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      piVar2 = (int *)*param_1;\n      if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }\n      if (param_1[7] != 0) {\n        FUN_000246e0();\n      }\n      if (param_1[10] != 0) {\n        FUN_000246e0();\n      }\n    }" ({ "{") (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" (identifier "piVar2") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (*piVar2 != 0) {\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }" (if "if") (parenthesized_expression "(*piVar2 != 0)" (( "(") (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_000347b0();\n        piVar2[1] = 0;\n        *piVar2 = 0;\n      }" ({ "{") (expression_statement "FUN_000347b0();" (call_expression "FUN_000347b0()" (identifier "FUN_000347b0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar2[1] = 0;" (assignment_expression "piVar2[1] = 0" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if (param_1[7] != 0) {\n        FUN_000246e0();\n      }" (if "if") (parenthesized_expression "(param_1[7] != 0)" (( "(") (binary_expression "param_1[7] != 0" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_000246e0();\n      }" ({ "{") (expression_statement "FUN_000246e0();" (call_expression "FUN_000246e0()" (identifier "FUN_000246e0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_1[10] != 0) {\n        FUN_000246e0();\n      }" (if "if") (parenthesized_expression "(param_1[10] != 0)" (( "(") (binary_expression "param_1[10] != 0" (subscript_expression "param_1[10]" (identifier "param_1") ([ "[") (number_literal "10") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_000246e0();\n      }" ({ "{") (expression_statement "FUN_000246e0();" (call_expression "FUN_000246e0()" (identifier "FUN_000246e0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_00034930();" (call_expression "FUN_00034930()" (identifier "FUN_00034930") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "sqlite3_free(param_1);" (call_expression "sqlite3_free(param_1)" (identifier "sqlite3_free") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" (identifier "FUN_000a9ea0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 function_1(type_1 *var_2)

{
  type_2 *pSVar1;
  type_3 *var_4;
  int var_1;
  void *pRet;
  int var_8;
  
  var_8 = *(int *)(var_1 + 0x14);
  if (var_2 != (type_1 *)0x0) {
    if (var_2->bUseThread != 0) {
      pSVar1 = var_2->pTask;
      if (pSVar1->pThread != (type_4 *)0x0) {
        pRet = (void *)0x1;
        var_3(pSVar1->pThread,&pRet);
        pSVar1->bDone = 0;
        pSVar1->pThread = (type_4 *)0x0;
      }
      var_4 = var_2->aFile[0].pFd;
      if (var_4 != (type_3 *)0x0) {
        var_5(var_4);
      }
      var_4 = var_2->aFile[1].pFd;
      if (var_4 != (type_3 *)0x0) {
        var_5(var_4);
      }
    }
    var_6(var_2->pMerger);
    var_7(var_2);
  }
  if (var_8 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_9();
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 MASKED(undefined4 *param_1)

{
  int iVar1;
  int *piVar2;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 != (undefined4 *)0x0) {
    if (param_1[6] != 0) {
      piVar2 = (int *)*param_1;
      if (*piVar2 != 0) {
        FUN_000347b0();
        piVar2[1] = 0;
        *piVar2 = 0;
      }
      if (param_1[7] != 0) {
        FUN_000246e0();
      }
      if (param_1[10] != 0) {
        FUN_000246e0();
      }
    }
    FUN_00034930();
    sqlite3_free(param_1);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a9ea0();
}

