
/* std::string::find_last_not_of(char, unsigned int) const */

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

{
  uint uVar1;
  undefined3 in_register_00000014;
  
  uVar1 = *(int *)(this + 4) - 1;
  if (*(int *)(this + 4) == 0) {
    return 0xffffffff;
  }
  if (uVar1 <= param_2) {
    param_2 = uVar1;
  }
  do {
    uVar1 = param_2 - 1;
    if ((int)*(char *)(*(int *)this + param_2) != CONCAT31(in_register_00000014,param_1)) {
      return param_2;
    }
    param_2 = uVar1;
  } while (uVar1 != 0xffffffff);
  return 0xffffffff;
}



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

{
  uint uVar1;
  
  uVar1 = param_1[1] - 1;
  if (param_1[1] == 0) {
    return 0xffffffff;
  }
  if (uVar1 <= param_3) {
    param_3 = uVar1;
  }
  do {
    uVar1 = param_3 - 1;
    if (*(char *)(*param_1 + param_3) != param_2) {
      return param_3;
    }
    param_3 = uVar1;
  } while (uVar1 != 0xffffffff);
  return 0xffffffff;
}


lw v0,0x4(a0)
beq v0,zero,0x002c2c80
_addiu v1,v0,-0x1
lw a0,0x0(a0)
li a3,-0x1
sltu v0,a2,v1
movz a2,v1,v0
b 0x002c2c68
_or v0,a2,zero
beq v0,a3,0x002c2c88
_nop
addu v1,a0,v0
lb v1,0x0(v1)
beq v1,a1,0x002c2c60
_addiu v0,v0,-0x1
jr ra
_addiu v0,v0,0x1
jr ra
_li v0,-0x1
jr ra
_nop
(translation_unit "uint FUN_002c2c3c(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[1] - 1;\n  if (param_1[1] == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}\n\n" (function_definition "uint FUN_002c2c3c(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[1] - 1;\n  if (param_1[1] == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_002c2c3c(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 = param_1[1] - 1;\n  if (param_1[1] == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = param_1[1] - 1;" (assignment_expression "uVar1 = param_1[1] - 1" identifier = (binary_expression "param_1[1] - 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - number_literal)) ;) (if_statement "if (param_1[1] == 0) {\n    return 0xffffffff;\n  }" if (parenthesized_expression "(param_1[1] == 0)" ( (binary_expression "param_1[1] == 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    return 0xffffffff;\n  }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (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) ;) })) (do_statement "do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);" do (compound_statement "{\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  }" { (expression_statement "uVar1 = param_3 - 1;" (assignment_expression "uVar1 = param_3 - 1" identifier = (binary_expression "param_3 - 1" identifier - number_literal)) ;) (if_statement "if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }" if (parenthesized_expression "(*(char *)(*param_1 + param_3) != param_2)" ( (binary_expression "*(char *)(*param_1 + param_3) != param_2" (pointer_expression "*(char *)(*param_1 + param_3)" * (cast_expression "(char *)(*param_1 + param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + param_3)" ( (binary_expression "*param_1 + param_3" (pointer_expression "*param_1" * identifier) + identifier) )))) != identifier) )) (compound_statement "{\n      return param_3;\n    }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "param_3 = uVar1;" (assignment_expression "param_3 = uVar1" identifier = identifier) ;) }) while (parenthesized_expression "(uVar1 != 0xffffffff)" ( (binary_expression "uVar1 != 0xffffffff" identifier != number_literal) )) ;) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* std::string::find_last_not_of(char, unsigned int) const */\n\nuint __thiscall std::string::find_last_not_of(string *this,char param_1,uint param_2)\n\n{\n  uint uVar1;\n  undefined3 in_register_00000014;\n  \n  uVar1 = *(int *)(this + 4) - 1;\n  if (*(int *)(this + 4) == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_2) {\n    param_2 = uVar1;\n  }\n  do {\n    uVar1 = param_2 - 1;\n    if ((int)*(char *)(*(int *)this + param_2) != CONCAT31(in_register_00000014,param_1)) {\n      return param_2;\n    }\n    param_2 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}\n\n" comment (function_definition "uint __thiscall std::string::find_last_not_of(string *this,char param_1,uint param_2)\n\n{\n  uint uVar1;\n  undefined3 in_register_00000014;\n  \n  uVar1 = *(int *)(this + 4) - 1;\n  if (*(int *)(this + 4) == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_2) {\n    param_2 = uVar1;\n  }\n  do {\n    uVar1 = param_2 - 1;\n    if ((int)*(char *)(*(int *)this + param_2) != CONCAT31(in_register_00000014,param_1)) {\n      return param_2;\n    }\n    param_2 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "find_last_not_of(string *this,char param_1,uint param_2)" identifier (parameter_list "(string *this,char param_1,uint param_2)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  undefined3 in_register_00000014;\n  \n  uVar1 = *(int *)(this + 4) - 1;\n  if (*(int *)(this + 4) == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_2) {\n    param_2 = uVar1;\n  }\n  do {\n    uVar1 = param_2 - 1;\n    if ((int)*(char *)(*(int *)this + param_2) != CONCAT31(in_register_00000014,param_1)) {\n      return param_2;\n    }\n    param_2 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined3 in_register_00000014;" type_identifier identifier ;) (expression_statement "uVar1 = *(int *)(this + 4) - 1;" (assignment_expression "uVar1 = *(int *)(this + 4) - 1" identifier = (binary_expression "*(int *)(this + 4) - 1" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) - number_literal)) ;) (if_statement "if (*(int *)(this + 4) == 0) {\n    return 0xffffffff;\n  }" if (parenthesized_expression "(*(int *)(this + 4) == 0)" ( (binary_expression "*(int *)(this + 4) == 0" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return 0xffffffff;\n  }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (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) ;) })) (do_statement "do {\n    uVar1 = param_2 - 1;\n    if ((int)*(char *)(*(int *)this + param_2) != CONCAT31(in_register_00000014,param_1)) {\n      return param_2;\n    }\n    param_2 = uVar1;\n  } while (uVar1 != 0xffffffff);" do (compound_statement "{\n    uVar1 = param_2 - 1;\n    if ((int)*(char *)(*(int *)this + param_2) != CONCAT31(in_register_00000014,param_1)) {\n      return param_2;\n    }\n    param_2 = uVar1;\n  }" { (expression_statement "uVar1 = param_2 - 1;" (assignment_expression "uVar1 = param_2 - 1" identifier = (binary_expression "param_2 - 1" identifier - number_literal)) ;) (if_statement "if ((int)*(char *)(*(int *)this + param_2) != CONCAT31(in_register_00000014,param_1)) {\n      return param_2;\n    }" if (parenthesized_expression "((int)*(char *)(*(int *)this + param_2) != CONCAT31(in_register_00000014,param_1))" ( (binary_expression "(int)*(char *)(*(int *)this + param_2) != CONCAT31(in_register_00000014,param_1)" (cast_expression "(int)*(char *)(*(int *)this + param_2)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(*(int *)this + param_2)" * (cast_expression "(char *)(*(int *)this + param_2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_2)" ( (binary_expression "*(int *)this + param_2" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + identifier) ))))) != (call_expression "CONCAT31(in_register_00000014,param_1)" identifier (argument_list "(in_register_00000014,param_1)" ( identifier , identifier )))) )) (compound_statement "{\n      return param_2;\n    }" { (return_statement "return param_2;" return identifier ;) })) (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" identifier = identifier) ;) }) while (parenthesized_expression "(uVar1 != 0xffffffff)" ( (binary_expression "uVar1 != 0xffffffff" identifier != number_literal) )) ;) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "uint FUN_002c2c3c(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[1] - 1;\n  if (param_1[1] == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}\n\n" (function_definition "uint FUN_002c2c3c(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[1] - 1;\n  if (param_1[1] == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_002c2c3c(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 = param_1[1] - 1;\n  if (param_1[1] == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = param_1[1] - 1;" (assignment_expression "uVar1 = param_1[1] - 1" identifier = (binary_expression "param_1[1] - 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - number_literal)) ;) (if_statement "if (param_1[1] == 0) {\n    return 0xffffffff;\n  }" if (parenthesized_expression "(param_1[1] == 0)" ( (binary_expression "param_1[1] == 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    return 0xffffffff;\n  }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (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) ;) })) (do_statement "do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);" do (compound_statement "{\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  }" { (expression_statement "uVar1 = param_3 - 1;" (assignment_expression "uVar1 = param_3 - 1" identifier = (binary_expression "param_3 - 1" identifier - number_literal)) ;) (if_statement "if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }" if (parenthesized_expression "(*(char *)(*param_1 + param_3) != param_2)" ( (binary_expression "*(char *)(*param_1 + param_3) != param_2" (pointer_expression "*(char *)(*param_1 + param_3)" * (cast_expression "(char *)(*param_1 + param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + param_3)" ( (binary_expression "*param_1 + param_3" (pointer_expression "*param_1" * identifier) + identifier) )))) != identifier) )) (compound_statement "{\n      return param_3;\n    }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "param_3 = uVar1;" (assignment_expression "param_3 = uVar1" identifier = identifier) ;) }) while (parenthesized_expression "(uVar1 != 0xffffffff)" ( (binary_expression "uVar1 != 0xffffffff" identifier != number_literal) )) ;) (return_statement "return 0xffffffff;" return number_literal ;) })))
(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 (subscript_expression IDENT [ LIT ]) - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + IDENT) )))) != IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (return_statement return LIT ;) })))
(function_definition "uint FUN_002c2c3c(int *param_1,int param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[1] - 1;\n  if (param_1[1] == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}" (type_identifier "uint") (function_declarator "FUN_002c2c3c(int *param_1,int param_2,uint param_3)" (identifier "FUN_002c2c3c") (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 = param_1[1] - 1;\n  if (param_1[1] == 0) {\n    return 0xffffffff;\n  }\n  if (uVar1 <= param_3) {\n    param_3 = uVar1;\n  }\n  do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);\n  return 0xffffffff;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = param_1[1] - 1;" (assignment_expression "uVar1 = param_1[1] - 1" (identifier "uVar1") (= "=") (binary_expression "param_1[1] - 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (number_literal "1"))) (; ";")) (if_statement "if (param_1[1] == 0) {\n    return 0xffffffff;\n  }" (if "if") (parenthesized_expression "(param_1[1] == 0)" (( "(") (binary_expression "param_1[1] == 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0xffffffff;\n  }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (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")) (; ";")) (} "}"))) (do_statement "do {\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  } while (uVar1 != 0xffffffff);" (do "do") (compound_statement "{\n    uVar1 = param_3 - 1;\n    if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }\n    param_3 = uVar1;\n  }" ({ "{") (expression_statement "uVar1 = param_3 - 1;" (assignment_expression "uVar1 = param_3 - 1" (identifier "uVar1") (= "=") (binary_expression "param_3 - 1" (identifier "param_3") (- "-") (number_literal "1"))) (; ";")) (if_statement "if (*(char *)(*param_1 + param_3) != param_2) {\n      return param_3;\n    }" (if "if") (parenthesized_expression "(*(char *)(*param_1 + param_3) != param_2)" (( "(") (binary_expression "*(char *)(*param_1 + param_3) != param_2" (pointer_expression "*(char *)(*param_1 + param_3)" (* "*") (cast_expression "(char *)(*param_1 + param_3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + param_3)" (( "(") (binary_expression "*param_1 + param_3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (identifier "param_3")) () ")")))) (!= "!=") (identifier "param_2")) () ")")) (compound_statement "{\n      return param_3;\n    }" ({ "{") (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}"))) (expression_statement "param_3 = uVar1;" (assignment_expression "param_3 = uVar1" (identifier "param_3") (= "=") (identifier "uVar1")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar1 != 0xffffffff)" (( "(") (binary_expression "uVar1 != 0xffffffff" (identifier "uVar1") (!= "!=") (number_literal "0xffffffff")) () ")")) (; ";")) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))

/* std::string::find_last_not_of(char, unsigned int) const */

type_1 __thiscall std::type_2::function_1(type_2 *var_1,char param_1,type_1 var_3)

{
  type_1 var_2;
  type_3 in_register_00000014;
  
  var_2 = *(int *)(var_1 + 4) - 1;
  if (*(int *)(var_1 + 4) == 0) {
    return 0xffffffff;
  }
  if (var_2 <= var_3) {
    var_3 = var_2;
  }
  do {
    var_2 = var_3 - 1;
    if ((int)*(char *)(*(int *)var_1 + var_3) != var_4(in_register_00000014,param_1)) {
      return var_3;
    }
    var_3 = var_2;
  } while (var_2 != 0xffffffff);
  return 0xffffffff;
}


(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: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (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: (pointer_expression argument: (identifier)) right: (identifier))))) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (return_statement (number_literal)))))

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

{
  uint uVar1;
  
  uVar1 = param_1[1] - 1;
  if (param_1[1] == 0) {
    return 0xffffffff;
  }
  if (uVar1 <= param_3) {
    param_3 = uVar1;
  }
  do {
    uVar1 = param_3 - 1;
    if (*(char *)(*param_1 + param_3) != param_2) {
      return param_3;
    }
    param_3 = uVar1;
  } while (uVar1 != 0xffffffff);
  return 0xffffffff;
}

