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

int sqlite3_unlock_notify(sqlite3 *db,_func_void_void_ptr_ptr_int *xNotify,void *pArg)

{
  _func_void_void_ptr_ptr_int *p_Var1;
  sqlite3 *psVar2;
  sqlite3 **ppsVar3;
  int err_code;
  sqlite3 *psVar4;
  char *zFormat;
  
  sqlite3_mutex_enter(db->mutex);
  enterMutex();
  if (xNotify == (_func_void_void_ptr_ptr_int *)0x0) {
    if (sqlite3BlockedList != (sqlite3 *)0x0) {
      psVar2 = sqlite3BlockedList;
      if (db == sqlite3BlockedList) {
        ppsVar3 = &sqlite3BlockedList;
        psVar2 = db;
      }
      else {
        do {
          psVar4 = psVar2;
          psVar2 = psVar4->pNextBlocked;
          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;
        } while (db != psVar2);
        ppsVar3 = &psVar4->pNextBlocked;
      }
      *ppsVar3 = psVar2->pNextBlocked;
    }
LAB_00058f0c:
    db->pBlockingConnection = (sqlite3 *)0x0;
    err_code = 0;
    zFormat = (char *)0x0;
    db->pUnlockConnection = (sqlite3 *)0x0;
    db->xUnlockNotify = (_func_void_void_ptr_ptr_int *)0x0;
    db->pUnlockArg = (void *)0x0;
    leaveMutex();
    goto LAB_00058eb8;
  }
  psVar2 = db->pBlockingConnection;
  if (psVar2 == (sqlite3 *)0x0) {
    zFormat = (char *)0x0;
    (*xNotify)(&pArg,1);
    err_code = 0;
    leaveMutex();
    goto LAB_00058eb8;
  }
  psVar4 = psVar2;
  if (psVar2 != db) {
    do {
      psVar4 = psVar4->pUnlockConnection;
      if (psVar4 == (sqlite3 *)0x0) break;
    } while (db != psVar4);
    if (psVar4 == (sqlite3 *)0x0) {
      db->pUnlockConnection = psVar2;
      db->xUnlockNotify = xNotify;
      db->pUnlockArg = pArg;
      if (sqlite3BlockedList == (sqlite3 *)0x0) {
LAB_00058f7c:
        psVar2 = (sqlite3 *)0x0;
        ppsVar3 = &sqlite3BlockedList;
      }
      else {
        psVar2 = sqlite3BlockedList;
        if (db == sqlite3BlockedList) {
          ppsVar3 = &sqlite3BlockedList;
          psVar2 = db;
        }
        else {
          do {
            psVar4 = psVar2;
            psVar2 = psVar4->pNextBlocked;
            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;
          } while (db != psVar2);
          ppsVar3 = &psVar4->pNextBlocked;
        }
        *ppsVar3 = psVar2->pNextBlocked;
        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;
LAB_00058e54:
        ppsVar3 = &sqlite3BlockedList;
        p_Var1 = sqlite3BlockedList->xUnlockNotify;
        psVar2 = sqlite3BlockedList;
        while (p_Var1 != db->xUnlockNotify) {
          ppsVar3 = &psVar2->pNextBlocked;
          psVar2 = psVar2->pNextBlocked;
          if (psVar2 == (sqlite3 *)0x0) break;
          p_Var1 = psVar2->xUnlockNotify;
        }
      }
      db->pNextBlocked = psVar2;
      err_code = 0;
      *ppsVar3 = db;
      leaveMutex();
      zFormat = (char *)0x0;
      goto LAB_00058eb8;
    }
  }
  leaveMutex();
  err_code = 6;
  zFormat = "database is deadlocked";
LAB_00058eb8:
  sqlite3ErrorWithMsg(db,err_code,zFormat);
  sqlite3_mutex_leave(db->mutex);
  return err_code;
}



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

undefined4 FUN_00058da0(int param_1,code *param_2,undefined4 param_3)

{
  int iVar1;
  int *piVar2;
  undefined4 *puVar3;
  undefined4 uVar4;
  int iVar5;
  char *pcVar6;
  
  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));
  FUN_0001ed40();
  if (param_2 == (code *)0x0) {
    if (DAT_0014c6b0 != 0) {
      iVar1 = DAT_0014c6b0;
      if (param_1 == DAT_0014c6b0) {
        puVar3 = &DAT_0014c6b0;
        iVar1 = param_1;
      }
      else {
        do {
          iVar5 = iVar1;
          iVar1 = *(int *)(iVar5 + 500);
          if (iVar1 == 0) goto LAB_00058f0c;
        } while (param_1 != iVar1);
        puVar3 = (undefined4 *)(iVar5 + 500);
      }
      *puVar3 = *(undefined4 *)(iVar1 + 500);
    }
LAB_00058f0c:
    *(undefined4 *)(param_1 + 0x1e4) = 0;
    uVar4 = 0;
    pcVar6 = (char *)0x0;
    *(undefined4 *)(param_1 + 0x1e8) = 0;
    *(undefined4 *)(param_1 + 0x1f0) = 0;
    *(undefined4 *)(param_1 + 0x1ec) = 0;
    FUN_0001ed90();
    goto LAB_00058eb8;
  }
  iVar1 = *(int *)(param_1 + 0x1e4);
  if (iVar1 == 0) {
    pcVar6 = (char *)0x0;
    (*param_2)(&param_3,1);
    uVar4 = 0;
    FUN_0001ed90();
    goto LAB_00058eb8;
  }
  iVar5 = iVar1;
  if (iVar1 != param_1) {
    do {
      iVar5 = *(int *)(iVar5 + 0x1e8);
      if (iVar5 == 0) break;
    } while (param_1 != iVar5);
    if (iVar5 == 0) {
      *(int *)(param_1 + 0x1e8) = iVar1;
      *(code **)(param_1 + 0x1f0) = param_2;
      *(undefined4 *)(param_1 + 0x1ec) = param_3;
      if (DAT_0014c6b0 == 0) {
LAB_00058f7c:
        iVar1 = 0;
        piVar2 = &DAT_0014c6b0;
      }
      else {
        iVar1 = DAT_0014c6b0;
        if (param_1 == DAT_0014c6b0) {
          puVar3 = &DAT_0014c6b0;
          iVar1 = param_1;
        }
        else {
          do {
            iVar5 = iVar1;
            iVar1 = *(int *)(iVar5 + 500);
            if (iVar1 == 0) goto LAB_00058e54;
          } while (param_1 != iVar1);
          puVar3 = (undefined4 *)(iVar5 + 500);
        }
        *puVar3 = *(undefined4 *)(iVar1 + 500);
        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;
LAB_00058e54:
        piVar2 = &DAT_0014c6b0;
        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);
        iVar1 = DAT_0014c6b0;
        while (iVar5 != *(int *)(param_1 + 0x1f0)) {
          piVar2 = (int *)(iVar1 + 500);
          iVar1 = *(int *)(iVar1 + 500);
          if (iVar1 == 0) break;
          iVar5 = *(int *)(iVar1 + 0x1f0);
        }
      }
      *(int *)(param_1 + 500) = iVar1;
      uVar4 = 0;
      *piVar2 = param_1;
      FUN_0001ed90();
      pcVar6 = (char *)0x0;
      goto LAB_00058eb8;
    }
  }
  FUN_0001ed90();
  uVar4 = 6;
  pcVar6 = "database is deadlocked";
LAB_00058eb8:
  FUN_00058300(param_1,uVar4,pcVar6);
  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));
  return uVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014d20
