
int sqlite3Close(sqlite3 *db,int forceZombie)

{
  Schema *pSVar1;
  HashElem *pHVar2;
  Table *p;
  int iVar3;
  long lVar4;
  
  if (db != (sqlite3 *)0x0) {
    iVar3 = sqlite3SafetyCheckSickOrOk(db);
    if (iVar3 == 0) {
      iVar3 = sqlite3MisuseError(0x25cc1);
    }
    else {
      sqlite3_mutex_enter(db->mutex);
      if ((db->mTrace & 8) != 0) {
        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);
      }
      sqlite3BtreeEnterAll(db);
      if (0 < db->nDb) {
        lVar4 = 0;
        do {
          pSVar1 = db->aDb[lVar4].pSchema;
          if (pSVar1 != (Schema *)0x0) {
            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)
            {
              if (((Table *)pHVar2->data)->nModuleArg != 0) {
                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);
              }
            }
          }
          lVar4 = lVar4 + 1;
        } while ((int)lVar4 < db->nDb);
      }
      for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {
        p = *(Table **)((long)pHVar2->data + 0x20);
        if (p != (Table *)0x0) {
          sqlite3VtabDisconnect(db,p);
        }
      }
      sqlite3VtabUnlockList(db);
      sqlite3BtreeLeaveAll(db);
      callFinaliser(db,0x88);
      if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {
        sqlite3ErrorWithMsg(db,5,
                            "unable to close due to unfinalized statements or unfinished backups");
        sqlite3_mutex_leave(db->mutex);
        iVar3 = 5;
      }
      else {
        db->magic = 0x64cffc7f;
        sqlite3LeaveMutexAndCloseZombie(db);
        iVar3 = 0;
      }
    }
    return iVar3;
  }
  return 0;
}



undefined8 FUN_0018b7d8(long param_1,int param_2)

{
  long lVar1;
  undefined8 *puVar2;
  int iVar3;
  undefined8 uVar4;
  long lVar5;
  
  if (param_1 != 0) {
    iVar3 = FUN_0015afa7();
    if (iVar3 == 0) {
      uVar4 = FUN_00159c59(0x25cc1);
    }
    else {
      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));
      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {
        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);
      }
      FUN_0013f226(param_1);
      if (0 < *(int *)(param_1 + 0x28)) {
        lVar5 = 0;
        do {
          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);
          if (lVar1 != 0) {
            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;
                puVar2 = (undefined8 *)*puVar2) {
              if (*(int *)(puVar2[2] + 0x54) != 0) {
                FUN_00141ee1(param_1);
              }
            }
          }
          lVar5 = lVar5 + 1;
        } while ((int)lVar5 < *(int *)(param_1 + 0x28));
      }
      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;
          puVar2 = (undefined8 *)*puVar2) {
        if (*(long *)(puVar2[2] + 0x20) != 0) {
          FUN_00141ee1(param_1);
        }
      }
      FUN_00141f29(param_1);
      FUN_0012cc4a(param_1);
      FUN_00142057(param_1,0x88);
      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {
        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"
                    );
        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));
        uVar4 = 5;
      }
      else {
        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;
        FUN_0018b471(param_1);
        uVar4 = 0;
      }
    }
    return uVar4;
  }
  return 0;
}


