
int sqlite3_limit(sqlite3 *db,int limitId,int newLimit)

{
  int iVar1;
  
  if ((uint)limitId < 0xc) {
    iVar1 = db->aLimit[limitId];
    if (-1 < newLimit) {
      if (*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit) {
        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);
      }
      db->aLimit[limitId] = newLimit;
      return iVar1;
    }
  }
  else {
    iVar1 = -1;
  }
  return iVar1;
}



undefined4 sqlite3_limit(int param_1,uint param_2,int param_3)

{
  undefined4 uVar1;
  
  if (param_2 < 0xc) {
    param_1 = param_1 + param_2 * 4;
    uVar1 = *(undefined4 *)(param_1 + 0x6c);
    if (-1 < param_3) {
      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {
        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);
      }
      *(int *)(param_1 + 0x6c) = param_3;
      return uVar1;
    }
  }
  else {
    uVar1 = 0xffffffff;
  }
  return uVar1;
}


lui gp,0x15
addiu gp,gp,0x4f8c
addu gp,gp,t9
sltiu v0,a1,0xc
beq v0,zero,0x000439d8
_sll a1,a1,0x2
addu a0,a0,a1
bltz a2,0x000439dc
_lw v0,0x6c(a0)
lw v1,-0x7d8c(gp)
addiu v1,v1,-0x767c
addu a1,a1,v1
lw a1,0x0(a1)
slt v1,a2,a1
movz a2,a1,v1
jr ra
_sw a2,0x6c(a0)
li v0,-0x1
jr ra
_nop
(translation_unit "undefined4 sqlite3_limit(int param_1,uint param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 sqlite3_limit(int param_1,uint param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "sqlite3_limit(int param_1,uint param_2,int param_3)" identifier (parameter_list "(int param_1,uint param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }" if (parenthesized_expression "(param_2 < 0xc)" ( (binary_expression "param_2 < 0xc" identifier < number_literal) )) (compound_statement "{\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }" { (expression_statement "param_1 = param_1 + param_2 * 4;" (assignment_expression "param_1 = param_1 + param_2 * 4" identifier = (binary_expression "param_1 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal))) ;) (expression_statement "uVar1 = *(undefined4 *)(param_1 + 0x6c);" (assignment_expression "uVar1 = *(undefined4 *)(param_1 + 0x6c)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x6c)" * (cast_expression "(undefined4 *)(param_1 + 0x6c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;) (if_statement "if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }" if (parenthesized_expression "(-1 < param_3)" ( (binary_expression "-1 < param_3" number_literal < identifier) )) (compound_statement "{\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }" { (if_statement "if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }" if (parenthesized_expression "(*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3)" ( (binary_expression "*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3" (pointer_expression "*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" * (cast_expression "(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" ( (binary_expression "PTR_DAT_00190b94 + param_2 * 4 + -0x767c" (binary_expression "PTR_DAT_00190b94 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal)) + number_literal) )))) <= identifier) )) (compound_statement "{\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }" { (expression_statement "param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);" (assignment_expression "param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" identifier = (pointer_expression "*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" * (cast_expression "(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" ( (binary_expression "PTR_DAT_00190b94 + param_2 * 4 + -0x767c" (binary_expression "PTR_DAT_00190b94 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal)) + number_literal) ))))) ;) })) (expression_statement "*(int *)(param_1 + 0x6c) = param_3;" (assignment_expression "*(int *)(param_1 + 0x6c) = param_3" (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) )))) = identifier) ;) (return_statement "return uVar1;" return identifier ;) })) }) (else_clause "else {\n    uVar1 = 0xffffffff;\n  }" else (compound_statement "{\n    uVar1 = 0xffffffff;\n  }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "int sqlite3_limit(sqlite3 *db,int limitId,int newLimit)\n\n{\n  int iVar1;\n  \n  if ((uint)limitId < 0xc) {\n    iVar1 = db->aLimit[limitId];\n    if (-1 < newLimit) {\n      if (*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit) {\n        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);\n      }\n      db->aLimit[limitId] = newLimit;\n      return iVar1;\n    }\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}\n\n" (function_definition "int sqlite3_limit(sqlite3 *db,int limitId,int newLimit)\n\n{\n  int iVar1;\n  \n  if ((uint)limitId < 0xc) {\n    iVar1 = db->aLimit[limitId];\n    if (-1 < newLimit) {\n      if (*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit) {\n        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);\n      }\n      db->aLimit[limitId] = newLimit;\n      return iVar1;\n    }\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "sqlite3_limit(sqlite3 *db,int limitId,int newLimit)" identifier (parameter_list "(sqlite3 *db,int limitId,int newLimit)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "int limitId" primitive_type identifier) , (parameter_declaration "int newLimit" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((uint)limitId < 0xc) {\n    iVar1 = db->aLimit[limitId];\n    if (-1 < newLimit) {\n      if (*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit) {\n        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);\n      }\n      db->aLimit[limitId] = newLimit;\n      return iVar1;\n    }\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((uint)limitId < 0xc) {\n    iVar1 = db->aLimit[limitId];\n    if (-1 < newLimit) {\n      if (*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit) {\n        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);\n      }\n      db->aLimit[limitId] = newLimit;\n      return iVar1;\n    }\n  }\n  else {\n    iVar1 = -1;\n  }" if (parenthesized_expression "((uint)limitId < 0xc)" ( (binary_expression "(uint)limitId < 0xc" (cast_expression "(uint)limitId" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n    iVar1 = db->aLimit[limitId];\n    if (-1 < newLimit) {\n      if (*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit) {\n        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);\n      }\n      db->aLimit[limitId] = newLimit;\n      return iVar1;\n    }\n  }" { (expression_statement "iVar1 = db->aLimit[limitId];" (assignment_expression "iVar1 = db->aLimit[limitId]" identifier = (subscript_expression "db->aLimit[limitId]" (field_expression "db->aLimit" identifier -> field_identifier) [ identifier ])) ;) (if_statement "if (-1 < newLimit) {\n      if (*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit) {\n        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);\n      }\n      db->aLimit[limitId] = newLimit;\n      return iVar1;\n    }" if (parenthesized_expression "(-1 < newLimit)" ( (binary_expression "-1 < newLimit" number_literal < identifier) )) (compound_statement "{\n      if (*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit) {\n        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);\n      }\n      db->aLimit[limitId] = newLimit;\n      return iVar1;\n    }" { (if_statement "if (*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit) {\n        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);\n      }" if (parenthesized_expression "(*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit)" ( (binary_expression "*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c) <= newLimit" (pointer_expression "*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c)" * (cast_expression "(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00190b94 + limitId * 4 + -0x767c)" ( (binary_expression "PTR_DAT_00190b94 + limitId * 4 + -0x767c" (binary_expression "PTR_DAT_00190b94 + limitId * 4" identifier + (binary_expression "limitId * 4" identifier * number_literal)) + number_literal) )))) <= identifier) )) (compound_statement "{\n        newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);\n      }" { (expression_statement "newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c);" (assignment_expression "newLimit = *(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c)" identifier = (pointer_expression "*(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c)" * (cast_expression "(int *)(PTR_DAT_00190b94 + limitId * 4 + -0x767c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00190b94 + limitId * 4 + -0x767c)" ( (binary_expression "PTR_DAT_00190b94 + limitId * 4 + -0x767c" (binary_expression "PTR_DAT_00190b94 + limitId * 4" identifier + (binary_expression "limitId * 4" identifier * number_literal)) + number_literal) ))))) ;) })) (expression_statement "db->aLimit[limitId] = newLimit;" (assignment_expression "db->aLimit[limitId] = newLimit" (subscript_expression "db->aLimit[limitId]" (field_expression "db->aLimit" identifier -> field_identifier) [ identifier ]) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })) }) (else_clause "else {\n    iVar1 = -1;\n  }" else (compound_statement "{\n    iVar1 = -1;\n  }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 sqlite3_limit(int param_1,uint param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 sqlite3_limit(int param_1,uint param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "sqlite3_limit(int param_1,uint param_2,int param_3)" identifier (parameter_list "(int param_1,uint param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }" if (parenthesized_expression "(param_2 < 0xc)" ( (binary_expression "param_2 < 0xc" identifier < number_literal) )) (compound_statement "{\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }" { (expression_statement "param_1 = param_1 + param_2 * 4;" (assignment_expression "param_1 = param_1 + param_2 * 4" identifier = (binary_expression "param_1 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal))) ;) (expression_statement "uVar1 = *(undefined4 *)(param_1 + 0x6c);" (assignment_expression "uVar1 = *(undefined4 *)(param_1 + 0x6c)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x6c)" * (cast_expression "(undefined4 *)(param_1 + 0x6c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;) (if_statement "if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }" if (parenthesized_expression "(-1 < param_3)" ( (binary_expression "-1 < param_3" number_literal < identifier) )) (compound_statement "{\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }" { (if_statement "if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }" if (parenthesized_expression "(*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3)" ( (binary_expression "*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3" (pointer_expression "*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" * (cast_expression "(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" ( (binary_expression "PTR_DAT_00190b94 + param_2 * 4 + -0x767c" (binary_expression "PTR_DAT_00190b94 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal)) + number_literal) )))) <= identifier) )) (compound_statement "{\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }" { (expression_statement "param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);" (assignment_expression "param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" identifier = (pointer_expression "*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" * (cast_expression "(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" ( (binary_expression "PTR_DAT_00190b94 + param_2 * 4 + -0x767c" (binary_expression "PTR_DAT_00190b94 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal)) + number_literal) ))))) ;) })) (expression_statement "*(int *)(param_1 + 0x6c) = param_3;" (assignment_expression "*(int *)(param_1 + 0x6c) = param_3" (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) )))) = identifier) ;) (return_statement "return uVar1;" return identifier ;) })) }) (else_clause "else {\n    uVar1 = 0xffffffff;\n  }" else (compound_statement "{\n    uVar1 = 0xffffffff;\n  }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression IDENT * LIT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT) )))) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT) ))))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 sqlite3_limit(int param_1,uint param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }\n  return uVar1;\n}" (type_identifier "undefined4") (function_declarator "sqlite3_limit(int param_1,uint param_2,int param_3)" (identifier "sqlite3_limit") (parameter_list "(int param_1,uint param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }\n  return uVar1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (if_statement "if (param_2 < 0xc) {\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }\n  else {\n    uVar1 = 0xffffffff;\n  }" (if "if") (parenthesized_expression "(param_2 < 0xc)" (( "(") (binary_expression "param_2 < 0xc" (identifier "param_2") (< "<") (number_literal "0xc")) () ")")) (compound_statement "{\n    param_1 = param_1 + param_2 * 4;\n    uVar1 = *(undefined4 *)(param_1 + 0x6c);\n    if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }\n  }" ({ "{") (expression_statement "param_1 = param_1 + param_2 * 4;" (assignment_expression "param_1 = param_1 + param_2 * 4" (identifier "param_1") (= "=") (binary_expression "param_1 + param_2 * 4" (identifier "param_1") (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4")))) (; ";")) (expression_statement "uVar1 = *(undefined4 *)(param_1 + 0x6c);" (assignment_expression "uVar1 = *(undefined4 *)(param_1 + 0x6c)" (identifier "uVar1") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x6c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x6c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x6c)" (( "(") (binary_expression "param_1 + 0x6c" (identifier "param_1") (+ "+") (number_literal "0x6c")) () ")"))))) (; ";")) (if_statement "if (-1 < param_3) {\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }" (if "if") (parenthesized_expression "(-1 < param_3)" (( "(") (binary_expression "-1 < param_3" (number_literal "-1") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }\n      *(int *)(param_1 + 0x6c) = param_3;\n      return uVar1;\n    }" ({ "{") (if_statement "if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }" (if "if") (parenthesized_expression "(*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3)" (( "(") (binary_expression "*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3" (pointer_expression "*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" (* "*") (cast_expression "(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" (( "(") (binary_expression "PTR_DAT_00190b94 + param_2 * 4 + -0x767c" (binary_expression "PTR_DAT_00190b94 + param_2 * 4" (identifier "PTR_DAT_00190b94") (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4"))) (+ "+") (number_literal "-0x767c")) () ")")))) (<= "<=") (identifier "param_3")) () ")")) (compound_statement "{\n        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);\n      }" ({ "{") (expression_statement "param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);" (assignment_expression "param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" (identifier "param_3") (= "=") (pointer_expression "*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" (* "*") (cast_expression "(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_00190b94 + param_2 * 4 + -0x767c)" (( "(") (binary_expression "PTR_DAT_00190b94 + param_2 * 4 + -0x767c" (binary_expression "PTR_DAT_00190b94 + param_2 * 4" (identifier "PTR_DAT_00190b94") (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4"))) (+ "+") (number_literal "-0x767c")) () ")"))))) (; ";")) (} "}"))) (expression_statement "*(int *)(param_1 + 0x6c) = param_3;" (assignment_expression "*(int *)(param_1 + 0x6c) = param_3" (pointer_expression "*(int *)(param_1 + 0x6c)" (* "*") (cast_expression "(int *)(param_1 + 0x6c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x6c)" (( "(") (binary_expression "param_1 + 0x6c" (identifier "param_1") (+ "+") (number_literal "0x6c")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    uVar1 = 0xffffffff;\n  }" (else "else") (compound_statement "{\n    uVar1 = 0xffffffff;\n  }" ({ "{") (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

int function_1(type_1 *db,int var_3,int var_1)

{
  int iVar1;
  
  if ((type_2)var_3 < 0xc) {
    iVar1 = db->aLimit[var_3];
    if (-1 < var_1) {
      if (*(int *)(var_2 + var_3 * 4 + -0x767c) <= var_1) {
        var_1 = *(int *)(var_2 + var_3 * 4 + -0x767c);
      }
      db->aLimit[var_3] = var_1;
      return iVar1;
    }
  }
  else {
    iVar1 = -1;
  }
  return iVar1;
}


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

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

{
  undefined4 uVar1;
  
  if (param_2 < 0xc) {
    param_1 = param_1 + param_2 * 4;
    uVar1 = *(undefined4 *)(param_1 + 0x6c);
    if (-1 < param_3) {
      if (*(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c) <= param_3) {
        param_3 = *(int *)(PTR_DAT_00190b94 + param_2 * 4 + -0x767c);
      }
      *(int *)(param_1 + 0x6c) = param_3;
      return uVar1;
    }
  }
  else {
    uVar1 = 0xffffffff;
  }
  return uVar1;
}

