
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Unknown calling convention */

int sqlite3_overload_function(sqlite3 *db,char *zName,int nArg)

{
  FuncDef *pFVar1;
  char *p;
  FuncDestructor *pDestructor;
  uint uVar2;
  u64 in_stack_ffffffd4;
  
  if (db->mutex != (sqlite3_mutex *)0x0) {
    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);
  }
  pFVar1 = sqlite3FindFunction(db,zName,nArg,'\x01','\0');
  if (db->mutex != (sqlite3_mutex *)0x0) {
    (*sqlite3Config.mutex.xMutexLeave)(db->mutex);
  }
  if (pFVar1 != (FuncDef *)0x0) {
    return 0;
  }
  p = sqlite3_mprintf(zName);
  if (p == (char *)0x0) {
    return 7;
  }
  if (db->mutex != (sqlite3_mutex *)0x0) {
    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);
  }
  pDestructor = (FuncDestructor *)sqlite3Malloc(in_stack_ffffffd4);
  if (pDestructor == (FuncDestructor *)0x0) {
    uVar2._0_1_ = db->temp_store;
    uVar2._1_1_ = db->mallocFailed;
    uVar2._2_1_ = db->bBenignMalloc;
    uVar2._3_1_ = db->dfltLockMode;
    if ((uVar2 & 0xffff00) == 0) {
      sqlite3OomFault(db);
    }
    sqlite3_free(p);
    uVar2 = 1;
    if (db->mallocFailed != '\0') goto LAB_000a59a0;
  }
  else {
    pDestructor->nRef = 0;
    pDestructor->xDestroy = sqlite3_free;
    pDestructor->pUserData = p;
    uVar2 = sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,
                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,
                              (_func_void_sqlite3_context_ptr *)0x0,
                              (_func_void_sqlite3_context_ptr *)0x0,
                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,
                              pDestructor);
    if (pDestructor->nRef == 0) {
      sqlite3_free(p);
      sqlite3_free(pDestructor);
    }
    if ((db->mallocFailed != '\0') || (uVar2 == 0xc0a)) {
LAB_000a59a0:
      uVar2 = apiOomError(db);
      goto LAB_000a594e;
    }
  }
  uVar2 = uVar2 & db->errMask;
LAB_000a594e:
  if (db->mutex == (sqlite3_mutex *)0x0) {
    return uVar2;
  }
  (*sqlite3Config.mutex.xMutexLeave)(db->mutex);
  return uVar2;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

uint FUN_000a5830(int param_1,undefined4 param_2)

{
  int iVar1;
  int *piVar2;
  uint uVar3;
  
  if (*(int *)(param_1 + 0xc) != 0) {
    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));
  }
  iVar1 = FUN_0005c140(1,0);
  if (*(int *)(param_1 + 0xc) != 0) {
    (*DAT_001bb444)(*(int *)(param_1 + 0xc));
  }
  if (iVar1 != 0) {
    return 0;
  }
  iVar1 = FUN_000a3060(param_2);
  if (iVar1 == 0) {
    return 7;
  }
  if (*(int *)(param_1 + 0xc) != 0) {
    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));
  }
  piVar2 = (int *)FUN_00055780();
  if (piVar2 == (int *)0x0) {
    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {
      FUN_000446a0();
    }
    FUN_00044000(iVar1);
    uVar3 = 1;
    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;
  }
  else {
    *piVar2 = 0;
    piVar2[1] = (int)FUN_00044000;
    piVar2[2] = iVar1;
    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);
    if (*piVar2 == 0) {
      FUN_00044000(iVar1);
      FUN_00044000(piVar2);
    }
    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {
LAB_000a59a0:
      uVar3 = FUN_0004c680();
      goto LAB_000a594e;
    }
  }
  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);
LAB_000a594e:
  if (*(int *)(param_1 + 0xc) == 0) {
    return uVar3;
  }
  (*DAT_001bb444)(*(int *)(param_1 + 0xc));
  return uVar3;
}


