
int sqlite3_extended_errcode(sqlite3 *db)

{
  u32 uVar1;
  int iVar2;
  
  if (db == (sqlite3 *)0x0) {
    return 7;
  }
  uVar1 = db->magic;
  if ((uVar1 != 0x4b771290 && uVar1 != 0xa029a697) && (uVar1 != 0xf03b7906)) {
    iVar2 = sqlite3SafetyCheckSickOrOk(db);
    if (iVar2 == 0) {
      iVar2 = sqlite3MisuseError(0x2622c);
      return iVar2;
    }
  }
  if (db->mallocFailed == '\0') {
    return db->errCode;
  }
  return 7;
}



ulong FUN_00148dc0(long param_1)

{
  int iVar1;
  ulong uVar2;
  
  if (param_1 == 0) {
    return 7;
  }
  iVar1 = *(int *)(param_1 + 0x70);
  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {
    iVar1 = FUN_00148d20();
    if (iVar1 == 0) {
      uVar2 = FUN_00144080(0x2622c);
      return uVar2;
    }
  }
  if (*(char *)(param_1 + 0x61) == '\0') {
    return (ulong)*(uint *)(param_1 + 0x50);
  }
  return 7;
}


TEST RDI,RDI
JZ 0x00148e10
PUSH RBX
MOV EAX,dword ptr [RDI + 0x70]
MOV RBX,RDI
CMP EAX,0x4b771290
SETNZ CL
CMP EAX,0xa029a697
SETNZ DL
TEST CL,DL
JZ 0x00148df0
CMP EAX,0xf03b7906
JZ 0x00148df0
CALL 0x00148d20
TEST EAX,EAX
JZ 0x00148e20
CMP byte ptr [RBX + 0x61],0x0
JNZ 0x00148e00
MOV EAX,dword ptr [RBX + 0x50]
POP RBX
RET
MOV EAX,0x7
POP RBX
RET
MOV EAX,0x7
RET
MOV EDI,0x2622c
POP RBX
JMP 0x00144080
(translation_unit "ulong FUN_00148dc0(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  \n  if (param_1 == 0) {\n    return 7;\n  }\n  iVar1 = *(int *)(param_1 + 0x70);\n  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }\n  if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\n  }\n  return 7;\n}\n\n" (function_definition "ulong FUN_00148dc0(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  \n  if (param_1 == 0) {\n    return 7;\n  }\n  iVar1 = *(int *)(param_1 + 0x70);\n  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }\n  if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\n  }\n  return 7;\n}" type_identifier (function_declarator "FUN_00148dc0(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  \n  if (param_1 == 0) {\n    return 7;\n  }\n  iVar1 = *(int *)(param_1 + 0x70);\n  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }\n  if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\n  }\n  return 7;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    return 7;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (expression_statement "iVar1 = *(int *)(param_1 + 0x70);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x70)" identifier = (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) ))))) ;) (if_statement "if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }" if (parenthesized_expression "((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa))" ( (binary_expression "(iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)" (parenthesized_expression "(iVar1 != 0x4b771290 && iVar1 != -0x5fd65969)" ( (binary_expression "iVar1 != 0x4b771290 && iVar1 != -0x5fd65969" (binary_expression "iVar1 != 0x4b771290" identifier != number_literal) && (binary_expression "iVar1 != -0x5fd65969" identifier != number_literal)) )) && (parenthesized_expression "(iVar1 != -0xfc486fa)" ( (binary_expression "iVar1 != -0xfc486fa" identifier != number_literal) ))) )) (compound_statement "{\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }" { (expression_statement "iVar1 = FUN_00148d20();" (assignment_expression "iVar1 = FUN_00148d20()" identifier = (call_expression "FUN_00148d20()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }" { (expression_statement "uVar2 = FUN_00144080(0x2622c);" (assignment_expression "uVar2 = FUN_00144080(0x2622c)" identifier = (call_expression "FUN_00144080(0x2622c)" identifier (argument_list "(0x2622c)" ( number_literal )))) ;) (return_statement "return uVar2;" return identifier ;) })) })) (if_statement "if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\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    return (ulong)*(uint *)(param_1 + 0x50);\n  }" { (return_statement "return (ulong)*(uint *)(param_1 + 0x50);" return (binary_expression "(ulong)*(uint *)(param_1 + 0x50)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(uint *)(param_1 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit "int sqlite3_extended_errcode(sqlite3 *db)\n\n{\n  u32 uVar1;\n  int iVar2;\n  \n  if (db == (sqlite3 *)0x0) {\n    return 7;\n  }\n  uVar1 = db->magic;\n  if ((uVar1 != 0x4b771290 && uVar1 != 0xa029a697) && (uVar1 != 0xf03b7906)) {\n    iVar2 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar2 == 0) {\n      iVar2 = sqlite3MisuseError(0x2622c);\n      return iVar2;\n    }\n  }\n  if (db->mallocFailed == '\0') {\n    return db->errCode;\n  }\n  return 7;\n}\n\n" (function_definition "int sqlite3_extended_errcode(sqlite3 *db)\n\n{\n  u32 uVar1;\n  int iVar2;\n  \n  if (db == (sqlite3 *)0x0) {\n    return 7;\n  }\n  uVar1 = db->magic;\n  if ((uVar1 != 0x4b771290 && uVar1 != 0xa029a697) && (uVar1 != 0xf03b7906)) {\n    iVar2 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar2 == 0) {\n      iVar2 = sqlite3MisuseError(0x2622c);\n      return iVar2;\n    }\n  }\n  if (db->mallocFailed == '\0') {\n    return db->errCode;\n  }\n  return 7;\n}" primitive_type (function_declarator "sqlite3_extended_errcode(sqlite3 *db)" identifier (parameter_list "(sqlite3 *db)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) ))) (compound_statement "{\n  u32 uVar1;\n  int iVar2;\n  \n  if (db == (sqlite3 *)0x0) {\n    return 7;\n  }\n  uVar1 = db->magic;\n  if ((uVar1 != 0x4b771290 && uVar1 != 0xa029a697) && (uVar1 != 0xf03b7906)) {\n    iVar2 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar2 == 0) {\n      iVar2 = sqlite3MisuseError(0x2622c);\n      return iVar2;\n    }\n  }\n  if (db->mallocFailed == '\0') {\n    return db->errCode;\n  }\n  return 7;\n}" { (declaration "u32 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (db == (sqlite3 *)0x0) {\n    return 7;\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    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (expression_statement "uVar1 = db->magic;" (assignment_expression "uVar1 = db->magic" identifier = (field_expression "db->magic" identifier -> field_identifier)) ;) (if_statement "if ((uVar1 != 0x4b771290 && uVar1 != 0xa029a697) && (uVar1 != 0xf03b7906)) {\n    iVar2 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar2 == 0) {\n      iVar2 = sqlite3MisuseError(0x2622c);\n      return iVar2;\n    }\n  }" if (parenthesized_expression "((uVar1 != 0x4b771290 && uVar1 != 0xa029a697) && (uVar1 != 0xf03b7906))" ( (binary_expression "(uVar1 != 0x4b771290 && uVar1 != 0xa029a697) && (uVar1 != 0xf03b7906)" (parenthesized_expression "(uVar1 != 0x4b771290 && uVar1 != 0xa029a697)" ( (binary_expression "uVar1 != 0x4b771290 && uVar1 != 0xa029a697" (binary_expression "uVar1 != 0x4b771290" identifier != number_literal) && (binary_expression "uVar1 != 0xa029a697" identifier != number_literal)) )) && (parenthesized_expression "(uVar1 != 0xf03b7906)" ( (binary_expression "uVar1 != 0xf03b7906" identifier != number_literal) ))) )) (compound_statement "{\n    iVar2 = sqlite3SafetyCheckSickOrOk(db);\n    if (iVar2 == 0) {\n      iVar2 = sqlite3MisuseError(0x2622c);\n      return iVar2;\n    }\n  }" { (expression_statement "iVar2 = sqlite3SafetyCheckSickOrOk(db);" (assignment_expression "iVar2 = sqlite3SafetyCheckSickOrOk(db)" identifier = (call_expression "sqlite3SafetyCheckSickOrOk(db)" identifier (argument_list "(db)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n      iVar2 = sqlite3MisuseError(0x2622c);\n      return iVar2;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = sqlite3MisuseError(0x2622c);\n      return iVar2;\n    }" { (expression_statement "iVar2 = sqlite3MisuseError(0x2622c);" (assignment_expression "iVar2 = sqlite3MisuseError(0x2622c)" identifier = (call_expression "sqlite3MisuseError(0x2622c)" identifier (argument_list "(0x2622c)" ( number_literal )))) ;) (return_statement "return iVar2;" return identifier ;) })) })) (if_statement "if (db->mallocFailed == '\0') {\n    return db->errCode;\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    return db->errCode;\n  }" { (return_statement "return db->errCode;" return (field_expression "db->errCode" identifier -> field_identifier) ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit "ulong FUN_00148dc0(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  \n  if (param_1 == 0) {\n    return 7;\n  }\n  iVar1 = *(int *)(param_1 + 0x70);\n  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }\n  if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\n  }\n  return 7;\n}\n\n" (function_definition "ulong FUN_00148dc0(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  \n  if (param_1 == 0) {\n    return 7;\n  }\n  iVar1 = *(int *)(param_1 + 0x70);\n  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }\n  if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\n  }\n  return 7;\n}" type_identifier (function_declarator "FUN_00148dc0(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  \n  if (param_1 == 0) {\n    return 7;\n  }\n  iVar1 = *(int *)(param_1 + 0x70);\n  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }\n  if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\n  }\n  return 7;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    return 7;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (expression_statement "iVar1 = *(int *)(param_1 + 0x70);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x70)" identifier = (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) ))))) ;) (if_statement "if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }" if (parenthesized_expression "((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa))" ( (binary_expression "(iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)" (parenthesized_expression "(iVar1 != 0x4b771290 && iVar1 != -0x5fd65969)" ( (binary_expression "iVar1 != 0x4b771290 && iVar1 != -0x5fd65969" (binary_expression "iVar1 != 0x4b771290" identifier != number_literal) && (binary_expression "iVar1 != -0x5fd65969" identifier != number_literal)) )) && (parenthesized_expression "(iVar1 != -0xfc486fa)" ( (binary_expression "iVar1 != -0xfc486fa" identifier != number_literal) ))) )) (compound_statement "{\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }" { (expression_statement "iVar1 = FUN_00148d20();" (assignment_expression "iVar1 = FUN_00148d20()" identifier = (call_expression "FUN_00148d20()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }" { (expression_statement "uVar2 = FUN_00144080(0x2622c);" (assignment_expression "uVar2 = FUN_00144080(0x2622c)" identifier = (call_expression "FUN_00144080(0x2622c)" identifier (argument_list "(0x2622c)" ( number_literal )))) ;) (return_statement "return uVar2;" return identifier ;) })) })) (if_statement "if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\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    return (ulong)*(uint *)(param_1 + 0x50);\n  }" { (return_statement "return (ulong)*(uint *)(param_1 + 0x50);" return (binary_expression "(ulong)*(uint *)(param_1 + 0x50)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(uint *)(param_1 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT != LIT) && (binary_expression IDENT != LIT)) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (return_statement return IDENT ;) })) })) (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 { (return_statement return (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })) (return_statement return LIT ;) })))
(function_definition "ulong FUN_00148dc0(long param_1)\n\n{\n  int iVar1;\n  ulong uVar2;\n  \n  if (param_1 == 0) {\n    return 7;\n  }\n  iVar1 = *(int *)(param_1 + 0x70);\n  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }\n  if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\n  }\n  return 7;\n}" (type_identifier "ulong") (function_declarator "FUN_00148dc0(long param_1)" (identifier "FUN_00148dc0") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  \n  if (param_1 == 0) {\n    return 7;\n  }\n  iVar1 = *(int *)(param_1 + 0x70);\n  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }\n  if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\n  }\n  return 7;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (if_statement "if (param_1 == 0) {\n    return 7;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 7;\n  }" ({ "{") (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (expression_statement "iVar1 = *(int *)(param_1 + 0x70);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x70)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x70)" (* "*") (cast_expression "(int *)(param_1 + 0x70)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x70)" (( "(") (binary_expression "param_1 + 0x70" (identifier "param_1") (+ "+") (number_literal "0x70")) () ")"))))) (; ";")) (if_statement "if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }" (if "if") (parenthesized_expression "((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa))" (( "(") (binary_expression "(iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)" (parenthesized_expression "(iVar1 != 0x4b771290 && iVar1 != -0x5fd65969)" (( "(") (binary_expression "iVar1 != 0x4b771290 && iVar1 != -0x5fd65969" (binary_expression "iVar1 != 0x4b771290" (identifier "iVar1") (!= "!=") (number_literal "0x4b771290")) (&& "&&") (binary_expression "iVar1 != -0x5fd65969" (identifier "iVar1") (!= "!=") (number_literal "-0x5fd65969"))) () ")")) (&& "&&") (parenthesized_expression "(iVar1 != -0xfc486fa)" (( "(") (binary_expression "iVar1 != -0xfc486fa" (identifier "iVar1") (!= "!=") (number_literal "-0xfc486fa")) () ")"))) () ")")) (compound_statement "{\n    iVar1 = FUN_00148d20();\n    if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }\n  }" ({ "{") (expression_statement "iVar1 = FUN_00148d20();" (assignment_expression "iVar1 = FUN_00148d20()" (identifier "iVar1") (= "=") (call_expression "FUN_00148d20()" (identifier "FUN_00148d20") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = FUN_00144080(0x2622c);\n      return uVar2;\n    }" ({ "{") (expression_statement "uVar2 = FUN_00144080(0x2622c);" (assignment_expression "uVar2 = FUN_00144080(0x2622c)" (identifier "uVar2") (= "=") (call_expression "FUN_00144080(0x2622c)" (identifier "FUN_00144080") (argument_list "(0x2622c)" (( "(") (number_literal "0x2622c") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (} "}"))) (if_statement "if (*(char *)(param_1 + 0x61) == '\0') {\n    return (ulong)*(uint *)(param_1 + 0x50);\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    return (ulong)*(uint *)(param_1 + 0x50);\n  }" ({ "{") (return_statement "return (ulong)*(uint *)(param_1 + 0x50);" (return "return") (binary_expression "(ulong)*(uint *)(param_1 + 0x50)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (* "*") (cast_expression "(uint *)(param_1 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (; ";")) (} "}"))) (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}")))

int function_1(type_1 *var_1)

{
  type_2 var_2;
  int var_4;
  
  if (var_1 == (type_1 *)0x0) {
    return 7;
  }
  var_2 = var_1->magic;
  if ((var_2 != 0x4b771290 && var_2 != 0xa029a697) && (var_2 != 0xf03b7906)) {
    var_4 = var_3(var_1);
    if (var_4 == 0) {
      var_4 = var_5(0x2622c);
      return var_4;
    }
  }
  if (var_1->mallocFailed == '\0') {
    return var_1->errCode;
  }
  return 7;
}


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

ulong MASKED(long param_1)

{
  int iVar1;
  ulong uVar2;
  
  if (param_1 == 0) {
    return 7;
  }
  iVar1 = *(int *)(param_1 + 0x70);
  if ((iVar1 != 0x4b771290 && iVar1 != -0x5fd65969) && (iVar1 != -0xfc486fa)) {
    iVar1 = FUN_00148d20();
    if (iVar1 == 0) {
      uVar2 = FUN_00144080(0x2622c);
      return uVar2;
    }
  }
  if (*(char *)(param_1 + 0x61) == '\0') {
    return (ulong)*(uint *)(param_1 + 0x50);
  }
  return 7;
}

