
void * dbMallocRawFinish(sqlite3 *db,u64 n)

{
  void *pvVar1;
  uint uVar2;
  undefined4 in_stack_ffffffec;
  
  pvVar1 = sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffec));
  if ((pvVar1 == (void *)0x0) &&
     (uVar2._0_1_ = db->temp_store, uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,
     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0)) {
    sqlite3OomFault(db);
    return (void *)0x0;
  }
  return pvVar1;
}



int FUN_0002de20(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  int iVar1;
  
  iVar1 = FUN_0002ac90(param_3,param_4);
  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {
    FUN_0002ddf8(param_1);
    return 0;
  }
  return iVar1;
}


lui gp,0x13
addiu gp,gp,0x6790
addu gp,gp,t9
lw t9,-0x7ed4(gp)
addiu sp,sp,-0x28
or a1,a3,zero
addiu t9,t9,-0x5370
sw gp,0x10(sp)
sw s0,0x20(sp)
or s0,a0,zero
sw ra,0x24(sp)
bal 0x0002ac90
_or a0,a2,zero
beq v0,zero,0x0002de6c
_lw gp,0x10(sp)
lw ra,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x28
lw v1,0x50(s0)
lui a0,0xff
ori a0,a0,0xff00
and v1,v1,a0
bne v1,zero,0x0002de60
_lw ra,0x24(sp)
lw t9,-0x7ed4(gp)
or a0,s0,zero
addiu t9,t9,-0x2208
bal 0x0002ddf8
_sw v0,0x1c(sp)
lw ra,0x24(sp)
lw v0,0x1c(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "int FUN_0002de20(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_0002ac90(param_3,param_4);\n  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_0002de20(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_0002ac90(param_3,param_4);\n  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0002de20(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_0002ac90(param_3,param_4);\n  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_0002ac90(param_3,param_4);" (assignment_expression "iVar1 = FUN_0002ac90(param_3,param_4)" identifier = (call_expression "FUN_0002ac90(param_3,param_4)" identifier (argument_list "(param_3,param_4)" ( identifier , identifier )))) ;) (if_statement "if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }" if (parenthesized_expression "((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0))" ( (binary_expression "(iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) && (parenthesized_expression "((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x50) & 0xffff00) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x50) & 0xffff00)" ( (binary_expression "*(uint *)(param_1 + 0x50) & 0xffff00" (pointer_expression "*(uint *)(param_1 + 0x50)" * (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) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    FUN_0002ddf8(param_1);\n    return 0;\n  }" { (expression_statement "FUN_0002ddf8(param_1);" (call_expression "FUN_0002ddf8(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "void * dbMallocRawFinish(sqlite3 *db,u64 n)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  undefined4 in_stack_ffffffec;\n  \n  pvVar1 = sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffec));\n  if ((pvVar1 == (void *)0x0) &&\n     (uVar2._0_1_ = db->temp_store, uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0)) {\n    sqlite3OomFault(db);\n    return (void *)0x0;\n  }\n  return pvVar1;\n}\n\n" (function_definition "void * dbMallocRawFinish(sqlite3 *db,u64 n)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  undefined4 in_stack_ffffffec;\n  \n  pvVar1 = sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffec));\n  if ((pvVar1 == (void *)0x0) &&\n     (uVar2._0_1_ = db->temp_store, uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0)) {\n    sqlite3OomFault(db);\n    return (void *)0x0;\n  }\n  return pvVar1;\n}" primitive_type (pointer_declarator "* dbMallocRawFinish(sqlite3 *db,u64 n)" * (function_declarator "dbMallocRawFinish(sqlite3 *db,u64 n)" identifier (parameter_list "(sqlite3 *db,u64 n)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "u64 n" type_identifier identifier) )))) (compound_statement "{\n  void *pvVar1;\n  uint uVar2;\n  undefined4 in_stack_ffffffec;\n  \n  pvVar1 = sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffec));\n  if ((pvVar1 == (void *)0x0) &&\n     (uVar2._0_1_ = db->temp_store, uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0)) {\n    sqlite3OomFault(db);\n    return (void *)0x0;\n  }\n  return pvVar1;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined4 in_stack_ffffffec;" type_identifier identifier ;) (expression_statement "pvVar1 = sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffec));" (assignment_expression "pvVar1 = sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffec))" identifier = (call_expression "sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffec))" identifier (argument_list "(CONCAT44(&_gp,in_stack_ffffffec))" ( (call_expression "CONCAT44(&_gp,in_stack_ffffffec)" identifier (argument_list "(&_gp,in_stack_ffffffec)" ( (pointer_expression "&_gp" & identifier) , identifier ))) )))) ;) (if_statement "if ((pvVar1 == (void *)0x0) &&\n     (uVar2._0_1_ = db->temp_store, uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0)) {\n    sqlite3OomFault(db);\n    return (void *)0x0;\n  }" if (parenthesized_expression "((pvVar1 == (void *)0x0) &&\n     (uVar2._0_1_ = db->temp_store, uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0))" ( (binary_expression "(pvVar1 == (void *)0x0) &&\n     (uVar2._0_1_ = db->temp_store, uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0)" (parenthesized_expression "(pvVar1 == (void *)0x0)" ( (binary_expression "pvVar1 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(uVar2._0_1_ = db->temp_store, uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0)" ( (comma_expression "uVar2._0_1_ = db->temp_store, uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0" (assignment_expression "uVar2._0_1_ = db->temp_store" (field_expression "uVar2._0_1_" identifier . field_identifier) = (field_expression "db->temp_store" identifier -> field_identifier)) , (comma_expression "uVar2._1_1_ = db->mallocFailed, uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0" (assignment_expression "uVar2._1_1_ = db->mallocFailed" (field_expression "uVar2._1_1_" identifier . field_identifier) = (field_expression "db->mallocFailed" identifier -> field_identifier)) , (comma_expression "uVar2._2_1_ = db->bBenignMalloc,\n     uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0" (assignment_expression "uVar2._2_1_ = db->bBenignMalloc" (field_expression "uVar2._2_1_" identifier . field_identifier) = (field_expression "db->bBenignMalloc" identifier -> field_identifier)) , (comma_expression "uVar2._3_1_ = db->dfltLockMode, (uVar2 & 0xffff00) == 0" (assignment_expression "uVar2._3_1_ = db->dfltLockMode" (field_expression "uVar2._3_1_" identifier . field_identifier) = (field_expression "db->dfltLockMode" identifier -> field_identifier)) , (binary_expression "(uVar2 & 0xffff00) == 0" (parenthesized_expression "(uVar2 & 0xffff00)" ( (binary_expression "uVar2 & 0xffff00" identifier & number_literal) )) == number_literal))))) ))) )) (compound_statement "{\n    sqlite3OomFault(db);\n    return (void *)0x0;\n  }" { (expression_statement "sqlite3OomFault(db);" (call_expression "sqlite3OomFault(db)" identifier (argument_list "(db)" ( identifier ))) ;) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (return_statement "return pvVar1;" return identifier ;) })))
(translation_unit "int FUN_0002de20(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_0002ac90(param_3,param_4);\n  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_0002de20(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_0002ac90(param_3,param_4);\n  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0002de20(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_0002ac90(param_3,param_4);\n  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_0002ac90(param_3,param_4);" (assignment_expression "iVar1 = FUN_0002ac90(param_3,param_4)" identifier = (call_expression "FUN_0002ac90(param_3,param_4)" identifier (argument_list "(param_3,param_4)" ( identifier , identifier )))) ;) (if_statement "if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }" if (parenthesized_expression "((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0))" ( (binary_expression "(iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) && (parenthesized_expression "((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x50) & 0xffff00) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x50) & 0xffff00)" ( (binary_expression "*(uint *)(param_1 + 0x50) & 0xffff00" (pointer_expression "*(uint *)(param_1 + 0x50)" * (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) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    FUN_0002ddf8(param_1);\n    return 0;\n  }" { (expression_statement "FUN_0002ddf8(param_1);" (call_expression "FUN_0002ddf8(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (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 ( IDENT ))) ;) (return_statement return LIT ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_0002de20(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_0002ac90(param_3,param_4);\n  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_0002de20(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" (identifier "FUN_0002de20") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_0002ac90(param_3,param_4);\n  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = FUN_0002ac90(param_3,param_4);" (assignment_expression "iVar1 = FUN_0002ac90(param_3,param_4)" (identifier "iVar1") (= "=") (call_expression "FUN_0002ac90(param_3,param_4)" (identifier "FUN_0002ac90") (argument_list "(param_3,param_4)" (( "(") (identifier "param_3") (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {\n    FUN_0002ddf8(param_1);\n    return 0;\n  }" (if "if") (parenthesized_expression "((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0))" (( "(") (binary_expression "(iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)" (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x50) & 0xffff00) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x50) & 0xffff00)" (( "(") (binary_expression "*(uint *)(param_1 + 0x50) & 0xffff00" (pointer_expression "*(uint *)(param_1 + 0x50)" (* "*") (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")) () ")")))) (& "&") (number_literal "0xffff00")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    FUN_0002ddf8(param_1);\n    return 0;\n  }" ({ "{") (expression_statement "FUN_0002ddf8(param_1);" (call_expression "FUN_0002ddf8(param_1)" (identifier "FUN_0002ddf8") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (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 (identifier)))) (return_statement (number_literal)))) (return_statement (identifier)))))

int MASKED(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  int iVar1;
  
  iVar1 = FUN_0002ac90(param_3,param_4);
  if ((iVar1 == 0) && ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)) {
    FUN_0002ddf8(param_1);
    return 0;
  }
  return iVar1;
}