MOV EAX,0x0
TEST RDI,RDI
JZ 0x0018b935
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R13D,ESI
MOV RBX,RDI
CALL 0x0015afa7
TEST EAX,EAX
JZ 0x0018b83e
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0012a8c7
TEST byte ptr [RBX + 0x68],0x8
JZ 0x0018b828
MOV RSI,qword ptr [RBX + 0xe0]
MOV ECX,0x0
MOV RDX,RBX
MOV EDI,0x8
CALL qword ptr [RBX + 0xd8]
MOV RDI,RBX
CALL 0x0013f226
CMP dword ptr [RBX + 0x28],0x0
JLE 0x0018b893
MOV R12D,0x0
JMP 0x0018b874
MOV EDI,0x25cc1
CALL 0x00159c59
JMP 0x0018b8e1
MOV RDI,RBX
CALL 0x00141ee1
MOV RBP,qword ptr [RBP]
TEST RBP,RBP
JZ 0x0018b86a
MOV RSI,qword ptr [RBP + 0x10]
CMP dword ptr [RSI + 0x54],0x0
JZ 0x0018b855
JMP 0x0018b84d
ADD R12,0x1
CMP dword ptr [RBX + 0x28],R12D
JLE 0x0018b893
MOV RAX,R12
SHL RAX,0x5
ADD RAX,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x0018b86a
MOV RBP,qword ptr [RAX + 0x10]
TEST RBP,RBP
JNZ 0x0018b85e
JMP 0x0018b86a
MOV RBP,qword ptr [RBX + 0x1e0]
TEST RBP,RBP
JNZ 0x0018b8fd
MOV RDI,RBX
CALL 0x00141f29
MOV RDI,RBX
CALL 0x0012cc4a
MOV ESI,0x88
MOV RDI,RBX
CALL 0x00142057
TEST R13D,R13D
JNZ 0x0018b8cd
MOV RDI,RBX
CALL 0x0013139a
TEST EAX,EAX
JNZ 0x0018b90c
MOV dword ptr [RBX + 0x70],0x64cffc7f
MOV RDI,RBX
CALL 0x0018b471
MOV EAX,0x0
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
MOV RDI,RBX
CALL 0x00141ee1
MOV RBP,qword ptr [RBP]
TEST RBP,RBP
JZ 0x0018b89f
MOV RAX,qword ptr [RBP + 0x10]
MOV RSI,qword ptr [RAX + 0x20]
TEST RSI,RSI
JNZ 0x0018b8ec
JMP 0x0018b8f4
LEA RDX,[0x201ad8]
MOV ESI,0x5
MOV RDI,RBX
MOV EAX,0x0
CALL 0x0015ec39
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0012a8f6
MOV EAX,0x5
JMP 0x0018b8e1
RET
(translation_unit "undefined8 FUN_0018b7d8(long param_1,int param_2)\n\n{\n  long lVar1;\n  undefined8 *puVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long lVar5;\n  \n  if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_0018b7d8(long param_1,int param_2)\n\n{\n  long lVar1;\n  undefined8 *puVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long lVar5;\n  \n  if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0018b7d8(long param_1,int param_2)" identifier (parameter_list "(long param_1,int param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  undefined8 *puVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long lVar5;\n  \n  if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }\n  return 0;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }" { (expression_statement "iVar3 = FUN_0015afa7();" (assignment_expression "iVar3 = FUN_0015afa7()" identifier = (call_expression "FUN_0015afa7()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar4 = FUN_00159c59(0x25cc1);\n    }" { (expression_statement "uVar4 = FUN_00159c59(0x25cc1);" (assignment_expression "uVar4 = FUN_00159c59(0x25cc1)" identifier = (call_expression "FUN_00159c59(0x25cc1)" identifier (argument_list "(0x25cc1)" ( number_literal )))) ;) }) (else_clause "else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }" else (compound_statement "{\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }" { (expression_statement "FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));" (call_expression "FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))) ;) (if_statement "if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }" if (parenthesized_expression "((*(byte *)(param_1 + 0x68) & 8) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x68) & 8) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x68) & 8)" ( (binary_expression "*(byte *)(param_1 + 0x68) & 8" (pointer_expression "*(byte *)(param_1 + 0x68)" * (cast_expression "(byte *)(param_1 + 0x68)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x68)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }" { (expression_statement "(**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);" (call_expression "(**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0)" (parenthesized_expression "(**(code **)(param_1 + 0xd8))" ( (pointer_expression "**(code **)(param_1 + 0xd8)" * (pointer_expression "*(code **)(param_1 + 0xd8)" * (cast_expression "(code **)(param_1 + 0xd8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xd8)" ( (binary_expression "param_1 + 0xd8" identifier + number_literal) ))))) )) (argument_list "(8,*(undefined8 *)(param_1 + 0xe0),param_1,0)" ( number_literal , (pointer_expression "*(undefined8 *)(param_1 + 0xe0)" * (cast_expression "(undefined8 *)(param_1 + 0xe0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) , identifier , number_literal ))) ;) })) (expression_statement "FUN_0013f226(param_1);" (call_expression "FUN_0013f226(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (if_statement "if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }" if (parenthesized_expression "(0 < *(int *)(param_1 + 0x28))" ( (binary_expression "0 < *(int *)(param_1 + 0x28)" number_literal < (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }" { (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));" do (compound_statement "{\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        }" { (expression_statement "lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);" (assignment_expression "lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" identifier = (pointer_expression "*(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" * (cast_expression "(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" ( (binary_expression "lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18" (binary_expression "lVar5 * 0x20 + *(long *)(param_1 + 0x20)" (binary_expression "lVar5 * 0x20" identifier * number_literal) + (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) + number_literal) ))))) ;) (if_statement "if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }" if (parenthesized_expression "(lVar1 != 0)" ( (binary_expression "lVar1 != 0" identifier != number_literal) )) (compound_statement "{\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }" { (for_statement "for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }" for ( (assignment_expression "puVar2 = *(undefined8 **)(lVar1 + 0x10)" identifier = (pointer_expression "*(undefined8 **)(lVar1 + 0x10)" * (cast_expression "(undefined8 **)(lVar1 + 0x10)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar1 + 0x10)" ( (binary_expression "lVar1 + 0x10" identifier + number_literal) ))))) ; (binary_expression "puVar2 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "puVar2 = (undefined8 *)*puVar2" identifier = (cast_expression "(undefined8 *)*puVar2" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) ) (compound_statement "{\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }" { (if_statement "if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }" if (parenthesized_expression "(*(int *)(puVar2[2] + 0x54) != 0)" ( (binary_expression "*(int *)(puVar2[2] + 0x54) != 0" (pointer_expression "*(int *)(puVar2[2] + 0x54)" * (cast_expression "(int *)(puVar2[2] + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2[2] + 0x54)" ( (binary_expression "puVar2[2] + 0x54" (subscript_expression "puVar2[2]" identifier [ number_literal ]) + number_literal) )))) != number_literal) )) (compound_statement "{\n                FUN_00141ee1(param_1);\n              }" { (expression_statement "FUN_00141ee1(param_1);" (call_expression "FUN_00141ee1(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) })) })) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((int)lVar5 < *(int *)(param_1 + 0x28))" ( (binary_expression "(int)lVar5 < *(int *)(param_1 + 0x28)" (cast_expression "(int)lVar5" ( (type_descriptor "int" primitive_type) ) identifier) < (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) )) ;) })) (for_statement "for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }" for ( (assignment_expression "puVar2 = *(undefined8 **)(param_1 + 0x1e0)" identifier = (pointer_expression "*(undefined8 **)(param_1 + 0x1e0)" * (cast_expression "(undefined8 **)(param_1 + 0x1e0)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1e0)" ( (binary_expression "param_1 + 0x1e0" identifier + number_literal) ))))) ; (binary_expression "puVar2 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "puVar2 = (undefined8 *)*puVar2" identifier = (cast_expression "(undefined8 *)*puVar2" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) ) (compound_statement "{\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }" { (if_statement "if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }" if (parenthesized_expression "(*(long *)(puVar2[2] + 0x20) != 0)" ( (binary_expression "*(long *)(puVar2[2] + 0x20) != 0" (pointer_expression "*(long *)(puVar2[2] + 0x20)" * (cast_expression "(long *)(puVar2[2] + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2[2] + 0x20)" ( (binary_expression "puVar2[2] + 0x20" (subscript_expression "puVar2[2]" identifier [ number_literal ]) + number_literal) )))) != number_literal) )) (compound_statement "{\n          FUN_00141ee1(param_1);\n        }" { (expression_statement "FUN_00141ee1(param_1);" (call_expression "FUN_00141ee1(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) })) (expression_statement "FUN_00141f29(param_1);" (call_expression "FUN_00141f29(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "FUN_0012cc4a(param_1);" (call_expression "FUN_0012cc4a(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "FUN_00142057(param_1,0x88);" (call_expression "FUN_00142057(param_1,0x88)" identifier (argument_list "(param_1,0x88)" ( identifier , number_literal ))) ;) (if_statement "if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }" if (parenthesized_expression "((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0))" ( (binary_expression "(param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar3 = FUN_0013139a(param_1), iVar3 != 0)" ( (comma_expression "iVar3 = FUN_0013139a(param_1), iVar3 != 0" (assignment_expression "iVar3 = FUN_0013139a(param_1)" identifier = (call_expression "FUN_0013139a(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }" { (expression_statement "FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );" (call_expression "FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    )" identifier (argument_list "(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    )" ( identifier , number_literal , (string_literal ""unable to close due to unfinalized statements or unfinished backups"" " string_content ") ))) ;) (expression_statement "FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));" (call_expression "FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))) ;) (expression_statement "uVar4 = 5;" (assignment_expression "uVar4 = 5" identifier = number_literal) ;) }) (else_clause "else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }" else (compound_statement "{\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }" { (expression_statement "*(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;" (assignment_expression "*(undefined4 *)(param_1 + 0x70) = 0x64cffc7f" (pointer_expression "*(undefined4 *)(param_1 + 0x70)" * (cast_expression "(undefined4 *)(param_1 + 0x70)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0018b471(param_1);" (call_expression "FUN_0018b471(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))) }))) (return_statement "return uVar4;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int sqlite3Close(sqlite3 *db,int forceZombie)\n\n{\n  Schema *pSVar1;\n  HashElem *pHVar2;\n  Table *p;\n  int iVar3;\n  long lVar4;\n  \n  if (db != (sqlite3 *)0x0) {\n    iVar3 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar3 == 0) {\n      iVar3 = sqlite3MisuseError(0x25cc1);\n    }\n    else {\n      sqlite3_mutex_enter(db->mutex);\n      if ((db->mTrace & 8) != 0) {\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }\n      sqlite3BtreeEnterAll(db);\n      if (0 < db->nDb) {\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }\n      for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }\n      sqlite3VtabUnlockList(db);\n      sqlite3BtreeLeaveAll(db);\n      callFinaliser(db,0x88);\n      if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }\n      else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }\n    }\n    return iVar3;\n  }\n  return 0;\n}\n\n" (function_definition "int sqlite3Close(sqlite3 *db,int forceZombie)\n\n{\n  Schema *pSVar1;\n  HashElem *pHVar2;\n  Table *p;\n  int iVar3;\n  long lVar4;\n  \n  if (db != (sqlite3 *)0x0) {\n    iVar3 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar3 == 0) {\n      iVar3 = sqlite3MisuseError(0x25cc1);\n    }\n    else {\n      sqlite3_mutex_enter(db->mutex);\n      if ((db->mTrace & 8) != 0) {\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }\n      sqlite3BtreeEnterAll(db);\n      if (0 < db->nDb) {\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }\n      for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }\n      sqlite3VtabUnlockList(db);\n      sqlite3BtreeLeaveAll(db);\n      callFinaliser(db,0x88);\n      if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }\n      else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }\n    }\n    return iVar3;\n  }\n  return 0;\n}" primitive_type (function_declarator "sqlite3Close(sqlite3 *db,int forceZombie)" identifier (parameter_list "(sqlite3 *db,int forceZombie)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "int forceZombie" primitive_type identifier) ))) (compound_statement "{\n  Schema *pSVar1;\n  HashElem *pHVar2;\n  Table *p;\n  int iVar3;\n  long lVar4;\n  \n  if (db != (sqlite3 *)0x0) {\n    iVar3 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar3 == 0) {\n      iVar3 = sqlite3MisuseError(0x25cc1);\n    }\n    else {\n      sqlite3_mutex_enter(db->mutex);\n      if ((db->mTrace & 8) != 0) {\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }\n      sqlite3BtreeEnterAll(db);\n      if (0 < db->nDb) {\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }\n      for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }\n      sqlite3VtabUnlockList(db);\n      sqlite3BtreeLeaveAll(db);\n      callFinaliser(db,0x88);\n      if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }\n      else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }\n    }\n    return iVar3;\n  }\n  return 0;\n}" { (declaration "Schema *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "HashElem *pHVar2;" type_identifier (pointer_declarator "*pHVar2" * identifier) ;) (declaration "Table *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (db != (sqlite3 *)0x0) {\n    iVar3 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar3 == 0) {\n      iVar3 = sqlite3MisuseError(0x25cc1);\n    }\n    else {\n      sqlite3_mutex_enter(db->mutex);\n      if ((db->mTrace & 8) != 0) {\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }\n      sqlite3BtreeEnterAll(db);\n      if (0 < db->nDb) {\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }\n      for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }\n      sqlite3VtabUnlockList(db);\n      sqlite3BtreeLeaveAll(db);\n      callFinaliser(db,0x88);\n      if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }\n      else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }\n    }\n    return iVar3;\n  }" if (parenthesized_expression "(db != (sqlite3 *)0x0)" ( (binary_expression "db != (sqlite3 *)0x0" identifier != (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar3 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar3 == 0) {\n      iVar3 = sqlite3MisuseError(0x25cc1);\n    }\n    else {\n      sqlite3_mutex_enter(db->mutex);\n      if ((db->mTrace & 8) != 0) {\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }\n      sqlite3BtreeEnterAll(db);\n      if (0 < db->nDb) {\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }\n      for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }\n      sqlite3VtabUnlockList(db);\n      sqlite3BtreeLeaveAll(db);\n      callFinaliser(db,0x88);\n      if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }\n      else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }\n    }\n    return iVar3;\n  }" { (expression_statement "iVar3 = sqlite3SafetyCheckSickOrOk(db);" (assignment_expression "iVar3 = sqlite3SafetyCheckSickOrOk(db)" identifier = (call_expression "sqlite3SafetyCheckSickOrOk(db)" identifier (argument_list "(db)" ( identifier )))) ;) (if_statement "if (iVar3 == 0) {\n      iVar3 = sqlite3MisuseError(0x25cc1);\n    }\n    else {\n      sqlite3_mutex_enter(db->mutex);\n      if ((db->mTrace & 8) != 0) {\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }\n      sqlite3BtreeEnterAll(db);\n      if (0 < db->nDb) {\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }\n      for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }\n      sqlite3VtabUnlockList(db);\n      sqlite3BtreeLeaveAll(db);\n      callFinaliser(db,0x88);\n      if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }\n      else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar3 = sqlite3MisuseError(0x25cc1);\n    }" { (expression_statement "iVar3 = sqlite3MisuseError(0x25cc1);" (assignment_expression "iVar3 = sqlite3MisuseError(0x25cc1)" identifier = (call_expression "sqlite3MisuseError(0x25cc1)" identifier (argument_list "(0x25cc1)" ( number_literal )))) ;) }) (else_clause "else {\n      sqlite3_mutex_enter(db->mutex);\n      if ((db->mTrace & 8) != 0) {\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }\n      sqlite3BtreeEnterAll(db);\n      if (0 < db->nDb) {\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }\n      for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }\n      sqlite3VtabUnlockList(db);\n      sqlite3BtreeLeaveAll(db);\n      callFinaliser(db,0x88);\n      if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }\n      else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }\n    }" else (compound_statement "{\n      sqlite3_mutex_enter(db->mutex);\n      if ((db->mTrace & 8) != 0) {\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }\n      sqlite3BtreeEnterAll(db);\n      if (0 < db->nDb) {\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }\n      for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }\n      sqlite3VtabUnlockList(db);\n      sqlite3BtreeLeaveAll(db);\n      callFinaliser(db,0x88);\n      if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }\n      else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }\n    }" { (expression_statement "sqlite3_mutex_enter(db->mutex);" (call_expression "sqlite3_mutex_enter(db->mutex)" identifier (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) (if_statement "if ((db->mTrace & 8) != 0) {\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }" if (parenthesized_expression "((db->mTrace & 8) != 0)" ( (binary_expression "(db->mTrace & 8) != 0" (parenthesized_expression "(db->mTrace & 8)" ( (binary_expression "db->mTrace & 8" (field_expression "db->mTrace" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n        (*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);\n      }" { (expression_statement "(*db->xTrace)(8,db->pTraceArg,db,(void *)0x0);" (call_expression "(*db->xTrace)(8,db->pTraceArg,db,(void *)0x0)" (parenthesized_expression "(*db->xTrace)" ( (pointer_expression "*db->xTrace" * (field_expression "db->xTrace" identifier -> field_identifier)) )) (argument_list "(8,db->pTraceArg,db,(void *)0x0)" ( number_literal , (field_expression "db->pTraceArg" identifier -> field_identifier) , identifier , (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) })) (expression_statement "sqlite3BtreeEnterAll(db);" (call_expression "sqlite3BtreeEnterAll(db)" identifier (argument_list "(db)" ( identifier ))) ;) (if_statement "if (0 < db->nDb) {\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }" if (parenthesized_expression "(0 < db->nDb)" ( (binary_expression "0 < db->nDb" number_literal < (field_expression "db->nDb" identifier -> field_identifier)) )) (compound_statement "{\n        lVar4 = 0;\n        do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);\n      }" { (expression_statement "lVar4 = 0;" (assignment_expression "lVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        } while ((int)lVar4 < db->nDb);" do (compound_statement "{\n          pSVar1 = db->aDb[lVar4].pSchema;\n          if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }\n          lVar4 = lVar4 + 1;\n        }" { (expression_statement "pSVar1 = db->aDb[lVar4].pSchema;" (assignment_expression "pSVar1 = db->aDb[lVar4].pSchema" identifier = (field_expression "db->aDb[lVar4].pSchema" (subscript_expression "db->aDb[lVar4]" (field_expression "db->aDb" identifier -> field_identifier) [ identifier ]) . field_identifier)) ;) (if_statement "if (pSVar1 != (Schema *)0x0) {\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }" if (parenthesized_expression "(pSVar1 != (Schema *)0x0)" ( (binary_expression "pSVar1 != (Schema *)0x0" identifier != (cast_expression "(Schema *)0x0" ( (type_descriptor "Schema *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }\n          }" { (for_statement "for (pHVar2 = (pSVar1->tblHash).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next)\n            {\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }" for ( (assignment_expression "pHVar2 = (pSVar1->tblHash).first" identifier = (field_expression "(pSVar1->tblHash).first" (parenthesized_expression "(pSVar1->tblHash)" ( (field_expression "pSVar1->tblHash" identifier -> field_identifier) )) . field_identifier)) ; (binary_expression "pHVar2 != (HashElem *)0x0" identifier != (cast_expression "(HashElem *)0x0" ( (type_descriptor "HashElem *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "pHVar2 = pHVar2->next" identifier = (field_expression "pHVar2->next" identifier -> field_identifier)) ) (compound_statement "{\n              if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }\n            }" { (if_statement "if (((Table *)pHVar2->data)->nModuleArg != 0) {\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }" if (parenthesized_expression "(((Table *)pHVar2->data)->nModuleArg != 0)" ( (binary_expression "((Table *)pHVar2->data)->nModuleArg != 0" (field_expression "((Table *)pHVar2->data)->nModuleArg" (parenthesized_expression "((Table *)pHVar2->data)" ( (cast_expression "(Table *)pHVar2->data" ( (type_descriptor "Table *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pHVar2->data" identifier -> field_identifier)) )) -> field_identifier) != number_literal) )) (compound_statement "{\n                sqlite3VtabDisconnect(db,(Table *)pHVar2->data);\n              }" { (expression_statement "sqlite3VtabDisconnect(db,(Table *)pHVar2->data);" (call_expression "sqlite3VtabDisconnect(db,(Table *)pHVar2->data)" identifier (argument_list "(db,(Table *)pHVar2->data)" ( identifier , (cast_expression "(Table *)pHVar2->data" ( (type_descriptor "Table *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pHVar2->data" identifier -> field_identifier)) ))) ;) })) })) })) (expression_statement "lVar4 = lVar4 + 1;" (assignment_expression "lVar4 = lVar4 + 1" identifier = (binary_expression "lVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((int)lVar4 < db->nDb)" ( (binary_expression "(int)lVar4 < db->nDb" (cast_expression "(int)lVar4" ( (type_descriptor "int" primitive_type) ) identifier) < (field_expression "db->nDb" identifier -> field_identifier)) )) ;) })) (for_statement "for (pHVar2 = (db->aModule).first; pHVar2 != (HashElem *)0x0; pHVar2 = pHVar2->next) {\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }" for ( (assignment_expression "pHVar2 = (db->aModule).first" identifier = (field_expression "(db->aModule).first" (parenthesized_expression "(db->aModule)" ( (field_expression "db->aModule" identifier -> field_identifier) )) . field_identifier)) ; (binary_expression "pHVar2 != (HashElem *)0x0" identifier != (cast_expression "(HashElem *)0x0" ( (type_descriptor "HashElem *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "pHVar2 = pHVar2->next" identifier = (field_expression "pHVar2->next" identifier -> field_identifier)) ) (compound_statement "{\n        p = *(Table **)((long)pHVar2->data + 0x20);\n        if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }\n      }" { (expression_statement "p = *(Table **)((long)pHVar2->data + 0x20);" (assignment_expression "p = *(Table **)((long)pHVar2->data + 0x20)" identifier = (pointer_expression "*(Table **)((long)pHVar2->data + 0x20)" * (cast_expression "(Table **)((long)pHVar2->data + 0x20)" ( (type_descriptor "Table **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((long)pHVar2->data + 0x20)" ( (binary_expression "(long)pHVar2->data + 0x20" (cast_expression "(long)pHVar2->data" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "pHVar2->data" identifier -> field_identifier)) + number_literal) ))))) ;) (if_statement "if (p != (Table *)0x0) {\n          sqlite3VtabDisconnect(db,p);\n        }" if (parenthesized_expression "(p != (Table *)0x0)" ( (binary_expression "p != (Table *)0x0" identifier != (cast_expression "(Table *)0x0" ( (type_descriptor "Table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          sqlite3VtabDisconnect(db,p);\n        }" { (expression_statement "sqlite3VtabDisconnect(db,p);" (call_expression "sqlite3VtabDisconnect(db,p)" identifier (argument_list "(db,p)" ( identifier , identifier ))) ;) })) })) (expression_statement "sqlite3VtabUnlockList(db);" (call_expression "sqlite3VtabUnlockList(db)" identifier (argument_list "(db)" ( identifier ))) ;) (expression_statement "sqlite3BtreeLeaveAll(db);" (call_expression "sqlite3BtreeLeaveAll(db)" identifier (argument_list "(db)" ( identifier ))) ;) (expression_statement "callFinaliser(db,0x88);" (call_expression "callFinaliser(db,0x88)" identifier (argument_list "(db,0x88)" ( identifier , number_literal ))) ;) (if_statement "if ((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)) {\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }\n      else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }" if (parenthesized_expression "((forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0))" ( (binary_expression "(forceZombie == 0) && (iVar3 = connectionIsBusy(db), iVar3 != 0)" (parenthesized_expression "(forceZombie == 0)" ( (binary_expression "forceZombie == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar3 = connectionIsBusy(db), iVar3 != 0)" ( (comma_expression "iVar3 = connectionIsBusy(db), iVar3 != 0" (assignment_expression "iVar3 = connectionIsBusy(db)" identifier = (call_expression "connectionIsBusy(db)" identifier (argument_list "(db)" ( identifier )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");\n        sqlite3_mutex_leave(db->mutex);\n        iVar3 = 5;\n      }" { (expression_statement "sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups");" (call_expression "sqlite3ErrorWithMsg(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups")" identifier (argument_list "(db,5,\n                            "unable to close due to unfinalized statements or unfinished backups")" ( identifier , number_literal , (string_literal ""unable to close due to unfinalized statements or unfinished backups"" " string_content ") ))) ;) (expression_statement "sqlite3_mutex_leave(db->mutex);" (call_expression "sqlite3_mutex_leave(db->mutex)" identifier (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) (expression_statement "iVar3 = 5;" (assignment_expression "iVar3 = 5" identifier = number_literal) ;) }) (else_clause "else {\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }" else (compound_statement "{\n        db->magic = 0x64cffc7f;\n        sqlite3LeaveMutexAndCloseZombie(db);\n        iVar3 = 0;\n      }" { (expression_statement "db->magic = 0x64cffc7f;" (assignment_expression "db->magic = 0x64cffc7f" (field_expression "db->magic" identifier -> field_identifier) = number_literal) ;) (expression_statement "sqlite3LeaveMutexAndCloseZombie(db);" (call_expression "sqlite3LeaveMutexAndCloseZombie(db)" identifier (argument_list "(db)" ( identifier ))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }))) }))) (return_statement "return iVar3;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined8 FUN_0018b7d8(long param_1,int param_2)\n\n{\n  long lVar1;\n  undefined8 *puVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long lVar5;\n  \n  if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_0018b7d8(long param_1,int param_2)\n\n{\n  long lVar1;\n  undefined8 *puVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long lVar5;\n  \n  if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0018b7d8(long param_1,int param_2)" identifier (parameter_list "(long param_1,int param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  undefined8 *puVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long lVar5;\n  \n  if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }\n  return 0;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }" { (expression_statement "iVar3 = FUN_0015afa7();" (assignment_expression "iVar3 = FUN_0015afa7()" identifier = (call_expression "FUN_0015afa7()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar4 = FUN_00159c59(0x25cc1);\n    }" { (expression_statement "uVar4 = FUN_00159c59(0x25cc1);" (assignment_expression "uVar4 = FUN_00159c59(0x25cc1)" identifier = (call_expression "FUN_00159c59(0x25cc1)" identifier (argument_list "(0x25cc1)" ( number_literal )))) ;) }) (else_clause "else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }" else (compound_statement "{\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }" { (expression_statement "FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));" (call_expression "FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))) ;) (if_statement "if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }" if (parenthesized_expression "((*(byte *)(param_1 + 0x68) & 8) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x68) & 8) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x68) & 8)" ( (binary_expression "*(byte *)(param_1 + 0x68) & 8" (pointer_expression "*(byte *)(param_1 + 0x68)" * (cast_expression "(byte *)(param_1 + 0x68)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x68)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }" { (expression_statement "(**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);" (call_expression "(**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0)" (parenthesized_expression "(**(code **)(param_1 + 0xd8))" ( (pointer_expression "**(code **)(param_1 + 0xd8)" * (pointer_expression "*(code **)(param_1 + 0xd8)" * (cast_expression "(code **)(param_1 + 0xd8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xd8)" ( (binary_expression "param_1 + 0xd8" identifier + number_literal) ))))) )) (argument_list "(8,*(undefined8 *)(param_1 + 0xe0),param_1,0)" ( number_literal , (pointer_expression "*(undefined8 *)(param_1 + 0xe0)" * (cast_expression "(undefined8 *)(param_1 + 0xe0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) , identifier , number_literal ))) ;) })) (expression_statement "FUN_0013f226(param_1);" (call_expression "FUN_0013f226(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (if_statement "if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }" if (parenthesized_expression "(0 < *(int *)(param_1 + 0x28))" ( (binary_expression "0 < *(int *)(param_1 + 0x28)" number_literal < (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }" { (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));" do (compound_statement "{\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        }" { (expression_statement "lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);" (assignment_expression "lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" identifier = (pointer_expression "*(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" * (cast_expression "(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" ( (binary_expression "lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18" (binary_expression "lVar5 * 0x20 + *(long *)(param_1 + 0x20)" (binary_expression "lVar5 * 0x20" identifier * number_literal) + (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) + number_literal) ))))) ;) (if_statement "if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }" if (parenthesized_expression "(lVar1 != 0)" ( (binary_expression "lVar1 != 0" identifier != number_literal) )) (compound_statement "{\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }" { (for_statement "for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }" for ( (assignment_expression "puVar2 = *(undefined8 **)(lVar1 + 0x10)" identifier = (pointer_expression "*(undefined8 **)(lVar1 + 0x10)" * (cast_expression "(undefined8 **)(lVar1 + 0x10)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar1 + 0x10)" ( (binary_expression "lVar1 + 0x10" identifier + number_literal) ))))) ; (binary_expression "puVar2 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "puVar2 = (undefined8 *)*puVar2" identifier = (cast_expression "(undefined8 *)*puVar2" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) ) (compound_statement "{\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }" { (if_statement "if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }" if (parenthesized_expression "(*(int *)(puVar2[2] + 0x54) != 0)" ( (binary_expression "*(int *)(puVar2[2] + 0x54) != 0" (pointer_expression "*(int *)(puVar2[2] + 0x54)" * (cast_expression "(int *)(puVar2[2] + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2[2] + 0x54)" ( (binary_expression "puVar2[2] + 0x54" (subscript_expression "puVar2[2]" identifier [ number_literal ]) + number_literal) )))) != number_literal) )) (compound_statement "{\n                FUN_00141ee1(param_1);\n              }" { (expression_statement "FUN_00141ee1(param_1);" (call_expression "FUN_00141ee1(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) })) })) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((int)lVar5 < *(int *)(param_1 + 0x28))" ( (binary_expression "(int)lVar5 < *(int *)(param_1 + 0x28)" (cast_expression "(int)lVar5" ( (type_descriptor "int" primitive_type) ) identifier) < (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) )) ;) })) (for_statement "for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }" for ( (assignment_expression "puVar2 = *(undefined8 **)(param_1 + 0x1e0)" identifier = (pointer_expression "*(undefined8 **)(param_1 + 0x1e0)" * (cast_expression "(undefined8 **)(param_1 + 0x1e0)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1e0)" ( (binary_expression "param_1 + 0x1e0" identifier + number_literal) ))))) ; (binary_expression "puVar2 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "puVar2 = (undefined8 *)*puVar2" identifier = (cast_expression "(undefined8 *)*puVar2" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) ) (compound_statement "{\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }" { (if_statement "if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }" if (parenthesized_expression "(*(long *)(puVar2[2] + 0x20) != 0)" ( (binary_expression "*(long *)(puVar2[2] + 0x20) != 0" (pointer_expression "*(long *)(puVar2[2] + 0x20)" * (cast_expression "(long *)(puVar2[2] + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2[2] + 0x20)" ( (binary_expression "puVar2[2] + 0x20" (subscript_expression "puVar2[2]" identifier [ number_literal ]) + number_literal) )))) != number_literal) )) (compound_statement "{\n          FUN_00141ee1(param_1);\n        }" { (expression_statement "FUN_00141ee1(param_1);" (call_expression "FUN_00141ee1(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) })) (expression_statement "FUN_00141f29(param_1);" (call_expression "FUN_00141f29(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "FUN_0012cc4a(param_1);" (call_expression "FUN_0012cc4a(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "FUN_00142057(param_1,0x88);" (call_expression "FUN_00142057(param_1,0x88)" identifier (argument_list "(param_1,0x88)" ( identifier , number_literal ))) ;) (if_statement "if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }" if (parenthesized_expression "((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0))" ( (binary_expression "(param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar3 = FUN_0013139a(param_1), iVar3 != 0)" ( (comma_expression "iVar3 = FUN_0013139a(param_1), iVar3 != 0" (assignment_expression "iVar3 = FUN_0013139a(param_1)" identifier = (call_expression "FUN_0013139a(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "iVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }" { (expression_statement "FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );" (call_expression "FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    )" identifier (argument_list "(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    )" ( identifier , number_literal , (string_literal ""unable to close due to unfinalized statements or unfinished backups"" " string_content ") ))) ;) (expression_statement "FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));" (call_expression "FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))) ;) (expression_statement "uVar4 = 5;" (assignment_expression "uVar4 = 5" identifier = number_literal) ;) }) (else_clause "else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }" else (compound_statement "{\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }" { (expression_statement "*(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;" (assignment_expression "*(undefined4 *)(param_1 + 0x70) = 0x64cffc7f" (pointer_expression "*(undefined4 *)(param_1 + 0x70)" * (cast_expression "(undefined4 *)(param_1 + 0x70)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0018b471(param_1);" (call_expression "FUN_0018b471(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))) }))) (return_statement "return uVar4;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (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 IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }) (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) )))) ))) ;) (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 (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , LIT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (binary_expression IDENT * LIT) + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (for_statement for ( (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ; (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ; (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) })) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) ;) })) (for_statement for ( (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ; (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ; (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") ))) ;) (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 IDENT = LIT) ;) }) (else_clause else (compound_statement { (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 ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) }))) (return_statement return IDENT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined8 FUN_0018b7d8(long param_1,int param_2)\n\n{\n  long lVar1;\n  undefined8 *puVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long lVar5;\n  \n  if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }\n  return 0;\n}" (type_identifier "undefined8") (function_declarator "FUN_0018b7d8(long param_1,int param_2)" (identifier "FUN_0018b7d8") (parameter_list "(long param_1,int param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  long lVar1;\n  undefined8 *puVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long lVar5;\n  \n  if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }\n  return 0;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "undefined8 *puVar2;" (type_identifier "undefined8") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined8 uVar4;" (type_identifier "undefined8") (identifier "uVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (if_statement "if (param_1 != 0) {\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = FUN_0015afa7();\n    if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }\n    return uVar4;\n  }" ({ "{") (expression_statement "iVar3 = FUN_0015afa7();" (assignment_expression "iVar3 = FUN_0015afa7()" (identifier "iVar3") (= "=") (call_expression "FUN_0015afa7()" (identifier "FUN_0015afa7") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n      uVar4 = FUN_00159c59(0x25cc1);\n    }\n    else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar4 = FUN_00159c59(0x25cc1);\n    }" ({ "{") (expression_statement "uVar4 = FUN_00159c59(0x25cc1);" (assignment_expression "uVar4 = FUN_00159c59(0x25cc1)" (identifier "uVar4") (= "=") (call_expression "FUN_00159c59(0x25cc1)" (identifier "FUN_00159c59") (argument_list "(0x25cc1)" (( "(") (number_literal "0x25cc1") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }" (else "else") (compound_statement "{\n      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));\n      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }\n      FUN_0013f226(param_1);\n      if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }\n      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }\n      FUN_00141f29(param_1);\n      FUN_0012cc4a(param_1);\n      FUN_00142057(param_1,0x88);\n      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }\n    }" ({ "{") (expression_statement "FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));" (call_expression "FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18))" (identifier "FUN_0012a8c7") (argument_list "(*(undefined8 *)(param_1 + 0x18))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";")) (if_statement "if ((*(byte *)(param_1 + 0x68) & 8) != 0) {\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }" (if "if") (parenthesized_expression "((*(byte *)(param_1 + 0x68) & 8) != 0)" (( "(") (binary_expression "(*(byte *)(param_1 + 0x68) & 8) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x68) & 8)" (( "(") (binary_expression "*(byte *)(param_1 + 0x68) & 8" (pointer_expression "*(byte *)(param_1 + 0x68)" (* "*") (cast_expression "(byte *)(param_1 + 0x68)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x68)" (( "(") (binary_expression "param_1 + 0x68" (identifier "param_1") (+ "+") (number_literal "0x68")) () ")")))) (& "&") (number_literal "8")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);\n      }" ({ "{") (expression_statement "(**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);" (call_expression "(**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0)" (parenthesized_expression "(**(code **)(param_1 + 0xd8))" (( "(") (pointer_expression "**(code **)(param_1 + 0xd8)" (* "*") (pointer_expression "*(code **)(param_1 + 0xd8)" (* "*") (cast_expression "(code **)(param_1 + 0xd8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xd8)" (( "(") (binary_expression "param_1 + 0xd8" (identifier "param_1") (+ "+") (number_literal "0xd8")) () ")"))))) () ")")) (argument_list "(8,*(undefined8 *)(param_1 + 0xe0),param_1,0)" (( "(") (number_literal "8") (, ",") (pointer_expression "*(undefined8 *)(param_1 + 0xe0)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xe0)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe0)" (( "(") (binary_expression "param_1 + 0xe0" (identifier "param_1") (+ "+") (number_literal "0xe0")) () ")")))) (, ",") (identifier "param_1") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0013f226(param_1);" (call_expression "FUN_0013f226(param_1)" (identifier "FUN_0013f226") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (if_statement "if (0 < *(int *)(param_1 + 0x28)) {\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }" (if "if") (parenthesized_expression "(0 < *(int *)(param_1 + 0x28))" (( "(") (binary_expression "0 < *(int *)(param_1 + 0x28)" (number_literal "0") (< "<") (pointer_expression "*(int *)(param_1 + 0x28)" (* "*") (cast_expression "(int *)(param_1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n        lVar5 = 0;\n        do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));\n      }" ({ "{") (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" (identifier "lVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        } while ((int)lVar5 < *(int *)(param_1 + 0x28));" (do "do") (compound_statement "{\n          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);\n          if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }\n          lVar5 = lVar5 + 1;\n        }" ({ "{") (expression_statement "lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);" (assignment_expression "lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" (identifier "lVar1") (= "=") (pointer_expression "*(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" (* "*") (cast_expression "(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18)" (( "(") (binary_expression "lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18" (binary_expression "lVar5 * 0x20 + *(long *)(param_1 + 0x20)" (binary_expression "lVar5 * 0x20" (identifier "lVar5") (* "*") (number_literal "0x20")) (+ "+") (pointer_expression "*(long *)(param_1 + 0x20)" (* "*") (cast_expression "(long *)(param_1 + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")"))))) (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (if_statement "if (lVar1 != 0) {\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }" (if "if") (parenthesized_expression "(lVar1 != 0)" (( "(") (binary_expression "lVar1 != 0" (identifier "lVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }\n          }" ({ "{") (for_statement "for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;\n                puVar2 = (undefined8 *)*puVar2) {\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }" (for "for") (( "(") (assignment_expression "puVar2 = *(undefined8 **)(lVar1 + 0x10)" (identifier "puVar2") (= "=") (pointer_expression "*(undefined8 **)(lVar1 + 0x10)" (* "*") (cast_expression "(undefined8 **)(lVar1 + 0x10)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(lVar1 + 0x10)" (( "(") (binary_expression "lVar1 + 0x10" (identifier "lVar1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";") (binary_expression "puVar2 != (undefined8 *)0x0" (identifier "puVar2") (!= "!=") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";") (assignment_expression "puVar2 = (undefined8 *)*puVar2" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)*puVar2" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar2" (* "*") (identifier "puVar2")))) () ")") (compound_statement "{\n              if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }\n            }" ({ "{") (if_statement "if (*(int *)(puVar2[2] + 0x54) != 0) {\n                FUN_00141ee1(param_1);\n              }" (if "if") (parenthesized_expression "(*(int *)(puVar2[2] + 0x54) != 0)" (( "(") (binary_expression "*(int *)(puVar2[2] + 0x54) != 0" (pointer_expression "*(int *)(puVar2[2] + 0x54)" (* "*") (cast_expression "(int *)(puVar2[2] + 0x54)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2[2] + 0x54)" (( "(") (binary_expression "puVar2[2] + 0x54" (subscript_expression "puVar2[2]" (identifier "puVar2") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "0x54")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n                FUN_00141ee1(param_1);\n              }" ({ "{") (expression_statement "FUN_00141ee1(param_1);" (call_expression "FUN_00141ee1(param_1)" (identifier "FUN_00141ee1") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (} "}"))) (} "}"))) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" (identifier "lVar5") (= "=") (binary_expression "lVar5 + 1" (identifier "lVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((int)lVar5 < *(int *)(param_1 + 0x28))" (( "(") (binary_expression "(int)lVar5 < *(int *)(param_1 + 0x28)" (cast_expression "(int)lVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "lVar5")) (< "<") (pointer_expression "*(int *)(param_1 + 0x28)" (* "*") (cast_expression "(int *)(param_1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (; ";")) (} "}"))) (for_statement "for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;\n          puVar2 = (undefined8 *)*puVar2) {\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }" (for "for") (( "(") (assignment_expression "puVar2 = *(undefined8 **)(param_1 + 0x1e0)" (identifier "puVar2") (= "=") (pointer_expression "*(undefined8 **)(param_1 + 0x1e0)" (* "*") (cast_expression "(undefined8 **)(param_1 + 0x1e0)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x1e0)" (( "(") (binary_expression "param_1 + 0x1e0" (identifier "param_1") (+ "+") (number_literal "0x1e0")) () ")"))))) (; ";") (binary_expression "puVar2 != (undefined8 *)0x0" (identifier "puVar2") (!= "!=") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";") (assignment_expression "puVar2 = (undefined8 *)*puVar2" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)*puVar2" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar2" (* "*") (identifier "puVar2")))) () ")") (compound_statement "{\n        if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }\n      }" ({ "{") (if_statement "if (*(long *)(puVar2[2] + 0x20) != 0) {\n          FUN_00141ee1(param_1);\n        }" (if "if") (parenthesized_expression "(*(long *)(puVar2[2] + 0x20) != 0)" (( "(") (binary_expression "*(long *)(puVar2[2] + 0x20) != 0" (pointer_expression "*(long *)(puVar2[2] + 0x20)" (* "*") (cast_expression "(long *)(puVar2[2] + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2[2] + 0x20)" (( "(") (binary_expression "puVar2[2] + 0x20" (subscript_expression "puVar2[2]" (identifier "puVar2") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "0x20")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          FUN_00141ee1(param_1);\n        }" ({ "{") (expression_statement "FUN_00141ee1(param_1);" (call_expression "FUN_00141ee1(param_1)" (identifier "FUN_00141ee1") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_00141f29(param_1);" (call_expression "FUN_00141f29(param_1)" (identifier "FUN_00141f29") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "FUN_0012cc4a(param_1);" (call_expression "FUN_0012cc4a(param_1)" (identifier "FUN_0012cc4a") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "FUN_00142057(param_1,0x88);" (call_expression "FUN_00142057(param_1,0x88)" (identifier "FUN_00142057") (argument_list "(param_1,0x88)" (( "(") (identifier "param_1") (, ",") (number_literal "0x88") () ")"))) (; ";")) (if_statement "if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }\n      else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }" (if "if") (parenthesized_expression "((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0))" (( "(") (binary_expression "(param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)" (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = FUN_0013139a(param_1), iVar3 != 0)" (( "(") (comma_expression "iVar3 = FUN_0013139a(param_1), iVar3 != 0" (assignment_expression "iVar3 = FUN_0013139a(param_1)" (identifier "iVar3") (= "=") (call_expression "FUN_0013139a(param_1)" (identifier "FUN_0013139a") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (, ",") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );\n        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));\n        uVar4 = 5;\n      }" ({ "{") (expression_statement "FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    );" (call_expression "FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    )" (identifier "FUN_0015ec39") (argument_list "(param_1,5,"unable to close due to unfinalized statements or unfinished backups"\n                    )" (( "(") (identifier "param_1") (, ",") (number_literal "5") (, ",") (string_literal ""unable to close due to unfinalized statements or unfinished backups"" (" """) (string_content "unable to close due to unfinalized statements or unfinished backups") (" """)) () ")"))) (; ";")) (expression_statement "FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));" (call_expression "FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18))" (identifier "FUN_0012a8f6") (argument_list "(*(undefined8 *)(param_1 + 0x18))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";")) (expression_statement "uVar4 = 5;" (assignment_expression "uVar4 = 5" (identifier "uVar4") (= "=") (number_literal "5")) (; ";")) (} "}")) (else_clause "else {\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }" (else "else") (compound_statement "{\n        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;\n        FUN_0018b471(param_1);\n        uVar4 = 0;\n      }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;" (assignment_expression "*(undefined4 *)(param_1 + 0x70) = 0x64cffc7f" (pointer_expression "*(undefined4 *)(param_1 + 0x70)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x70)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x70)" (( "(") (binary_expression "param_1 + 0x70" (identifier "param_1") (+ "+") (number_literal "0x70")) () ")")))) (= "=") (number_literal "0x64cffc7f")) (; ";")) (expression_statement "FUN_0018b471(param_1);" (call_expression "FUN_0018b471(param_1)" (identifier "FUN_0018b471") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}")))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(type_1 *var_1,int var_15)

{
  type_2 *var_7;
  type_3 *var_8;
  type_4 *var_11;
  int var_3;
  long var_10;
  
  if (var_1 != (type_1 *)0x0) {
    var_3 = var_2(var_1);
    if (var_3 == 0) {
      var_3 = var_4(0x25cc1);
    }
    else {
      var_5(var_1->mutex);
      if ((var_1->mTrace & 8) != 0) {
        (*var_1->xTrace)(8,var_1->pTraceArg,var_1,(void *)0x0);
      }
      var_6(var_1);
      if (0 < var_1->nDb) {
        var_10 = 0;
        do {
          var_7 = var_1->aDb[var_10].pSchema;
          if (var_7 != (type_2 *)0x0) {
            for (var_8 = (var_7->tblHash).first; var_8 != (type_3 *)0x0; var_8 = var_8->next)
            {
              if (((type_4 *)var_8->data)->nModuleArg != 0) {
                var_9(var_1,(type_4 *)var_8->data);
              }
            }
          }
          var_10 = var_10 + 1;
        } while ((int)var_10 < var_1->nDb);
      }
      for (var_8 = (var_1->aModule).first; var_8 != (type_3 *)0x0; var_8 = var_8->next) {
        var_11 = *(type_4 **)((long)var_8->data + 0x20);
        if (var_11 != (type_4 *)0x0) {
          var_9(var_1,var_11);
        }
      }
      var_12(var_1);
      var_13(var_1);
      var_14(var_1,0x88);
      if ((var_15 == 0) && (var_3 = var_16(var_1), var_3 != 0)) {
        var_17(var_1,5,
                            "unable to close due to unfinalized statements or unfinished backups");
        var_18(var_1->mutex);
        var_3 = 5;
      }
      else {
        var_1->magic = 0x64cffc7f;
        var_19(var_1);
        var_3 = 0;
      }
    }
    return var_3;
  }
  return 0;
}


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

undefined8 MASKED(long param_1,int param_2)

{
  long lVar1;
  undefined8 *puVar2;
  int iVar3;
  undefined8 uVar4;
  long lVar5;
  
  if (param_1 != 0) {
    iVar3 = FUN_0015afa7();
    if (iVar3 == 0) {
      uVar4 = FUN_00159c59(0x25cc1);
    }
    else {
      FUN_0012a8c7(*(undefined8 *)(param_1 + 0x18));
      if ((*(byte *)(param_1 + 0x68) & 8) != 0) {
        (**(code **)(param_1 + 0xd8))(8,*(undefined8 *)(param_1 + 0xe0),param_1,0);
      }
      FUN_0013f226(param_1);
      if (0 < *(int *)(param_1 + 0x28)) {
        lVar5 = 0;
        do {
          lVar1 = *(long *)(lVar5 * 0x20 + *(long *)(param_1 + 0x20) + 0x18);
          if (lVar1 != 0) {
            for (puVar2 = *(undefined8 **)(lVar1 + 0x10); puVar2 != (undefined8 *)0x0;
                puVar2 = (undefined8 *)*puVar2) {
              if (*(int *)(puVar2[2] + 0x54) != 0) {
                FUN_00141ee1(param_1);
              }
            }
          }
          lVar5 = lVar5 + 1;
        } while ((int)lVar5 < *(int *)(param_1 + 0x28));
      }
      for (puVar2 = *(undefined8 **)(param_1 + 0x1e0); puVar2 != (undefined8 *)0x0;
          puVar2 = (undefined8 *)*puVar2) {
        if (*(long *)(puVar2[2] + 0x20) != 0) {
          FUN_00141ee1(param_1);
        }
      }
      FUN_00141f29(param_1);
      FUN_0012cc4a(param_1);
      FUN_00142057(param_1,0x88);
      if ((param_2 == 0) && (iVar3 = FUN_0013139a(param_1), iVar3 != 0)) {
        FUN_0015ec39(param_1,5,"unable to close due to unfinalized statements or unfinished backups"
                    );
        FUN_0012a8f6(*(undefined8 *)(param_1 + 0x18));
        uVar4 = 5;
      }
      else {
        *(undefined4 *)(param_1 + 0x70) = 0x64cffc7f;
        FUN_0018b471(param_1);
        uVar4 = 0;
      }
    }
    return uVar4;
  }
  return 0;
}

