
/* std::string::_M_limit(unsigned int, unsigned int) const */

uint __thiscall std::string::_M_limit(string *this,uint param_1,uint param_2)

{
  uint uVar1;
  
  uVar1 = *(int *)(*(int *)this + -0xc) - param_1;
  if (uVar1 <= param_2) {
    param_2 = uVar1;
  }
  return param_2;
}



uint FUN_003756e0(int *param_1,int param_2,uint param_3)

{
  uint uVar1;
  
  uVar1 = *(int *)(*param_1 + -0xc) - param_2;
  if (uVar1 <= param_3) {
    param_3 = uVar1;
  }
  return param_3;
}


lw v0,0x0(a0)
lw v1,-0xc(v0)
subu a1,v1,a1
sltu v0,a2,a1
movz a2,a1,v0
jr ra
_or v0,a2,zero
(translation_unit "uint FUN_003756e0(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*param_1 + -0xc) - param_2;\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  return param_3;\n}\n\n" (function_definition "uint FUN_003756e0(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*param_1 + -0xc) - param_2;\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  return param_3;\n}" type_identifier (function_declarator "FUN_003756e0(int *param_1,int param_2,uint param_3)" identifier (parameter_list "(int *param_1,int param_2,uint param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*param_1 + -0xc) - param_2;\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  return param_3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *(int *)(*param_1 + -0xc) - param_2;" (assignment_expression "uVar1 = *(int *)(*param_1 + -0xc) - param_2" identifier = (binary_expression "*(int *)(*param_1 + -0xc) - param_2" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) - identifier)) ;) (if_statement "if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }" if (parenthesized_expression "(uVar1 <= param_3)" ( (binary_expression "uVar1 <= param_3" identifier <= identifier) )) (compound_statement "{\n    param_3 = uVar1;\n  }" { (expression_statement "param_3 = uVar1;" (assignment_expression "param_3 = uVar1" identifier = identifier) ;) })) (return_statement "return param_3;" return identifier ;) })))
(translation_unit "/* std::string::_M_limit(unsigned int, unsigned int) const */\n\nuint __thiscall std::string::_M_limit(string *this,uint param_1,uint param_2)\n\n{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*(int *)this + -0xc) - param_1;\n  if (uVar1 <= param_2) {\n    param_2 = uVar1;\n  }\n  return param_2;\n}\n\n" comment (function_definition "uint __thiscall std::string::_M_limit(string *this,uint param_1,uint param_2)\n\n{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*(int *)this + -0xc) - param_1;\n  if (uVar1 <= param_2) {\n    param_2 = uVar1;\n  }\n  return param_2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "_M_limit(string *this,uint param_1,uint param_2)" identifier (parameter_list "(string *this,uint param_1,uint param_2)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*(int *)this + -0xc) - param_1;\n  if (uVar1 <= param_2) {\n    param_2 = uVar1;\n  }\n  return param_2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *(int *)(*(int *)this + -0xc) - param_1;" (assignment_expression "uVar1 = *(int *)(*(int *)this + -0xc) - param_1" identifier = (binary_expression "*(int *)(*(int *)this + -0xc) - param_1" (pointer_expression "*(int *)(*(int *)this + -0xc)" * (cast_expression "(int *)(*(int *)this + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) - identifier)) ;) (if_statement "if (uVar1 <= param_2) {\n    param_2 = uVar1;\n  }" if (parenthesized_expression "(uVar1 <= param_2)" ( (binary_expression "uVar1 <= param_2" identifier <= identifier) )) (compound_statement "{\n    param_2 = uVar1;\n  }" { (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" identifier = identifier) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "uint FUN_003756e0(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*param_1 + -0xc) - param_2;\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  return param_3;\n}\n\n" (function_definition "uint FUN_003756e0(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*param_1 + -0xc) - param_2;\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  return param_3;\n}" type_identifier (function_declarator "FUN_003756e0(int *param_1,int param_2,uint param_3)" identifier (parameter_list "(int *param_1,int param_2,uint param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*param_1 + -0xc) - param_2;\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  return param_3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *(int *)(*param_1 + -0xc) - param_2;" (assignment_expression "uVar1 = *(int *)(*param_1 + -0xc) - param_2" identifier = (binary_expression "*(int *)(*param_1 + -0xc) - param_2" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) - identifier)) ;) (if_statement "if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }" if (parenthesized_expression "(uVar1 <= param_3)" ( (binary_expression "uVar1 <= param_3" identifier <= identifier) )) (compound_statement "{\n    param_3 = uVar1;\n  }" { (expression_statement "param_3 = uVar1;" (assignment_expression "param_3 = uVar1" identifier = identifier) ;) })) (return_statement "return param_3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint FUN_003756e0(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*param_1 + -0xc) - param_2;\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  return param_3;\n}" (type_identifier "uint") (function_declarator "FUN_003756e0(int *param_1,int param_2,uint param_3)" (identifier "FUN_003756e0") (parameter_list "(int *param_1,int param_2,uint param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = *(int *)(*param_1 + -0xc) - param_2;\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  return param_3;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = *(int *)(*param_1 + -0xc) - param_2;" (assignment_expression "uVar1 = *(int *)(*param_1 + -0xc) - param_2" (identifier "uVar1") (= "=") (binary_expression "*(int *)(*param_1 + -0xc) - param_2" (pointer_expression "*(int *)(*param_1 + -0xc)" (* "*") (cast_expression "(int *)(*param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0xc)" (( "(") (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0xc")) () ")")))) (- "-") (identifier "param_2"))) (; ";")) (if_statement "if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }" (if "if") (parenthesized_expression "(uVar1 <= param_3)" (( "(") (binary_expression "uVar1 <= param_3" (identifier "uVar1") (<= "<=") (identifier "param_3")) () ")")) (compound_statement "{\n    param_3 = uVar1;\n  }" ({ "{") (expression_statement "param_3 = uVar1;" (assignment_expression "param_3 = uVar1" (identifier "param_3") (= "=") (identifier "uVar1")) (; ";")) (} "}"))) (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (return_statement (identifier)))))

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

{
  uint uVar1;
  
  uVar1 = *(int *)(*param_1 + -0xc) - param_2;
  if (uVar1 <= param_3) {
    param_3 = uVar1;
  }
  return param_3;
}