ADD EBX,0xf212b
SUB ESP,0x18
MOV EDI,dword ptr [ESP + 0x2c]
MOV EBP,dword ptr [ESP + 0x30]
PUSH dword ptr [EDI + 0xc]
CALL 0x0001afd0
CALL 0x0001ed40
ADD ESP,0x10
TEST EBP,EBP
JZ 0x00058ee0
MOV EAX,dword ptr [EDI + 0x1e4]
TEST EAX,EAX
JZ 0x00058ea0
MOV ESI,EAX
CMP EAX,EDI
JZ 0x00058f48
LEA ESI,[ESI]
MOV ESI,dword ptr [ESI + 0x1e8]
TEST ESI,ESI
JZ 0x00058dfe
CMP EDI,ESI
JNZ 0x00058df0
TEST ESI,ESI
JNZ 0x00058f48
MOV dword ptr [EDI + 0x1e8],EAX
MOV EAX,dword ptr [ESP + 0x28]
MOV dword ptr [EDI + 0x1f0],EBP
MOV dword ptr [EDI + 0x1ec],EAX
MOV EAX,dword ptr [EBX + 0x17dc]
TEST EAX,EAX
JZ 0x00058f7c
CMP EDI,EAX
JZ 0x00058fa3
MOV ECX,EAX
JMP 0x00058e4a
CMP EDI,EDX
JZ 0x00058f60
MOV ECX,EDX
MOV EDX,dword ptr [ECX + 0x1f4]
TEST EDX,EDX
JNZ 0x00058e40
MOV EDX,dword ptr [EDI + 0x1f0]
LEA ECX,[EBX + 0x17dc]
CMP dword ptr [EAX + 0x1f0],EDX
JNZ 0x00058e78
JMP 0x00058e88
CMP dword ptr [EAX + 0x1f0],EDX
JZ 0x00058e88
LEA ECX,[EAX + 0x1f4]
MOV EAX,dword ptr [EAX + 0x1f4]
TEST EAX,EAX
JNZ 0x00058e70
MOV dword ptr [EDI + 0x1f4],EAX
XOR EBP,EBP
MOV dword ptr [ECX],EDI
CALL 0x0001ed90
JMP 0x00058eb8
SUB ESP,0x8
XOR ESI,ESI
PUSH 0x1
LEA EAX,[ESP + 0x34]
PUSH EAX
CALL EBP
XOR EBP,EBP
CALL 0x0001ed90
ADD ESP,0x10
SUB ESP,0x4
PUSH ESI
PUSH EBP
PUSH EDI
CALL 0x00058300
POP EAX
PUSH dword ptr [EDI + 0xc]
CALL 0x0001b000
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,dword ptr [EBX + 0x17dc]
TEST EDX,EDX
JZ 0x00058f0c
CMP EDI,EDX
JNZ 0x00058f02
JMP 0x00058fad
CMP EDI,EAX
JZ 0x00058f90
MOV EDX,EAX
MOV EAX,dword ptr [EDX + 0x1f4]
TEST EAX,EAX
JNZ 0x00058ef8
MOV dword ptr [EDI + 0x1e4],0x0
XOR EBP,EBP
XOR ESI,ESI
MOV dword ptr [EDI + 0x1e8],0x0
MOV dword ptr [EDI + 0x1f0],0x0
MOV dword ptr [EDI + 0x1ec],0x0
CALL 0x0001ed90
JMP 0x00058eb8
CALL 0x0001ed90
MOV EBP,0x6
LEA ESI,[EBX + 0xfffadc1c]
JMP 0x00058eb8
ADD ECX,0x1f4
MOV EAX,dword ptr [EDX + 0x1f4]
MOV dword ptr [ECX],EAX
MOV EAX,dword ptr [EBX + 0x17dc]
TEST EAX,EAX
JNZ 0x00058e54
XOR EAX,EAX
LEA ECX,[EBX + 0x17dc]
JMP 0x00058e88
ADD EDX,0x1f4
MOV EAX,dword ptr [EAX + 0x1f4]
MOV dword ptr [EDX],EAX
JMP 0x00058f0c
MOV EDX,EDI
LEA ECX,[EBX + 0x17dc]
JMP 0x00058f66
MOV EAX,EDI
LEA EDX,[EBX + 0x17dc]
JMP 0x00058f96
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00058da0(int param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));\n  FUN_0001ed40();\n  if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar1 = *(int *)(param_1 + 0x1e4);\n  if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar5 = iVar1;\n  if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  FUN_0001ed90();\n  uVar4 = 6;\n  pcVar6 = "database is deadlocked";\nLAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);\n  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));\n  return uVar4;\n}\n\n" comment (function_definition "undefined4 FUN_00058da0(int param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));\n  FUN_0001ed40();\n  if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar1 = *(int *)(param_1 + 0x1e4);\n  if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar5 = iVar1;\n  if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  FUN_0001ed90();\n  uVar4 = 6;\n  pcVar6 = "database is deadlocked";\nLAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);\n  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));\n  return uVar4;\n}" type_identifier (function_declarator "FUN_00058da0(int param_1,code *param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,code *param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));\n  FUN_0001ed40();\n  if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar1 = *(int *)(param_1 + 0x1e4);\n  if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar5 = iVar1;\n  if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  FUN_0001ed90();\n  uVar4 = 6;\n  pcVar6 = "database is deadlocked";\nLAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);\n  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));\n  return uVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (expression_statement "FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_0001afd0(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_0001ed40();" (call_expression "FUN_0001ed40()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" if (parenthesized_expression "(param_2 == (code *)0x0)" ( (binary_expression "param_2 == (code *)0x0" identifier == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" { (if_statement "if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }" if (parenthesized_expression "(DAT_0014c6b0 != 0)" ( (binary_expression "DAT_0014c6b0 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }" { (expression_statement "iVar1 = DAT_0014c6b0;" (assignment_expression "iVar1 = DAT_0014c6b0" identifier = identifier) ;) (if_statement "if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }" if (parenthesized_expression "(param_1 == DAT_0014c6b0)" ( (binary_expression "param_1 == DAT_0014c6b0" identifier == identifier) )) (compound_statement "{\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }" { (expression_statement "puVar3 = &DAT_0014c6b0;" (assignment_expression "puVar3 = &DAT_0014c6b0" identifier = (pointer_expression "&DAT_0014c6b0" & identifier)) ;) (expression_statement "iVar1 = param_1;" (assignment_expression "iVar1 = param_1" identifier = identifier) ;) }) (else_clause "else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }" else (compound_statement "{\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }" { (do_statement "do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);" do (compound_statement "{\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        }" { (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" identifier = identifier) ;) (expression_statement "iVar1 = *(int *)(iVar5 + 500);" (assignment_expression "iVar1 = *(int *)(iVar5 + 500)" identifier = (pointer_expression "*(int *)(iVar5 + 500)" * (cast_expression "(int *)(iVar5 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 500)" ( (binary_expression "iVar5 + 500" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) goto LAB_00058f0c;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00058f0c;" goto statement_identifier ;)) }) while (parenthesized_expression "(param_1 != iVar1)" ( (binary_expression "param_1 != iVar1" identifier != identifier) )) ;) (expression_statement "puVar3 = (undefined4 *)(iVar5 + 500);" (assignment_expression "puVar3 = (undefined4 *)(iVar5 + 500)" identifier = (cast_expression "(undefined4 *)(iVar5 + 500)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 500)" ( (binary_expression "iVar5 + 500" identifier + number_literal) )))) ;) }))) (expression_statement "*puVar3 = *(undefined4 *)(iVar1 + 500);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar1 + 500)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar1 + 500)" * (cast_expression "(undefined4 *)(iVar1 + 500)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 500)" ( (binary_expression "iVar1 + 500" identifier + number_literal) ))))) ;) })) (labeled_statement "LAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;" statement_identifier : (expression_statement "*(undefined4 *)(param_1 + 0x1e4) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1e4) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1e4)" * (cast_expression "(undefined4 *)(param_1 + 0x1e4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e4)" ( (binary_expression "param_1 + 0x1e4" identifier + number_literal) )))) = number_literal) ;)) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1e8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1e8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1e8)" * (cast_expression "(undefined4 *)(param_1 + 0x1e8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e8)" ( (binary_expression "param_1 + 0x1e8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1f0) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1f0) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1f0)" * (cast_expression "(undefined4 *)(param_1 + 0x1f0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1f0)" ( (binary_expression "param_1 + 0x1f0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1ec) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1ec) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1ec)" * (cast_expression "(undefined4 *)(param_1 + 0x1ec)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ec)" ( (binary_expression "param_1 + 0x1ec" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00058eb8;" goto statement_identifier ;) })) (expression_statement "iVar1 = *(int *)(param_1 + 0x1e4);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x1e4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1e4)" * (cast_expression "(int *)(param_1 + 0x1e4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e4)" ( (binary_expression "param_1 + 0x1e4" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" { (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "(*param_2)(&param_3,1);" (call_expression "(*param_2)(&param_3,1)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(&param_3,1)" ( (pointer_expression "&param_3" & identifier) , number_literal ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00058eb8;" goto statement_identifier ;) })) (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" identifier = identifier) ;) (if_statement "if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }" if (parenthesized_expression "(iVar1 != param_1)" ( (binary_expression "iVar1 != param_1" identifier != identifier) )) (compound_statement "{\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }" { (do_statement "do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);" do (compound_statement "{\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    }" { (expression_statement "iVar5 = *(int *)(iVar5 + 0x1e8);" (assignment_expression "iVar5 = *(int *)(iVar5 + 0x1e8)" identifier = (pointer_expression "*(int *)(iVar5 + 0x1e8)" * (cast_expression "(int *)(iVar5 + 0x1e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x1e8)" ( (binary_expression "iVar5 + 0x1e8" identifier + number_literal) ))))) ;) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(param_1 != iVar5)" ( (binary_expression "param_1 != iVar5" identifier != identifier) )) ;) (if_statement "if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }" { (expression_statement "*(int *)(param_1 + 0x1e8) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x1e8) = iVar1" (pointer_expression "*(int *)(param_1 + 0x1e8)" * (cast_expression "(int *)(param_1 + 0x1e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e8)" ( (binary_expression "param_1 + 0x1e8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(code **)(param_1 + 0x1f0) = param_2;" (assignment_expression "*(code **)(param_1 + 0x1f0) = param_2" (pointer_expression "*(code **)(param_1 + 0x1f0)" * (cast_expression "(code **)(param_1 + 0x1f0)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1f0)" ( (binary_expression "param_1 + 0x1f0" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1ec) = param_3;" (assignment_expression "*(undefined4 *)(param_1 + 0x1ec) = param_3" (pointer_expression "*(undefined4 *)(param_1 + 0x1ec)" * (cast_expression "(undefined4 *)(param_1 + 0x1ec)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ec)" ( (binary_expression "param_1 + 0x1ec" identifier + number_literal) )))) = identifier) ;) (if_statement "if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }" if (parenthesized_expression "(DAT_0014c6b0 == 0)" ( (binary_expression "DAT_0014c6b0 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }" { (labeled_statement "LAB_00058f7c:\n        iVar1 = 0;" statement_identifier : (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;)) (expression_statement "piVar2 = &DAT_0014c6b0;" (assignment_expression "piVar2 = &DAT_0014c6b0" identifier = (pointer_expression "&DAT_0014c6b0" & identifier)) ;) }) (else_clause "else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }" else (compound_statement "{\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }" { (expression_statement "iVar1 = DAT_0014c6b0;" (assignment_expression "iVar1 = DAT_0014c6b0" identifier = identifier) ;) (if_statement "if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }" if (parenthesized_expression "(param_1 == DAT_0014c6b0)" ( (binary_expression "param_1 == DAT_0014c6b0" identifier == identifier) )) (compound_statement "{\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }" { (expression_statement "puVar3 = &DAT_0014c6b0;" (assignment_expression "puVar3 = &DAT_0014c6b0" identifier = (pointer_expression "&DAT_0014c6b0" & identifier)) ;) (expression_statement "iVar1 = param_1;" (assignment_expression "iVar1 = param_1" identifier = identifier) ;) }) (else_clause "else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }" else (compound_statement "{\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }" { (do_statement "do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);" do (compound_statement "{\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          }" { (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" identifier = identifier) ;) (expression_statement "iVar1 = *(int *)(iVar5 + 500);" (assignment_expression "iVar1 = *(int *)(iVar5 + 500)" identifier = (pointer_expression "*(int *)(iVar5 + 500)" * (cast_expression "(int *)(iVar5 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 500)" ( (binary_expression "iVar5 + 500" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) goto LAB_00058e54;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00058e54;" goto statement_identifier ;)) }) while (parenthesized_expression "(param_1 != iVar1)" ( (binary_expression "param_1 != iVar1" identifier != identifier) )) ;) (expression_statement "puVar3 = (undefined4 *)(iVar5 + 500);" (assignment_expression "puVar3 = (undefined4 *)(iVar5 + 500)" identifier = (cast_expression "(undefined4 *)(iVar5 + 500)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 500)" ( (binary_expression "iVar5 + 500" identifier + number_literal) )))) ;) }))) (expression_statement "*puVar3 = *(undefined4 *)(iVar1 + 500);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar1 + 500)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar1 + 500)" * (cast_expression "(undefined4 *)(iVar1 + 500)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 500)" ( (binary_expression "iVar1 + 500" identifier + number_literal) ))))) ;) (if_statement "if (DAT_0014c6b0 == 0) goto LAB_00058f7c;" if (parenthesized_expression "(DAT_0014c6b0 == 0)" ( (binary_expression "DAT_0014c6b0 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00058f7c;" goto statement_identifier ;)) (labeled_statement "LAB_00058e54:\n        piVar2 = &DAT_0014c6b0;" statement_identifier : (expression_statement "piVar2 = &DAT_0014c6b0;" (assignment_expression "piVar2 = &DAT_0014c6b0" identifier = (pointer_expression "&DAT_0014c6b0" & identifier)) ;)) (expression_statement "iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);" (assignment_expression "iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0)" identifier = (pointer_expression "*(int *)(DAT_0014c6b0 + 0x1f0)" * (cast_expression "(int *)(DAT_0014c6b0 + 0x1f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_0014c6b0 + 0x1f0)" ( (binary_expression "DAT_0014c6b0 + 0x1f0" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = DAT_0014c6b0;" (assignment_expression "iVar1 = DAT_0014c6b0" identifier = identifier) ;) (while_statement "while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }" while (parenthesized_expression "(iVar5 != *(int *)(param_1 + 0x1f0))" ( (binary_expression "iVar5 != *(int *)(param_1 + 0x1f0)" identifier != (pointer_expression "*(int *)(param_1 + 0x1f0)" * (cast_expression "(int *)(param_1 + 0x1f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1f0)" ( (binary_expression "param_1 + 0x1f0" identifier + number_literal) ))))) )) (compound_statement "{\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }" { (expression_statement "piVar2 = (int *)(iVar1 + 500);" (assignment_expression "piVar2 = (int *)(iVar1 + 500)" identifier = (cast_expression "(int *)(iVar1 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 500)" ( (binary_expression "iVar1 + 500" identifier + number_literal) )))) ;) (expression_statement "iVar1 = *(int *)(iVar1 + 500);" (assignment_expression "iVar1 = *(int *)(iVar1 + 500)" identifier = (pointer_expression "*(int *)(iVar1 + 500)" * (cast_expression "(int *)(iVar1 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 500)" ( (binary_expression "iVar1 + 500" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) break;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar5 = *(int *)(iVar1 + 0x1f0);" (assignment_expression "iVar5 = *(int *)(iVar1 + 0x1f0)" identifier = (pointer_expression "*(int *)(iVar1 + 0x1f0)" * (cast_expression "(int *)(iVar1 + 0x1f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1f0)" ( (binary_expression "iVar1 + 0x1f0" identifier + number_literal) ))))) ;) })) }))) (expression_statement "*(int *)(param_1 + 500) = iVar1;" (assignment_expression "*(int *)(param_1 + 500) = iVar1" (pointer_expression "*(int *)(param_1 + 500)" * (cast_expression "(int *)(param_1 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 500)" ( (binary_expression "param_1 + 500" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "*piVar2 = param_1;" (assignment_expression "*piVar2 = param_1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (goto_statement "goto LAB_00058eb8;" goto statement_identifier ;) })) })) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar4 = 6;" (assignment_expression "uVar4 = 6" identifier = number_literal) ;) (expression_statement "pcVar6 = "database is deadlocked";" (assignment_expression "pcVar6 = "database is deadlocked"" identifier = (string_literal ""database is deadlocked"" " string_content ")) ;) (labeled_statement "LAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);" statement_identifier : (expression_statement "FUN_00058300(param_1,uVar4,pcVar6);" (call_expression "FUN_00058300(param_1,uVar4,pcVar6)" identifier (argument_list "(param_1,uVar4,pcVar6)" ( identifier , identifier , identifier ))) ;)) (expression_statement "FUN_0001b000(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_0001b000(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint sqlite3_unlock_notify(sqlite3 *db,_func_void_void_ptr_ptr_int *xNotify,void *pArg)\n\n{\n  _func_void_void_ptr_ptr_int *p_Var1;\n  sqlite3 *psVar2;\n  sqlite3 **ppsVar3;\n  int err_code;\n  sqlite3 *psVar4;\n  char *zFormat;\n  \n  sqlite3_mutex_enter(db->mutex);\n  enterMutex();\n  if (xNotify == (_func_void_void_ptr_ptr_int *)0x0) {\n    if (sqlite3BlockedList != (sqlite3 *)0x0) {\n      psVar2 = sqlite3BlockedList;\n      if (db == sqlite3BlockedList) {\n        ppsVar3 = &sqlite3BlockedList;\n        psVar2 = db;\n      }\n      else {\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }\n      *ppsVar3 = psVar2->pNextBlocked;\n    }\nLAB_00058f0c:\n    db->pBlockingConnection = (sqlite3 *)0x0;\n    err_code = 0;\n    zFormat = (char *)0x0;\n    db->pUnlockConnection = (sqlite3 *)0x0;\n    db->xUnlockNotify = (_func_void_void_ptr_ptr_int *)0x0;\n    db->pUnlockArg = (void *)0x0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }\n  psVar2 = db->pBlockingConnection;\n  if (psVar2 == (sqlite3 *)0x0) {\n    zFormat = (char *)0x0;\n    (*xNotify)(&pArg,1);\n    err_code = 0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }\n  psVar4 = psVar2;\n  if (psVar2 != db) {\n    do {\n      psVar4 = psVar4->pUnlockConnection;\n      if (psVar4 == (sqlite3 *)0x0) break;\n    } while (db != psVar4);\n    if (psVar4 == (sqlite3 *)0x0) {\n      db->pUnlockConnection = psVar2;\n      db->xUnlockNotify = xNotify;\n      db->pUnlockArg = pArg;\n      if (sqlite3BlockedList == (sqlite3 *)0x0) {\nLAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;\n        ppsVar3 = &sqlite3BlockedList;\n      }\n      else {\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }\n      db->pNextBlocked = psVar2;\n      err_code = 0;\n      *ppsVar3 = db;\n      leaveMutex();\n      zFormat = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  leaveMutex();\n  err_code = 6;\n  zFormat = "database is deadlocked";\nLAB_00058eb8:\n  sqlite3ErrorWithMsg(db,err_code,zFormat);\n  sqlite3_mutex_leave(db->mutex);\n  return err_code;\n}\n\n" comment (function_definition "int sqlite3_unlock_notify(sqlite3 *db,_func_void_void_ptr_ptr_int *xNotify,void *pArg)\n\n{\n  _func_void_void_ptr_ptr_int *p_Var1;\n  sqlite3 *psVar2;\n  sqlite3 **ppsVar3;\n  int err_code;\n  sqlite3 *psVar4;\n  char *zFormat;\n  \n  sqlite3_mutex_enter(db->mutex);\n  enterMutex();\n  if (xNotify == (_func_void_void_ptr_ptr_int *)0x0) {\n    if (sqlite3BlockedList != (sqlite3 *)0x0) {\n      psVar2 = sqlite3BlockedList;\n      if (db == sqlite3BlockedList) {\n        ppsVar3 = &sqlite3BlockedList;\n        psVar2 = db;\n      }\n      else {\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }\n      *ppsVar3 = psVar2->pNextBlocked;\n    }\nLAB_00058f0c:\n    db->pBlockingConnection = (sqlite3 *)0x0;\n    err_code = 0;\n    zFormat = (char *)0x0;\n    db->pUnlockConnection = (sqlite3 *)0x0;\n    db->xUnlockNotify = (_func_void_void_ptr_ptr_int *)0x0;\n    db->pUnlockArg = (void *)0x0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }\n  psVar2 = db->pBlockingConnection;\n  if (psVar2 == (sqlite3 *)0x0) {\n    zFormat = (char *)0x0;\n    (*xNotify)(&pArg,1);\n    err_code = 0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }\n  psVar4 = psVar2;\n  if (psVar2 != db) {\n    do {\n      psVar4 = psVar4->pUnlockConnection;\n      if (psVar4 == (sqlite3 *)0x0) break;\n    } while (db != psVar4);\n    if (psVar4 == (sqlite3 *)0x0) {\n      db->pUnlockConnection = psVar2;\n      db->xUnlockNotify = xNotify;\n      db->pUnlockArg = pArg;\n      if (sqlite3BlockedList == (sqlite3 *)0x0) {\nLAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;\n        ppsVar3 = &sqlite3BlockedList;\n      }\n      else {\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }\n      db->pNextBlocked = psVar2;\n      err_code = 0;\n      *ppsVar3 = db;\n      leaveMutex();\n      zFormat = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  leaveMutex();\n  err_code = 6;\n  zFormat = "database is deadlocked";\nLAB_00058eb8:\n  sqlite3ErrorWithMsg(db,err_code,zFormat);\n  sqlite3_mutex_leave(db->mutex);\n  return err_code;\n}" primitive_type (function_declarator "sqlite3_unlock_notify(sqlite3 *db,_func_void_void_ptr_ptr_int *xNotify,void *pArg)" identifier (parameter_list "(sqlite3 *db,_func_void_void_ptr_ptr_int *xNotify,void *pArg)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "_func_void_void_ptr_ptr_int *xNotify" type_identifier (pointer_declarator "*xNotify" * identifier)) , (parameter_declaration "void *pArg" primitive_type (pointer_declarator "*pArg" * identifier)) ))) (compound_statement "{\n  _func_void_void_ptr_ptr_int *p_Var1;\n  sqlite3 *psVar2;\n  sqlite3 **ppsVar3;\n  int err_code;\n  sqlite3 *psVar4;\n  char *zFormat;\n  \n  sqlite3_mutex_enter(db->mutex);\n  enterMutex();\n  if (xNotify == (_func_void_void_ptr_ptr_int *)0x0) {\n    if (sqlite3BlockedList != (sqlite3 *)0x0) {\n      psVar2 = sqlite3BlockedList;\n      if (db == sqlite3BlockedList) {\n        ppsVar3 = &sqlite3BlockedList;\n        psVar2 = db;\n      }\n      else {\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }\n      *ppsVar3 = psVar2->pNextBlocked;\n    }\nLAB_00058f0c:\n    db->pBlockingConnection = (sqlite3 *)0x0;\n    err_code = 0;\n    zFormat = (char *)0x0;\n    db->pUnlockConnection = (sqlite3 *)0x0;\n    db->xUnlockNotify = (_func_void_void_ptr_ptr_int *)0x0;\n    db->pUnlockArg = (void *)0x0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }\n  psVar2 = db->pBlockingConnection;\n  if (psVar2 == (sqlite3 *)0x0) {\n    zFormat = (char *)0x0;\n    (*xNotify)(&pArg,1);\n    err_code = 0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }\n  psVar4 = psVar2;\n  if (psVar2 != db) {\n    do {\n      psVar4 = psVar4->pUnlockConnection;\n      if (psVar4 == (sqlite3 *)0x0) break;\n    } while (db != psVar4);\n    if (psVar4 == (sqlite3 *)0x0) {\n      db->pUnlockConnection = psVar2;\n      db->xUnlockNotify = xNotify;\n      db->pUnlockArg = pArg;\n      if (sqlite3BlockedList == (sqlite3 *)0x0) {\nLAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;\n        ppsVar3 = &sqlite3BlockedList;\n      }\n      else {\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }\n      db->pNextBlocked = psVar2;\n      err_code = 0;\n      *ppsVar3 = db;\n      leaveMutex();\n      zFormat = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  leaveMutex();\n  err_code = 6;\n  zFormat = "database is deadlocked";\nLAB_00058eb8:\n  sqlite3ErrorWithMsg(db,err_code,zFormat);\n  sqlite3_mutex_leave(db->mutex);\n  return err_code;\n}" { (declaration "_func_void_void_ptr_ptr_int *p_Var1;" type_identifier (pointer_declarator "*p_Var1" * identifier) ;) (declaration "sqlite3 *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "sqlite3 **ppsVar3;" type_identifier (pointer_declarator "**ppsVar3" * (pointer_declarator "*ppsVar3" * identifier)) ;) (declaration "int err_code;" primitive_type identifier ;) (declaration "sqlite3 *psVar4;" type_identifier (pointer_declarator "*psVar4" * identifier) ;) (declaration "char *zFormat;" primitive_type (pointer_declarator "*zFormat" * identifier) ;) (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) ))) ;) (expression_statement "enterMutex();" (call_expression "enterMutex()" identifier (argument_list "()" ( ))) ;) (if_statement "if (xNotify == (_func_void_void_ptr_ptr_int *)0x0) {\n    if (sqlite3BlockedList != (sqlite3 *)0x0) {\n      psVar2 = sqlite3BlockedList;\n      if (db == sqlite3BlockedList) {\n        ppsVar3 = &sqlite3BlockedList;\n        psVar2 = db;\n      }\n      else {\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }\n      *ppsVar3 = psVar2->pNextBlocked;\n    }\nLAB_00058f0c:\n    db->pBlockingConnection = (sqlite3 *)0x0;\n    err_code = 0;\n    zFormat = (char *)0x0;\n    db->pUnlockConnection = (sqlite3 *)0x0;\n    db->xUnlockNotify = (_func_void_void_ptr_ptr_int *)0x0;\n    db->pUnlockArg = (void *)0x0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }" if (parenthesized_expression "(xNotify == (_func_void_void_ptr_ptr_int *)0x0)" ( (binary_expression "xNotify == (_func_void_void_ptr_ptr_int *)0x0" identifier == (cast_expression "(_func_void_void_ptr_ptr_int *)0x0" ( (type_descriptor "_func_void_void_ptr_ptr_int *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (sqlite3BlockedList != (sqlite3 *)0x0) {\n      psVar2 = sqlite3BlockedList;\n      if (db == sqlite3BlockedList) {\n        ppsVar3 = &sqlite3BlockedList;\n        psVar2 = db;\n      }\n      else {\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }\n      *ppsVar3 = psVar2->pNextBlocked;\n    }\nLAB_00058f0c:\n    db->pBlockingConnection = (sqlite3 *)0x0;\n    err_code = 0;\n    zFormat = (char *)0x0;\n    db->pUnlockConnection = (sqlite3 *)0x0;\n    db->xUnlockNotify = (_func_void_void_ptr_ptr_int *)0x0;\n    db->pUnlockArg = (void *)0x0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }" { (if_statement "if (sqlite3BlockedList != (sqlite3 *)0x0) {\n      psVar2 = sqlite3BlockedList;\n      if (db == sqlite3BlockedList) {\n        ppsVar3 = &sqlite3BlockedList;\n        psVar2 = db;\n      }\n      else {\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }\n      *ppsVar3 = psVar2->pNextBlocked;\n    }" if (parenthesized_expression "(sqlite3BlockedList != (sqlite3 *)0x0)" ( (binary_expression "sqlite3BlockedList != (sqlite3 *)0x0" identifier != (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      psVar2 = sqlite3BlockedList;\n      if (db == sqlite3BlockedList) {\n        ppsVar3 = &sqlite3BlockedList;\n        psVar2 = db;\n      }\n      else {\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }\n      *ppsVar3 = psVar2->pNextBlocked;\n    }" { (expression_statement "psVar2 = sqlite3BlockedList;" (assignment_expression "psVar2 = sqlite3BlockedList" identifier = identifier) ;) (if_statement "if (db == sqlite3BlockedList) {\n        ppsVar3 = &sqlite3BlockedList;\n        psVar2 = db;\n      }\n      else {\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }" if (parenthesized_expression "(db == sqlite3BlockedList)" ( (binary_expression "db == sqlite3BlockedList" identifier == identifier) )) (compound_statement "{\n        ppsVar3 = &sqlite3BlockedList;\n        psVar2 = db;\n      }" { (expression_statement "ppsVar3 = &sqlite3BlockedList;" (assignment_expression "ppsVar3 = &sqlite3BlockedList" identifier = (pointer_expression "&sqlite3BlockedList" & identifier)) ;) (expression_statement "psVar2 = db;" (assignment_expression "psVar2 = db" identifier = identifier) ;) }) (else_clause "else {\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }" else (compound_statement "{\n        do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);\n        ppsVar3 = &psVar4->pNextBlocked;\n      }" { (do_statement "do {\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        } while (db != psVar2);" do (compound_statement "{\n          psVar4 = psVar2;\n          psVar2 = psVar4->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;\n        }" { (expression_statement "psVar4 = psVar2;" (assignment_expression "psVar4 = psVar2" identifier = identifier) ;) (expression_statement "psVar2 = psVar4->pNextBlocked;" (assignment_expression "psVar2 = psVar4->pNextBlocked" identifier = (field_expression "psVar4->pNextBlocked" identifier -> field_identifier)) ;) (if_statement "if (psVar2 == (sqlite3 *)0x0) goto LAB_00058f0c;" if (parenthesized_expression "(psVar2 == (sqlite3 *)0x0)" ( (binary_expression "psVar2 == (sqlite3 *)0x0" identifier == (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00058f0c;" goto statement_identifier ;)) }) while (parenthesized_expression "(db != psVar2)" ( (binary_expression "db != psVar2" identifier != identifier) )) ;) (expression_statement "ppsVar3 = &psVar4->pNextBlocked;" (assignment_expression "ppsVar3 = &psVar4->pNextBlocked" identifier = (pointer_expression "&psVar4->pNextBlocked" & (field_expression "psVar4->pNextBlocked" identifier -> field_identifier))) ;) }))) (expression_statement "*ppsVar3 = psVar2->pNextBlocked;" (assignment_expression "*ppsVar3 = psVar2->pNextBlocked" (pointer_expression "*ppsVar3" * identifier) = (field_expression "psVar2->pNextBlocked" identifier -> field_identifier)) ;) })) (labeled_statement "LAB_00058f0c:\n    db->pBlockingConnection = (sqlite3 *)0x0;" statement_identifier : (expression_statement "db->pBlockingConnection = (sqlite3 *)0x0;" (assignment_expression "db->pBlockingConnection = (sqlite3 *)0x0" (field_expression "db->pBlockingConnection" identifier -> field_identifier) = (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (expression_statement "err_code = 0;" (assignment_expression "err_code = 0" identifier = number_literal) ;) (expression_statement "zFormat = (char *)0x0;" (assignment_expression "zFormat = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "db->pUnlockConnection = (sqlite3 *)0x0;" (assignment_expression "db->pUnlockConnection = (sqlite3 *)0x0" (field_expression "db->pUnlockConnection" identifier -> field_identifier) = (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "db->xUnlockNotify = (_func_void_void_ptr_ptr_int *)0x0;" (assignment_expression "db->xUnlockNotify = (_func_void_void_ptr_ptr_int *)0x0" (field_expression "db->xUnlockNotify" identifier -> field_identifier) = (cast_expression "(_func_void_void_ptr_ptr_int *)0x0" ( (type_descriptor "_func_void_void_ptr_ptr_int *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "db->pUnlockArg = (void *)0x0;" (assignment_expression "db->pUnlockArg = (void *)0x0" (field_expression "db->pUnlockArg" identifier -> field_identifier) = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "leaveMutex();" (call_expression "leaveMutex()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00058eb8;" goto statement_identifier ;) })) (expression_statement "psVar2 = db->pBlockingConnection;" (assignment_expression "psVar2 = db->pBlockingConnection" identifier = (field_expression "db->pBlockingConnection" identifier -> field_identifier)) ;) (if_statement "if (psVar2 == (sqlite3 *)0x0) {\n    zFormat = (char *)0x0;\n    (*xNotify)(&pArg,1);\n    err_code = 0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }" if (parenthesized_expression "(psVar2 == (sqlite3 *)0x0)" ( (binary_expression "psVar2 == (sqlite3 *)0x0" identifier == (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    zFormat = (char *)0x0;\n    (*xNotify)(&pArg,1);\n    err_code = 0;\n    leaveMutex();\n    goto LAB_00058eb8;\n  }" { (expression_statement "zFormat = (char *)0x0;" (assignment_expression "zFormat = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "(*xNotify)(&pArg,1);" (call_expression "(*xNotify)(&pArg,1)" (parenthesized_expression "(*xNotify)" ( (pointer_expression "*xNotify" * identifier) )) (argument_list "(&pArg,1)" ( (pointer_expression "&pArg" & identifier) , number_literal ))) ;) (expression_statement "err_code = 0;" (assignment_expression "err_code = 0" identifier = number_literal) ;) (expression_statement "leaveMutex();" (call_expression "leaveMutex()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00058eb8;" goto statement_identifier ;) })) (expression_statement "psVar4 = psVar2;" (assignment_expression "psVar4 = psVar2" identifier = identifier) ;) (if_statement "if (psVar2 != db) {\n    do {\n      psVar4 = psVar4->pUnlockConnection;\n      if (psVar4 == (sqlite3 *)0x0) break;\n    } while (db != psVar4);\n    if (psVar4 == (sqlite3 *)0x0) {\n      db->pUnlockConnection = psVar2;\n      db->xUnlockNotify = xNotify;\n      db->pUnlockArg = pArg;\n      if (sqlite3BlockedList == (sqlite3 *)0x0) {\nLAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;\n        ppsVar3 = &sqlite3BlockedList;\n      }\n      else {\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }\n      db->pNextBlocked = psVar2;\n      err_code = 0;\n      *ppsVar3 = db;\n      leaveMutex();\n      zFormat = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }" if (parenthesized_expression "(psVar2 != db)" ( (binary_expression "psVar2 != db" identifier != identifier) )) (compound_statement "{\n    do {\n      psVar4 = psVar4->pUnlockConnection;\n      if (psVar4 == (sqlite3 *)0x0) break;\n    } while (db != psVar4);\n    if (psVar4 == (sqlite3 *)0x0) {\n      db->pUnlockConnection = psVar2;\n      db->xUnlockNotify = xNotify;\n      db->pUnlockArg = pArg;\n      if (sqlite3BlockedList == (sqlite3 *)0x0) {\nLAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;\n        ppsVar3 = &sqlite3BlockedList;\n      }\n      else {\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }\n      db->pNextBlocked = psVar2;\n      err_code = 0;\n      *ppsVar3 = db;\n      leaveMutex();\n      zFormat = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }" { (do_statement "do {\n      psVar4 = psVar4->pUnlockConnection;\n      if (psVar4 == (sqlite3 *)0x0) break;\n    } while (db != psVar4);" do (compound_statement "{\n      psVar4 = psVar4->pUnlockConnection;\n      if (psVar4 == (sqlite3 *)0x0) break;\n    }" { (expression_statement "psVar4 = psVar4->pUnlockConnection;" (assignment_expression "psVar4 = psVar4->pUnlockConnection" identifier = (field_expression "psVar4->pUnlockConnection" identifier -> field_identifier)) ;) (if_statement "if (psVar4 == (sqlite3 *)0x0) break;" if (parenthesized_expression "(psVar4 == (sqlite3 *)0x0)" ( (binary_expression "psVar4 == (sqlite3 *)0x0" identifier == (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(db != psVar4)" ( (binary_expression "db != psVar4" identifier != identifier) )) ;) (if_statement "if (psVar4 == (sqlite3 *)0x0) {\n      db->pUnlockConnection = psVar2;\n      db->xUnlockNotify = xNotify;\n      db->pUnlockArg = pArg;\n      if (sqlite3BlockedList == (sqlite3 *)0x0) {\nLAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;\n        ppsVar3 = &sqlite3BlockedList;\n      }\n      else {\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }\n      db->pNextBlocked = psVar2;\n      err_code = 0;\n      *ppsVar3 = db;\n      leaveMutex();\n      zFormat = (char *)0x0;\n      goto LAB_00058eb8;\n    }" if (parenthesized_expression "(psVar4 == (sqlite3 *)0x0)" ( (binary_expression "psVar4 == (sqlite3 *)0x0" identifier == (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      db->pUnlockConnection = psVar2;\n      db->xUnlockNotify = xNotify;\n      db->pUnlockArg = pArg;\n      if (sqlite3BlockedList == (sqlite3 *)0x0) {\nLAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;\n        ppsVar3 = &sqlite3BlockedList;\n      }\n      else {\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }\n      db->pNextBlocked = psVar2;\n      err_code = 0;\n      *ppsVar3 = db;\n      leaveMutex();\n      zFormat = (char *)0x0;\n      goto LAB_00058eb8;\n    }" { (expression_statement "db->pUnlockConnection = psVar2;" (assignment_expression "db->pUnlockConnection = psVar2" (field_expression "db->pUnlockConnection" identifier -> field_identifier) = identifier) ;) (expression_statement "db->xUnlockNotify = xNotify;" (assignment_expression "db->xUnlockNotify = xNotify" (field_expression "db->xUnlockNotify" identifier -> field_identifier) = identifier) ;) (expression_statement "db->pUnlockArg = pArg;" (assignment_expression "db->pUnlockArg = pArg" (field_expression "db->pUnlockArg" identifier -> field_identifier) = identifier) ;) (if_statement "if (sqlite3BlockedList == (sqlite3 *)0x0) {\nLAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;\n        ppsVar3 = &sqlite3BlockedList;\n      }\n      else {\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }" if (parenthesized_expression "(sqlite3BlockedList == (sqlite3 *)0x0)" ( (binary_expression "sqlite3BlockedList == (sqlite3 *)0x0" identifier == (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;\n        ppsVar3 = &sqlite3BlockedList;\n      }" { (labeled_statement "LAB_00058f7c:\n        psVar2 = (sqlite3 *)0x0;" statement_identifier : (expression_statement "psVar2 = (sqlite3 *)0x0;" (assignment_expression "psVar2 = (sqlite3 *)0x0" identifier = (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (expression_statement "ppsVar3 = &sqlite3BlockedList;" (assignment_expression "ppsVar3 = &sqlite3BlockedList" identifier = (pointer_expression "&sqlite3BlockedList" & identifier)) ;) }) (else_clause "else {\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }" else (compound_statement "{\n        psVar2 = sqlite3BlockedList;\n        if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }\n        *ppsVar3 = psVar2->pNextBlocked;\n        if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;\nLAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;\n        p_Var1 = sqlite3BlockedList->xUnlockNotify;\n        psVar2 = sqlite3BlockedList;\n        while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }\n      }" { (expression_statement "psVar2 = sqlite3BlockedList;" (assignment_expression "psVar2 = sqlite3BlockedList" identifier = identifier) ;) (if_statement "if (db == sqlite3BlockedList) {\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }\n        else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }" if (parenthesized_expression "(db == sqlite3BlockedList)" ( (binary_expression "db == sqlite3BlockedList" identifier == identifier) )) (compound_statement "{\n          ppsVar3 = &sqlite3BlockedList;\n          psVar2 = db;\n        }" { (expression_statement "ppsVar3 = &sqlite3BlockedList;" (assignment_expression "ppsVar3 = &sqlite3BlockedList" identifier = (pointer_expression "&sqlite3BlockedList" & identifier)) ;) (expression_statement "psVar2 = db;" (assignment_expression "psVar2 = db" identifier = identifier) ;) }) (else_clause "else {\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }" else (compound_statement "{\n          do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);\n          ppsVar3 = &psVar4->pNextBlocked;\n        }" { (do_statement "do {\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          } while (db != psVar2);" do (compound_statement "{\n            psVar4 = psVar2;\n            psVar2 = psVar4->pNextBlocked;\n            if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;\n          }" { (expression_statement "psVar4 = psVar2;" (assignment_expression "psVar4 = psVar2" identifier = identifier) ;) (expression_statement "psVar2 = psVar4->pNextBlocked;" (assignment_expression "psVar2 = psVar4->pNextBlocked" identifier = (field_expression "psVar4->pNextBlocked" identifier -> field_identifier)) ;) (if_statement "if (psVar2 == (sqlite3 *)0x0) goto LAB_00058e54;" if (parenthesized_expression "(psVar2 == (sqlite3 *)0x0)" ( (binary_expression "psVar2 == (sqlite3 *)0x0" identifier == (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00058e54;" goto statement_identifier ;)) }) while (parenthesized_expression "(db != psVar2)" ( (binary_expression "db != psVar2" identifier != identifier) )) ;) (expression_statement "ppsVar3 = &psVar4->pNextBlocked;" (assignment_expression "ppsVar3 = &psVar4->pNextBlocked" identifier = (pointer_expression "&psVar4->pNextBlocked" & (field_expression "psVar4->pNextBlocked" identifier -> field_identifier))) ;) }))) (expression_statement "*ppsVar3 = psVar2->pNextBlocked;" (assignment_expression "*ppsVar3 = psVar2->pNextBlocked" (pointer_expression "*ppsVar3" * identifier) = (field_expression "psVar2->pNextBlocked" identifier -> field_identifier)) ;) (if_statement "if (sqlite3BlockedList == (sqlite3 *)0x0) goto LAB_00058f7c;" if (parenthesized_expression "(sqlite3BlockedList == (sqlite3 *)0x0)" ( (binary_expression "sqlite3BlockedList == (sqlite3 *)0x0" identifier == (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00058f7c;" goto statement_identifier ;)) (labeled_statement "LAB_00058e54:\n        ppsVar3 = &sqlite3BlockedList;" statement_identifier : (expression_statement "ppsVar3 = &sqlite3BlockedList;" (assignment_expression "ppsVar3 = &sqlite3BlockedList" identifier = (pointer_expression "&sqlite3BlockedList" & identifier)) ;)) (expression_statement "p_Var1 = sqlite3BlockedList->xUnlockNotify;" (assignment_expression "p_Var1 = sqlite3BlockedList->xUnlockNotify" identifier = (field_expression "sqlite3BlockedList->xUnlockNotify" identifier -> field_identifier)) ;) (expression_statement "psVar2 = sqlite3BlockedList;" (assignment_expression "psVar2 = sqlite3BlockedList" identifier = identifier) ;) (while_statement "while (p_Var1 != db->xUnlockNotify) {\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }" while (parenthesized_expression "(p_Var1 != db->xUnlockNotify)" ( (binary_expression "p_Var1 != db->xUnlockNotify" identifier != (field_expression "db->xUnlockNotify" identifier -> field_identifier)) )) (compound_statement "{\n          ppsVar3 = &psVar2->pNextBlocked;\n          psVar2 = psVar2->pNextBlocked;\n          if (psVar2 == (sqlite3 *)0x0) break;\n          p_Var1 = psVar2->xUnlockNotify;\n        }" { (expression_statement "ppsVar3 = &psVar2->pNextBlocked;" (assignment_expression "ppsVar3 = &psVar2->pNextBlocked" identifier = (pointer_expression "&psVar2->pNextBlocked" & (field_expression "psVar2->pNextBlocked" identifier -> field_identifier))) ;) (expression_statement "psVar2 = psVar2->pNextBlocked;" (assignment_expression "psVar2 = psVar2->pNextBlocked" identifier = (field_expression "psVar2->pNextBlocked" identifier -> field_identifier)) ;) (if_statement "if (psVar2 == (sqlite3 *)0x0) break;" if (parenthesized_expression "(psVar2 == (sqlite3 *)0x0)" ( (binary_expression "psVar2 == (sqlite3 *)0x0" identifier == (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) (expression_statement "p_Var1 = psVar2->xUnlockNotify;" (assignment_expression "p_Var1 = psVar2->xUnlockNotify" identifier = (field_expression "psVar2->xUnlockNotify" identifier -> field_identifier)) ;) })) }))) (expression_statement "db->pNextBlocked = psVar2;" (assignment_expression "db->pNextBlocked = psVar2" (field_expression "db->pNextBlocked" identifier -> field_identifier) = identifier) ;) (expression_statement "err_code = 0;" (assignment_expression "err_code = 0" identifier = number_literal) ;) (expression_statement "*ppsVar3 = db;" (assignment_expression "*ppsVar3 = db" (pointer_expression "*ppsVar3" * identifier) = identifier) ;) (expression_statement "leaveMutex();" (call_expression "leaveMutex()" identifier (argument_list "()" ( ))) ;) (expression_statement "zFormat = (char *)0x0;" (assignment_expression "zFormat = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (goto_statement "goto LAB_00058eb8;" goto statement_identifier ;) })) })) (expression_statement "leaveMutex();" (call_expression "leaveMutex()" identifier (argument_list "()" ( ))) ;) (expression_statement "err_code = 6;" (assignment_expression "err_code = 6" identifier = number_literal) ;) (expression_statement "zFormat = "database is deadlocked";" (assignment_expression "zFormat = "database is deadlocked"" identifier = (string_literal ""database is deadlocked"" " string_content ")) ;) (labeled_statement "LAB_00058eb8:\n  sqlite3ErrorWithMsg(db,err_code,zFormat);" statement_identifier : (expression_statement "sqlite3ErrorWithMsg(db,err_code,zFormat);" (call_expression "sqlite3ErrorWithMsg(db,err_code,zFormat)" identifier (argument_list "(db,err_code,zFormat)" ( identifier , identifier , identifier ))) ;)) (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) ))) ;) (return_statement "return err_code;" return identifier ;) })))
(translation_unit "undefined4 FUN_00058da0(int param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));\n  FUN_0001ed40();\n  if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar1 = *(int *)(param_1 + 0x1e4);\n  if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar5 = iVar1;\n  if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  FUN_0001ed90();\n  uVar4 = 6;\n  pcVar6 = "database is deadlocked";\nLAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);\n  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));\n  return uVar4;\n}\n\n" (function_definition "undefined4 FUN_00058da0(int param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));\n  FUN_0001ed40();\n  if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar1 = *(int *)(param_1 + 0x1e4);\n  if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar5 = iVar1;\n  if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  FUN_0001ed90();\n  uVar4 = 6;\n  pcVar6 = "database is deadlocked";\nLAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);\n  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));\n  return uVar4;\n}" type_identifier (function_declarator "FUN_00058da0(int param_1,code *param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,code *param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));\n  FUN_0001ed40();\n  if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar1 = *(int *)(param_1 + 0x1e4);\n  if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar5 = iVar1;\n  if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  FUN_0001ed90();\n  uVar4 = 6;\n  pcVar6 = "database is deadlocked";\nLAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);\n  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));\n  return uVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (expression_statement "FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_0001afd0(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_0001ed40();" (call_expression "FUN_0001ed40()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" if (parenthesized_expression "(param_2 == (code *)0x0)" ( (binary_expression "param_2 == (code *)0x0" identifier == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" { (if_statement "if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }" if (parenthesized_expression "(DAT_0014c6b0 != 0)" ( (binary_expression "DAT_0014c6b0 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }" { (expression_statement "iVar1 = DAT_0014c6b0;" (assignment_expression "iVar1 = DAT_0014c6b0" identifier = identifier) ;) (if_statement "if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }" if (parenthesized_expression "(param_1 == DAT_0014c6b0)" ( (binary_expression "param_1 == DAT_0014c6b0" identifier == identifier) )) (compound_statement "{\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }" { (expression_statement "puVar3 = &DAT_0014c6b0;" (assignment_expression "puVar3 = &DAT_0014c6b0" identifier = (pointer_expression "&DAT_0014c6b0" & identifier)) ;) (expression_statement "iVar1 = param_1;" (assignment_expression "iVar1 = param_1" identifier = identifier) ;) }) (else_clause "else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }" else (compound_statement "{\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }" { (do_statement "do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);" do (compound_statement "{\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        }" { (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" identifier = identifier) ;) (expression_statement "iVar1 = *(int *)(iVar5 + 500);" (assignment_expression "iVar1 = *(int *)(iVar5 + 500)" identifier = (pointer_expression "*(int *)(iVar5 + 500)" * (cast_expression "(int *)(iVar5 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 500)" ( (binary_expression "iVar5 + 500" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) goto LAB_00058f0c;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00058f0c;" goto statement_identifier ;)) }) while (parenthesized_expression "(param_1 != iVar1)" ( (binary_expression "param_1 != iVar1" identifier != identifier) )) ;) (expression_statement "puVar3 = (undefined4 *)(iVar5 + 500);" (assignment_expression "puVar3 = (undefined4 *)(iVar5 + 500)" identifier = (cast_expression "(undefined4 *)(iVar5 + 500)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 500)" ( (binary_expression "iVar5 + 500" identifier + number_literal) )))) ;) }))) (expression_statement "*puVar3 = *(undefined4 *)(iVar1 + 500);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar1 + 500)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar1 + 500)" * (cast_expression "(undefined4 *)(iVar1 + 500)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 500)" ( (binary_expression "iVar1 + 500" identifier + number_literal) ))))) ;) })) (labeled_statement "LAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;" statement_identifier : (expression_statement "*(undefined4 *)(param_1 + 0x1e4) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1e4) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1e4)" * (cast_expression "(undefined4 *)(param_1 + 0x1e4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e4)" ( (binary_expression "param_1 + 0x1e4" identifier + number_literal) )))) = number_literal) ;)) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1e8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1e8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1e8)" * (cast_expression "(undefined4 *)(param_1 + 0x1e8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e8)" ( (binary_expression "param_1 + 0x1e8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1f0) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1f0) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1f0)" * (cast_expression "(undefined4 *)(param_1 + 0x1f0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1f0)" ( (binary_expression "param_1 + 0x1f0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1ec) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1ec) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1ec)" * (cast_expression "(undefined4 *)(param_1 + 0x1ec)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ec)" ( (binary_expression "param_1 + 0x1ec" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00058eb8;" goto statement_identifier ;) })) (expression_statement "iVar1 = *(int *)(param_1 + 0x1e4);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x1e4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1e4)" * (cast_expression "(int *)(param_1 + 0x1e4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e4)" ( (binary_expression "param_1 + 0x1e4" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" { (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "(*param_2)(&param_3,1);" (call_expression "(*param_2)(&param_3,1)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(&param_3,1)" ( (pointer_expression "&param_3" & identifier) , number_literal ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_00058eb8;" goto statement_identifier ;) })) (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" identifier = identifier) ;) (if_statement "if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }" if (parenthesized_expression "(iVar1 != param_1)" ( (binary_expression "iVar1 != param_1" identifier != identifier) )) (compound_statement "{\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }" { (do_statement "do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);" do (compound_statement "{\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    }" { (expression_statement "iVar5 = *(int *)(iVar5 + 0x1e8);" (assignment_expression "iVar5 = *(int *)(iVar5 + 0x1e8)" identifier = (pointer_expression "*(int *)(iVar5 + 0x1e8)" * (cast_expression "(int *)(iVar5 + 0x1e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x1e8)" ( (binary_expression "iVar5 + 0x1e8" identifier + number_literal) ))))) ;) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(param_1 != iVar5)" ( (binary_expression "param_1 != iVar5" identifier != identifier) )) ;) (if_statement "if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }" { (expression_statement "*(int *)(param_1 + 0x1e8) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x1e8) = iVar1" (pointer_expression "*(int *)(param_1 + 0x1e8)" * (cast_expression "(int *)(param_1 + 0x1e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1e8)" ( (binary_expression "param_1 + 0x1e8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(code **)(param_1 + 0x1f0) = param_2;" (assignment_expression "*(code **)(param_1 + 0x1f0) = param_2" (pointer_expression "*(code **)(param_1 + 0x1f0)" * (cast_expression "(code **)(param_1 + 0x1f0)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1f0)" ( (binary_expression "param_1 + 0x1f0" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1ec) = param_3;" (assignment_expression "*(undefined4 *)(param_1 + 0x1ec) = param_3" (pointer_expression "*(undefined4 *)(param_1 + 0x1ec)" * (cast_expression "(undefined4 *)(param_1 + 0x1ec)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ec)" ( (binary_expression "param_1 + 0x1ec" identifier + number_literal) )))) = identifier) ;) (if_statement "if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }" if (parenthesized_expression "(DAT_0014c6b0 == 0)" ( (binary_expression "DAT_0014c6b0 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }" { (labeled_statement "LAB_00058f7c:\n        iVar1 = 0;" statement_identifier : (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;)) (expression_statement "piVar2 = &DAT_0014c6b0;" (assignment_expression "piVar2 = &DAT_0014c6b0" identifier = (pointer_expression "&DAT_0014c6b0" & identifier)) ;) }) (else_clause "else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }" else (compound_statement "{\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }" { (expression_statement "iVar1 = DAT_0014c6b0;" (assignment_expression "iVar1 = DAT_0014c6b0" identifier = identifier) ;) (if_statement "if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }" if (parenthesized_expression "(param_1 == DAT_0014c6b0)" ( (binary_expression "param_1 == DAT_0014c6b0" identifier == identifier) )) (compound_statement "{\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }" { (expression_statement "puVar3 = &DAT_0014c6b0;" (assignment_expression "puVar3 = &DAT_0014c6b0" identifier = (pointer_expression "&DAT_0014c6b0" & identifier)) ;) (expression_statement "iVar1 = param_1;" (assignment_expression "iVar1 = param_1" identifier = identifier) ;) }) (else_clause "else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }" else (compound_statement "{\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }" { (do_statement "do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);" do (compound_statement "{\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          }" { (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" identifier = identifier) ;) (expression_statement "iVar1 = *(int *)(iVar5 + 500);" (assignment_expression "iVar1 = *(int *)(iVar5 + 500)" identifier = (pointer_expression "*(int *)(iVar5 + 500)" * (cast_expression "(int *)(iVar5 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 500)" ( (binary_expression "iVar5 + 500" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) goto LAB_00058e54;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00058e54;" goto statement_identifier ;)) }) while (parenthesized_expression "(param_1 != iVar1)" ( (binary_expression "param_1 != iVar1" identifier != identifier) )) ;) (expression_statement "puVar3 = (undefined4 *)(iVar5 + 500);" (assignment_expression "puVar3 = (undefined4 *)(iVar5 + 500)" identifier = (cast_expression "(undefined4 *)(iVar5 + 500)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 500)" ( (binary_expression "iVar5 + 500" identifier + number_literal) )))) ;) }))) (expression_statement "*puVar3 = *(undefined4 *)(iVar1 + 500);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar1 + 500)" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)(iVar1 + 500)" * (cast_expression "(undefined4 *)(iVar1 + 500)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 500)" ( (binary_expression "iVar1 + 500" identifier + number_literal) ))))) ;) (if_statement "if (DAT_0014c6b0 == 0) goto LAB_00058f7c;" if (parenthesized_expression "(DAT_0014c6b0 == 0)" ( (binary_expression "DAT_0014c6b0 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00058f7c;" goto statement_identifier ;)) (labeled_statement "LAB_00058e54:\n        piVar2 = &DAT_0014c6b0;" statement_identifier : (expression_statement "piVar2 = &DAT_0014c6b0;" (assignment_expression "piVar2 = &DAT_0014c6b0" identifier = (pointer_expression "&DAT_0014c6b0" & identifier)) ;)) (expression_statement "iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);" (assignment_expression "iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0)" identifier = (pointer_expression "*(int *)(DAT_0014c6b0 + 0x1f0)" * (cast_expression "(int *)(DAT_0014c6b0 + 0x1f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_0014c6b0 + 0x1f0)" ( (binary_expression "DAT_0014c6b0 + 0x1f0" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = DAT_0014c6b0;" (assignment_expression "iVar1 = DAT_0014c6b0" identifier = identifier) ;) (while_statement "while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }" while (parenthesized_expression "(iVar5 != *(int *)(param_1 + 0x1f0))" ( (binary_expression "iVar5 != *(int *)(param_1 + 0x1f0)" identifier != (pointer_expression "*(int *)(param_1 + 0x1f0)" * (cast_expression "(int *)(param_1 + 0x1f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1f0)" ( (binary_expression "param_1 + 0x1f0" identifier + number_literal) ))))) )) (compound_statement "{\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }" { (expression_statement "piVar2 = (int *)(iVar1 + 500);" (assignment_expression "piVar2 = (int *)(iVar1 + 500)" identifier = (cast_expression "(int *)(iVar1 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 500)" ( (binary_expression "iVar1 + 500" identifier + number_literal) )))) ;) (expression_statement "iVar1 = *(int *)(iVar1 + 500);" (assignment_expression "iVar1 = *(int *)(iVar1 + 500)" identifier = (pointer_expression "*(int *)(iVar1 + 500)" * (cast_expression "(int *)(iVar1 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 500)" ( (binary_expression "iVar1 + 500" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) break;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar5 = *(int *)(iVar1 + 0x1f0);" (assignment_expression "iVar5 = *(int *)(iVar1 + 0x1f0)" identifier = (pointer_expression "*(int *)(iVar1 + 0x1f0)" * (cast_expression "(int *)(iVar1 + 0x1f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1f0)" ( (binary_expression "iVar1 + 0x1f0" identifier + number_literal) ))))) ;) })) }))) (expression_statement "*(int *)(param_1 + 500) = iVar1;" (assignment_expression "*(int *)(param_1 + 500) = iVar1" (pointer_expression "*(int *)(param_1 + 500)" * (cast_expression "(int *)(param_1 + 500)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 500)" ( (binary_expression "param_1 + 500" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "*piVar2 = param_1;" (assignment_expression "*piVar2 = param_1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (goto_statement "goto LAB_00058eb8;" goto statement_identifier ;) })) })) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar4 = 6;" (assignment_expression "uVar4 = 6" identifier = number_literal) ;) (expression_statement "pcVar6 = "database is deadlocked";" (assignment_expression "pcVar6 = "database is deadlocked"" identifier = (string_literal ""database is deadlocked"" " string_content ")) ;) (labeled_statement "LAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);" statement_identifier : (expression_statement "FUN_00058300(param_1,uVar4,pcVar6);" (call_expression "FUN_00058300(param_1,uVar4,pcVar6)" identifier (argument_list "(param_1,uVar4,pcVar6)" ( identifier , identifier , identifier ))) ;)) (expression_statement "FUN_0001b000(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_0001b000(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (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 (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (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 ( ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;)) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_00058da0(int param_1,code *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));\n  FUN_0001ed40();\n  if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar1 = *(int *)(param_1 + 0x1e4);\n  if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar5 = iVar1;\n  if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  FUN_0001ed90();\n  uVar4 = 6;\n  pcVar6 = "database is deadlocked";\nLAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);\n  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));\n  return uVar4;\n}" (type_identifier "undefined4") (function_declarator "FUN_00058da0(int param_1,code *param_2,undefined4 param_3)" (identifier "FUN_00058da0") (parameter_list "(int param_1,code *param_2,undefined4 param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "code *param_2" (type_identifier "code") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  char *pcVar6;\n  \n  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));\n  FUN_0001ed40();\n  if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar1 = *(int *)(param_1 + 0x1e4);\n  if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }\n  iVar5 = iVar1;\n  if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }\n  FUN_0001ed90();\n  uVar4 = 6;\n  pcVar6 = "database is deadlocked";\nLAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);\n  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));\n  return uVar4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (expression_statement "FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_0001afd0(*(undefined4 *)(param_1 + 0xc))" (identifier "FUN_0001afd0") (argument_list "(*(undefined4 *)(param_1 + 0xc))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (expression_statement "FUN_0001ed40();" (call_expression "FUN_0001ed40()" (identifier "FUN_0001ed40") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (param_2 == (code *)0x0) {\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" (if "if") (parenthesized_expression "(param_2 == (code *)0x0)" (( "(") (binary_expression "param_2 == (code *)0x0" (identifier "param_2") (== "==") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }\nLAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;\n    uVar4 = 0;\n    pcVar6 = (char *)0x0;\n    *(undefined4 *)(param_1 + 0x1e8) = 0;\n    *(undefined4 *)(param_1 + 0x1f0) = 0;\n    *(undefined4 *)(param_1 + 0x1ec) = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" ({ "{") (if_statement "if (DAT_0014c6b0 != 0) {\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }" (if "if") (parenthesized_expression "(DAT_0014c6b0 != 0)" (( "(") (binary_expression "DAT_0014c6b0 != 0" (identifier "DAT_0014c6b0") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = DAT_0014c6b0;\n      if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }\n      *puVar3 = *(undefined4 *)(iVar1 + 500);\n    }" ({ "{") (expression_statement "iVar1 = DAT_0014c6b0;" (assignment_expression "iVar1 = DAT_0014c6b0" (identifier "iVar1") (= "=") (identifier "DAT_0014c6b0")) (; ";")) (if_statement "if (param_1 == DAT_0014c6b0) {\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }\n      else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }" (if "if") (parenthesized_expression "(param_1 == DAT_0014c6b0)" (( "(") (binary_expression "param_1 == DAT_0014c6b0" (identifier "param_1") (== "==") (identifier "DAT_0014c6b0")) () ")")) (compound_statement "{\n        puVar3 = &DAT_0014c6b0;\n        iVar1 = param_1;\n      }" ({ "{") (expression_statement "puVar3 = &DAT_0014c6b0;" (assignment_expression "puVar3 = &DAT_0014c6b0" (identifier "puVar3") (= "=") (pointer_expression "&DAT_0014c6b0" (& "&") (identifier "DAT_0014c6b0"))) (; ";")) (expression_statement "iVar1 = param_1;" (assignment_expression "iVar1 = param_1" (identifier "iVar1") (= "=") (identifier "param_1")) (; ";")) (} "}")) (else_clause "else {\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }" (else "else") (compound_statement "{\n        do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);\n        puVar3 = (undefined4 *)(iVar5 + 500);\n      }" ({ "{") (do_statement "do {\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        } while (param_1 != iVar1);" (do "do") (compound_statement "{\n          iVar5 = iVar1;\n          iVar1 = *(int *)(iVar5 + 500);\n          if (iVar1 == 0) goto LAB_00058f0c;\n        }" ({ "{") (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" (identifier "iVar5") (= "=") (identifier "iVar1")) (; ";")) (expression_statement "iVar1 = *(int *)(iVar5 + 500);" (assignment_expression "iVar1 = *(int *)(iVar5 + 500)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(iVar5 + 500)" (* "*") (cast_expression "(int *)(iVar5 + 500)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 500)" (( "(") (binary_expression "iVar5 + 500" (identifier "iVar5") (+ "+") (number_literal "500")) () ")"))))) (; ";")) (if_statement "if (iVar1 == 0) goto LAB_00058f0c;" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00058f0c;" (goto "goto") (statement_identifier "LAB_00058f0c") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(param_1 != iVar1)" (( "(") (binary_expression "param_1 != iVar1" (identifier "param_1") (!= "!=") (identifier "iVar1")) () ")")) (; ";")) (expression_statement "puVar3 = (undefined4 *)(iVar5 + 500);" (assignment_expression "puVar3 = (undefined4 *)(iVar5 + 500)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(iVar5 + 500)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 500)" (( "(") (binary_expression "iVar5 + 500" (identifier "iVar5") (+ "+") (number_literal "500")) () ")")))) (; ";")) (} "}")))) (expression_statement "*puVar3 = *(undefined4 *)(iVar1 + 500);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar1 + 500)" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "*(undefined4 *)(iVar1 + 500)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 500)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 500)" (( "(") (binary_expression "iVar1 + 500" (identifier "iVar1") (+ "+") (number_literal "500")) () ")"))))) (; ";")) (} "}"))) (labeled_statement "LAB_00058f0c:\n    *(undefined4 *)(param_1 + 0x1e4) = 0;" (statement_identifier "LAB_00058f0c") (: ":") (expression_statement "*(undefined4 *)(param_1 + 0x1e4) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1e4) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1e4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1e4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1e4)" (( "(") (binary_expression "param_1 + 0x1e4" (identifier "param_1") (+ "+") (number_literal "0x1e4")) () ")")))) (= "=") (number_literal "0")) (; ";"))) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" (identifier "pcVar6") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x1e8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1e8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1e8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1e8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1e8)" (( "(") (binary_expression "param_1 + 0x1e8" (identifier "param_1") (+ "+") (number_literal "0x1e8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x1f0) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1f0) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1f0)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1f0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1f0)" (( "(") (binary_expression "param_1 + 0x1f0" (identifier "param_1") (+ "+") (number_literal "0x1f0")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x1ec) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1ec) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1ec)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1ec)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1ec)" (( "(") (binary_expression "param_1 + 0x1ec" (identifier "param_1") (+ "+") (number_literal "0x1ec")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" (identifier "FUN_0001ed90") (argument_list "()" (( "(") () ")"))) (; ";")) (goto_statement "goto LAB_00058eb8;" (goto "goto") (statement_identifier "LAB_00058eb8") (; ";")) (} "}"))) (expression_statement "iVar1 = *(int *)(param_1 + 0x1e4);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x1e4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x1e4)" (* "*") (cast_expression "(int *)(param_1 + 0x1e4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1e4)" (( "(") (binary_expression "param_1 + 0x1e4" (identifier "param_1") (+ "+") (number_literal "0x1e4")) () ")"))))) (; ";")) (if_statement "if (iVar1 == 0) {\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    pcVar6 = (char *)0x0;\n    (*param_2)(&param_3,1);\n    uVar4 = 0;\n    FUN_0001ed90();\n    goto LAB_00058eb8;\n  }" ({ "{") (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" (identifier "pcVar6") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "(*param_2)(&param_3,1);" (call_expression "(*param_2)(&param_3,1)" (parenthesized_expression "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")")) (argument_list "(&param_3,1)" (( "(") (pointer_expression "&param_3" (& "&") (identifier "param_3")) (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" (identifier "FUN_0001ed90") (argument_list "()" (( "(") () ")"))) (; ";")) (goto_statement "goto LAB_00058eb8;" (goto "goto") (statement_identifier "LAB_00058eb8") (; ";")) (} "}"))) (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" (identifier "iVar5") (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 != param_1) {\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != param_1)" (( "(") (binary_expression "iVar1 != param_1" (identifier "iVar1") (!= "!=") (identifier "param_1")) () ")")) (compound_statement "{\n    do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);\n    if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }\n  }" ({ "{") (do_statement "do {\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    } while (param_1 != iVar5);" (do "do") (compound_statement "{\n      iVar5 = *(int *)(iVar5 + 0x1e8);\n      if (iVar5 == 0) break;\n    }" ({ "{") (expression_statement "iVar5 = *(int *)(iVar5 + 0x1e8);" (assignment_expression "iVar5 = *(int *)(iVar5 + 0x1e8)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar5 + 0x1e8)" (* "*") (cast_expression "(int *)(iVar5 + 0x1e8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x1e8)" (( "(") (binary_expression "iVar5 + 0x1e8" (identifier "iVar5") (+ "+") (number_literal "0x1e8")) () ")"))))) (; ";")) (if_statement "if (iVar5 == 0) break;" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(param_1 != iVar5)" (( "(") (binary_expression "param_1 != iVar5" (identifier "param_1") (!= "!=") (identifier "iVar5")) () ")")) (; ";")) (if_statement "if (iVar5 == 0) {\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(int *)(param_1 + 0x1e8) = iVar1;\n      *(code **)(param_1 + 0x1f0) = param_2;\n      *(undefined4 *)(param_1 + 0x1ec) = param_3;\n      if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }\n      *(int *)(param_1 + 500) = iVar1;\n      uVar4 = 0;\n      *piVar2 = param_1;\n      FUN_0001ed90();\n      pcVar6 = (char *)0x0;\n      goto LAB_00058eb8;\n    }" ({ "{") (expression_statement "*(int *)(param_1 + 0x1e8) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x1e8) = iVar1" (pointer_expression "*(int *)(param_1 + 0x1e8)" (* "*") (cast_expression "(int *)(param_1 + 0x1e8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1e8)" (( "(") (binary_expression "param_1 + 0x1e8" (identifier "param_1") (+ "+") (number_literal "0x1e8")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "*(code **)(param_1 + 0x1f0) = param_2;" (assignment_expression "*(code **)(param_1 + 0x1f0) = param_2" (pointer_expression "*(code **)(param_1 + 0x1f0)" (* "*") (cast_expression "(code **)(param_1 + 0x1f0)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x1f0)" (( "(") (binary_expression "param_1 + 0x1f0" (identifier "param_1") (+ "+") (number_literal "0x1f0")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x1ec) = param_3;" (assignment_expression "*(undefined4 *)(param_1 + 0x1ec) = param_3" (pointer_expression "*(undefined4 *)(param_1 + 0x1ec)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1ec)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1ec)" (( "(") (binary_expression "param_1 + 0x1ec" (identifier "param_1") (+ "+") (number_literal "0x1ec")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (if_statement "if (DAT_0014c6b0 == 0) {\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }\n      else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }" (if "if") (parenthesized_expression "(DAT_0014c6b0 == 0)" (( "(") (binary_expression "DAT_0014c6b0 == 0" (identifier "DAT_0014c6b0") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00058f7c:\n        iVar1 = 0;\n        piVar2 = &DAT_0014c6b0;\n      }" ({ "{") (labeled_statement "LAB_00058f7c:\n        iVar1 = 0;" (statement_identifier "LAB_00058f7c") (: ":") (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";"))) (expression_statement "piVar2 = &DAT_0014c6b0;" (assignment_expression "piVar2 = &DAT_0014c6b0" (identifier "piVar2") (= "=") (pointer_expression "&DAT_0014c6b0" (& "&") (identifier "DAT_0014c6b0"))) (; ";")) (} "}")) (else_clause "else {\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }" (else "else") (compound_statement "{\n        iVar1 = DAT_0014c6b0;\n        if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }\n        *puVar3 = *(undefined4 *)(iVar1 + 500);\n        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;\nLAB_00058e54:\n        piVar2 = &DAT_0014c6b0;\n        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);\n        iVar1 = DAT_0014c6b0;\n        while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }\n      }" ({ "{") (expression_statement "iVar1 = DAT_0014c6b0;" (assignment_expression "iVar1 = DAT_0014c6b0" (identifier "iVar1") (= "=") (identifier "DAT_0014c6b0")) (; ";")) (if_statement "if (param_1 == DAT_0014c6b0) {\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }\n        else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }" (if "if") (parenthesized_expression "(param_1 == DAT_0014c6b0)" (( "(") (binary_expression "param_1 == DAT_0014c6b0" (identifier "param_1") (== "==") (identifier "DAT_0014c6b0")) () ")")) (compound_statement "{\n          puVar3 = &DAT_0014c6b0;\n          iVar1 = param_1;\n        }" ({ "{") (expression_statement "puVar3 = &DAT_0014c6b0;" (assignment_expression "puVar3 = &DAT_0014c6b0" (identifier "puVar3") (= "=") (pointer_expression "&DAT_0014c6b0" (& "&") (identifier "DAT_0014c6b0"))) (; ";")) (expression_statement "iVar1 = param_1;" (assignment_expression "iVar1 = param_1" (identifier "iVar1") (= "=") (identifier "param_1")) (; ";")) (} "}")) (else_clause "else {\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }" (else "else") (compound_statement "{\n          do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);\n          puVar3 = (undefined4 *)(iVar5 + 500);\n        }" ({ "{") (do_statement "do {\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          } while (param_1 != iVar1);" (do "do") (compound_statement "{\n            iVar5 = iVar1;\n            iVar1 = *(int *)(iVar5 + 500);\n            if (iVar1 == 0) goto LAB_00058e54;\n          }" ({ "{") (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" (identifier "iVar5") (= "=") (identifier "iVar1")) (; ";")) (expression_statement "iVar1 = *(int *)(iVar5 + 500);" (assignment_expression "iVar1 = *(int *)(iVar5 + 500)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(iVar5 + 500)" (* "*") (cast_expression "(int *)(iVar5 + 500)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 500)" (( "(") (binary_expression "iVar5 + 500" (identifier "iVar5") (+ "+") (number_literal "500")) () ")"))))) (; ";")) (if_statement "if (iVar1 == 0) goto LAB_00058e54;" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00058e54;" (goto "goto") (statement_identifier "LAB_00058e54") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(param_1 != iVar1)" (( "(") (binary_expression "param_1 != iVar1" (identifier "param_1") (!= "!=") (identifier "iVar1")) () ")")) (; ";")) (expression_statement "puVar3 = (undefined4 *)(iVar5 + 500);" (assignment_expression "puVar3 = (undefined4 *)(iVar5 + 500)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(iVar5 + 500)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 500)" (( "(") (binary_expression "iVar5 + 500" (identifier "iVar5") (+ "+") (number_literal "500")) () ")")))) (; ";")) (} "}")))) (expression_statement "*puVar3 = *(undefined4 *)(iVar1 + 500);" (assignment_expression "*puVar3 = *(undefined4 *)(iVar1 + 500)" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "*(undefined4 *)(iVar1 + 500)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 500)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 500)" (( "(") (binary_expression "iVar1 + 500" (identifier "iVar1") (+ "+") (number_literal "500")) () ")"))))) (; ";")) (if_statement "if (DAT_0014c6b0 == 0) goto LAB_00058f7c;" (if "if") (parenthesized_expression "(DAT_0014c6b0 == 0)" (( "(") (binary_expression "DAT_0014c6b0 == 0" (identifier "DAT_0014c6b0") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00058f7c;" (goto "goto") (statement_identifier "LAB_00058f7c") (; ";"))) (labeled_statement "LAB_00058e54:\n        piVar2 = &DAT_0014c6b0;" (statement_identifier "LAB_00058e54") (: ":") (expression_statement "piVar2 = &DAT_0014c6b0;" (assignment_expression "piVar2 = &DAT_0014c6b0" (identifier "piVar2") (= "=") (pointer_expression "&DAT_0014c6b0" (& "&") (identifier "DAT_0014c6b0"))) (; ";"))) (expression_statement "iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);" (assignment_expression "iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(DAT_0014c6b0 + 0x1f0)" (* "*") (cast_expression "(int *)(DAT_0014c6b0 + 0x1f0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(DAT_0014c6b0 + 0x1f0)" (( "(") (binary_expression "DAT_0014c6b0 + 0x1f0" (identifier "DAT_0014c6b0") (+ "+") (number_literal "0x1f0")) () ")"))))) (; ";")) (expression_statement "iVar1 = DAT_0014c6b0;" (assignment_expression "iVar1 = DAT_0014c6b0" (identifier "iVar1") (= "=") (identifier "DAT_0014c6b0")) (; ";")) (while_statement "while (iVar5 != *(int *)(param_1 + 0x1f0)) {\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }" (while "while") (parenthesized_expression "(iVar5 != *(int *)(param_1 + 0x1f0))" (( "(") (binary_expression "iVar5 != *(int *)(param_1 + 0x1f0)" (identifier "iVar5") (!= "!=") (pointer_expression "*(int *)(param_1 + 0x1f0)" (* "*") (cast_expression "(int *)(param_1 + 0x1f0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1f0)" (( "(") (binary_expression "param_1 + 0x1f0" (identifier "param_1") (+ "+") (number_literal "0x1f0")) () ")"))))) () ")")) (compound_statement "{\n          piVar2 = (int *)(iVar1 + 500);\n          iVar1 = *(int *)(iVar1 + 500);\n          if (iVar1 == 0) break;\n          iVar5 = *(int *)(iVar1 + 0x1f0);\n        }" ({ "{") (expression_statement "piVar2 = (int *)(iVar1 + 500);" (assignment_expression "piVar2 = (int *)(iVar1 + 500)" (identifier "piVar2") (= "=") (cast_expression "(int *)(iVar1 + 500)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 500)" (( "(") (binary_expression "iVar1 + 500" (identifier "iVar1") (+ "+") (number_literal "500")) () ")")))) (; ";")) (expression_statement "iVar1 = *(int *)(iVar1 + 500);" (assignment_expression "iVar1 = *(int *)(iVar1 + 500)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(iVar1 + 500)" (* "*") (cast_expression "(int *)(iVar1 + 500)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 500)" (( "(") (binary_expression "iVar1 + 500" (identifier "iVar1") (+ "+") (number_literal "500")) () ")"))))) (; ";")) (if_statement "if (iVar1 == 0) break;" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar5 = *(int *)(iVar1 + 0x1f0);" (assignment_expression "iVar5 = *(int *)(iVar1 + 0x1f0)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar1 + 0x1f0)" (* "*") (cast_expression "(int *)(iVar1 + 0x1f0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x1f0)" (( "(") (binary_expression "iVar1 + 0x1f0" (identifier "iVar1") (+ "+") (number_literal "0x1f0")) () ")"))))) (; ";")) (} "}"))) (} "}")))) (expression_statement "*(int *)(param_1 + 500) = iVar1;" (assignment_expression "*(int *)(param_1 + 500) = iVar1" (pointer_expression "*(int *)(param_1 + 500)" (* "*") (cast_expression "(int *)(param_1 + 500)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 500)" (( "(") (binary_expression "param_1 + 500" (identifier "param_1") (+ "+") (number_literal "500")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "*piVar2 = param_1;" (assignment_expression "*piVar2 = param_1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" (identifier "FUN_0001ed90") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" (identifier "pcVar6") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (goto_statement "goto LAB_00058eb8;" (goto "goto") (statement_identifier "LAB_00058eb8") (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_0001ed90();" (call_expression "FUN_0001ed90()" (identifier "FUN_0001ed90") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar4 = 6;" (assignment_expression "uVar4 = 6" (identifier "uVar4") (= "=") (number_literal "6")) (; ";")) (expression_statement "pcVar6 = "database is deadlocked";" (assignment_expression "pcVar6 = "database is deadlocked"" (identifier "pcVar6") (= "=") (string_literal ""database is deadlocked"" (" """) (string_content "database is deadlocked") (" """))) (; ";")) (labeled_statement "LAB_00058eb8:\n  FUN_00058300(param_1,uVar4,pcVar6);" (statement_identifier "LAB_00058eb8") (: ":") (expression_statement "FUN_00058300(param_1,uVar4,pcVar6);" (call_expression "FUN_00058300(param_1,uVar4,pcVar6)" (identifier "FUN_00058300") (argument_list "(param_1,uVar4,pcVar6)" (( "(") (identifier "param_1") (, ",") (identifier "uVar4") (, ",") (identifier "pcVar6") () ")"))) (; ";"))) (expression_statement "FUN_0001b000(*(undefined4 *)(param_1 + 0xc));" (call_expression "FUN_0001b000(*(undefined4 *)(param_1 + 0xc))" (identifier "FUN_0001b000") (argument_list "(*(undefined4 *)(param_1 + 0xc))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

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

int function_1(type_1 *var_5,type_2 *var_3,void *pArg)

{
  type_2 *var_9;
  type_1 *var_6;
  type_1 **ppsVar3;
  int err_code;
  type_1 *var_8;
  char *zFormat;
  
  var_1(var_5->mutex);
  var_2();
  if (var_3 == (type_2 *)0x0) {
    if (var_4 != (type_1 *)0x0) {
      var_6 = var_4;
      if (var_5 == var_4) {
        ppsVar3 = &var_4;
        var_6 = var_5;
      }
      else {
        do {
          var_8 = var_6;
          var_6 = var_8->pNextBlocked;
          if (var_6 == (type_1 *)0x0) goto LAB_00058f0c;
        } while (var_5 != var_6);
        ppsVar3 = &var_8->pNextBlocked;
      }
      *ppsVar3 = var_6->pNextBlocked;
    }
LAB_00058f0c:
    var_5->pBlockingConnection = (type_1 *)0x0;
    err_code = 0;
    zFormat = (char *)0x0;
    var_5->pUnlockConnection = (type_1 *)0x0;
    var_5->xUnlockNotify = (type_2 *)0x0;
    var_5->pUnlockArg = (void *)0x0;
    var_7();
    goto LAB_00058eb8;
  }
  var_6 = var_5->pBlockingConnection;
  if (var_6 == (type_1 *)0x0) {
    zFormat = (char *)0x0;
    (*var_3)(&pArg,1);
    err_code = 0;
    var_7();
    goto LAB_00058eb8;
  }
  var_8 = var_6;
  if (var_6 != var_5) {
    do {
      var_8 = var_8->pUnlockConnection;
      if (var_8 == (type_1 *)0x0) break;
    } while (var_5 != var_8);
    if (var_8 == (type_1 *)0x0) {
      var_5->pUnlockConnection = var_6;
      var_5->xUnlockNotify = var_3;
      var_5->pUnlockArg = pArg;
      if (var_4 == (type_1 *)0x0) {
LAB_00058f7c:
        var_6 = (type_1 *)0x0;
        ppsVar3 = &var_4;
      }
      else {
        var_6 = var_4;
        if (var_5 == var_4) {
          ppsVar3 = &var_4;
          var_6 = var_5;
        }
        else {
          do {
            var_8 = var_6;
            var_6 = var_8->pNextBlocked;
            if (var_6 == (type_1 *)0x0) goto LAB_00058e54;
          } while (var_5 != var_6);
          ppsVar3 = &var_8->pNextBlocked;
        }
        *ppsVar3 = var_6->pNextBlocked;
        if (var_4 == (type_1 *)0x0) goto LAB_00058f7c;
LAB_00058e54:
        ppsVar3 = &var_4;
        var_9 = var_4->xUnlockNotify;
        var_6 = var_4;
        while (var_9 != var_5->xUnlockNotify) {
          ppsVar3 = &var_6->pNextBlocked;
          var_6 = var_6->pNextBlocked;
          if (var_6 == (type_1 *)0x0) break;
          var_9 = var_6->xUnlockNotify;
        }
      }
      var_5->pNextBlocked = var_6;
      err_code = 0;
      *ppsVar3 = var_5;
      var_7();
      zFormat = (char *)0x0;
      goto LAB_00058eb8;
    }
  }
  var_7();
  err_code = 6;
  zFormat = "database is deadlocked";
LAB_00058eb8:
  var_10(var_5,err_code,zFormat);
  var_11(var_5->mutex);
  return err_code;
}


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

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

undefined4 MASKED(int param_1,code *param_2,undefined4 param_3)

{
  int iVar1;
  int *piVar2;
  undefined4 *puVar3;
  undefined4 uVar4;
  int iVar5;
  char *pcVar6;
  
  FUN_0001afd0(*(undefined4 *)(param_1 + 0xc));
  FUN_0001ed40();
  if (param_2 == (code *)0x0) {
    if (DAT_0014c6b0 != 0) {
      iVar1 = DAT_0014c6b0;
      if (param_1 == DAT_0014c6b0) {
        puVar3 = &DAT_0014c6b0;
        iVar1 = param_1;
      }
      else {
        do {
          iVar5 = iVar1;
          iVar1 = *(int *)(iVar5 + 500);
          if (iVar1 == 0) goto LAB_00058f0c;
        } while (param_1 != iVar1);
        puVar3 = (undefined4 *)(iVar5 + 500);
      }
      *puVar3 = *(undefined4 *)(iVar1 + 500);
    }
LAB_00058f0c:
    *(undefined4 *)(param_1 + 0x1e4) = 0;
    uVar4 = 0;
    pcVar6 = (char *)0x0;
    *(undefined4 *)(param_1 + 0x1e8) = 0;
    *(undefined4 *)(param_1 + 0x1f0) = 0;
    *(undefined4 *)(param_1 + 0x1ec) = 0;
    FUN_0001ed90();
    goto LAB_00058eb8;
  }
  iVar1 = *(int *)(param_1 + 0x1e4);
  if (iVar1 == 0) {
    pcVar6 = (char *)0x0;
    (*param_2)(&param_3,1);
    uVar4 = 0;
    FUN_0001ed90();
    goto LAB_00058eb8;
  }
  iVar5 = iVar1;
  if (iVar1 != param_1) {
    do {
      iVar5 = *(int *)(iVar5 + 0x1e8);
      if (iVar5 == 0) break;
    } while (param_1 != iVar5);
    if (iVar5 == 0) {
      *(int *)(param_1 + 0x1e8) = iVar1;
      *(code **)(param_1 + 0x1f0) = param_2;
      *(undefined4 *)(param_1 + 0x1ec) = param_3;
      if (DAT_0014c6b0 == 0) {
LAB_00058f7c:
        iVar1 = 0;
        piVar2 = &DAT_0014c6b0;
      }
      else {
        iVar1 = DAT_0014c6b0;
        if (param_1 == DAT_0014c6b0) {
          puVar3 = &DAT_0014c6b0;
          iVar1 = param_1;
        }
        else {
          do {
            iVar5 = iVar1;
            iVar1 = *(int *)(iVar5 + 500);
            if (iVar1 == 0) goto LAB_00058e54;
          } while (param_1 != iVar1);
          puVar3 = (undefined4 *)(iVar5 + 500);
        }
        *puVar3 = *(undefined4 *)(iVar1 + 500);
        if (DAT_0014c6b0 == 0) goto LAB_00058f7c;
LAB_00058e54:
        piVar2 = &DAT_0014c6b0;
        iVar5 = *(int *)(DAT_0014c6b0 + 0x1f0);
        iVar1 = DAT_0014c6b0;
        while (iVar5 != *(int *)(param_1 + 0x1f0)) {
          piVar2 = (int *)(iVar1 + 500);
          iVar1 = *(int *)(iVar1 + 500);
          if (iVar1 == 0) break;
          iVar5 = *(int *)(iVar1 + 0x1f0);
        }
      }
      *(int *)(param_1 + 500) = iVar1;
      uVar4 = 0;
      *piVar2 = param_1;
      FUN_0001ed90();
      pcVar6 = (char *)0x0;
      goto LAB_00058eb8;
    }
  }
  FUN_0001ed90();
  uVar4 = 6;
  pcVar6 = "database is deadlocked";
LAB_00058eb8:
  FUN_00058300(param_1,uVar4,pcVar6);
  FUN_0001b000(*(undefined4 *)(param_1 + 0xc));
  return uVar4;
}

