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

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

{
  sqlite3_value *psVar1;
  Fts3Table *p;
  char *z;
  int iVar2;
  int iVar3;
  char cVar4;
  char *zSql;
  char *zSql_00;
  byte *pbVar5;
  byte *pbVar6;
  bool bVar7;
  bool bVar8;
  char *xDel;
  
  psVar1 = *apVal;
  if ((psVar1->flags & 0xc3ff) == 0x8201) {
    bVar7 = psVar1->eSubtype < 0x70;
    bVar8 = psVar1->eSubtype == 0x70;
    if (bVar8) {
      iVar3 = 0xb;
      pbVar5 = (byte *)(psVar1->u).zPType;
      pbVar6 = (byte *)"fts3cursor";
      do {
        if (iVar3 == 0) break;
        iVar3 = iVar3 + -1;
        bVar7 = *pbVar5 < *pbVar6;
        bVar8 = *pbVar5 == *pbVar6;
        pbVar5 = pbVar5 + 1;
        pbVar6 = pbVar6 + 1;
      } while (bVar8);
      cVar4 = (!bVar7 && !bVar8) - bVar7;
      if ((cVar4 == '\0') && (psVar1->z != (char *)0x0)) {
        p = *(Fts3Table **)psVar1->z;
        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),
                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);
        if (iVar3 == 0) {
          iVar3 = fts3DoOptimize(p,1);
          if ((iVar3 == 0) || (iVar3 == 0x65)) {
            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,
                                 "RELEASE fts3",(char **)0x0);
            if (iVar2 != 0) {
              iVar3 = iVar2;
            }
          }
          else {
            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,
                         "ROLLBACK TO fts3",(char **)0x0);
            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",
                         (char **)0x0);
          }
        }
        sqlite3_blob_close(p->pSegments);
        p->pSegments = (sqlite3_blob *)0x0;
        if (iVar3 == 0) {
          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)
          ;
          return;
        }
        if (iVar3 == 0x65) {
          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,
                              (_func_void_void_ptr *)nVal);
          return;
        }
        sqlite3_result_error_code(pContext,iVar3);
        return;
      }
    }
  }
  xDel = "optimize";
  z = sqlite3_mprintf("illegal first argument to %s");
  pContext->isError = 1;
  sqlite3VdbeMemSetStr(pContext->pOut,z,1,0xff,(_func_void_void_ptr *)xDel);
  sqlite3_free(z);
  return;
}



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