PUSH EBP
PUSH EDI
PUSH ESI
CALL 0x00152e6c
ADD ESI,0x1155f0
PUSH EBX
SUB ESP,0x1c
MOV EBX,dword ptr [ESP + 0x30]
MOV EAX,dword ptr [EBX + 0xc]
TEST EAX,EAX
JZ 0x000a585a
SUB ESP,0xc
PUSH EAX
CALL dword ptr [ESI + 0x614]
ADD ESP,0x10
SUB ESP,0x8
MOV EAX,EBX
PUSH 0x0
PUSH 0x1
MOV EDX,dword ptr [ESP + 0x44]
MOV ECX,dword ptr [ESP + 0x48]
CALL 0x0005c140
MOV EDX,dword ptr [EBX + 0xc]
ADD ESP,0x10
MOV EBP,EAX
TEST EDX,EDX
JZ 0x000a5889
SUB ESP,0xc
PUSH EDX
CALL dword ptr [ESI + 0x61c]
ADD ESP,0x10
XOR EDI,EDI
TEST EBP,EBP
JZ 0x000a58a0
ADD ESP,0x1c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [ESP + 0x40]
CALL 0x000a3060
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x000a59b0
MOV EAX,dword ptr [EBX + 0xc]
TEST EAX,EAX
JZ 0x000a58cd
SUB ESP,0xc
PUSH EAX
CALL dword ptr [ESI + 0x614]
ADD ESP,0x10
MOV EAX,0xc
XOR EDX,EDX
CALL 0x00055780
MOV EDI,EAX
TEST EAX,EAX
JZ 0x000a5970
MOV dword ptr [EAX],0x0
LEA EAX,[ESI + 0xffe891d8]
MOV dword ptr [EDI + 0x4],EAX
LEA EAX,[ESI + 0xffeeab98]
MOV dword ptr [EDI + 0x8],EBP
PUSH EDI
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EAX
MOV EAX,EBX
PUSH EBP
PUSH 0x1
MOV EDX,dword ptr [ESP + 0x54]
MOV ECX,dword ptr [ESP + 0x58]
CALL 0x0007d140
MOV EDX,dword ptr [EDI]
ADD ESP,0x20
TEST EDX,EDX
JNZ 0x000a593c
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0xc
PUSH EBP
CALL 0x00044000
MOV dword ptr [ESP],EDI
CALL 0x00044000
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
CMP byte ptr [EBX + 0x4d],0x0
JNZ 0x000a59a0
CMP EAX,0xc0a
JZ 0x000a59a0
AND EAX,dword ptr [EBX + 0x40]
MOV EDI,EAX
MOV EAX,dword ptr [EBX + 0xc]
TEST EAX,EAX
JZ 0x000a588f
SUB ESP,0xc
PUSH EAX
CALL dword ptr [ESI + 0x61c]
MOV EAX,EDI
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST dword ptr [EBX + 0x4c],0xffff00
JNZ 0x000a5980
MOV EAX,EBX
CALL 0x000446a0
SUB ESP,0xc
PUSH EBP
CALL 0x00044000
ADD ESP,0x10
CMP byte ptr [EBX + 0x4d],0x0
MOV EAX,0x1
JZ 0x000a5949
LEA ESI,[ESI]
NOP
MOV EAX,EBX
CALL 0x0004c680
MOV EDI,EAX
JMP 0x000a594e
MOV EDI,0x7
JMP 0x000a588f
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nuint FUN_000a5830(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  iVar1 = FUN_0005c140(1,0);\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }\n  if (iVar1 != 0) {\n    return 0;\n  }\n  iVar1 = FUN_000a3060(param_2);\n  if (iVar1 == 0) {\n    return 7;\n  }\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  piVar2 = (int *)FUN_00055780();\n  if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }\n  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);\nLAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }\n  (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  return uVar3;\n}\n\n" comment (function_definition "uint FUN_000a5830(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  iVar1 = FUN_0005c140(1,0);\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }\n  if (iVar1 != 0) {\n    return 0;\n  }\n  iVar1 = FUN_000a3060(param_2);\n  if (iVar1 == 0) {\n    return 7;\n  }\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  piVar2 = (int *)FUN_00055780();\n  if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }\n  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);\nLAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }\n  (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  return uVar3;\n}" type_identifier (function_declarator "FUN_000a5830(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  iVar1 = FUN_0005c140(1,0);\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }\n  if (iVar1 != 0) {\n    return 0;\n  }\n  iVar1 = FUN_000a3060(param_2);\n  if (iVar1 == 0) {\n    return 7;\n  }\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  piVar2 = (int *)FUN_00055780();\n  if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }\n  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);\nLAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }\n  (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" { (expression_statement "(*DAT_001bb43c)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb43c)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(*(int *)(param_1 + 0xc))" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "iVar1 = FUN_0005c140(1,0);" (assignment_expression "iVar1 = FUN_0005c140(1,0)" identifier = (call_expression "FUN_0005c140(1,0)" identifier (argument_list "(1,0)" ( number_literal , number_literal )))) ;) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }" { (expression_statement "(*DAT_001bb444)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb444)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(*(int *)(param_1 + 0xc))" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) })) (if_statement "if (iVar1 != 0) {\n    return 0;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = FUN_000a3060(param_2);" (assignment_expression "iVar1 = FUN_000a3060(param_2)" identifier = (call_expression "FUN_000a3060(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    return 7;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" { (expression_statement "(*DAT_001bb43c)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb43c)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(*(int *)(param_1 + 0xc))" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "piVar2 = (int *)FUN_00055780();" (assignment_expression "piVar2 = (int *)FUN_00055780()" identifier = (cast_expression "(int *)FUN_00055780()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00055780()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }" { (if_statement "if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }" if (parenthesized_expression "((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x4c) & 0xffff00) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x4c) & 0xffff00)" ( (binary_expression "*(uint *)(param_1 + 0x4c) & 0xffff00" (pointer_expression "*(uint *)(param_1 + 0x4c)" * (cast_expression "(uint *)(param_1 + 0x4c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_000446a0();\n    }" { (expression_statement "FUN_000446a0();" (call_expression "FUN_000446a0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "FUN_00044000(iVar1);" (call_expression "FUN_00044000(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (if_statement "if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;" if (parenthesized_expression "(*(char *)(param_1 + 0x4d) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x4d) != '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" * (cast_expression "(char *)(param_1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4d)" ( (binary_expression "param_1 + 0x4d" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000a59a0;" goto statement_identifier ;)) }) (else_clause "else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }" else (compound_statement "{\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }" { (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "piVar2[1] = (int)FUN_00044000;" (assignment_expression "piVar2[1] = (int)FUN_00044000" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = (cast_expression "(int)FUN_00044000" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "piVar2[2] = iVar1;" (assignment_expression "piVar2[2] = iVar1" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);" (assignment_expression "uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2)" identifier = (call_expression "FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2)" identifier (argument_list "(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2)" ( number_literal , identifier , identifier , number_literal , number_literal , number_literal , number_literal , identifier )))) ;) (if_statement "if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }" if (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }" { (expression_statement "FUN_00044000(iVar1);" (call_expression "FUN_00044000(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "FUN_00044000(piVar2);" (call_expression "FUN_00044000(piVar2)" identifier (argument_list "(piVar2)" ( identifier ))) ;) })) (if_statement "if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }" if (parenthesized_expression "((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a))" ( (binary_expression "(*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)" (parenthesized_expression "(*(char *)(param_1 + 0x4d) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x4d) != '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" * (cast_expression "(char *)(param_1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4d)" ( (binary_expression "param_1 + 0x4d" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(uVar3 == 0xc0a)" ( (binary_expression "uVar3 == 0xc0a" identifier == number_literal) ))) )) (compound_statement "{\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }" { (labeled_statement "LAB_000a59a0:\n      uVar3 = FUN_0004c680();" statement_identifier : (expression_statement "uVar3 = FUN_0004c680();" (assignment_expression "uVar3 = FUN_0004c680()" identifier = (call_expression "FUN_0004c680()" identifier (argument_list "()" ( )))) ;)) (goto_statement "goto LAB_000a594e;" goto statement_identifier ;) })) }))) (expression_statement "uVar3 = uVar3 & *(uint *)(param_1 + 0x40);" (assignment_expression "uVar3 = uVar3 & *(uint *)(param_1 + 0x40)" identifier = (binary_expression "uVar3 & *(uint *)(param_1 + 0x40)" identifier & (pointer_expression "*(uint *)(param_1 + 0x40)" * (cast_expression "(uint *)(param_1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))))) ;) (labeled_statement "LAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }" statement_identifier : (if_statement "if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" ( (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return uVar3;\n  }" { (return_statement "return uVar3;" return identifier ;) }))) (expression_statement "(*DAT_001bb444)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb444)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(*(int *)(param_1 + 0xc))" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* WARNING: Unknown calling convention */\n\nint sqlite3_overload_function(sqlite3 *db,char *zName,int nArg)\n\n{\n  FuncDef *pFVar1;\n  char *p;\n  FuncDestructor *pDestructor;\n  uint uVar2;\n  u64 in_stack_ffffffd4;\n  \n  if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }\n  pFVar1 = sqlite3FindFunction(db,zName,nArg,'\x01','\0');\n  if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n  }\n  if (pFVar1 != (FuncDef *)0x0) {\n    return 0;\n  }\n  p = sqlite3_mprintf(zName);\n  if (p == (char *)0x0) {\n    return 7;\n  }\n  if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }\n  pDestructor = (FuncDestructor *)sqlite3Malloc(in_stack_ffffffd4);\n  if (pDestructor == (FuncDestructor *)0x0) {\n    uVar2._0_1_ = db->temp_store;\n    uVar2._1_1_ = db->mallocFailed;\n    uVar2._2_1_ = db->bBenignMalloc;\n    uVar2._3_1_ = db->dfltLockMode;\n    if ((uVar2 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n    sqlite3_free(p);\n    uVar2 = 1;\n    if (db->mallocFailed != '\0') goto LAB_000a59a0;\n  }\n  else {\n    pDestructor->nRef = 0;\n    pDestructor->xDestroy = sqlite3_free;\n    pDestructor->pUserData = p;\n    uVar2 = sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor);\n    if (pDestructor->nRef == 0) {\n      sqlite3_free(p);\n      sqlite3_free(pDestructor);\n    }\n    if ((db->mallocFailed != '\0') || (uVar2 == 0xc0a)) {\nLAB_000a59a0:\n      uVar2 = apiOomError(db);\n      goto LAB_000a594e;\n    }\n  }\n  uVar2 = uVar2 & db->errMask;\nLAB_000a594e:\n  if (db->mutex == (sqlite3_mutex *)0x0) {\n    return uVar2;\n  }\n  (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n  return uVar2;\n}\n\n" comment comment (function_definition "int sqlite3_overload_function(sqlite3 *db,char *zName,int nArg)\n\n{\n  FuncDef *pFVar1;\n  char *p;\n  FuncDestructor *pDestructor;\n  uint uVar2;\n  u64 in_stack_ffffffd4;\n  \n  if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }\n  pFVar1 = sqlite3FindFunction(db,zName,nArg,'\x01','\0');\n  if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n  }\n  if (pFVar1 != (FuncDef *)0x0) {\n    return 0;\n  }\n  p = sqlite3_mprintf(zName);\n  if (p == (char *)0x0) {\n    return 7;\n  }\n  if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }\n  pDestructor = (FuncDestructor *)sqlite3Malloc(in_stack_ffffffd4);\n  if (pDestructor == (FuncDestructor *)0x0) {\n    uVar2._0_1_ = db->temp_store;\n    uVar2._1_1_ = db->mallocFailed;\n    uVar2._2_1_ = db->bBenignMalloc;\n    uVar2._3_1_ = db->dfltLockMode;\n    if ((uVar2 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n    sqlite3_free(p);\n    uVar2 = 1;\n    if (db->mallocFailed != '\0') goto LAB_000a59a0;\n  }\n  else {\n    pDestructor->nRef = 0;\n    pDestructor->xDestroy = sqlite3_free;\n    pDestructor->pUserData = p;\n    uVar2 = sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor);\n    if (pDestructor->nRef == 0) {\n      sqlite3_free(p);\n      sqlite3_free(pDestructor);\n    }\n    if ((db->mallocFailed != '\0') || (uVar2 == 0xc0a)) {\nLAB_000a59a0:\n      uVar2 = apiOomError(db);\n      goto LAB_000a594e;\n    }\n  }\n  uVar2 = uVar2 & db->errMask;\nLAB_000a594e:\n  if (db->mutex == (sqlite3_mutex *)0x0) {\n    return uVar2;\n  }\n  (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n  return uVar2;\n}" primitive_type (function_declarator "sqlite3_overload_function(sqlite3 *db,char *zName,int nArg)" identifier (parameter_list "(sqlite3 *db,char *zName,int nArg)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "char *zName" primitive_type (pointer_declarator "*zName" * identifier)) , (parameter_declaration "int nArg" primitive_type identifier) ))) (compound_statement "{\n  FuncDef *pFVar1;\n  char *p;\n  FuncDestructor *pDestructor;\n  uint uVar2;\n  u64 in_stack_ffffffd4;\n  \n  if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }\n  pFVar1 = sqlite3FindFunction(db,zName,nArg,'\x01','\0');\n  if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n  }\n  if (pFVar1 != (FuncDef *)0x0) {\n    return 0;\n  }\n  p = sqlite3_mprintf(zName);\n  if (p == (char *)0x0) {\n    return 7;\n  }\n  if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }\n  pDestructor = (FuncDestructor *)sqlite3Malloc(in_stack_ffffffd4);\n  if (pDestructor == (FuncDestructor *)0x0) {\n    uVar2._0_1_ = db->temp_store;\n    uVar2._1_1_ = db->mallocFailed;\n    uVar2._2_1_ = db->bBenignMalloc;\n    uVar2._3_1_ = db->dfltLockMode;\n    if ((uVar2 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n    sqlite3_free(p);\n    uVar2 = 1;\n    if (db->mallocFailed != '\0') goto LAB_000a59a0;\n  }\n  else {\n    pDestructor->nRef = 0;\n    pDestructor->xDestroy = sqlite3_free;\n    pDestructor->pUserData = p;\n    uVar2 = sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor);\n    if (pDestructor->nRef == 0) {\n      sqlite3_free(p);\n      sqlite3_free(pDestructor);\n    }\n    if ((db->mallocFailed != '\0') || (uVar2 == 0xc0a)) {\nLAB_000a59a0:\n      uVar2 = apiOomError(db);\n      goto LAB_000a594e;\n    }\n  }\n  uVar2 = uVar2 & db->errMask;\nLAB_000a594e:\n  if (db->mutex == (sqlite3_mutex *)0x0) {\n    return uVar2;\n  }\n  (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n  return uVar2;\n}" { (declaration "FuncDef *pFVar1;" type_identifier (pointer_declarator "*pFVar1" * identifier) ;) (declaration "char *p;" primitive_type (pointer_declarator "*p" * identifier) ;) (declaration "FuncDestructor *pDestructor;" type_identifier (pointer_declarator "*pDestructor" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "u64 in_stack_ffffffd4;" type_identifier identifier ;) (if_statement "if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }" if (parenthesized_expression "(db->mutex != (sqlite3_mutex *)0x0)" ( (binary_expression "db->mutex != (sqlite3_mutex *)0x0" (field_expression "db->mutex" identifier -> field_identifier) != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }" { (expression_statement "(*sqlite3Config.mutex.xMutexEnter)(db->mutex);" (call_expression "(*sqlite3Config.mutex.xMutexEnter)(db->mutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexEnter)" ( (pointer_expression "*sqlite3Config.mutex.xMutexEnter" * (field_expression "sqlite3Config.mutex.xMutexEnter" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) })) (expression_statement "pFVar1 = sqlite3FindFunction(db,zName,nArg,'\x01','\0');" (assignment_expression "pFVar1 = sqlite3FindFunction(db,zName,nArg,'\x01','\0')" identifier = (call_expression "sqlite3FindFunction(db,zName,nArg,'\x01','\0')" identifier (argument_list "(db,zName,nArg,'\x01','\0')" ( identifier , identifier , identifier , (char_literal "'\x01'" ' escape_sequence ') , (char_literal "'\0'" ' escape_sequence ') )))) ;) (if_statement "if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n  }" if (parenthesized_expression "(db->mutex != (sqlite3_mutex *)0x0)" ( (binary_expression "db->mutex != (sqlite3_mutex *)0x0" (field_expression "db->mutex" identifier -> field_identifier) != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n  }" { (expression_statement "(*sqlite3Config.mutex.xMutexLeave)(db->mutex);" (call_expression "(*sqlite3Config.mutex.xMutexLeave)(db->mutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexLeave)" ( (pointer_expression "*sqlite3Config.mutex.xMutexLeave" * (field_expression "sqlite3Config.mutex.xMutexLeave" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) })) (if_statement "if (pFVar1 != (FuncDef *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(pFVar1 != (FuncDef *)0x0)" ( (binary_expression "pFVar1 != (FuncDef *)0x0" identifier != (cast_expression "(FuncDef *)0x0" ( (type_descriptor "FuncDef *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "p = sqlite3_mprintf(zName);" (assignment_expression "p = sqlite3_mprintf(zName)" identifier = (call_expression "sqlite3_mprintf(zName)" identifier (argument_list "(zName)" ( identifier )))) ;) (if_statement "if (p == (char *)0x0) {\n    return 7;\n  }" if (parenthesized_expression "(p == (char *)0x0)" ( (binary_expression "p == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (if_statement "if (db->mutex != (sqlite3_mutex *)0x0) {\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }" if (parenthesized_expression "(db->mutex != (sqlite3_mutex *)0x0)" ( (binary_expression "db->mutex != (sqlite3_mutex *)0x0" (field_expression "db->mutex" identifier -> field_identifier) != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n  }" { (expression_statement "(*sqlite3Config.mutex.xMutexEnter)(db->mutex);" (call_expression "(*sqlite3Config.mutex.xMutexEnter)(db->mutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexEnter)" ( (pointer_expression "*sqlite3Config.mutex.xMutexEnter" * (field_expression "sqlite3Config.mutex.xMutexEnter" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) })) (expression_statement "pDestructor = (FuncDestructor *)sqlite3Malloc(in_stack_ffffffd4);" (assignment_expression "pDestructor = (FuncDestructor *)sqlite3Malloc(in_stack_ffffffd4)" identifier = (cast_expression "(FuncDestructor *)sqlite3Malloc(in_stack_ffffffd4)" ( (type_descriptor "FuncDestructor *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3Malloc(in_stack_ffffffd4)" identifier (argument_list "(in_stack_ffffffd4)" ( identifier ))))) ;) (if_statement "if (pDestructor == (FuncDestructor *)0x0) {\n    uVar2._0_1_ = db->temp_store;\n    uVar2._1_1_ = db->mallocFailed;\n    uVar2._2_1_ = db->bBenignMalloc;\n    uVar2._3_1_ = db->dfltLockMode;\n    if ((uVar2 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n    sqlite3_free(p);\n    uVar2 = 1;\n    if (db->mallocFailed != '\0') goto LAB_000a59a0;\n  }\n  else {\n    pDestructor->nRef = 0;\n    pDestructor->xDestroy = sqlite3_free;\n    pDestructor->pUserData = p;\n    uVar2 = sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor);\n    if (pDestructor->nRef == 0) {\n      sqlite3_free(p);\n      sqlite3_free(pDestructor);\n    }\n    if ((db->mallocFailed != '\0') || (uVar2 == 0xc0a)) {\nLAB_000a59a0:\n      uVar2 = apiOomError(db);\n      goto LAB_000a594e;\n    }\n  }" if (parenthesized_expression "(pDestructor == (FuncDestructor *)0x0)" ( (binary_expression "pDestructor == (FuncDestructor *)0x0" identifier == (cast_expression "(FuncDestructor *)0x0" ( (type_descriptor "FuncDestructor *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar2._0_1_ = db->temp_store;\n    uVar2._1_1_ = db->mallocFailed;\n    uVar2._2_1_ = db->bBenignMalloc;\n    uVar2._3_1_ = db->dfltLockMode;\n    if ((uVar2 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n    sqlite3_free(p);\n    uVar2 = 1;\n    if (db->mallocFailed != '\0') goto LAB_000a59a0;\n  }" { (expression_statement "uVar2._0_1_ = db->temp_store;" (assignment_expression "uVar2._0_1_ = db->temp_store" (field_expression "uVar2._0_1_" identifier . field_identifier) = (field_expression "db->temp_store" identifier -> field_identifier)) ;) (expression_statement "uVar2._1_1_ = db->mallocFailed;" (assignment_expression "uVar2._1_1_ = db->mallocFailed" (field_expression "uVar2._1_1_" identifier . field_identifier) = (field_expression "db->mallocFailed" identifier -> field_identifier)) ;) (expression_statement "uVar2._2_1_ = db->bBenignMalloc;" (assignment_expression "uVar2._2_1_ = db->bBenignMalloc" (field_expression "uVar2._2_1_" identifier . field_identifier) = (field_expression "db->bBenignMalloc" identifier -> field_identifier)) ;) (expression_statement "uVar2._3_1_ = db->dfltLockMode;" (assignment_expression "uVar2._3_1_ = db->dfltLockMode" (field_expression "uVar2._3_1_" identifier . field_identifier) = (field_expression "db->dfltLockMode" identifier -> field_identifier)) ;) (if_statement "if ((uVar2 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }" if (parenthesized_expression "((uVar2 & 0xffff00) == 0)" ( (binary_expression "(uVar2 & 0xffff00) == 0" (parenthesized_expression "(uVar2 & 0xffff00)" ( (binary_expression "uVar2 & 0xffff00" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      sqlite3OomFault(db);\n    }" { (expression_statement "sqlite3OomFault(db);" (call_expression "sqlite3OomFault(db)" identifier (argument_list "(db)" ( identifier ))) ;) })) (expression_statement "sqlite3_free(p);" (call_expression "sqlite3_free(p)" identifier (argument_list "(p)" ( identifier ))) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (if_statement "if (db->mallocFailed != '\0') goto LAB_000a59a0;" if (parenthesized_expression "(db->mallocFailed != '\0')" ( (binary_expression "db->mallocFailed != '\0'" (field_expression "db->mallocFailed" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000a59a0;" goto statement_identifier ;)) }) (else_clause "else {\n    pDestructor->nRef = 0;\n    pDestructor->xDestroy = sqlite3_free;\n    pDestructor->pUserData = p;\n    uVar2 = sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor);\n    if (pDestructor->nRef == 0) {\n      sqlite3_free(p);\n      sqlite3_free(pDestructor);\n    }\n    if ((db->mallocFailed != '\0') || (uVar2 == 0xc0a)) {\nLAB_000a59a0:\n      uVar2 = apiOomError(db);\n      goto LAB_000a594e;\n    }\n  }" else (compound_statement "{\n    pDestructor->nRef = 0;\n    pDestructor->xDestroy = sqlite3_free;\n    pDestructor->pUserData = p;\n    uVar2 = sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor);\n    if (pDestructor->nRef == 0) {\n      sqlite3_free(p);\n      sqlite3_free(pDestructor);\n    }\n    if ((db->mallocFailed != '\0') || (uVar2 == 0xc0a)) {\nLAB_000a59a0:\n      uVar2 = apiOomError(db);\n      goto LAB_000a594e;\n    }\n  }" { (expression_statement "pDestructor->nRef = 0;" (assignment_expression "pDestructor->nRef = 0" (field_expression "pDestructor->nRef" identifier -> field_identifier) = number_literal) ;) (expression_statement "pDestructor->xDestroy = sqlite3_free;" (assignment_expression "pDestructor->xDestroy = sqlite3_free" (field_expression "pDestructor->xDestroy" identifier -> field_identifier) = identifier) ;) (expression_statement "pDestructor->pUserData = p;" (assignment_expression "pDestructor->pUserData = p" (field_expression "pDestructor->pUserData" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar2 = sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor);" (assignment_expression "uVar2 = sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor)" identifier = (call_expression "sqlite3CreateFunc(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor)" identifier (argument_list "(db,zName,nArg,1,p,sqlite3InvalidFunction,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr *)0x0,\n                              (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                              pDestructor)" ( identifier , identifier , identifier , number_literal , identifier , identifier , (cast_expression "(_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0" ( (type_descriptor "_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(_func_void_sqlite3_context_ptr *)0x0" ( (type_descriptor "_func_void_sqlite3_context_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(_func_void_sqlite3_context_ptr *)0x0" ( (type_descriptor "_func_void_sqlite3_context_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0" ( (type_descriptor "_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier )))) ;) (if_statement "if (pDestructor->nRef == 0) {\n      sqlite3_free(p);\n      sqlite3_free(pDestructor);\n    }" if (parenthesized_expression "(pDestructor->nRef == 0)" ( (binary_expression "pDestructor->nRef == 0" (field_expression "pDestructor->nRef" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      sqlite3_free(p);\n      sqlite3_free(pDestructor);\n    }" { (expression_statement "sqlite3_free(p);" (call_expression "sqlite3_free(p)" identifier (argument_list "(p)" ( identifier ))) ;) (expression_statement "sqlite3_free(pDestructor);" (call_expression "sqlite3_free(pDestructor)" identifier (argument_list "(pDestructor)" ( identifier ))) ;) })) (if_statement "if ((db->mallocFailed != '\0') || (uVar2 == 0xc0a)) {\nLAB_000a59a0:\n      uVar2 = apiOomError(db);\n      goto LAB_000a594e;\n    }" if (parenthesized_expression "((db->mallocFailed != '\0') || (uVar2 == 0xc0a))" ( (binary_expression "(db->mallocFailed != '\0') || (uVar2 == 0xc0a)" (parenthesized_expression "(db->mallocFailed != '\0')" ( (binary_expression "db->mallocFailed != '\0'" (field_expression "db->mallocFailed" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(uVar2 == 0xc0a)" ( (binary_expression "uVar2 == 0xc0a" identifier == number_literal) ))) )) (compound_statement "{\nLAB_000a59a0:\n      uVar2 = apiOomError(db);\n      goto LAB_000a594e;\n    }" { (labeled_statement "LAB_000a59a0:\n      uVar2 = apiOomError(db);" statement_identifier : (expression_statement "uVar2 = apiOomError(db);" (assignment_expression "uVar2 = apiOomError(db)" identifier = (call_expression "apiOomError(db)" identifier (argument_list "(db)" ( identifier )))) ;)) (goto_statement "goto LAB_000a594e;" goto statement_identifier ;) })) }))) (expression_statement "uVar2 = uVar2 & db->errMask;" (assignment_expression "uVar2 = uVar2 & db->errMask" identifier = (binary_expression "uVar2 & db->errMask" identifier & (field_expression "db->errMask" identifier -> field_identifier))) ;) (labeled_statement "LAB_000a594e:\n  if (db->mutex == (sqlite3_mutex *)0x0) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (db->mutex == (sqlite3_mutex *)0x0) {\n    return uVar2;\n  }" if (parenthesized_expression "(db->mutex == (sqlite3_mutex *)0x0)" ( (binary_expression "db->mutex == (sqlite3_mutex *)0x0" (field_expression "db->mutex" identifier -> field_identifier) == (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) (expression_statement "(*sqlite3Config.mutex.xMutexLeave)(db->mutex);" (call_expression "(*sqlite3Config.mutex.xMutexLeave)(db->mutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexLeave)" ( (pointer_expression "*sqlite3Config.mutex.xMutexLeave" * (field_expression "sqlite3Config.mutex.xMutexLeave" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "uint FUN_000a5830(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  iVar1 = FUN_0005c140(1,0);\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }\n  if (iVar1 != 0) {\n    return 0;\n  }\n  iVar1 = FUN_000a3060(param_2);\n  if (iVar1 == 0) {\n    return 7;\n  }\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  piVar2 = (int *)FUN_00055780();\n  if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }\n  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);\nLAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }\n  (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  return uVar3;\n}\n\n" (function_definition "uint FUN_000a5830(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  iVar1 = FUN_0005c140(1,0);\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }\n  if (iVar1 != 0) {\n    return 0;\n  }\n  iVar1 = FUN_000a3060(param_2);\n  if (iVar1 == 0) {\n    return 7;\n  }\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  piVar2 = (int *)FUN_00055780();\n  if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }\n  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);\nLAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }\n  (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  return uVar3;\n}" type_identifier (function_declarator "FUN_000a5830(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  iVar1 = FUN_0005c140(1,0);\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }\n  if (iVar1 != 0) {\n    return 0;\n  }\n  iVar1 = FUN_000a3060(param_2);\n  if (iVar1 == 0) {\n    return 7;\n  }\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  piVar2 = (int *)FUN_00055780();\n  if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }\n  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);\nLAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }\n  (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" { (expression_statement "(*DAT_001bb43c)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb43c)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(*(int *)(param_1 + 0xc))" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "iVar1 = FUN_0005c140(1,0);" (assignment_expression "iVar1 = FUN_0005c140(1,0)" identifier = (call_expression "FUN_0005c140(1,0)" identifier (argument_list "(1,0)" ( number_literal , number_literal )))) ;) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }" { (expression_statement "(*DAT_001bb444)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb444)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(*(int *)(param_1 + 0xc))" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) })) (if_statement "if (iVar1 != 0) {\n    return 0;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = FUN_000a3060(param_2);" (assignment_expression "iVar1 = FUN_000a3060(param_2)" identifier = (call_expression "FUN_000a3060(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    return 7;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" { (expression_statement "(*DAT_001bb43c)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb43c)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(*(int *)(param_1 + 0xc))" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "piVar2 = (int *)FUN_00055780();" (assignment_expression "piVar2 = (int *)FUN_00055780()" identifier = (cast_expression "(int *)FUN_00055780()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00055780()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }" { (if_statement "if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }" if (parenthesized_expression "((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x4c) & 0xffff00) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x4c) & 0xffff00)" ( (binary_expression "*(uint *)(param_1 + 0x4c) & 0xffff00" (pointer_expression "*(uint *)(param_1 + 0x4c)" * (cast_expression "(uint *)(param_1 + 0x4c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_000446a0();\n    }" { (expression_statement "FUN_000446a0();" (call_expression "FUN_000446a0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "FUN_00044000(iVar1);" (call_expression "FUN_00044000(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (if_statement "if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;" if (parenthesized_expression "(*(char *)(param_1 + 0x4d) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x4d) != '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" * (cast_expression "(char *)(param_1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4d)" ( (binary_expression "param_1 + 0x4d" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000a59a0;" goto statement_identifier ;)) }) (else_clause "else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }" else (compound_statement "{\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }" { (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "piVar2[1] = (int)FUN_00044000;" (assignment_expression "piVar2[1] = (int)FUN_00044000" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = (cast_expression "(int)FUN_00044000" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "piVar2[2] = iVar1;" (assignment_expression "piVar2[2] = iVar1" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);" (assignment_expression "uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2)" identifier = (call_expression "FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2)" identifier (argument_list "(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2)" ( number_literal , identifier , identifier , number_literal , number_literal , number_literal , number_literal , identifier )))) ;) (if_statement "if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }" if (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }" { (expression_statement "FUN_00044000(iVar1);" (call_expression "FUN_00044000(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "FUN_00044000(piVar2);" (call_expression "FUN_00044000(piVar2)" identifier (argument_list "(piVar2)" ( identifier ))) ;) })) (if_statement "if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }" if (parenthesized_expression "((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a))" ( (binary_expression "(*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)" (parenthesized_expression "(*(char *)(param_1 + 0x4d) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x4d) != '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" * (cast_expression "(char *)(param_1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4d)" ( (binary_expression "param_1 + 0x4d" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(uVar3 == 0xc0a)" ( (binary_expression "uVar3 == 0xc0a" identifier == number_literal) ))) )) (compound_statement "{\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }" { (labeled_statement "LAB_000a59a0:\n      uVar3 = FUN_0004c680();" statement_identifier : (expression_statement "uVar3 = FUN_0004c680();" (assignment_expression "uVar3 = FUN_0004c680()" identifier = (call_expression "FUN_0004c680()" identifier (argument_list "()" ( )))) ;)) (goto_statement "goto LAB_000a594e;" goto statement_identifier ;) })) }))) (expression_statement "uVar3 = uVar3 & *(uint *)(param_1 + 0x40);" (assignment_expression "uVar3 = uVar3 & *(uint *)(param_1 + 0x40)" identifier = (binary_expression "uVar3 & *(uint *)(param_1 + 0x40)" identifier & (pointer_expression "*(uint *)(param_1 + 0x40)" * (cast_expression "(uint *)(param_1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))))) ;) (labeled_statement "LAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }" statement_identifier : (if_statement "if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" ( (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return uVar3;\n  }" { (return_statement "return uVar3;" return identifier ;) }))) (expression_statement "(*DAT_001bb444)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb444)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(*(int *)(param_1 + 0xc))" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (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 (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , IDENT , LIT , LIT , LIT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;)) (goto_statement goto statement_identifier ;) })) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_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 "uint FUN_000a5830(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  iVar1 = FUN_0005c140(1,0);\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }\n  if (iVar1 != 0) {\n    return 0;\n  }\n  iVar1 = FUN_000a3060(param_2);\n  if (iVar1 == 0) {\n    return 7;\n  }\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  piVar2 = (int *)FUN_00055780();\n  if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }\n  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);\nLAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }\n  (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  return uVar3;\n}" (type_identifier "uint") (function_declarator "FUN_000a5830(int param_1,undefined4 param_2)" (identifier "FUN_000a5830") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  iVar1 = FUN_0005c140(1,0);\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }\n  if (iVar1 != 0) {\n    return 0;\n  }\n  iVar1 = FUN_000a3060(param_2);\n  if (iVar1 == 0) {\n    return 7;\n  }\n  if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }\n  piVar2 = (int *)FUN_00055780();\n  if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }\n  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);\nLAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }\n  (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  return uVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" ({ "{") (expression_statement "(*DAT_001bb43c)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb43c)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb43c)" (( "(") (pointer_expression "*DAT_001bb43c" (* "*") (identifier "DAT_001bb43c")) () ")")) (argument_list "(*(int *)(param_1 + 0xc))" (( "(") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_0005c140(1,0);" (assignment_expression "iVar1 = FUN_0005c140(1,0)" (identifier "iVar1") (= "=") (call_expression "FUN_0005c140(1,0)" (identifier "FUN_0005c140") (argument_list "(1,0)" (( "(") (number_literal "1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*DAT_001bb444)(*(int *)(param_1 + 0xc));\n  }" ({ "{") (expression_statement "(*DAT_001bb444)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb444)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb444)" (( "(") (pointer_expression "*DAT_001bb444" (* "*") (identifier "DAT_001bb444")) () ")")) (argument_list "(*(int *)(param_1 + 0xc))" (( "(") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (if_statement "if (iVar1 != 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_000a3060(param_2);" (assignment_expression "iVar1 = FUN_000a3060(param_2)" (identifier "iVar1") (= "=") (call_expression "FUN_000a3060(param_2)" (identifier "FUN_000a3060") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    return 7;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 7;\n  }" ({ "{") (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));\n  }" ({ "{") (expression_statement "(*DAT_001bb43c)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb43c)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb43c)" (( "(") (pointer_expression "*DAT_001bb43c" (* "*") (identifier "DAT_001bb43c")) () ")")) (argument_list "(*(int *)(param_1 + 0xc))" (( "(") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "piVar2 = (int *)FUN_00055780();" (assignment_expression "piVar2 = (int *)FUN_00055780()" (identifier "piVar2") (= "=") (cast_expression "(int *)FUN_00055780()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00055780()" (identifier "FUN_00055780") (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (piVar2 == (int *)0x0) {\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }\n  else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }" (if "if") (parenthesized_expression "(piVar2 == (int *)0x0)" (( "(") (binary_expression "piVar2 == (int *)0x0" (identifier "piVar2") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }\n    FUN_00044000(iVar1);\n    uVar3 = 1;\n    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;\n  }" ({ "{") (if_statement "if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {\n      FUN_000446a0();\n    }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x4c) & 0xffff00) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x4c) & 0xffff00)" (( "(") (binary_expression "*(uint *)(param_1 + 0x4c) & 0xffff00" (pointer_expression "*(uint *)(param_1 + 0x4c)" (* "*") (cast_expression "(uint *)(param_1 + 0x4c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4c)" (( "(") (binary_expression "param_1 + 0x4c" (identifier "param_1") (+ "+") (number_literal "0x4c")) () ")")))) (& "&") (number_literal "0xffff00")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_000446a0();\n    }" ({ "{") (expression_statement "FUN_000446a0();" (call_expression "FUN_000446a0()" (identifier "FUN_000446a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_00044000(iVar1);" (call_expression "FUN_00044000(iVar1)" (identifier "FUN_00044000") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" (identifier "uVar3") (= "=") (number_literal "1")) (; ";")) (if_statement "if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x4d) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x4d) != '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" (* "*") (cast_expression "(char *)(param_1 + 0x4d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4d)" (( "(") (binary_expression "param_1 + 0x4d" (identifier "param_1") (+ "+") (number_literal "0x4d")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_000a59a0;" (goto "goto") (statement_identifier "LAB_000a59a0") (; ";"))) (} "}")) (else_clause "else {\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }" (else "else") (compound_statement "{\n    *piVar2 = 0;\n    piVar2[1] = (int)FUN_00044000;\n    piVar2[2] = iVar1;\n    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);\n    if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }\n    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }\n  }" ({ "{") (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2[1] = (int)FUN_00044000;" (assignment_expression "piVar2[1] = (int)FUN_00044000" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (cast_expression "(int)FUN_00044000" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "FUN_00044000"))) (; ";")) (expression_statement "piVar2[2] = iVar1;" (assignment_expression "piVar2[2] = iVar1" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);" (assignment_expression "uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2)" (identifier "uVar3") (= "=") (call_expression "FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2)" (identifier "FUN_0007d140") (argument_list "(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2)" (( "(") (number_literal "1") (, ",") (identifier "iVar1") (, ",") (identifier "FUN_000a59c0") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (identifier "piVar2") () ")")))) (; ";")) (if_statement "if (*piVar2 == 0) {\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }" (if "if") (parenthesized_expression "(*piVar2 == 0)" (( "(") (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00044000(iVar1);\n      FUN_00044000(piVar2);\n    }" ({ "{") (expression_statement "FUN_00044000(iVar1);" (call_expression "FUN_00044000(iVar1)" (identifier "FUN_00044000") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "FUN_00044000(piVar2);" (call_expression "FUN_00044000(piVar2)" (identifier "FUN_00044000") (argument_list "(piVar2)" (( "(") (identifier "piVar2") () ")"))) (; ";")) (} "}"))) (if_statement "if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }" (if "if") (parenthesized_expression "((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a))" (( "(") (binary_expression "(*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)" (parenthesized_expression "(*(char *)(param_1 + 0x4d) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x4d) != '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" (* "*") (cast_expression "(char *)(param_1 + 0x4d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4d)" (( "(") (binary_expression "param_1 + 0x4d" (identifier "param_1") (+ "+") (number_literal "0x4d")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(uVar3 == 0xc0a)" (( "(") (binary_expression "uVar3 == 0xc0a" (identifier "uVar3") (== "==") (number_literal "0xc0a")) () ")"))) () ")")) (compound_statement "{\nLAB_000a59a0:\n      uVar3 = FUN_0004c680();\n      goto LAB_000a594e;\n    }" ({ "{") (labeled_statement "LAB_000a59a0:\n      uVar3 = FUN_0004c680();" (statement_identifier "LAB_000a59a0") (: ":") (expression_statement "uVar3 = FUN_0004c680();" (assignment_expression "uVar3 = FUN_0004c680()" (identifier "uVar3") (= "=") (call_expression "FUN_0004c680()" (identifier "FUN_0004c680") (argument_list "()" (( "(") () ")")))) (; ";"))) (goto_statement "goto LAB_000a594e;" (goto "goto") (statement_identifier "LAB_000a594e") (; ";")) (} "}"))) (} "}")))) (expression_statement "uVar3 = uVar3 & *(uint *)(param_1 + 0x40);" (assignment_expression "uVar3 = uVar3 & *(uint *)(param_1 + 0x40)" (identifier "uVar3") (= "=") (binary_expression "uVar3 & *(uint *)(param_1 + 0x40)" (identifier "uVar3") (& "&") (pointer_expression "*(uint *)(param_1 + 0x40)" (* "*") (cast_expression "(uint *)(param_1 + 0x40)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))))) (; ";")) (labeled_statement "LAB_000a594e:\n  if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }" (statement_identifier "LAB_000a594e") (: ":") (if_statement "if (*(int *)(param_1 + 0xc) == 0) {\n    return uVar3;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return uVar3;\n  }" ({ "{") (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))) (expression_statement "(*DAT_001bb444)(*(int *)(param_1 + 0xc));" (call_expression "(*DAT_001bb444)(*(int *)(param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb444)" (( "(") (pointer_expression "*DAT_001bb444" (* "*") (identifier "DAT_001bb444")) () ")")) (argument_list "(*(int *)(param_1 + 0xc))" (( "(") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Unknown calling convention */

int function_1(type_1 *db,char *zName,int nArg)

{
  type_2 *var_2;
  char *var_4;
  type_3 *var_6;
  type_4 var_7;
  type_5 in_stack_ffffffd4;
  
  if (db->mutex != (type_6 *)0x0) {
    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);
  }
  var_2 = var_1(db,zName,nArg,'\x01','\0');
  if (db->mutex != (type_6 *)0x0) {
    (*sqlite3Config.mutex.xMutexLeave)(db->mutex);
  }
  if (var_2 != (type_2 *)0x0) {
    return 0;
  }
  var_4 = var_3(zName);
  if (var_4 == (char *)0x0) {
    return 7;
  }
  if (db->mutex != (type_6 *)0x0) {
    (*sqlite3Config.mutex.xMutexEnter)(db->mutex);
  }
  var_6 = (type_3 *)var_5(in_stack_ffffffd4);
  if (var_6 == (type_3 *)0x0) {
    var_7._0_1_ = db->temp_store;
    var_7._1_1_ = db->mallocFailed;
    var_7._2_1_ = db->bBenignMalloc;
    var_7._3_1_ = db->dfltLockMode;
    if ((var_7 & 0xffff00) == 0) {
      var_8(db);
    }
    var_9(var_4);
    var_7 = 1;
    if (db->mallocFailed != '\0') goto LAB_000a59a0;
  }
  else {
    var_6->nRef = 0;
    var_6->xDestroy = var_9;
    var_6->pUserData = var_4;
    var_7 = var_10(db,zName,nArg,1,var_4,sqlite3InvalidFunction,
                              (type_7 *)0x0,
                              (type_8 *)0x0,
                              (type_8 *)0x0,
                              (type_7 *)0x0,
                              var_6);
    if (var_6->nRef == 0) {
      var_9(var_4);
      var_9(var_6);
    }
    if ((db->mallocFailed != '\0') || (var_7 == 0xc0a)) {
LAB_000a59a0:
      var_7 = var_11(db);
      goto LAB_000a594e;
    }
  }
  var_7 = var_7 & db->errMask;
LAB_000a594e:
  if (db->mutex == (type_6 *)0x0) {
    return var_7;
  }
  (*sqlite3Config.mutex.xMutexLeave)(db->mutex);
  return var_7;
}


(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: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (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 (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (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: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier) (identifier) (number_literal) (number_literal) (number_literal) (number_literal) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))))) (goto_statement label: (statement_identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (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) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (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)))))))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

uint MASKED(int param_1,undefined4 param_2)

{
  int iVar1;
  int *piVar2;
  uint uVar3;
  
  if (*(int *)(param_1 + 0xc) != 0) {
    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));
  }
  iVar1 = FUN_0005c140(1,0);
  if (*(int *)(param_1 + 0xc) != 0) {
    (*DAT_001bb444)(*(int *)(param_1 + 0xc));
  }
  if (iVar1 != 0) {
    return 0;
  }
  iVar1 = FUN_000a3060(param_2);
  if (iVar1 == 0) {
    return 7;
  }
  if (*(int *)(param_1 + 0xc) != 0) {
    (*DAT_001bb43c)(*(int *)(param_1 + 0xc));
  }
  piVar2 = (int *)FUN_00055780();
  if (piVar2 == (int *)0x0) {
    if ((*(uint *)(param_1 + 0x4c) & 0xffff00) == 0) {
      FUN_000446a0();
    }
    FUN_00044000(iVar1);
    uVar3 = 1;
    if (*(char *)(param_1 + 0x4d) != '\0') goto LAB_000a59a0;
  }
  else {
    *piVar2 = 0;
    piVar2[1] = (int)FUN_00044000;
    piVar2[2] = iVar1;
    uVar3 = FUN_0007d140(1,iVar1,FUN_000a59c0,0,0,0,0,piVar2);
    if (*piVar2 == 0) {
      FUN_00044000(iVar1);
      FUN_00044000(piVar2);
    }
    if ((*(char *)(param_1 + 0x4d) != '\0') || (uVar3 == 0xc0a)) {
LAB_000a59a0:
      uVar3 = FUN_0004c680();
      goto LAB_000a594e;
    }
  }
  uVar3 = uVar3 & *(uint *)(param_1 + 0x40);
LAB_000a594e:
  if (*(int *)(param_1 + 0xc) == 0) {
    return uVar3;
  }
  (*DAT_001bb444)(*(int *)(param_1 + 0xc));
  return uVar3;
}

