
void * sqlite3_errmsg16(sqlite3 *db)

{
  int iVar1;
  char *zFormat;
  u16 *puVar2;
  
  puVar2 = sqlite3_errmsg16::outOfMem;
  if (db != (sqlite3 *)0x0) {
    iVar1 = sqlite3SafetyCheckSickOrOk(db);
    puVar2 = sqlite3_errmsg16::misuse;
    if (iVar1 != 0) {
      sqlite3_mutex_enter(db->mutex);
      puVar2 = sqlite3_errmsg16::outOfMem;
      if (db->mallocFailed == '\0') {
        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);
        if (puVar2 == (u16 *)0x0) {
          iVar1 = db->errCode;
          zFormat = sqlite3ErrStr(iVar1);
          sqlite3ErrorWithMsg(db,iVar1,zFormat);
          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);
        }
        sqlite3OomClear(db);
      }
      sqlite3_mutex_leave(db->mutex);
    }
  }
  return puVar2;
}



wchar16 * sqlite3_errmsg16(long param_1)

{
  undefined4 uVar1;
  int iVar2;
  undefined8 uVar3;
  wchar16 *pwVar4;
  
  pwVar4 = L"out of memory";
  if (param_1 != 0) {
    iVar2 = FUN_00128bb9();
    pwVar4 = L"bad parameter or other API misuse";
    if (iVar2 != 0) {
      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));
      pwVar4 = L"out of memory";
      if (*(char *)(param_1 + 0x61) == '\0') {
        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));
        if (pwVar4 == (wchar16 *)0x0) {
          uVar1 = *(undefined4 *)(param_1 + 0x50);
          uVar3 = FUN_00113a11(uVar1);
          FUN_0012bfad(param_1,uVar1,uVar3);
          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));
        }
        FUN_00114098(param_1);
      }
      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));
    }
  }
  return pwVar4;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