void FUN_0013a870(int param_1,undefined4 param_2,undefined4 *param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  byte *pbVar4;
  byte *pbVar5;
  bool bVar6;
  bool bVar7;
  
  param_3 = (undefined4 *)*param_3;
  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {
    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;
    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;
    if (bVar7) {
      iVar3 = 0xb;
      pbVar4 = (byte *)*param_3;
      pbVar5 = (byte *)"fts3cursor";
      do {
        if (iVar3 == 0) break;
        iVar3 = iVar3 + -1;
        bVar6 = *pbVar4 < *pbVar5;
        bVar7 = *pbVar4 == *pbVar5;
        pbVar4 = pbVar4 + 1;
        pbVar5 = pbVar5 + 1;
      } while (bVar7);
      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {
        iVar3 = *(int *)param_3[4];
        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);
        if (iVar1 == 0) {
          iVar1 = FUN_00139450();
          if ((iVar1 == 0) || (iVar1 == 0x65)) {
            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);
            if (iVar2 != 0) {
              iVar1 = iVar2;
            }
          }
          else {
            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);
            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);
          }
        }
        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));
        *(undefined4 *)(iVar3 + 0xf8) = 0;
        if (iVar1 == 0) {
          FUN_00070c50();
          return;
        }
        if (iVar1 == 0x65) {
          FUN_00070c50();
          return;
        }
        FUN_0006feb0();
        return;
      }
    }
  }
  FUN_000a3060("illegal first argument to %s","optimize");
  *(undefined4 *)(param_1 + 0x14) = 1;
  FUN_0006f5d0(0xffffffff);
  FUN_00044000();
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000172e0
ADD EBX,0x805af
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x28]
MOV EBP,dword ptr [ESP + 0x20]
MOV EAX,dword ptr [EAX]
MOVZX EDX,word ptr [EAX + 0x8]
AND DH,0xc3
CMP DX,0x8201
JNZ 0x0013a930
CMP byte ptr [EAX + 0xb],0x70
JNZ 0x0013a930
MOV ESI,dword ptr [EAX]
MOV ECX,0xb
LEA EDI,[EBX + 0xfffa35e1]
CMPSB.REPE ES:EDI,ESI
SETA DL
SBB DL,0x0
TEST DL,DL
JNZ 0x0013a930
MOV EAX,dword ptr [EAX + 0x10]
TEST EAX,EAX
JZ 0x0013a930
MOV EDI,dword ptr [EAX]
SUB ESP,0xc
LEA EAX,[EBX + 0xfffa3c87]
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EAX
PUSH dword ptr [EDI + 0xc]
CALL 0x000e9460
ADD ESP,0x20
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0013a9b0
SUB ESP,0xc
PUSH dword ptr [EDI + 0xf8]
CALL 0x000c0610
ADD ESP,0x10
MOV dword ptr [EDI + 0xf8],0x0
TEST ESI,ESI
JZ 0x0013a978
CMP ESI,0x65
JZ 0x0013a990
MOV dword ptr [ESP + 0x24],ESI
MOV dword ptr [ESP + 0x20],EBP
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x0006feb0
SUB ESP,0x8
LEA EAX,[EBX + 0xfffa18cf]
PUSH EAX
LEA EAX,[EBX + 0xfffa35ec]
PUSH EAX
CALL 0x000a3060
MOV dword ptr [EBP + 0x14],0x1
MOV ECX,0x1
MOV EBX,EAX
MOV dword ptr [ESP],0xffffffff
MOV EDX,EAX
MOV EAX,dword ptr [EBP]
CALL 0x0006f5d0
MOV dword ptr [ESP + 0x30],EBX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x00044000
ADD ESP,0xc
LEA EDX,[EBX + 0xfffa3cb4]
MOV EAX,EBP
XOR ECX,ECX
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x00070c50
ADD ESP,0xc
LEA EDX,[EBX + 0xfffa3cc4]
MOV EAX,EBP
XOR ECX,ECX
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x00070c50
MOV EDX,0x1
MOV EAX,EDI
CALL 0x00139450
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0013aa00
CMP EAX,0x65
JZ 0x0013aa00
SUB ESP,0xc
LEA EAX,[EBX + 0xfffa3ca3]
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EAX
PUSH dword ptr [EDI + 0xc]
CALL 0x000e9460
ADD ESP,0x14
LEA EAX,[EBX + 0xfffa3c96]
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EAX
PUSH dword ptr [EDI + 0xc]
CALL 0x000e9460
ADD ESP,0x20
JMP 0x0013a8ef
SUB ESP,0xc
LEA EAX,[EBX + 0xfffa3c96]
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EAX
PUSH dword ptr [EDI + 0xc]
CALL 0x000e9460
ADD ESP,0x20
TEST EAX,EAX
CMOVNZ ESI,EAX
JMP 0x0013a8ef
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0013a870(int param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  param_3 = (undefined4 *)*param_3;\n  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }\n  FUN_000a3060("illegal first argument to %s","optimize");\n  *(undefined4 *)(param_1 + 0x14) = 1;\n  FUN_0006f5d0(0xffffffff);\n  FUN_00044000();\n  return;\n}\n\n" comment (function_definition "void FUN_0013a870(int param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  param_3 = (undefined4 *)*param_3;\n  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }\n  FUN_000a3060("illegal first argument to %s","optimize");\n  *(undefined4 *)(param_1 + 0x14) = 1;\n  FUN_0006f5d0(0xffffffff);\n  FUN_00044000();\n  return;\n}" primitive_type (function_declarator "FUN_0013a870(int param_1,undefined4 param_2,undefined4 *param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  param_3 = (undefined4 *)*param_3;\n  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }\n  FUN_000a3060("illegal first argument to %s","optimize");\n  *(undefined4 *)(param_1 + 0x14) = 1;\n  FUN_0006f5d0(0xffffffff);\n  FUN_00044000();\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "param_3 = (undefined4 *)*param_3;" (assignment_expression "param_3 = (undefined4 *)*param_3" identifier = (cast_expression "(undefined4 *)*param_3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) ;) (if_statement "if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }" if (parenthesized_expression "((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201)" ( (binary_expression "(*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201" (parenthesized_expression "(*(ushort *)(param_3 + 2) & 0xc3ff)" ( (binary_expression "*(ushort *)(param_3 + 2) & 0xc3ff" (pointer_expression "*(ushort *)(param_3 + 2)" * (cast_expression "(ushort *)(param_3 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 2)" ( (binary_expression "param_3 + 2" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }" { (expression_statement "bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;" (assignment_expression "bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70" identifier = (binary_expression "*(byte *)((int)param_3 + 0xb) < 0x70" (pointer_expression "*(byte *)((int)param_3 + 0xb)" * (cast_expression "(byte *)((int)param_3 + 0xb)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + 0xb)" ( (binary_expression "(int)param_3 + 0xb" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) < number_literal)) ;) (expression_statement "bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;" (assignment_expression "bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70" identifier = (binary_expression "*(byte *)((int)param_3 + 0xb) == 0x70" (pointer_expression "*(byte *)((int)param_3 + 0xb)" * (cast_expression "(byte *)((int)param_3 + 0xb)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + 0xb)" ( (binary_expression "(int)param_3 + 0xb" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == number_literal)) ;) (if_statement "if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }" if (parenthesized_expression "(bVar7)" ( identifier )) (compound_statement "{\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }" { (expression_statement "iVar3 = 0xb;" (assignment_expression "iVar3 = 0xb" identifier = number_literal) ;) (expression_statement "pbVar4 = (byte *)*param_3;" (assignment_expression "pbVar4 = (byte *)*param_3" identifier = (cast_expression "(byte *)*param_3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) ;) (expression_statement "pbVar5 = (byte *)"fts3cursor";" (assignment_expression "pbVar5 = (byte *)"fts3cursor"" identifier = (cast_expression "(byte *)"fts3cursor"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""fts3cursor"" " string_content "))) ;) (do_statement "do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);" do (compound_statement "{\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      }" { (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "bVar6 = *pbVar4 < *pbVar5;" (assignment_expression "bVar6 = *pbVar4 < *pbVar5" identifier = (binary_expression "*pbVar4 < *pbVar5" (pointer_expression "*pbVar4" * identifier) < (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "bVar7 = *pbVar4 == *pbVar5;" (assignment_expression "bVar7 = *pbVar4 == *pbVar5" identifier = (binary_expression "*pbVar4 == *pbVar5" (pointer_expression "*pbVar4" * identifier) == (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "pbVar5 = pbVar5 + 1;" (assignment_expression "pbVar5 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar7)" ( identifier )) ;) (if_statement "if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }" if (parenthesized_expression "(((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0))" ( (binary_expression "((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)" (parenthesized_expression "((!bVar6 && !bVar7) == bVar6)" ( (binary_expression "(!bVar6 && !bVar7) == bVar6" (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) == identifier) )) && (parenthesized_expression "((int *)param_3[4] != (int *)0x0)" ( (binary_expression "(int *)param_3[4] != (int *)0x0" (cast_expression "(int *)param_3[4]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_3[4]" identifier [ number_literal ])) != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }" { (expression_statement "iVar3 = *(int *)param_3[4];" (assignment_expression "iVar3 = *(int *)param_3[4]" identifier = (pointer_expression "*(int *)param_3[4]" * (cast_expression "(int *)param_3[4]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_3[4]" identifier [ number_literal ])))) ;) (expression_statement "iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);" (assignment_expression "iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0)" identifier = (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) , (string_literal ""SAVEPOINT fts3"" " string_content ") , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }" { (expression_statement "iVar1 = FUN_00139450();" (assignment_expression "iVar1 = FUN_00139450()" identifier = (call_expression "FUN_00139450()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\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 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }" { (expression_statement "iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);" (assignment_expression "iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" identifier = (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) , (string_literal ""RELEASE fts3"" " string_content ") , number_literal , number_literal , 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            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }" else (compound_statement "{\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }" { (expression_statement "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);" (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) , (string_literal ""ROLLBACK TO fts3"" " string_content ") , number_literal , number_literal , number_literal ))) ;) (expression_statement "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);" (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) , (string_literal ""RELEASE fts3"" " string_content ") , number_literal , number_literal , number_literal ))) ;) }))) })) (expression_statement "FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));" (call_expression "FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8))" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xf8))" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xf8)" * (cast_expression "(undefined4 *)(iVar3 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xf8)" ( (binary_expression "iVar3 + 0xf8" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(iVar3 + 0xf8) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 0xf8) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 0xf8)" * (cast_expression "(undefined4 *)(iVar3 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xf8)" ( (binary_expression "iVar3 + 0xf8" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          FUN_00070c50();\n          return;\n        }" { (expression_statement "FUN_00070c50();" (call_expression "FUN_00070c50()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0x65)" ( (binary_expression "iVar1 == 0x65" identifier == number_literal) )) (compound_statement "{\n          FUN_00070c50();\n          return;\n        }" { (expression_statement "FUN_00070c50();" (call_expression "FUN_00070c50()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0006feb0();" (call_expression "FUN_0006feb0()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) })) })) (expression_statement "FUN_000a3060("illegal first argument to %s","optimize");" (call_expression "FUN_000a3060("illegal first argument to %s","optimize")" identifier (argument_list "("illegal first argument to %s","optimize")" ( (string_literal ""illegal first argument to %s"" " string_content ") , (string_literal ""optimize"" " string_content ") ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x14) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0006f5d0(0xffffffff);" (call_expression "FUN_0006f5d0(0xffffffff)" identifier (argument_list "(0xffffffff)" ( number_literal ))) ;) (expression_statement "FUN_00044000();" (call_expression "FUN_00044000()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid fts3OptimizeFunc(sqlite3_context *pContext,int nVal,sqlite3_value **apVal)\n\n{\n  sqlite3_value *psVar1;\n  Fts3Table *p;\n  char *z;\n  int iVar2;\n  int iVar3;\n  char cVar4;\n  char *zSql;\n  char *zSql_00;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  char *xDel;\n  \n  psVar1 = *apVal;\n  if ((psVar1->flags & 0xc3ff) == 0x8201) {\n    bVar7 = psVar1->eSubtype < 0x70;\n    bVar8 = psVar1->eSubtype == 0x70;\n    if (bVar8) {\n      iVar3 = 0xb;\n      pbVar5 = (byte *)(psVar1->u).zPType;\n      pbVar6 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + 1;\n        pbVar6 = pbVar6 + 1;\n      } while (bVar8);\n      cVar4 = (!bVar7 && !bVar8) - bVar7;\n      if ((cVar4 == '\0') && (psVar1->z != (char *)0x0)) {\n        p = *(Fts3Table **)psVar1->z;\n        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);\n        if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }\n        sqlite3_blob_close(p->pSegments);\n        p->pSegments = (sqlite3_blob *)0x0;\n        if (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }\n        if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }\n        sqlite3_result_error_code(pContext,iVar3);\n        return;\n      }\n    }\n  }\n  xDel = "optimize";\n  z = sqlite3_mprintf("illegal first argument to %s");\n  pContext->isError = 1;\n  sqlite3VdbeMemSetStr(pContext->pOut,z,1,0xff,(_func_void_void_ptr *)xDel);\n  sqlite3_free(z);\n  return;\n}\n\n" comment (function_definition "void fts3OptimizeFunc(sqlite3_context *pContext,int nVal,sqlite3_value **apVal)\n\n{\n  sqlite3_value *psVar1;\n  Fts3Table *p;\n  char *z;\n  int iVar2;\n  int iVar3;\n  char cVar4;\n  char *zSql;\n  char *zSql_00;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  char *xDel;\n  \n  psVar1 = *apVal;\n  if ((psVar1->flags & 0xc3ff) == 0x8201) {\n    bVar7 = psVar1->eSubtype < 0x70;\n    bVar8 = psVar1->eSubtype == 0x70;\n    if (bVar8) {\n      iVar3 = 0xb;\n      pbVar5 = (byte *)(psVar1->u).zPType;\n      pbVar6 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + 1;\n        pbVar6 = pbVar6 + 1;\n      } while (bVar8);\n      cVar4 = (!bVar7 && !bVar8) - bVar7;\n      if ((cVar4 == '\0') && (psVar1->z != (char *)0x0)) {\n        p = *(Fts3Table **)psVar1->z;\n        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);\n        if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }\n        sqlite3_blob_close(p->pSegments);\n        p->pSegments = (sqlite3_blob *)0x0;\n        if (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }\n        if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }\n        sqlite3_result_error_code(pContext,iVar3);\n        return;\n      }\n    }\n  }\n  xDel = "optimize";\n  z = sqlite3_mprintf("illegal first argument to %s");\n  pContext->isError = 1;\n  sqlite3VdbeMemSetStr(pContext->pOut,z,1,0xff,(_func_void_void_ptr *)xDel);\n  sqlite3_free(z);\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  sqlite3_value *psVar1;\n  Fts3Table *p;\n  char *z;\n  int iVar2;\n  int iVar3;\n  char cVar4;\n  char *zSql;\n  char *zSql_00;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  char *xDel;\n  \n  psVar1 = *apVal;\n  if ((psVar1->flags & 0xc3ff) == 0x8201) {\n    bVar7 = psVar1->eSubtype < 0x70;\n    bVar8 = psVar1->eSubtype == 0x70;\n    if (bVar8) {\n      iVar3 = 0xb;\n      pbVar5 = (byte *)(psVar1->u).zPType;\n      pbVar6 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + 1;\n        pbVar6 = pbVar6 + 1;\n      } while (bVar8);\n      cVar4 = (!bVar7 && !bVar8) - bVar7;\n      if ((cVar4 == '\0') && (psVar1->z != (char *)0x0)) {\n        p = *(Fts3Table **)psVar1->z;\n        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);\n        if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }\n        sqlite3_blob_close(p->pSegments);\n        p->pSegments = (sqlite3_blob *)0x0;\n        if (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }\n        if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }\n        sqlite3_result_error_code(pContext,iVar3);\n        return;\n      }\n    }\n  }\n  xDel = "optimize";\n  z = sqlite3_mprintf("illegal first argument to %s");\n  pContext->isError = 1;\n  sqlite3VdbeMemSetStr(pContext->pOut,z,1,0xff,(_func_void_void_ptr *)xDel);\n  sqlite3_free(z);\n  return;\n}" { (declaration "sqlite3_value *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "Fts3Table *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "char *z;" primitive_type (pointer_declarator "*z" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "char *zSql;" primitive_type (pointer_declarator "*zSql" * identifier) ;) (declaration "char *zSql_00;" primitive_type (pointer_declarator "*zSql_00" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "char *xDel;" primitive_type (pointer_declarator "*xDel" * identifier) ;) (expression_statement "psVar1 = *apVal;" (assignment_expression "psVar1 = *apVal" identifier = (pointer_expression "*apVal" * identifier)) ;) (if_statement "if ((psVar1->flags & 0xc3ff) == 0x8201) {\n    bVar7 = psVar1->eSubtype < 0x70;\n    bVar8 = psVar1->eSubtype == 0x70;\n    if (bVar8) {\n      iVar3 = 0xb;\n      pbVar5 = (byte *)(psVar1->u).zPType;\n      pbVar6 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + 1;\n        pbVar6 = pbVar6 + 1;\n      } while (bVar8);\n      cVar4 = (!bVar7 && !bVar8) - bVar7;\n      if ((cVar4 == '\0') && (psVar1->z != (char *)0x0)) {\n        p = *(Fts3Table **)psVar1->z;\n        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);\n        if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }\n        sqlite3_blob_close(p->pSegments);\n        p->pSegments = (sqlite3_blob *)0x0;\n        if (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }\n        if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }\n        sqlite3_result_error_code(pContext,iVar3);\n        return;\n      }\n    }\n  }" if (parenthesized_expression "((psVar1->flags & 0xc3ff) == 0x8201)" ( (binary_expression "(psVar1->flags & 0xc3ff) == 0x8201" (parenthesized_expression "(psVar1->flags & 0xc3ff)" ( (binary_expression "psVar1->flags & 0xc3ff" (field_expression "psVar1->flags" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    bVar7 = psVar1->eSubtype < 0x70;\n    bVar8 = psVar1->eSubtype == 0x70;\n    if (bVar8) {\n      iVar3 = 0xb;\n      pbVar5 = (byte *)(psVar1->u).zPType;\n      pbVar6 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + 1;\n        pbVar6 = pbVar6 + 1;\n      } while (bVar8);\n      cVar4 = (!bVar7 && !bVar8) - bVar7;\n      if ((cVar4 == '\0') && (psVar1->z != (char *)0x0)) {\n        p = *(Fts3Table **)psVar1->z;\n        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);\n        if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }\n        sqlite3_blob_close(p->pSegments);\n        p->pSegments = (sqlite3_blob *)0x0;\n        if (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }\n        if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }\n        sqlite3_result_error_code(pContext,iVar3);\n        return;\n      }\n    }\n  }" { (expression_statement "bVar7 = psVar1->eSubtype < 0x70;" (assignment_expression "bVar7 = psVar1->eSubtype < 0x70" identifier = (binary_expression "psVar1->eSubtype < 0x70" (field_expression "psVar1->eSubtype" identifier -> field_identifier) < number_literal)) ;) (expression_statement "bVar8 = psVar1->eSubtype == 0x70;" (assignment_expression "bVar8 = psVar1->eSubtype == 0x70" identifier = (binary_expression "psVar1->eSubtype == 0x70" (field_expression "psVar1->eSubtype" identifier -> field_identifier) == number_literal)) ;) (if_statement "if (bVar8) {\n      iVar3 = 0xb;\n      pbVar5 = (byte *)(psVar1->u).zPType;\n      pbVar6 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + 1;\n        pbVar6 = pbVar6 + 1;\n      } while (bVar8);\n      cVar4 = (!bVar7 && !bVar8) - bVar7;\n      if ((cVar4 == '\0') && (psVar1->z != (char *)0x0)) {\n        p = *(Fts3Table **)psVar1->z;\n        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);\n        if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }\n        sqlite3_blob_close(p->pSegments);\n        p->pSegments = (sqlite3_blob *)0x0;\n        if (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }\n        if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }\n        sqlite3_result_error_code(pContext,iVar3);\n        return;\n      }\n    }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n      iVar3 = 0xb;\n      pbVar5 = (byte *)(psVar1->u).zPType;\n      pbVar6 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + 1;\n        pbVar6 = pbVar6 + 1;\n      } while (bVar8);\n      cVar4 = (!bVar7 && !bVar8) - bVar7;\n      if ((cVar4 == '\0') && (psVar1->z != (char *)0x0)) {\n        p = *(Fts3Table **)psVar1->z;\n        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);\n        if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }\n        sqlite3_blob_close(p->pSegments);\n        p->pSegments = (sqlite3_blob *)0x0;\n        if (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }\n        if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }\n        sqlite3_result_error_code(pContext,iVar3);\n        return;\n      }\n    }" { (expression_statement "iVar3 = 0xb;" (assignment_expression "iVar3 = 0xb" identifier = number_literal) ;) (expression_statement "pbVar5 = (byte *)(psVar1->u).zPType;" (assignment_expression "pbVar5 = (byte *)(psVar1->u).zPType" identifier = (cast_expression "(byte *)(psVar1->u).zPType" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(psVar1->u).zPType" (parenthesized_expression "(psVar1->u)" ( (field_expression "psVar1->u" identifier -> field_identifier) )) . field_identifier))) ;) (expression_statement "pbVar6 = (byte *)"fts3cursor";" (assignment_expression "pbVar6 = (byte *)"fts3cursor"" identifier = (cast_expression "(byte *)"fts3cursor"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""fts3cursor"" " string_content "))) ;) (do_statement "do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + 1;\n        pbVar6 = pbVar6 + 1;\n      } while (bVar8);" do (compound_statement "{\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + 1;\n        pbVar6 = pbVar6 + 1;\n      }" { (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "bVar7 = *pbVar5 < *pbVar6;" (assignment_expression "bVar7 = *pbVar5 < *pbVar6" identifier = (binary_expression "*pbVar5 < *pbVar6" (pointer_expression "*pbVar5" * identifier) < (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "bVar8 = *pbVar5 == *pbVar6;" (assignment_expression "bVar8 = *pbVar5 == *pbVar6" identifier = (binary_expression "*pbVar5 == *pbVar6" (pointer_expression "*pbVar5" * identifier) == (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar5 = pbVar5 + 1;" (assignment_expression "pbVar5 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar8)" ( identifier )) ;) (expression_statement "cVar4 = (!bVar7 && !bVar8) - bVar7;" (assignment_expression "cVar4 = (!bVar7 && !bVar8) - bVar7" identifier = (binary_expression "(!bVar7 && !bVar8) - bVar7" (parenthesized_expression "(!bVar7 && !bVar8)" ( (binary_expression "!bVar7 && !bVar8" (unary_expression "!bVar7" ! identifier) && (unary_expression "!bVar8" ! identifier)) )) - identifier)) ;) (if_statement "if ((cVar4 == '\0') && (psVar1->z != (char *)0x0)) {\n        p = *(Fts3Table **)psVar1->z;\n        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);\n        if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }\n        sqlite3_blob_close(p->pSegments);\n        p->pSegments = (sqlite3_blob *)0x0;\n        if (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }\n        if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }\n        sqlite3_result_error_code(pContext,iVar3);\n        return;\n      }" if (parenthesized_expression "((cVar4 == '\0') && (psVar1->z != (char *)0x0))" ( (binary_expression "(cVar4 == '\0') && (psVar1->z != (char *)0x0)" (parenthesized_expression "(cVar4 == '\0')" ( (binary_expression "cVar4 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(psVar1->z != (char *)0x0)" ( (binary_expression "psVar1->z != (char *)0x0" (field_expression "psVar1->z" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        p = *(Fts3Table **)psVar1->z;\n        iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);\n        if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }\n        sqlite3_blob_close(p->pSegments);\n        p->pSegments = (sqlite3_blob *)0x0;\n        if (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }\n        if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }\n        sqlite3_result_error_code(pContext,iVar3);\n        return;\n      }" { (expression_statement "p = *(Fts3Table **)psVar1->z;" (assignment_expression "p = *(Fts3Table **)psVar1->z" identifier = (pointer_expression "*(Fts3Table **)psVar1->z" * (cast_expression "(Fts3Table **)psVar1->z" ( (type_descriptor "Fts3Table **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (field_expression "psVar1->z" identifier -> field_identifier)))) ;) (expression_statement "iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0);" (assignment_expression "iVar3 = sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0)" identifier = (call_expression "sqlite3_exec((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0)" identifier (argument_list "((sqlite3 *)"SAVEPOINT fts3",(char *)(uint)CONCAT11(0x82,cVar4),\n                             (sqlite3_callback)p->db,"SAVEPOINT fts3",(char **)0x0)" ( (cast_expression "(sqlite3 *)"SAVEPOINT fts3"" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""SAVEPOINT fts3"" " string_content ")) , (cast_expression "(char *)(uint)CONCAT11(0x82,cVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (cast_expression "(uint)CONCAT11(0x82,cVar4)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11(0x82,cVar4)" identifier (argument_list "(0x82,cVar4)" ( number_literal , identifier ))))) , (cast_expression "(sqlite3_callback)p->db" ( (type_descriptor "sqlite3_callback" type_identifier) ) (field_expression "p->db" identifier -> field_identifier)) , (string_literal ""SAVEPOINT fts3"" " string_content ") , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) )))) ;) (if_statement "if (iVar3 == 0) {\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar3 = fts3DoOptimize(p,1);\n          if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }\n        }" { (expression_statement "iVar3 = fts3DoOptimize(p,1);" (assignment_expression "iVar3 = fts3DoOptimize(p,1)" identifier = (call_expression "fts3DoOptimize(p,1)" identifier (argument_list "(p,1)" ( identifier , number_literal )))) ;) (if_statement "if ((iVar3 == 0) || (iVar3 == 0x65)) {\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }\n          else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }" if (parenthesized_expression "((iVar3 == 0) || (iVar3 == 0x65))" ( (binary_expression "(iVar3 == 0) || (iVar3 == 0x65)" (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) || (parenthesized_expression "(iVar3 == 0x65)" ( (binary_expression "iVar3 == 0x65" identifier == number_literal) ))) )) (compound_statement "{\n            iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);\n            if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }\n          }" { (expression_statement "iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0);" (assignment_expression "iVar2 = sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0)" identifier = (call_expression "sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0)" identifier (argument_list "((sqlite3 *)"RELEASE fts3",zSql,(sqlite3_callback)p->db,\n                                 "RELEASE fts3",(char **)0x0)" ( (cast_expression "(sqlite3 *)"RELEASE fts3"" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""RELEASE fts3"" " string_content ")) , identifier , (cast_expression "(sqlite3_callback)p->db" ( (type_descriptor "sqlite3_callback" type_identifier) ) (field_expression "p->db" identifier -> field_identifier)) , (string_literal ""RELEASE fts3"" " string_content ") , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) )))) ;) (if_statement "if (iVar2 != 0) {\n              iVar3 = iVar2;\n            }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n              iVar3 = iVar2;\n            }" { (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) })) }) (else_clause "else {\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }" else (compound_statement "{\n            sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);\n            sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);\n          }" { (expression_statement "sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0);" (call_expression "sqlite3_exec((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0)" identifier (argument_list "((sqlite3 *)"ROLLBACK TO fts3",zSql,(sqlite3_callback)p->db,\n                         "ROLLBACK TO fts3",(char **)0x0)" ( (cast_expression "(sqlite3 *)"ROLLBACK TO fts3"" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""ROLLBACK TO fts3"" " string_content ")) , identifier , (cast_expression "(sqlite3_callback)p->db" ( (type_descriptor "sqlite3_callback" type_identifier) ) (field_expression "p->db" identifier -> field_identifier)) , (string_literal ""ROLLBACK TO fts3"" " string_content ") , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) ))) ;) (expression_statement "sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0);" (call_expression "sqlite3_exec((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0)" identifier (argument_list "((sqlite3 *)"RELEASE fts3",zSql_00,(sqlite3_callback)p->db,"RELEASE fts3",\n                         (char **)0x0)" ( (cast_expression "(sqlite3 *)"RELEASE fts3"" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""RELEASE fts3"" " string_content ")) , identifier , (cast_expression "(sqlite3_callback)p->db" ( (type_descriptor "sqlite3_callback" type_identifier) ) (field_expression "p->db" identifier -> field_identifier)) , (string_literal ""RELEASE fts3"" " string_content ") , (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 (iVar3 == 0) {\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;\n          return;\n        }" { (expression_statement "setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)\n          ;" (call_expression "setResultStrOrError(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)" identifier (argument_list "(pContext,"Index optimized",0,(u8)pContext,(_func_void_void_ptr *)nVal)" ( identifier , (string_literal ""Index optimized"" " string_content ") , number_literal , (cast_expression "(u8)pContext" ( (type_descriptor "u8" type_identifier) ) identifier) , (cast_expression "(_func_void_void_ptr *)nVal" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar3 == 0x65) {\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }" if (parenthesized_expression "(iVar3 == 0x65)" ( (binary_expression "iVar3 == 0x65" identifier == number_literal) )) (compound_statement "{\n          setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);\n          return;\n        }" { (expression_statement "setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal);" (call_expression "setResultStrOrError(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal)" identifier (argument_list "(pContext,"Index already optimal",0,(u8)pContext,\n                              (_func_void_void_ptr *)nVal)" ( identifier , (string_literal ""Index already optimal"" " string_content ") , number_literal , (cast_expression "(u8)pContext" ( (type_descriptor "u8" type_identifier) ) identifier) , (cast_expression "(_func_void_void_ptr *)nVal" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (return_statement "return;" return ;) })) (expression_statement "sqlite3_result_error_code(pContext,iVar3);" (call_expression "sqlite3_result_error_code(pContext,iVar3)" identifier (argument_list "(pContext,iVar3)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })) })) })) (expression_statement "xDel = "optimize";" (assignment_expression "xDel = "optimize"" identifier = (string_literal ""optimize"" " string_content ")) ;) (expression_statement "z = sqlite3_mprintf("illegal first argument to %s");" (assignment_expression "z = sqlite3_mprintf("illegal first argument to %s")" identifier = (call_expression "sqlite3_mprintf("illegal first argument to %s")" identifier (argument_list "("illegal first argument to %s")" ( (string_literal ""illegal first argument to %s"" " string_content ") )))) ;) (expression_statement "pContext->isError = 1;" (assignment_expression "pContext->isError = 1" (field_expression "pContext->isError" identifier -> field_identifier) = number_literal) ;) (expression_statement "sqlite3VdbeMemSetStr(pContext->pOut,z,1,0xff,(_func_void_void_ptr *)xDel);" (call_expression "sqlite3VdbeMemSetStr(pContext->pOut,z,1,0xff,(_func_void_void_ptr *)xDel)" identifier (argument_list "(pContext->pOut,z,1,0xff,(_func_void_void_ptr *)xDel)" ( (field_expression "pContext->pOut" identifier -> field_identifier) , identifier , number_literal , number_literal , (cast_expression "(_func_void_void_ptr *)xDel" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (expression_statement "sqlite3_free(z);" (call_expression "sqlite3_free(z)" identifier (argument_list "(z)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0013a870(int param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  param_3 = (undefined4 *)*param_3;\n  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }\n  FUN_000a3060("illegal first argument to %s","optimize");\n  *(undefined4 *)(param_1 + 0x14) = 1;\n  FUN_0006f5d0(0xffffffff);\n  FUN_00044000();\n  return;\n}\n\n" (function_definition "void FUN_0013a870(int param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  param_3 = (undefined4 *)*param_3;\n  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }\n  FUN_000a3060("illegal first argument to %s","optimize");\n  *(undefined4 *)(param_1 + 0x14) = 1;\n  FUN_0006f5d0(0xffffffff);\n  FUN_00044000();\n  return;\n}" primitive_type (function_declarator "FUN_0013a870(int param_1,undefined4 param_2,undefined4 *param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  param_3 = (undefined4 *)*param_3;\n  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }\n  FUN_000a3060("illegal first argument to %s","optimize");\n  *(undefined4 *)(param_1 + 0x14) = 1;\n  FUN_0006f5d0(0xffffffff);\n  FUN_00044000();\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "param_3 = (undefined4 *)*param_3;" (assignment_expression "param_3 = (undefined4 *)*param_3" identifier = (cast_expression "(undefined4 *)*param_3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) ;) (if_statement "if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }" if (parenthesized_expression "((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201)" ( (binary_expression "(*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201" (parenthesized_expression "(*(ushort *)(param_3 + 2) & 0xc3ff)" ( (binary_expression "*(ushort *)(param_3 + 2) & 0xc3ff" (pointer_expression "*(ushort *)(param_3 + 2)" * (cast_expression "(ushort *)(param_3 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 2)" ( (binary_expression "param_3 + 2" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }" { (expression_statement "bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;" (assignment_expression "bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70" identifier = (binary_expression "*(byte *)((int)param_3 + 0xb) < 0x70" (pointer_expression "*(byte *)((int)param_3 + 0xb)" * (cast_expression "(byte *)((int)param_3 + 0xb)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + 0xb)" ( (binary_expression "(int)param_3 + 0xb" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) < number_literal)) ;) (expression_statement "bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;" (assignment_expression "bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70" identifier = (binary_expression "*(byte *)((int)param_3 + 0xb) == 0x70" (pointer_expression "*(byte *)((int)param_3 + 0xb)" * (cast_expression "(byte *)((int)param_3 + 0xb)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + 0xb)" ( (binary_expression "(int)param_3 + 0xb" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == number_literal)) ;) (if_statement "if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }" if (parenthesized_expression "(bVar7)" ( identifier )) (compound_statement "{\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }" { (expression_statement "iVar3 = 0xb;" (assignment_expression "iVar3 = 0xb" identifier = number_literal) ;) (expression_statement "pbVar4 = (byte *)*param_3;" (assignment_expression "pbVar4 = (byte *)*param_3" identifier = (cast_expression "(byte *)*param_3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) ;) (expression_statement "pbVar5 = (byte *)"fts3cursor";" (assignment_expression "pbVar5 = (byte *)"fts3cursor"" identifier = (cast_expression "(byte *)"fts3cursor"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""fts3cursor"" " string_content "))) ;) (do_statement "do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);" do (compound_statement "{\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      }" { (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "bVar6 = *pbVar4 < *pbVar5;" (assignment_expression "bVar6 = *pbVar4 < *pbVar5" identifier = (binary_expression "*pbVar4 < *pbVar5" (pointer_expression "*pbVar4" * identifier) < (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "bVar7 = *pbVar4 == *pbVar5;" (assignment_expression "bVar7 = *pbVar4 == *pbVar5" identifier = (binary_expression "*pbVar4 == *pbVar5" (pointer_expression "*pbVar4" * identifier) == (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "pbVar5 = pbVar5 + 1;" (assignment_expression "pbVar5 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar7)" ( identifier )) ;) (if_statement "if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }" if (parenthesized_expression "(((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0))" ( (binary_expression "((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)" (parenthesized_expression "((!bVar6 && !bVar7) == bVar6)" ( (binary_expression "(!bVar6 && !bVar7) == bVar6" (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) == identifier) )) && (parenthesized_expression "((int *)param_3[4] != (int *)0x0)" ( (binary_expression "(int *)param_3[4] != (int *)0x0" (cast_expression "(int *)param_3[4]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_3[4]" identifier [ number_literal ])) != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }" { (expression_statement "iVar3 = *(int *)param_3[4];" (assignment_expression "iVar3 = *(int *)param_3[4]" identifier = (pointer_expression "*(int *)param_3[4]" * (cast_expression "(int *)param_3[4]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_3[4]" identifier [ number_literal ])))) ;) (expression_statement "iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);" (assignment_expression "iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0)" identifier = (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) , (string_literal ""SAVEPOINT fts3"" " string_content ") , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }" { (expression_statement "iVar1 = FUN_00139450();" (assignment_expression "iVar1 = FUN_00139450()" identifier = (call_expression "FUN_00139450()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\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 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }" { (expression_statement "iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);" (assignment_expression "iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" identifier = (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) , (string_literal ""RELEASE fts3"" " string_content ") , number_literal , number_literal , 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            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }" else (compound_statement "{\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }" { (expression_statement "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);" (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) , (string_literal ""ROLLBACK TO fts3"" " string_content ") , number_literal , number_literal , number_literal ))) ;) (expression_statement "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);" (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) , (string_literal ""RELEASE fts3"" " string_content ") , number_literal , number_literal , number_literal ))) ;) }))) })) (expression_statement "FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));" (call_expression "FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8))" identifier (argument_list "(*(undefined4 *)(iVar3 + 0xf8))" ( (pointer_expression "*(undefined4 *)(iVar3 + 0xf8)" * (cast_expression "(undefined4 *)(iVar3 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xf8)" ( (binary_expression "iVar3 + 0xf8" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(iVar3 + 0xf8) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 0xf8) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 0xf8)" * (cast_expression "(undefined4 *)(iVar3 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xf8)" ( (binary_expression "iVar3 + 0xf8" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          FUN_00070c50();\n          return;\n        }" { (expression_statement "FUN_00070c50();" (call_expression "FUN_00070c50()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0x65)" ( (binary_expression "iVar1 == 0x65" identifier == number_literal) )) (compound_statement "{\n          FUN_00070c50();\n          return;\n        }" { (expression_statement "FUN_00070c50();" (call_expression "FUN_00070c50()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0006feb0();" (call_expression "FUN_0006feb0()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) })) })) (expression_statement "FUN_000a3060("illegal first argument to %s","optimize");" (call_expression "FUN_000a3060("illegal first argument to %s","optimize")" identifier (argument_list "("illegal first argument to %s","optimize")" ( (string_literal ""illegal first argument to %s"" " string_content ") , (string_literal ""optimize"" " string_content ") ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x14) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0006f5d0(0xffffffff);" (call_expression "FUN_0006f5d0(0xffffffff)" identifier (argument_list "(0xffffffff)" ( number_literal ))) ;) (expression_statement "FUN_00044000();" (call_expression "FUN_00044000()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) < LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (string_literal " string_content "))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) == IDENT) )) && (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (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 ( ))) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) })) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0013a870(int param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  param_3 = (undefined4 *)*param_3;\n  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }\n  FUN_000a3060("illegal first argument to %s","optimize");\n  *(undefined4 *)(param_1 + 0x14) = 1;\n  FUN_0006f5d0(0xffffffff);\n  FUN_00044000();\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0013a870(int param_1,undefined4 param_2,undefined4 *param_3)" (identifier "FUN_0013a870") (parameter_list "(int param_1,undefined4 param_2,undefined4 *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  param_3 = (undefined4 *)*param_3;\n  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }\n  FUN_000a3060("illegal first argument to %s","optimize");\n  *(undefined4 *)(param_1 + 0x14) = 1;\n  FUN_0006f5d0(0xffffffff);\n  FUN_00044000();\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 "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "bool bVar6;" (primitive_type "bool") (identifier "bVar6") (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (expression_statement "param_3 = (undefined4 *)*param_3;" (assignment_expression "param_3 = (undefined4 *)*param_3" (identifier "param_3") (= "=") (cast_expression "(undefined4 *)*param_3" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_3" (* "*") (identifier "param_3")))) (; ";")) (if_statement "if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }" (if "if") (parenthesized_expression "((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201)" (( "(") (binary_expression "(*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201" (parenthesized_expression "(*(ushort *)(param_3 + 2) & 0xc3ff)" (( "(") (binary_expression "*(ushort *)(param_3 + 2) & 0xc3ff" (pointer_expression "*(ushort *)(param_3 + 2)" (* "*") (cast_expression "(ushort *)(param_3 + 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 2)" (( "(") (binary_expression "param_3 + 2" (identifier "param_3") (+ "+") (number_literal "2")) () ")")))) (& "&") (number_literal "0xc3ff")) () ")")) (== "==") (number_literal "0x8201")) () ")")) (compound_statement "{\n    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;\n    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;\n    if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }\n  }" ({ "{") (expression_statement "bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;" (assignment_expression "bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70" (identifier "bVar6") (= "=") (binary_expression "*(byte *)((int)param_3 + 0xb) < 0x70" (pointer_expression "*(byte *)((int)param_3 + 0xb)" (* "*") (cast_expression "(byte *)((int)param_3 + 0xb)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_3 + 0xb)" (( "(") (binary_expression "(int)param_3 + 0xb" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (+ "+") (number_literal "0xb")) () ")")))) (< "<") (number_literal "0x70"))) (; ";")) (expression_statement "bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;" (assignment_expression "bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70" (identifier "bVar7") (= "=") (binary_expression "*(byte *)((int)param_3 + 0xb) == 0x70" (pointer_expression "*(byte *)((int)param_3 + 0xb)" (* "*") (cast_expression "(byte *)((int)param_3 + 0xb)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_3 + 0xb)" (( "(") (binary_expression "(int)param_3 + 0xb" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (+ "+") (number_literal "0xb")) () ")")))) (== "==") (number_literal "0x70"))) (; ";")) (if_statement "if (bVar7) {\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }" (if "if") (parenthesized_expression "(bVar7)" (( "(") (identifier "bVar7") () ")")) (compound_statement "{\n      iVar3 = 0xb;\n      pbVar4 = (byte *)*param_3;\n      pbVar5 = (byte *)"fts3cursor";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);\n      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }\n    }" ({ "{") (expression_statement "iVar3 = 0xb;" (assignment_expression "iVar3 = 0xb" (identifier "iVar3") (= "=") (number_literal "0xb")) (; ";")) (expression_statement "pbVar4 = (byte *)*param_3;" (assignment_expression "pbVar4 = (byte *)*param_3" (identifier "pbVar4") (= "=") (cast_expression "(byte *)*param_3" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_3" (* "*") (identifier "param_3")))) (; ";")) (expression_statement "pbVar5 = (byte *)"fts3cursor";" (assignment_expression "pbVar5 = (byte *)"fts3cursor"" (identifier "pbVar5") (= "=") (cast_expression "(byte *)"fts3cursor"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""fts3cursor"" (" """) (string_content "fts3cursor") (" """)))) (; ";")) (do_statement "do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      } while (bVar7);" (do "do") (compound_statement "{\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + 1;\n        pbVar5 = pbVar5 + 1;\n      }" ({ "{") (if_statement "if (iVar3 == 0) break;" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar6 = *pbVar4 < *pbVar5;" (assignment_expression "bVar6 = *pbVar4 < *pbVar5" (identifier "bVar6") (= "=") (binary_expression "*pbVar4 < *pbVar5" (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")) (< "<") (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")))) (; ";")) (expression_statement "bVar7 = *pbVar4 == *pbVar5;" (assignment_expression "bVar7 = *pbVar4 == *pbVar5" (identifier "bVar7") (= "=") (binary_expression "*pbVar4 == *pbVar5" (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")) (== "==") (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")))) (; ";")) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar5 = pbVar5 + 1;" (assignment_expression "pbVar5 = pbVar5 + 1" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + 1" (identifier "pbVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar7)" (( "(") (identifier "bVar7") () ")")) (; ";")) (if_statement "if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }" (if "if") (parenthesized_expression "(((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0))" (( "(") (binary_expression "((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)" (parenthesized_expression "((!bVar6 && !bVar7) == bVar6)" (( "(") (binary_expression "(!bVar6 && !bVar7) == bVar6" (parenthesized_expression "(!bVar6 && !bVar7)" (( "(") (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" (! "!") (identifier "bVar6")) (&& "&&") (unary_expression "!bVar7" (! "!") (identifier "bVar7"))) () ")")) (== "==") (identifier "bVar6")) () ")")) (&& "&&") (parenthesized_expression "((int *)param_3[4] != (int *)0x0)" (( "(") (binary_expression "(int *)param_3[4] != (int *)0x0" (cast_expression "(int *)param_3[4]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_3[4]" (identifier "param_3") ([ "[") (number_literal "4") (] "]"))) (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (compound_statement "{\n        iVar3 = *(int *)param_3[4];\n        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);\n        if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }\n        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));\n        *(undefined4 *)(iVar3 + 0xf8) = 0;\n        if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }\n        if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }\n        FUN_0006feb0();\n        return;\n      }" ({ "{") (expression_statement "iVar3 = *(int *)param_3[4];" (assignment_expression "iVar3 = *(int *)param_3[4]" (identifier "iVar3") (= "=") (pointer_expression "*(int *)param_3[4]" (* "*") (cast_expression "(int *)param_3[4]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_3[4]" (identifier "param_3") ([ "[") (number_literal "4") (] "]"))))) (; ";")) (expression_statement "iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);" (assignment_expression "iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0)" (identifier "iVar1") (= "=") (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0)" (identifier "FUN_000e9460") (argument_list "(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0)" (( "(") (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc)" (( "(") (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (string_literal ""SAVEPOINT fts3"" (" """) (string_content "SAVEPOINT fts3") (" """)) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          iVar1 = FUN_00139450();\n          if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }\n        }" ({ "{") (expression_statement "iVar1 = FUN_00139450();" (assignment_expression "iVar1 = FUN_00139450()" (identifier "iVar1") (= "=") (call_expression "FUN_00139450()" (identifier "FUN_00139450") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((iVar1 == 0) || (iVar1 == 0x65)) {\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }\n          else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }" (if "if") (parenthesized_expression "((iVar1 == 0) || (iVar1 == 0x65))" (( "(") (binary_expression "(iVar1 == 0) || (iVar1 == 0x65)" (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(iVar1 == 0x65)" (( "(") (binary_expression "iVar1 == 0x65" (identifier "iVar1") (== "==") (number_literal "0x65")) () ")"))) () ")")) (compound_statement "{\n            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n            if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }\n          }" ({ "{") (expression_statement "iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);" (assignment_expression "iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" (identifier "iVar2") (= "=") (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" (identifier "FUN_000e9460") (argument_list "(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" (( "(") (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc)" (( "(") (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (string_literal ""RELEASE fts3"" (" """) (string_content "RELEASE fts3") (" """)) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n              iVar1 = iVar2;\n            }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n              iVar1 = iVar2;\n            }" ({ "{") (expression_statement "iVar1 = iVar2;" (assignment_expression "iVar1 = iVar2" (identifier "iVar1") (= "=") (identifier "iVar2")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }" (else "else") (compound_statement "{\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);\n            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);\n          }" ({ "{") (expression_statement "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);" (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0)" (identifier "FUN_000e9460") (argument_list "(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0)" (( "(") (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc)" (( "(") (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (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_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);" (call_expression "FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" (identifier "FUN_000e9460") (argument_list "(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0)" (( "(") (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc)" (( "(") (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (string_literal ""RELEASE fts3"" (" """) (string_content "RELEASE fts3") (" """)) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}")))) (} "}"))) (expression_statement "FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));" (call_expression "FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8))" (identifier "FUN_000c0610") (argument_list "(*(undefined4 *)(iVar3 + 0xf8))" (( "(") (pointer_expression "*(undefined4 *)(iVar3 + 0xf8)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0xf8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xf8)" (( "(") (binary_expression "iVar3 + 0xf8" (identifier "iVar3") (+ "+") (number_literal "0xf8")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 0xf8) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 0xf8) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 0xf8)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0xf8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xf8)" (( "(") (binary_expression "iVar3 + 0xf8" (identifier "iVar3") (+ "+") (number_literal "0xf8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar1 == 0) {\n          FUN_00070c50();\n          return;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          FUN_00070c50();\n          return;\n        }" ({ "{") (expression_statement "FUN_00070c50();" (call_expression "FUN_00070c50()" (identifier "FUN_00070c50") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (iVar1 == 0x65) {\n          FUN_00070c50();\n          return;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0x65)" (( "(") (binary_expression "iVar1 == 0x65" (identifier "iVar1") (== "==") (number_literal "0x65")) () ")")) (compound_statement "{\n          FUN_00070c50();\n          return;\n        }" ({ "{") (expression_statement "FUN_00070c50();" (call_expression "FUN_00070c50()" (identifier "FUN_00070c50") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0006feb0();" (call_expression "FUN_0006feb0()" (identifier "FUN_0006feb0") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (} "}"))) (expression_statement "FUN_000a3060("illegal first argument to %s","optimize");" (call_expression "FUN_000a3060("illegal first argument to %s","optimize")" (identifier "FUN_000a3060") (argument_list "("illegal first argument to %s","optimize")" (( "(") (string_literal ""illegal first argument to %s"" (" """) (string_content "illegal first argument to %s") (" """)) (, ",") (string_literal ""optimize"" (" """) (string_content "optimize") (" """)) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x14) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "FUN_0006f5d0(0xffffffff);" (call_expression "FUN_0006f5d0(0xffffffff)" (identifier "FUN_0006f5d0") (argument_list "(0xffffffff)" (( "(") (number_literal "0xffffffff") () ")"))) (; ";")) (expression_statement "FUN_00044000();" (call_expression "FUN_00044000()" (identifier "FUN_00044000") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

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

{
  type_2 *psVar1;
  type_3 *p;
  char *z;
  int var_9;
  int var_1;
  char var_5;
  char *zSql;
  char *zSql_00;
  type_4 *var_2;
  type_4 *var_3;
  bool var_4;
  bool bVar8;
  char *xDel;
  
  psVar1 = *apVal;
  if ((psVar1->flags & 0xc3ff) == 0x8201) {
    var_4 = psVar1->eSubtype < 0x70;
    bVar8 = psVar1->eSubtype == 0x70;
    if (bVar8) {
      var_1 = 0xb;
      var_2 = (type_4 *)(psVar1->u).zPType;
      var_3 = (type_4 *)"fts3cursor";
      do {
        if (var_1 == 0) break;
        var_1 = var_1 + -1;
        var_4 = *var_2 < *var_3;
        bVar8 = *var_2 == *var_3;
        var_2 = var_2 + 1;
        var_3 = var_3 + 1;
      } while (bVar8);
      var_5 = (!var_4 && !bVar8) - var_4;
      if ((var_5 == '\0') && (psVar1->z != (char *)0x0)) {
        p = *(type_3 **)psVar1->z;
        var_1 = var_6((type_5 *)"SAVEPOINT fts3",(char *)(type_6)var_7(0x82,var_5),
                             (type_7)p->db,"SAVEPOINT fts3",(char **)0x0);
        if (var_1 == 0) {
          var_1 = var_8(p,1);
          if ((var_1 == 0) || (var_1 == 0x65)) {
            var_9 = var_6((type_5 *)"RELEASE fts3",zSql,(type_7)p->db,
                                 "RELEASE fts3",(char **)0x0);
            if (var_9 != 0) {
              var_1 = var_9;
            }
          }
          else {
            var_6((type_5 *)"ROLLBACK TO fts3",zSql,(type_7)p->db,
                         "ROLLBACK TO fts3",(char **)0x0);
            var_6((type_5 *)"RELEASE fts3",zSql_00,(type_7)p->db,"RELEASE fts3",
                         (char **)0x0);
          }
        }
        var_10(p->pSegments);
        p->pSegments = (type_8 *)0x0;
        if (var_1 == 0) {
          var_11(pContext,"Index optimized",0,(type_9)pContext,(type_10 *)nVal)
          ;
          return;
        }
        if (var_1 == 0x65) {
          var_11(pContext,"Index already optimal",0,(type_9)pContext,
                              (type_10 *)nVal);
          return;
        }
        var_12(pContext,var_1);
        return;
      }
    }
  }
  xDel = "optimize";
  z = var_13("illegal first argument to %s");
  pContext->isError = 1;
  var_14(pContext->pOut,z,1,0xff,(type_10 *)xDel);
  var_15(z);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator 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: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_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))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (string_literal (string_content))))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (identifier)) right: (unary_expression argument: (identifier)))) right: (identifier))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (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))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (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(int param_1,undefined4 param_2,undefined4 *param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  byte *pbVar4;
  byte *pbVar5;
  bool bVar6;
  bool bVar7;
  
  param_3 = (undefined4 *)*param_3;
  if ((*(ushort *)(param_3 + 2) & 0xc3ff) == 0x8201) {
    bVar6 = *(byte *)((int)param_3 + 0xb) < 0x70;
    bVar7 = *(byte *)((int)param_3 + 0xb) == 0x70;
    if (bVar7) {
      iVar3 = 0xb;
      pbVar4 = (byte *)*param_3;
      pbVar5 = (byte *)"fts3cursor";
      do {
        if (iVar3 == 0) break;
        iVar3 = iVar3 + -1;
        bVar6 = *pbVar4 < *pbVar5;
        bVar7 = *pbVar4 == *pbVar5;
        pbVar4 = pbVar4 + 1;
        pbVar5 = pbVar5 + 1;
      } while (bVar7);
      if (((!bVar6 && !bVar7) == bVar6) && ((int *)param_3[4] != (int *)0x0)) {
        iVar3 = *(int *)param_3[4];
        iVar1 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"SAVEPOINT fts3",0,0,0);
        if (iVar1 == 0) {
          iVar1 = FUN_00139450();
          if ((iVar1 == 0) || (iVar1 == 0x65)) {
            iVar2 = FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);
            if (iVar2 != 0) {
              iVar1 = iVar2;
            }
          }
          else {
            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"ROLLBACK TO fts3",0,0,0);
            FUN_000e9460(*(undefined4 *)(iVar3 + 0xc),"RELEASE fts3",0,0,0);
          }
        }
        FUN_000c0610(*(undefined4 *)(iVar3 + 0xf8));
        *(undefined4 *)(iVar3 + 0xf8) = 0;
        if (iVar1 == 0) {
          FUN_00070c50();
          return;
        }
        if (iVar1 == 0x65) {
          FUN_00070c50();
          return;
        }
        FUN_0006feb0();
        return;
      }
    }
  }
  FUN_000a3060("illegal first argument to %s","optimize");
  *(undefined4 *)(param_1 + 0x14) = 1;
  FUN_0006f5d0(0xffffffff);
  FUN_00044000();
  return;
}

