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

void fts3OptimizeFunc(sqlite3_context *pContext,int nVal,sqlite3_value **apVal)

{
  Fts3Table *p;
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  Fts3Cursor *pCursor;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xe4179;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = fts3FunctionArg(pContext,"optimize",*apVal,&pCursor);
  if (iVar1 == 0) {
    p = (Fts3Table *)(pCursor->base).pVtab;
    iVar1 = sqlite3_exec(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);
    if (iVar1 == 0) {
      iVar1 = fts3DoOptimize(p,1);
      if ((iVar1 == 0) || (iVar1 == 0x65)) {
        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);
        if (iVar2 != 0) {
          iVar1 = iVar2;
        }
      }
      else {
        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);
        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);
      }
    }
    sqlite3_blob_close(p->pSegments);
    p->pSegments = (sqlite3_blob *)0x0;
    if (iVar1 == 0) {
      sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0);
    }
    else if (iVar1 == 0x65) {
      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);
    }
    else {
      sqlite3_result_error_code(pContext,iVar1);
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return;
}



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

void FUN_000e4170(undefined4 param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  int *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xe4179;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = FUN_00076990(&local_24);
  if (iVar1 == 0) {
    iVar1 = *local_24;
    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);
    if (iVar2 == 0) {
      iVar2 = FUN_000e3fa0();
      if ((iVar2 == 0) || (iVar2 == 0x65)) {
        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);
        if (iVar3 != 0) {
          iVar2 = iVar3;
        }
      }
      else {
        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);
        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);
      }
    }
    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));
    *(undefined4 *)(iVar1 + 0xf8) = 0;
    if (iVar2 == 0) {
      FUN_00046480(param_1,"Index optimized",0xffffffff,0);
    }
    else if (iVar2 == 0x65) {
      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);
    }
    else {
      FUN_00045dd0(param_1,iVar2);
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000f4bf0();
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014cf0
ADD EBX,0x64d5b
SUB ESP,0x28
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x18],EAX
XOR EAX,EAX
LEA EAX,[ESP + 0x14]
MOV ESI,dword ptr [ESP + 0x3c]
PUSH EAX
MOV EAX,dword ptr [ESP + 0x48]
MOV ECX,dword ptr [EAX]
LEA EDX,[EBX + 0xfffad708]
MOV EAX,ESI
CALL 0x00076990
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000e41d0
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x000e42e5
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0x8]
SUB ESP,0xc
MOV EDI,dword ptr [EAX]
LEA EAX,[EBX + 0xfffaf74f]
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EAX
PUSH dword ptr [EDI + 0xc]
CALL 0x000adc50
ADD ESP,0x20
MOV EBP,EAX
TEST EAX,EAX
JZ 0x000e4270
SUB ESP,0xc
PUSH dword ptr [EDI + 0xf8]
CALL 0x00089d60
ADD ESP,0x10
MOV dword ptr [EDI + 0xf8],0x0
TEST EBP,EBP
JZ 0x000e4230
CMP EBP,0x65
JZ 0x000e4250
SUB ESP,0x8
PUSH EBP
PUSH ESI
CALL 0x00045dd0
ADD ESP,0x10
JMP 0x000e41b1
LEA EAX,[EBX + 0xfffaf77c]
PUSH 0x0
PUSH -0x1
PUSH EAX
PUSH ESI
CALL 0x00046480
ADD ESP,0x10
JMP 0x000e41b1
LEA EAX,[EBX + 0xfffaf78c]
PUSH 0x0
PUSH -0x1
PUSH EAX
PUSH ESI
CALL 0x00046480
ADD ESP,0x10
JMP 0x000e41b1
MOV EDX,0x1
MOV EAX,EDI
CALL 0x000e3fa0
MOV EBP,EAX
TEST EAX,EAX
JZ 0x000e42c0
CMP EAX,0x65
JZ 0x000e42c0
SUB ESP,0xc
LEA EAX,[EBX + 0xfffaf76b]
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EAX
PUSH dword ptr [EDI + 0xc]
CALL 0x000adc50
ADD ESP,0x14
LEA EAX,[EBX + 0xfffaf75e]
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EAX
PUSH dword ptr [EDI + 0xc]
CALL 0x000adc50
ADD ESP,0x20
JMP 0x000e41f7
SUB ESP,0xc
LEA EAX,[EBX + 0xfffaf75e]
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EAX
PUSH dword ptr [EDI + 0xc]
CALL 0x000adc50
ADD ESP,0x20
TEST EAX,EAX
CMOVNZ EBP,EAX
JMP 0x000e41f7
CALL 0x000f4bf0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000e4170(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00076990(&local_24);\n  if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f4bf0();\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_000e4170(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00076990(&local_24);\n  if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f4bf0();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000e4170(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00076990(&local_24);\n  if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f4bf0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xe4179;" (assignment_expression "uStack_14 = 0xe4179" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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) ))))) ;) (expression_statement "iVar1 = FUN_00076990(&local_24);" (assignment_expression "iVar1 = FUN_00076990(&local_24)" identifier = (call_expression "FUN_00076990(&local_24)" identifier (argument_list "(&local_24)" ( (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }" { (expression_statement "iVar1 = *local_24;" (assignment_expression "iVar1 = *local_24" identifier = (pointer_expression "*local_24" * identifier)) ;) (expression_statement "iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);" (assignment_expression "iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0)" identifier = (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) , (string_literal ""SAVEPOINT fts3"" " string_content ") , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }" { (expression_statement "iVar2 = FUN_000e3fa0();" (assignment_expression "iVar2 = FUN_000e3fa0()" identifier = (call_expression "FUN_000e3fa0()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }" if (parenthesized_expression "((iVar2 == 0) || (iVar2 == 0x65))" ( (binary_expression "(iVar2 == 0) || (iVar2 == 0x65)" (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar2 == 0x65)" ( (binary_expression "iVar2 == 0x65" identifier == number_literal) ))) )) (compound_statement "{\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }" { (expression_statement "iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);" (assignment_expression "iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" identifier = (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) , (string_literal ""RELEASE fts3"" " string_content ") , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          iVar2 = iVar3;\n        }" { (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) })) }) (else_clause "else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }" else (compound_statement "{\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }" { (expression_statement "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);" (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) , (string_literal ""ROLLBACK TO fts3"" " string_content ") , number_literal , number_literal , number_literal ))) ;) (expression_statement "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);" (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) , (string_literal ""RELEASE fts3"" " string_content ") , number_literal , number_literal , number_literal ))) ;) }))) })) (expression_statement "FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));" (call_expression "FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xf8))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xf8)" * (cast_expression "(undefined4 *)(iVar1 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xf8)" ( (binary_expression "iVar1 + 0xf8" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0xf8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0xf8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0xf8)" * (cast_expression "(undefined4 *)(iVar1 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xf8)" ( (binary_expression "iVar1 + 0xf8" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }" { (expression_statement "FUN_00046480(param_1,"Index optimized",0xffffffff,0);" (call_expression "FUN_00046480(param_1,"Index optimized",0xffffffff,0)" identifier (argument_list "(param_1,"Index optimized",0xffffffff,0)" ( identifier , (string_literal ""Index optimized"" " string_content ") , number_literal , number_literal ))) ;) }) (else_clause "else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }" else (if_statement "if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }" if (parenthesized_expression "(iVar2 == 0x65)" ( (binary_expression "iVar2 == 0x65" identifier == number_literal) )) (compound_statement "{\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }" { (expression_statement "FUN_00046480(param_1,"Index already optimal",0xffffffff,0);" (call_expression "FUN_00046480(param_1,"Index already optimal",0xffffffff,0)" identifier (argument_list "(param_1,"Index already optimal",0xffffffff,0)" ( identifier , (string_literal ""Index already optimal"" " string_content ") , number_literal , number_literal ))) ;) }) (else_clause "else {\n      FUN_00045dd0(param_1,iVar2);\n    }" else (compound_statement "{\n      FUN_00045dd0(param_1,iVar2);\n    }" { (expression_statement "FUN_00045dd0(param_1,iVar2);" (call_expression "FUN_00045dd0(param_1,iVar2)" identifier (argument_list "(param_1,iVar2)" ( identifier , identifier ))) ;) }))))) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f4bf0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(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                    /* WARNING: Subroutine does not return */\n    FUN_000f4bf0();\n  }" { comment (expression_statement "FUN_000f4bf0();" (call_expression "FUN_000f4bf0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid fts3OptimizeFunc(sqlite3_context *pContext,int nVal,sqlite3_value **apVal)\n\n{\n  Fts3Table *p;\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  Fts3Cursor *pCursor;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fts3FunctionArg(pContext,"optimize",*apVal,&pCursor);\n  if (iVar1 == 0) {\n    p = (Fts3Table *)(pCursor->base).pVtab;\n    iVar1 = sqlite3_exec(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n    if (iVar1 == 0) {\n      iVar1 = fts3DoOptimize(p,1);\n      if ((iVar1 == 0) || (iVar1 == 0x65)) {\n        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }\n      }\n      else {\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }\n    }\n    sqlite3_blob_close(p->pSegments);\n    p->pSegments = (sqlite3_blob *)0x0;\n    if (iVar1 == 0) {\n      sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0);\n    }\n    else if (iVar1 == 0x65) {\n      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);\n    }\n    else {\n      sqlite3_result_error_code(pContext,iVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}\n\n" comment comment (function_definition "void fts3OptimizeFunc(sqlite3_context *pContext,int nVal,sqlite3_value **apVal)\n\n{\n  Fts3Table *p;\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  Fts3Cursor *pCursor;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fts3FunctionArg(pContext,"optimize",*apVal,&pCursor);\n  if (iVar1 == 0) {\n    p = (Fts3Table *)(pCursor->base).pVtab;\n    iVar1 = sqlite3_exec(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n    if (iVar1 == 0) {\n      iVar1 = fts3DoOptimize(p,1);\n      if ((iVar1 == 0) || (iVar1 == 0x65)) {\n        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }\n      }\n      else {\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }\n    }\n    sqlite3_blob_close(p->pSegments);\n    p->pSegments = (sqlite3_blob *)0x0;\n    if (iVar1 == 0) {\n      sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0);\n    }\n    else if (iVar1 == 0x65) {\n      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);\n    }\n    else {\n      sqlite3_result_error_code(pContext,iVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" primitive_type (function_declarator "fts3OptimizeFunc(sqlite3_context *pContext,int nVal,sqlite3_value **apVal)" identifier (parameter_list "(sqlite3_context *pContext,int nVal,sqlite3_value **apVal)" ( (parameter_declaration "sqlite3_context *pContext" type_identifier (pointer_declarator "*pContext" * identifier)) , (parameter_declaration "int nVal" primitive_type identifier) , (parameter_declaration "sqlite3_value **apVal" type_identifier (pointer_declarator "**apVal" * (pointer_declarator "*apVal" * identifier))) ))) (compound_statement "{\n  Fts3Table *p;\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  Fts3Cursor *pCursor;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fts3FunctionArg(pContext,"optimize",*apVal,&pCursor);\n  if (iVar1 == 0) {\n    p = (Fts3Table *)(pCursor->base).pVtab;\n    iVar1 = sqlite3_exec(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n    if (iVar1 == 0) {\n      iVar1 = fts3DoOptimize(p,1);\n      if ((iVar1 == 0) || (iVar1 == 0x65)) {\n        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }\n      }\n      else {\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }\n    }\n    sqlite3_blob_close(p->pSegments);\n    p->pSegments = (sqlite3_blob *)0x0;\n    if (iVar1 == 0) {\n      sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0);\n    }\n    else if (iVar1 == 0x65) {\n      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);\n    }\n    else {\n      sqlite3_result_error_code(pContext,iVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" { (declaration "Fts3Table *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "Fts3Cursor *pCursor;" type_identifier (pointer_declarator "*pCursor" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xe4179;" (assignment_expression "uStack_14 = 0xe4179" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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) ))))) ;) (expression_statement "iVar1 = fts3FunctionArg(pContext,"optimize",*apVal,&pCursor);" (assignment_expression "iVar1 = fts3FunctionArg(pContext,"optimize",*apVal,&pCursor)" identifier = (call_expression "fts3FunctionArg(pContext,"optimize",*apVal,&pCursor)" identifier (argument_list "(pContext,"optimize",*apVal,&pCursor)" ( identifier , (string_literal ""optimize"" " string_content ") , (pointer_expression "*apVal" * identifier) , (pointer_expression "&pCursor" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n    p = (Fts3Table *)(pCursor->base).pVtab;\n    iVar1 = sqlite3_exec(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n    if (iVar1 == 0) {\n      iVar1 = fts3DoOptimize(p,1);\n      if ((iVar1 == 0) || (iVar1 == 0x65)) {\n        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }\n      }\n      else {\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }\n    }\n    sqlite3_blob_close(p->pSegments);\n    p->pSegments = (sqlite3_blob *)0x0;\n    if (iVar1 == 0) {\n      sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0);\n    }\n    else if (iVar1 == 0x65) {\n      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);\n    }\n    else {\n      sqlite3_result_error_code(pContext,iVar1);\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    p = (Fts3Table *)(pCursor->base).pVtab;\n    iVar1 = sqlite3_exec(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n    if (iVar1 == 0) {\n      iVar1 = fts3DoOptimize(p,1);\n      if ((iVar1 == 0) || (iVar1 == 0x65)) {\n        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }\n      }\n      else {\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }\n    }\n    sqlite3_blob_close(p->pSegments);\n    p->pSegments = (sqlite3_blob *)0x0;\n    if (iVar1 == 0) {\n      sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0);\n    }\n    else if (iVar1 == 0x65) {\n      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);\n    }\n    else {\n      sqlite3_result_error_code(pContext,iVar1);\n    }\n  }" { (expression_statement "p = (Fts3Table *)(pCursor->base).pVtab;" (assignment_expression "p = (Fts3Table *)(pCursor->base).pVtab" identifier = (cast_expression "(Fts3Table *)(pCursor->base).pVtab" ( (type_descriptor "Fts3Table *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(pCursor->base).pVtab" (parenthesized_expression "(pCursor->base)" ( (field_expression "pCursor->base" identifier -> field_identifier) )) . field_identifier))) ;) (expression_statement "iVar1 = sqlite3_exec(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);" (assignment_expression "iVar1 = sqlite3_exec(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" identifier = (call_expression "sqlite3_exec(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" identifier (argument_list "(p->db,"SAVEPOINT fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" ( (field_expression "p->db" identifier -> field_identifier) , (string_literal ""SAVEPOINT fts3"" " string_content ") , (cast_expression "(sqlite3_callback)0x0" ( (type_descriptor "sqlite3_callback" type_identifier) ) number_literal) , (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) )))) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = fts3DoOptimize(p,1);\n      if ((iVar1 == 0) || (iVar1 == 0x65)) {\n        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }\n      }\n      else {\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = fts3DoOptimize(p,1);\n      if ((iVar1 == 0) || (iVar1 == 0x65)) {\n        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }\n      }\n      else {\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }\n    }" { (expression_statement "iVar1 = fts3DoOptimize(p,1);" (assignment_expression "iVar1 = fts3DoOptimize(p,1)" identifier = (call_expression "fts3DoOptimize(p,1)" identifier (argument_list "(p,1)" ( identifier , number_literal )))) ;) (if_statement "if ((iVar1 == 0) || (iVar1 == 0x65)) {\n        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }\n      }\n      else {\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }" if (parenthesized_expression "((iVar1 == 0) || (iVar1 == 0x65))" ( (binary_expression "(iVar1 == 0) || (iVar1 == 0x65)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar1 == 0x65)" ( (binary_expression "iVar1 == 0x65" identifier == number_literal) ))) )) (compound_statement "{\n        iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }\n      }" { (expression_statement "iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);" (assignment_expression "iVar2 = sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" identifier = (call_expression "sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" identifier (argument_list "(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" ( (field_expression "p->db" identifier -> field_identifier) , (string_literal ""RELEASE fts3"" " string_content ") , (cast_expression "(sqlite3_callback)0x0" ( (type_descriptor "sqlite3_callback" type_identifier) ) number_literal) , (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) )))) ;) (if_statement "if (iVar2 != 0) {\n          iVar1 = iVar2;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          iVar1 = iVar2;\n        }" { (expression_statement "iVar1 = iVar2;" (assignment_expression "iVar1 = iVar2" identifier = identifier) ;) })) }) (else_clause "else {\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }" else (compound_statement "{\n        sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n        sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);\n      }" { (expression_statement "sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);" (call_expression "sqlite3_exec(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" identifier (argument_list "(p->db,"ROLLBACK TO fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" ( (field_expression "p->db" identifier -> field_identifier) , (string_literal ""ROLLBACK TO fts3"" " string_content ") , (cast_expression "(sqlite3_callback)0x0" ( (type_descriptor "sqlite3_callback" type_identifier) ) number_literal) , (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) ))) ;) (expression_statement "sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0);" (call_expression "sqlite3_exec(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" identifier (argument_list "(p->db,"RELEASE fts3",(sqlite3_callback)0x0,(void *)0x0,(char **)0x0)" ( (field_expression "p->db" identifier -> field_identifier) , (string_literal ""RELEASE fts3"" " string_content ") , (cast_expression "(sqlite3_callback)0x0" ( (type_descriptor "sqlite3_callback" type_identifier) ) number_literal) , (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) ))) ;) }))) })) (expression_statement "sqlite3_blob_close(p->pSegments);" (call_expression "sqlite3_blob_close(p->pSegments)" identifier (argument_list "(p->pSegments)" ( (field_expression "p->pSegments" identifier -> field_identifier) ))) ;) (expression_statement "p->pSegments = (sqlite3_blob *)0x0;" (assignment_expression "p->pSegments = (sqlite3_blob *)0x0" (field_expression "p->pSegments" identifier -> field_identifier) = (cast_expression "(sqlite3_blob *)0x0" ( (type_descriptor "sqlite3_blob *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (iVar1 == 0) {\n      sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0);\n    }\n    else if (iVar1 == 0x65) {\n      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);\n    }\n    else {\n      sqlite3_result_error_code(pContext,iVar1);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0);\n    }" { (expression_statement "sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0);" (call_expression "sqlite3_result_text(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0)" identifier (argument_list "(pContext,"Index optimized",-1,(_func_void_void_ptr *)0x0)" ( identifier , (string_literal ""Index optimized"" " string_content ") , number_literal , (cast_expression "(_func_void_void_ptr *)0x0" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) }) (else_clause "else if (iVar1 == 0x65) {\n      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);\n    }\n    else {\n      sqlite3_result_error_code(pContext,iVar1);\n    }" else (if_statement "if (iVar1 == 0x65) {\n      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);\n    }\n    else {\n      sqlite3_result_error_code(pContext,iVar1);\n    }" if (parenthesized_expression "(iVar1 == 0x65)" ( (binary_expression "iVar1 == 0x65" identifier == number_literal) )) (compound_statement "{\n      sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);\n    }" { (expression_statement "sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0);" (call_expression "sqlite3_result_text(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0)" identifier (argument_list "(pContext,"Index already optimal",-1,(_func_void_void_ptr *)0x0)" ( identifier , (string_literal ""Index already optimal"" " string_content ") , number_literal , (cast_expression "(_func_void_void_ptr *)0x0" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) }) (else_clause "else {\n      sqlite3_result_error_code(pContext,iVar1);\n    }" else (compound_statement "{\n      sqlite3_result_error_code(pContext,iVar1);\n    }" { (expression_statement "sqlite3_result_error_code(pContext,iVar1);" (call_expression "sqlite3_result_error_code(pContext,iVar1)" identifier (argument_list "(pContext,iVar1)" ( identifier , identifier ))) ;) }))))) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000e4170(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00076990(&local_24);\n  if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f4bf0();\n  }\n  return;\n}\n\n" (function_definition "void FUN_000e4170(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00076990(&local_24);\n  if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f4bf0();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000e4170(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00076990(&local_24);\n  if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f4bf0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xe4179;" (assignment_expression "uStack_14 = 0xe4179" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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) ))))) ;) (expression_statement "iVar1 = FUN_00076990(&local_24);" (assignment_expression "iVar1 = FUN_00076990(&local_24)" identifier = (call_expression "FUN_00076990(&local_24)" identifier (argument_list "(&local_24)" ( (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }" { (expression_statement "iVar1 = *local_24;" (assignment_expression "iVar1 = *local_24" identifier = (pointer_expression "*local_24" * identifier)) ;) (expression_statement "iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);" (assignment_expression "iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0)" identifier = (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) , (string_literal ""SAVEPOINT fts3"" " string_content ") , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }" { (expression_statement "iVar2 = FUN_000e3fa0();" (assignment_expression "iVar2 = FUN_000e3fa0()" identifier = (call_expression "FUN_000e3fa0()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }" if (parenthesized_expression "((iVar2 == 0) || (iVar2 == 0x65))" ( (binary_expression "(iVar2 == 0) || (iVar2 == 0x65)" (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar2 == 0x65)" ( (binary_expression "iVar2 == 0x65" identifier == number_literal) ))) )) (compound_statement "{\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }" { (expression_statement "iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);" (assignment_expression "iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" identifier = (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) , (string_literal ""RELEASE fts3"" " string_content ") , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          iVar2 = iVar3;\n        }" { (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) })) }) (else_clause "else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }" else (compound_statement "{\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }" { (expression_statement "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);" (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) , (string_literal ""ROLLBACK TO fts3"" " string_content ") , number_literal , number_literal , number_literal ))) ;) (expression_statement "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);" (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) , (string_literal ""RELEASE fts3"" " string_content ") , number_literal , number_literal , number_literal ))) ;) }))) })) (expression_statement "FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));" (call_expression "FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0xf8))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0xf8)" * (cast_expression "(undefined4 *)(iVar1 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xf8)" ( (binary_expression "iVar1 + 0xf8" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0xf8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0xf8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0xf8)" * (cast_expression "(undefined4 *)(iVar1 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xf8)" ( (binary_expression "iVar1 + 0xf8" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }" { (expression_statement "FUN_00046480(param_1,"Index optimized",0xffffffff,0);" (call_expression "FUN_00046480(param_1,"Index optimized",0xffffffff,0)" identifier (argument_list "(param_1,"Index optimized",0xffffffff,0)" ( identifier , (string_literal ""Index optimized"" " string_content ") , number_literal , number_literal ))) ;) }) (else_clause "else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }" else (if_statement "if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }" if (parenthesized_expression "(iVar2 == 0x65)" ( (binary_expression "iVar2 == 0x65" identifier == number_literal) )) (compound_statement "{\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }" { (expression_statement "FUN_00046480(param_1,"Index already optimal",0xffffffff,0);" (call_expression "FUN_00046480(param_1,"Index already optimal",0xffffffff,0)" identifier (argument_list "(param_1,"Index already optimal",0xffffffff,0)" ( identifier , (string_literal ""Index already optimal"" " string_content ") , number_literal , number_literal ))) ;) }) (else_clause "else {\n      FUN_00045dd0(param_1,iVar2);\n    }" else (compound_statement "{\n      FUN_00045dd0(param_1,iVar2);\n    }" { (expression_statement "FUN_00045dd0(param_1,iVar2);" (call_expression "FUN_00045dd0(param_1,iVar2)" identifier (argument_list "(param_1,iVar2)" ( identifier , identifier ))) ;) }))))) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f4bf0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(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                    \n    FUN_000f4bf0();\n  }" { (expression_statement "FUN_000f4bf0();" (call_expression "FUN_000f4bf0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (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) )))) , (string_literal " string_content ") , LIT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (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) )))) , (string_literal " string_content ") , LIT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) }) (else_clause else (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) )))) , (string_literal " string_content ") , LIT , LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content ") , LIT , LIT , LIT ))) ;) }))) })) (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) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT , LIT ))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT , LIT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , 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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_000e4170(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00076990(&local_24);\n  if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f4bf0();\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000e4170(undefined4 param_1)" (identifier "FUN_000e4170") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xe4179;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00076990(&local_24);\n  if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f4bf0();\n  }\n  return;\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 "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int *local_24;" (primitive_type "int") (pointer_declarator "*local_24" (* "*") (identifier "local_24")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0xe4179;" (assignment_expression "uStack_14 = 0xe4179" (identifier "uStack_14") (= "=") (number_literal "0xe4179")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (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")) () ")"))))) (; ";")) (expression_statement "iVar1 = FUN_00076990(&local_24);" (assignment_expression "iVar1 = FUN_00076990(&local_24)" (identifier "iVar1") (= "=") (call_expression "FUN_00076990(&local_24)" (identifier "FUN_00076990") (argument_list "(&local_24)" (( "(") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = *local_24;\n    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);\n    if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }\n    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));\n    *(undefined4 *)(iVar1 + 0xf8) = 0;\n    if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }\n  }" ({ "{") (expression_statement "iVar1 = *local_24;" (assignment_expression "iVar1 = *local_24" (identifier "iVar1") (= "=") (pointer_expression "*local_24" (* "*") (identifier "local_24"))) (; ";")) (expression_statement "iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);" (assignment_expression "iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0)" (identifier "iVar2") (= "=") (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0)" (identifier "FUN_000adc50") (argument_list "(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0)" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (string_literal ""SAVEPOINT fts3"" (" """) (string_content "SAVEPOINT fts3") (" """)) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = FUN_000e3fa0();\n      if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }\n    }" ({ "{") (expression_statement "iVar2 = FUN_000e3fa0();" (assignment_expression "iVar2 = FUN_000e3fa0()" (identifier "iVar2") (= "=") (call_expression "FUN_000e3fa0()" (identifier "FUN_000e3fa0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((iVar2 == 0) || (iVar2 == 0x65)) {\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }\n      else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }" (if "if") (parenthesized_expression "((iVar2 == 0) || (iVar2 == 0x65))" (( "(") (binary_expression "(iVar2 == 0) || (iVar2 == 0x65)" (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(iVar2 == 0x65)" (( "(") (binary_expression "iVar2 == 0x65" (identifier "iVar2") (== "==") (number_literal "0x65")) () ")"))) () ")")) (compound_statement "{\n        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n        if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }\n      }" ({ "{") (expression_statement "iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);" (assignment_expression "iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" (identifier "iVar3") (= "=") (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" (identifier "FUN_000adc50") (argument_list "(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (string_literal ""RELEASE fts3"" (" """) (string_content "RELEASE fts3") (" """)) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n          iVar2 = iVar3;\n        }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          iVar2 = iVar3;\n        }" ({ "{") (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" (identifier "iVar2") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }" (else "else") (compound_statement "{\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);\n        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);\n      }" ({ "{") (expression_statement "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);" (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0)" (identifier "FUN_000adc50") (argument_list "(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0)" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (string_literal ""ROLLBACK TO fts3"" (" """) (string_content "ROLLBACK TO fts3") (" """)) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);" (call_expression "FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" (identifier "FUN_000adc50") (argument_list "(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0)" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (string_literal ""RELEASE fts3"" (" """) (string_content "RELEASE fts3") (" """)) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}")))) (} "}"))) (expression_statement "FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));" (call_expression "FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8))" (identifier "FUN_00089d60") (argument_list "(*(undefined4 *)(iVar1 + 0xf8))" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0xf8)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0xf8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xf8)" (( "(") (binary_expression "iVar1 + 0xf8" (identifier "iVar1") (+ "+") (number_literal "0xf8")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0xf8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0xf8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0xf8)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0xf8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xf8)" (( "(") (binary_expression "iVar1 + 0xf8" (identifier "iVar1") (+ "+") (number_literal "0xf8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar2 == 0) {\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }\n    else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00046480(param_1,"Index optimized",0xffffffff,0);\n    }" ({ "{") (expression_statement "FUN_00046480(param_1,"Index optimized",0xffffffff,0);" (call_expression "FUN_00046480(param_1,"Index optimized",0xffffffff,0)" (identifier "FUN_00046480") (argument_list "(param_1,"Index optimized",0xffffffff,0)" (( "(") (identifier "param_1") (, ",") (string_literal ""Index optimized"" (" """) (string_content "Index optimized") (" """)) (, ",") (number_literal "0xffffffff") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}")) (else_clause "else if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }" (else "else") (if_statement "if (iVar2 == 0x65) {\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }\n    else {\n      FUN_00045dd0(param_1,iVar2);\n    }" (if "if") (parenthesized_expression "(iVar2 == 0x65)" (( "(") (binary_expression "iVar2 == 0x65" (identifier "iVar2") (== "==") (number_literal "0x65")) () ")")) (compound_statement "{\n      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);\n    }" ({ "{") (expression_statement "FUN_00046480(param_1,"Index already optimal",0xffffffff,0);" (call_expression "FUN_00046480(param_1,"Index already optimal",0xffffffff,0)" (identifier "FUN_00046480") (argument_list "(param_1,"Index already optimal",0xffffffff,0)" (( "(") (identifier "param_1") (, ",") (string_literal ""Index already optimal"" (" """) (string_content "Index already optimal") (" """)) (, ",") (number_literal "0xffffffff") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}")) (else_clause "else {\n      FUN_00045dd0(param_1,iVar2);\n    }" (else "else") (compound_statement "{\n      FUN_00045dd0(param_1,iVar2);\n    }" ({ "{") (expression_statement "FUN_00045dd0(param_1,iVar2);" (call_expression "FUN_00045dd0(param_1,iVar2)" (identifier "FUN_00045dd0") (argument_list "(param_1,iVar2)" (( "(") (identifier "param_1") (, ",") (identifier "iVar2") () ")"))) (; ";")) (} "}")))))) (} "}"))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f4bf0();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (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                    \n    FUN_000f4bf0();\n  }" ({ "{") (expression_statement "FUN_000f4bf0();" (call_expression "FUN_000f4bf0()" (identifier "FUN_000f4bf0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *pContext,int nVal,type_2 **apVal)

{
  type_3 *p;
  int var_3;
  int var_6;
  int var_1;
  type_4 *pCursor;
  int var_10;
  type_5 uStack_14;
  
  uStack_14 = 0xe4179;
  var_10 = *(int *)(var_1 + 0x14);
  var_3 = var_2(pContext,"optimize",*apVal,&pCursor);
  if (var_3 == 0) {
    p = (type_3 *)(pCursor->base).pVtab;
    var_3 = var_4(p->db,"SAVEPOINT fts3",(type_6)0x0,(void *)0x0,(char **)0x0);
    if (var_3 == 0) {
      var_3 = var_5(p,1);
      if ((var_3 == 0) || (var_3 == 0x65)) {
        var_6 = var_4(p->db,"RELEASE fts3",(type_6)0x0,(void *)0x0,(char **)0x0);
        if (var_6 != 0) {
          var_3 = var_6;
        }
      }
      else {
        var_4(p->db,"ROLLBACK TO fts3",(type_6)0x0,(void *)0x0,(char **)0x0);
        var_4(p->db,"RELEASE fts3",(type_6)0x0,(void *)0x0,(char **)0x0);
      }
    }
    var_7(p->pSegments);
    p->pSegments = (type_7 *)0x0;
    if (var_3 == 0) {
      var_8(pContext,"Index optimized",-1,(type_8 *)0x0);
    }
    else if (var_3 == 0x65) {
      var_8(pContext,"Index already optimal",-1,(type_8 *)0x0);
    }
    else {
      var_9(pContext,var_3);
    }
  }
  if (var_10 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_11();
  }
  return;
}


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

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

void MASKED(undefined4 param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  int *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xe4179;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = FUN_00076990(&local_24);
  if (iVar1 == 0) {
    iVar1 = *local_24;
    iVar2 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"SAVEPOINT fts3",0,0,0);
    if (iVar2 == 0) {
      iVar2 = FUN_000e3fa0();
      if ((iVar2 == 0) || (iVar2 == 0x65)) {
        iVar3 = FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);
        if (iVar3 != 0) {
          iVar2 = iVar3;
        }
      }
      else {
        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"ROLLBACK TO fts3",0,0,0);
        FUN_000adc50(*(undefined4 *)(iVar1 + 0xc),"RELEASE fts3",0,0,0);
      }
    }
    FUN_00089d60(*(undefined4 *)(iVar1 + 0xf8));
    *(undefined4 *)(iVar1 + 0xf8) = 0;
    if (iVar2 == 0) {
      FUN_00046480(param_1,"Index optimized",0xffffffff,0);
    }
    else if (iVar2 == 0x65) {
      FUN_00046480(param_1,"Index already optimal",0xffffffff,0);
    }
    else {
      FUN_00045dd0(param_1,iVar2);
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000f4bf0();
  }
  return;
}