LEA RBP,[0x192210]
TEST RDI,RDI
JZ 0x00131c94
MOV RBX,RDI
CALL 0x00128bb9
LEA RBP,[0x1921c0]
TEST EAX,EAX
JNZ 0x00131c9e
MOV RAX,RBP
ADD RSP,0x8
POP RBX
POP RBP
RET
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0010c480
LEA RBP,[0x192210]
CMP byte ptr [RBX + 0x61],0x0
JZ 0x00131cbf
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0010c3f0
JMP 0x00131c94
MOV RDI,qword ptr [RBX + 0x160]
CALL 0x0010c450
MOV RBP,RAX
TEST RAX,RAX
JZ 0x00131cdd
MOV RDI,RBX
CALL 0x00114098
JMP 0x00131cb4
MOV EBP,dword ptr [RBX + 0x50]
MOV EDI,EBP
CALL 0x00113a11
MOV RDX,RAX
MOV ESI,EBP
MOV RDI,RBX
MOV EAX,0x0
CALL 0x0012bfad
MOV RDI,qword ptr [RBX + 0x160]
CALL 0x0010c450
MOV RBP,RAX
JMP 0x00131cd3
(translation_unit "wchar16 * sqlite3_errmsg16(long param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined8 uVar3;\n  wchar16 *pwVar4;\n  \n  pwVar4 = L"out of memory";\n  if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }\n  return pwVar4;\n}\n\n" (function_definition "wchar16 * sqlite3_errmsg16(long param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined8 uVar3;\n  wchar16 *pwVar4;\n  \n  pwVar4 = L"out of memory";\n  if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }\n  return pwVar4;\n}" type_identifier (pointer_declarator "* sqlite3_errmsg16(long param_1)" * (function_declarator "sqlite3_errmsg16(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) )))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined8 uVar3;\n  wchar16 *pwVar4;\n  \n  pwVar4 = L"out of memory";\n  if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }\n  return pwVar4;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "wchar16 *pwVar4;" type_identifier (pointer_declarator "*pwVar4" * identifier) ;) (expression_statement "pwVar4 = L"out of memory";" (assignment_expression "pwVar4 = L"out of memory"" identifier = (string_literal "L"out of memory"" L" string_content ")) ;) (if_statement "if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }" { (expression_statement "iVar2 = FUN_00128bb9();" (assignment_expression "iVar2 = FUN_00128bb9()" identifier = (call_expression "FUN_00128bb9()" identifier (argument_list "()" ( )))) ;) (expression_statement "pwVar4 = L"bad parameter or other API misuse";" (assignment_expression "pwVar4 = L"bad parameter or other API misuse"" identifier = (string_literal "L"bad parameter or other API misuse"" L" string_content ")) ;) (if_statement "if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }" { (expression_statement "sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));" (call_expression "sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))) ;) (expression_statement "pwVar4 = L"out of memory";" (assignment_expression "pwVar4 = L"out of memory"" identifier = (string_literal "L"out of memory"" L" string_content ")) ;) (if_statement "if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }" if (parenthesized_expression "(*(char *)(param_1 + 0x61) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x61) == '\0'" (pointer_expression "*(char *)(param_1 + 0x61)" * (cast_expression "(char *)(param_1 + 0x61)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x61)" ( (binary_expression "param_1 + 0x61" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }" { (expression_statement "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));" (assignment_expression "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" identifier = (cast_expression "(wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" ( (type_descriptor "wchar16 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x160))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) ))))) ;) (if_statement "if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }" if (parenthesized_expression "(pwVar4 == (wchar16 *)0x0)" ( (binary_expression "pwVar4 == (wchar16 *)0x0" identifier == (cast_expression "(wchar16 *)0x0" ( (type_descriptor "wchar16 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }" { (expression_statement "uVar1 = *(undefined4 *)(param_1 + 0x50);" (assignment_expression "uVar1 = *(undefined4 *)(param_1 + 0x50)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = FUN_00113a11(uVar1);" (assignment_expression "uVar3 = FUN_00113a11(uVar1)" identifier = (call_expression "FUN_00113a11(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) (expression_statement "FUN_0012bfad(param_1,uVar1,uVar3);" (call_expression "FUN_0012bfad(param_1,uVar1,uVar3)" identifier (argument_list "(param_1,uVar1,uVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));" (assignment_expression "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" identifier = (cast_expression "(wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" ( (type_descriptor "wchar16 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x160))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) ))))) ;) })) (expression_statement "FUN_00114098(param_1);" (call_expression "FUN_00114098(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (expression_statement "sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));" (call_expression "sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))) ;) })) })) (return_statement "return pwVar4;" return identifier ;) })))
(translation_unit "void * sqlite3_errmsg16(sqlite3 *db)\n\n{\n  int iVar1;\n  char *zFormat;\n  u16 *puVar2;\n  \n  puVar2 = sqlite3_errmsg16::outOfMem;\n  if (db != (sqlite3 *)0x0) {\n    iVar1 = sqlite3SafetyCheckSickOrOk(db);\n    puVar2 = sqlite3_errmsg16::misuse;\n    if (iVar1 != 0) {\n      sqlite3_mutex_enter(db->mutex);\n      puVar2 = sqlite3_errmsg16::outOfMem;\n      if (db->mallocFailed == '\0') {\n        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }\n        sqlite3OomClear(db);\n      }\n      sqlite3_mutex_leave(db->mutex);\n    }\n  }\n  return puVar2;\n}\n\n" (function_definition "void * sqlite3_errmsg16(sqlite3 *db)\n\n{\n  int iVar1;\n  char *zFormat;\n  u16 *puVar2;\n  \n  puVar2 = sqlite3_errmsg16::outOfMem;\n  if (db != (sqlite3 *)0x0) {\n    iVar1 = sqlite3SafetyCheckSickOrOk(db);\n    puVar2 = sqlite3_errmsg16::misuse;\n    if (iVar1 != 0) {\n      sqlite3_mutex_enter(db->mutex);\n      puVar2 = sqlite3_errmsg16::outOfMem;\n      if (db->mallocFailed == '\0') {\n        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }\n        sqlite3OomClear(db);\n      }\n      sqlite3_mutex_leave(db->mutex);\n    }\n  }\n  return puVar2;\n}" primitive_type (pointer_declarator "* sqlite3_errmsg16(sqlite3 *db)" * (function_declarator "sqlite3_errmsg16(sqlite3 *db)" identifier (parameter_list "(sqlite3 *db)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  char *zFormat;\n  u16 *puVar2;\n  \n  puVar2 = sqlite3_errmsg16::outOfMem;\n  if (db != (sqlite3 *)0x0) {\n    iVar1 = sqlite3SafetyCheckSickOrOk(db);\n    puVar2 = sqlite3_errmsg16::misuse;\n    if (iVar1 != 0) {\n      sqlite3_mutex_enter(db->mutex);\n      puVar2 = sqlite3_errmsg16::outOfMem;\n      if (db->mallocFailed == '\0') {\n        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }\n        sqlite3OomClear(db);\n      }\n      sqlite3_mutex_leave(db->mutex);\n    }\n  }\n  return puVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *zFormat;" primitive_type (pointer_declarator "*zFormat" * identifier) ;) (declaration "u16 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar2 = sqlite3_errmsg16::outOfMem;" (assignment_expression "puVar2 = sqlite3_errmsg16" identifier = identifier) (ERROR "::outOfMem" : : identifier) ;) (if_statement "if (db != (sqlite3 *)0x0) {\n    iVar1 = sqlite3SafetyCheckSickOrOk(db);\n    puVar2 = sqlite3_errmsg16::misuse;\n    if (iVar1 != 0) {\n      sqlite3_mutex_enter(db->mutex);\n      puVar2 = sqlite3_errmsg16::outOfMem;\n      if (db->mallocFailed == '\0') {\n        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }\n        sqlite3OomClear(db);\n      }\n      sqlite3_mutex_leave(db->mutex);\n    }\n  }" if (parenthesized_expression "(db != (sqlite3 *)0x0)" ( (binary_expression "db != (sqlite3 *)0x0" identifier != (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = sqlite3SafetyCheckSickOrOk(db);\n    puVar2 = sqlite3_errmsg16::misuse;\n    if (iVar1 != 0) {\n      sqlite3_mutex_enter(db->mutex);\n      puVar2 = sqlite3_errmsg16::outOfMem;\n      if (db->mallocFailed == '\0') {\n        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }\n        sqlite3OomClear(db);\n      }\n      sqlite3_mutex_leave(db->mutex);\n    }\n  }" { (expression_statement "iVar1 = sqlite3SafetyCheckSickOrOk(db);" (assignment_expression "iVar1 = sqlite3SafetyCheckSickOrOk(db)" identifier = (call_expression "sqlite3SafetyCheckSickOrOk(db)" identifier (argument_list "(db)" ( identifier )))) ;) (expression_statement "puVar2 = sqlite3_errmsg16::misuse;" (assignment_expression "puVar2 = sqlite3_errmsg16" identifier = identifier) (ERROR "::misuse" : : identifier) ;) (if_statement "if (iVar1 != 0) {\n      sqlite3_mutex_enter(db->mutex);\n      puVar2 = sqlite3_errmsg16::outOfMem;\n      if (db->mallocFailed == '\0') {\n        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }\n        sqlite3OomClear(db);\n      }\n      sqlite3_mutex_leave(db->mutex);\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      sqlite3_mutex_enter(db->mutex);\n      puVar2 = sqlite3_errmsg16::outOfMem;\n      if (db->mallocFailed == '\0') {\n        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }\n        sqlite3OomClear(db);\n      }\n      sqlite3_mutex_leave(db->mutex);\n    }" { (expression_statement "sqlite3_mutex_enter(db->mutex);" (call_expression "sqlite3_mutex_enter(db->mutex)" identifier (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) (expression_statement "puVar2 = sqlite3_errmsg16::outOfMem;" (assignment_expression "puVar2 = sqlite3_errmsg16" identifier = identifier) (ERROR "::outOfMem" : : identifier) ;) (if_statement "if (db->mallocFailed == '\0') {\n        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }\n        sqlite3OomClear(db);\n      }" if (parenthesized_expression "(db->mallocFailed == '\0')" ( (binary_expression "db->mallocFailed == '\0'" (field_expression "db->mallocFailed" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }\n        sqlite3OomClear(db);\n      }" { (expression_statement "puVar2 = (u16 *)sqlite3_value_text16(db->pErr);" (assignment_expression "puVar2 = (u16 *)sqlite3_value_text16(db->pErr)" identifier = (cast_expression "(u16 *)sqlite3_value_text16(db->pErr)" ( (type_descriptor "u16 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_value_text16(db->pErr)" identifier (argument_list "(db->pErr)" ( (field_expression "db->pErr" identifier -> field_identifier) ))))) ;) (if_statement "if (puVar2 == (u16 *)0x0) {\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }" if (parenthesized_expression "(puVar2 == (u16 *)0x0)" ( (binary_expression "puVar2 == (u16 *)0x0" identifier == (cast_expression "(u16 *)0x0" ( (type_descriptor "u16 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          iVar1 = db->errCode;\n          zFormat = sqlite3ErrStr(iVar1);\n          sqlite3ErrorWithMsg(db,iVar1,zFormat);\n          puVar2 = (u16 *)sqlite3_value_text16(db->pErr);\n        }" { (expression_statement "iVar1 = db->errCode;" (assignment_expression "iVar1 = db->errCode" identifier = (field_expression "db->errCode" identifier -> field_identifier)) ;) (expression_statement "zFormat = sqlite3ErrStr(iVar1);" (assignment_expression "zFormat = sqlite3ErrStr(iVar1)" identifier = (call_expression "sqlite3ErrStr(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "sqlite3ErrorWithMsg(db,iVar1,zFormat);" (call_expression "sqlite3ErrorWithMsg(db,iVar1,zFormat)" identifier (argument_list "(db,iVar1,zFormat)" ( identifier , identifier , identifier ))) ;) (expression_statement "puVar2 = (u16 *)sqlite3_value_text16(db->pErr);" (assignment_expression "puVar2 = (u16 *)sqlite3_value_text16(db->pErr)" identifier = (cast_expression "(u16 *)sqlite3_value_text16(db->pErr)" ( (type_descriptor "u16 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_value_text16(db->pErr)" identifier (argument_list "(db->pErr)" ( (field_expression "db->pErr" identifier -> field_identifier) ))))) ;) })) (expression_statement "sqlite3OomClear(db);" (call_expression "sqlite3OomClear(db)" identifier (argument_list "(db)" ( identifier ))) ;) })) (expression_statement "sqlite3_mutex_leave(db->mutex);" (call_expression "sqlite3_mutex_leave(db->mutex)" identifier (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) })) })) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit "wchar16 * sqlite3_errmsg16(long param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined8 uVar3;\n  wchar16 *pwVar4;\n  \n  pwVar4 = L"out of memory";\n  if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }\n  return pwVar4;\n}\n\n" (function_definition "wchar16 * sqlite3_errmsg16(long param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined8 uVar3;\n  wchar16 *pwVar4;\n  \n  pwVar4 = L"out of memory";\n  if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }\n  return pwVar4;\n}" type_identifier (pointer_declarator "* sqlite3_errmsg16(long param_1)" * (function_declarator "sqlite3_errmsg16(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) )))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined8 uVar3;\n  wchar16 *pwVar4;\n  \n  pwVar4 = L"out of memory";\n  if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }\n  return pwVar4;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "wchar16 *pwVar4;" type_identifier (pointer_declarator "*pwVar4" * identifier) ;) (expression_statement "pwVar4 = L"out of memory";" (assignment_expression "pwVar4 = L"out of memory"" identifier = (string_literal "L"out of memory"" L" string_content ")) ;) (if_statement "if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }" { (expression_statement "iVar2 = FUN_00128bb9();" (assignment_expression "iVar2 = FUN_00128bb9()" identifier = (call_expression "FUN_00128bb9()" identifier (argument_list "()" ( )))) ;) (expression_statement "pwVar4 = L"bad parameter or other API misuse";" (assignment_expression "pwVar4 = L"bad parameter or other API misuse"" identifier = (string_literal "L"bad parameter or other API misuse"" L" string_content ")) ;) (if_statement "if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }" { (expression_statement "sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));" (call_expression "sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))) ;) (expression_statement "pwVar4 = L"out of memory";" (assignment_expression "pwVar4 = L"out of memory"" identifier = (string_literal "L"out of memory"" L" string_content ")) ;) (if_statement "if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }" if (parenthesized_expression "(*(char *)(param_1 + 0x61) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x61) == '\0'" (pointer_expression "*(char *)(param_1 + 0x61)" * (cast_expression "(char *)(param_1 + 0x61)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x61)" ( (binary_expression "param_1 + 0x61" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }" { (expression_statement "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));" (assignment_expression "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" identifier = (cast_expression "(wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" ( (type_descriptor "wchar16 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x160))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) ))))) ;) (if_statement "if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }" if (parenthesized_expression "(pwVar4 == (wchar16 *)0x0)" ( (binary_expression "pwVar4 == (wchar16 *)0x0" identifier == (cast_expression "(wchar16 *)0x0" ( (type_descriptor "wchar16 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }" { (expression_statement "uVar1 = *(undefined4 *)(param_1 + 0x50);" (assignment_expression "uVar1 = *(undefined4 *)(param_1 + 0x50)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = FUN_00113a11(uVar1);" (assignment_expression "uVar3 = FUN_00113a11(uVar1)" identifier = (call_expression "FUN_00113a11(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) (expression_statement "FUN_0012bfad(param_1,uVar1,uVar3);" (call_expression "FUN_0012bfad(param_1,uVar1,uVar3)" identifier (argument_list "(param_1,uVar1,uVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));" (assignment_expression "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" identifier = (cast_expression "(wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" ( (type_descriptor "wchar16 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x160))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) ))))) ;) })) (expression_statement "FUN_00114098(param_1);" (call_expression "FUN_00114098(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (expression_statement "sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));" (call_expression "sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) ))) ;) })) })) (return_statement "return pwVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (string_literal L" string_content ")) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (string_literal L" string_content ")) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression IDENT = (string_literal L" string_content ")) ;) (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 ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "wchar16 * sqlite3_errmsg16(long param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined8 uVar3;\n  wchar16 *pwVar4;\n  \n  pwVar4 = L"out of memory";\n  if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }\n  return pwVar4;\n}" (type_identifier "wchar16") (pointer_declarator "* sqlite3_errmsg16(long param_1)" (* "*") (function_declarator "sqlite3_errmsg16(long param_1)" (identifier "sqlite3_errmsg16") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")")))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined8 uVar3;\n  wchar16 *pwVar4;\n  \n  pwVar4 = L"out of memory";\n  if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }\n  return pwVar4;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "wchar16 *pwVar4;" (type_identifier "wchar16") (pointer_declarator "*pwVar4" (* "*") (identifier "pwVar4")) (; ";")) (expression_statement "pwVar4 = L"out of memory";" (assignment_expression "pwVar4 = L"out of memory"" (identifier "pwVar4") (= "=") (string_literal "L"out of memory"" (L" "L"") (string_content "out of memory") (" """))) (; ";")) (if_statement "if (param_1 != 0) {\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = FUN_00128bb9();\n    pwVar4 = L"bad parameter or other API misuse";\n    if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }\n  }" ({ "{") (expression_statement "iVar2 = FUN_00128bb9();" (assignment_expression "iVar2 = FUN_00128bb9()" (identifier "iVar2") (= "=") (call_expression "FUN_00128bb9()" (identifier "FUN_00128bb9") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pwVar4 = L"bad parameter or other API misuse";" (assignment_expression "pwVar4 = L"bad parameter or other API misuse"" (identifier "pwVar4") (= "=") (string_literal "L"bad parameter or other API misuse"" (L" "L"") (string_content "bad parameter or other API misuse") (" """))) (; ";")) (if_statement "if (iVar2 != 0) {\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));\n      pwVar4 = L"out of memory";\n      if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }\n      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));\n    }" ({ "{") (expression_statement "sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));" (call_expression "sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18))" (identifier "sqlite3_mutex_enter") (argument_list "(*(undefined8 *)(param_1 + 0x18))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";")) (expression_statement "pwVar4 = L"out of memory";" (assignment_expression "pwVar4 = L"out of memory"" (identifier "pwVar4") (= "=") (string_literal "L"out of memory"" (L" "L"") (string_content "out of memory") (" """))) (; ";")) (if_statement "if (*(char *)(param_1 + 0x61) == '\0') {\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x61) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x61) == '\0'" (pointer_expression "*(char *)(param_1 + 0x61)" (* "*") (cast_expression "(char *)(param_1 + 0x61)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x61)" (( "(") (binary_expression "param_1 + 0x61" (identifier "param_1") (+ "+") (number_literal "0x61")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }\n        FUN_00114098(param_1);\n      }" ({ "{") (expression_statement "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));" (assignment_expression "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" (identifier "pwVar4") (= "=") (cast_expression "(wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" (( "(") (type_descriptor "wchar16 *" (type_identifier "wchar16") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" (identifier "sqlite3_value_text16") (argument_list "(*(undefined8 *)(param_1 + 0x160))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x160)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x160)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x160)" (( "(") (binary_expression "param_1 + 0x160" (identifier "param_1") (+ "+") (number_literal "0x160")) () ")")))) () ")"))))) (; ";")) (if_statement "if (pwVar4 == (wchar16 *)0x0) {\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }" (if "if") (parenthesized_expression "(pwVar4 == (wchar16 *)0x0)" (( "(") (binary_expression "pwVar4 == (wchar16 *)0x0" (identifier "pwVar4") (== "==") (cast_expression "(wchar16 *)0x0" (( "(") (type_descriptor "wchar16 *" (type_identifier "wchar16") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          uVar1 = *(undefined4 *)(param_1 + 0x50);\n          uVar3 = FUN_00113a11(uVar1);\n          FUN_0012bfad(param_1,uVar1,uVar3);\n          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));\n        }" ({ "{") (expression_statement "uVar1 = *(undefined4 *)(param_1 + 0x50);" (assignment_expression "uVar1 = *(undefined4 *)(param_1 + 0x50)" (identifier "uVar1") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x50)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x50)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")"))))) (; ";")) (expression_statement "uVar3 = FUN_00113a11(uVar1);" (assignment_expression "uVar3 = FUN_00113a11(uVar1)" (identifier "uVar3") (= "=") (call_expression "FUN_00113a11(uVar1)" (identifier "FUN_00113a11") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")")))) (; ";")) (expression_statement "FUN_0012bfad(param_1,uVar1,uVar3);" (call_expression "FUN_0012bfad(param_1,uVar1,uVar3)" (identifier "FUN_0012bfad") (argument_list "(param_1,uVar1,uVar3)" (( "(") (identifier "param_1") (, ",") (identifier "uVar1") (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));" (assignment_expression "pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" (identifier "pwVar4") (= "=") (cast_expression "(wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" (( "(") (type_descriptor "wchar16 *" (type_identifier "wchar16") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160))" (identifier "sqlite3_value_text16") (argument_list "(*(undefined8 *)(param_1 + 0x160))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x160)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x160)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x160)" (( "(") (binary_expression "param_1 + 0x160" (identifier "param_1") (+ "+") (number_literal "0x160")) () ")")))) () ")"))))) (; ";")) (} "}"))) (expression_statement "FUN_00114098(param_1);" (call_expression "FUN_00114098(param_1)" (identifier "FUN_00114098") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (expression_statement "sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));" (call_expression "sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18))" (identifier "sqlite3_mutex_leave") (argument_list "(*(undefined8 *)(param_1 + 0x18))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return pwVar4;" (return "return") (identifier "pwVar4") (; ";")) (} "}")))

void * function_1(type_1 *var_1)

{
  int var_3;
  char *zFormat;
  type_2 *var_6;
  
  var_6 = function_1::outOfMem;
  if (var_1 != (type_1 *)0x0) {
    var_3 = var_2(var_1);
    var_6 = function_1::misuse;
    if (var_3 != 0) {
      var_4(var_1->mutex);
      var_6 = function_1::outOfMem;
      if (var_1->mallocFailed == '\0') {
        var_6 = (type_2 *)var_5(var_1->pErr);
        if (var_6 == (type_2 *)0x0) {
          var_3 = var_1->errCode;
          zFormat = var_7(var_3);
          var_8(var_1,var_3,zFormat);
          var_6 = (type_2 *)var_5(var_1->pErr);
        }
        var_9(var_1);
      }
      var_10(var_1->mutex);
    }
  }
  return var_6;
}


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

wchar16 * MASKED(long param_1)

{
  undefined4 uVar1;
  int iVar2;
  undefined8 uVar3;
  wchar16 *pwVar4;
  
  pwVar4 = L"out of memory";
  if (param_1 != 0) {
    iVar2 = FUN_00128bb9();
    pwVar4 = L"bad parameter or other API misuse";
    if (iVar2 != 0) {
      sqlite3_mutex_enter(*(undefined8 *)(param_1 + 0x18));
      pwVar4 = L"out of memory";
      if (*(char *)(param_1 + 0x61) == '\0') {
        pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));
        if (pwVar4 == (wchar16 *)0x0) {
          uVar1 = *(undefined4 *)(param_1 + 0x50);
          uVar3 = FUN_00113a11(uVar1);
          FUN_0012bfad(param_1,uVar1,uVar3);
          pwVar4 = (wchar16 *)sqlite3_value_text16(*(undefined8 *)(param_1 + 0x160));
        }
        FUN_00114098(param_1);
      }
      sqlite3_mutex_leave(*(undefined8 *)(param_1 + 0x18));
    }
  }
  return pwVar4;
}

