
/* std::wstring::find_last_not_of(wchar_t, unsigned long) const */

void __thiscall std::wstring::find_last_not_of(wstring *this,wchar_t param_1,ulong param_2)

{
  long lVar1;
  ulong uVar2;
  
  lVar1 = *(long *)(*(long *)this + -0x18);
  if (lVar1 != 0) {
    uVar2 = lVar1 - 1;
    if (param_2 < uVar2) {
      uVar2 = param_2;
    }
    do {
      if (*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1) {
        return;
      }
      uVar2 = uVar2 - 1;
    } while (uVar2 != 0xffffffffffffffff);
  }
  return;
}



void FUN_003555d0(long *param_1,int param_2,ulong param_3)

{
  long lVar1;
  ulong uVar2;
  
  lVar1 = *(long *)(*param_1 + -0x18);
  if (lVar1 != 0) {
    uVar2 = lVar1 - 1;
    if (param_3 < uVar2) {
      uVar2 = param_3;
    }
    do {
      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {
        return;
      }
      uVar2 = uVar2 - 1;
    } while (uVar2 != 0xffffffffffffffff);
  }
  return;
}


MOV RCX,qword ptr [RDI]
MOV RAX,-0x1
MOV RDI,qword ptr [RCX + -0x18]
TEST RDI,RDI
JZ 0x003555ff
ADD RAX,RDI
CMP RAX,RDX
CMOVA RAX,RDX
JMP 0x003555fa
SUB RAX,0x1
CMP RAX,-0x1
JZ 0x003555ff
CMP dword ptr [RCX + RAX*0x4],ESI
JZ 0x003555f0
RET
(translation_unit "void FUN_003555d0(long *param_1,int param_2,ulong param_3)\n\n{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*param_1 + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}\n\n" (function_definition "void FUN_003555d0(long *param_1,int param_2,ulong param_3)\n\n{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*param_1 + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_003555d0(long *param_1,int param_2,ulong param_3)" identifier (parameter_list "(long *param_1,int param_2,ulong param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*param_1 + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "lVar1 = *(long *)(*param_1 + -0x18);" (assignment_expression "lVar1 = *(long *)(*param_1 + -0x18)" identifier = (pointer_expression "*(long *)(*param_1 + -0x18)" * (cast_expression "(long *)(*param_1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (if_statement "if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }" if (parenthesized_expression "(lVar1 != 0)" ( (binary_expression "lVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }" { (expression_statement "uVar2 = lVar1 - 1;" (assignment_expression "uVar2 = lVar1 - 1" identifier = (binary_expression "lVar1 - 1" identifier - number_literal)) ;) (if_statement "if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }" if (parenthesized_expression "(param_3 < uVar2)" ( (binary_expression "param_3 < uVar2" identifier < identifier) )) (compound_statement "{\n      uVar2 = param_3;\n    }" { (expression_statement "uVar2 = param_3;" (assignment_expression "uVar2 = param_3" identifier = identifier) ;) })) (do_statement "do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);" do (compound_statement "{\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    }" { (if_statement "if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }" if (parenthesized_expression "(*(int *)(*param_1 + uVar2 * 4) != param_2)" ( (binary_expression "*(int *)(*param_1 + uVar2 * 4) != param_2" (pointer_expression "*(int *)(*param_1 + uVar2 * 4)" * (cast_expression "(int *)(*param_1 + uVar2 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + uVar2 * 4)" ( (binary_expression "*param_1 + uVar2 * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "uVar2 * 4" identifier * number_literal)) )))) != identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(uVar2 != 0xffffffffffffffff)" ( (binary_expression "uVar2 != 0xffffffffffffffff" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* std::wstring::find_last_not_of(wchar_t, unsigned long) const */\n\nvoid __thiscall std::wstring::find_last_not_of(wstring *this,wchar_t param_1,ulong param_2)\n\n{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*(long *)this + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_2 < uVar2) {\n      uVar2 = param_2;\n    }\n    do {\n      if (*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}\n\n" comment (function_definition "void __thiscall std::wstring::find_last_not_of(wstring *this,wchar_t param_1,ulong param_2)\n\n{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*(long *)this + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_2 < uVar2) {\n      uVar2 = param_2;\n    }\n    do {\n      if (*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "find_last_not_of(wstring *this,wchar_t param_1,ulong param_2)" identifier (parameter_list "(wstring *this,wchar_t param_1,ulong param_2)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "wchar_t param_1" type_identifier identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*(long *)this + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_2 < uVar2) {\n      uVar2 = param_2;\n    }\n    do {\n      if (*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "lVar1 = *(long *)(*(long *)this + -0x18);" (assignment_expression "lVar1 = *(long *)(*(long *)this + -0x18)" identifier = (pointer_expression "*(long *)(*(long *)this + -0x18)" * (cast_expression "(long *)(*(long *)this + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)this + -0x18)" ( (binary_expression "*(long *)this + -0x18" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ;) (if_statement "if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_2 < uVar2) {\n      uVar2 = param_2;\n    }\n    do {\n      if (*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }" if (parenthesized_expression "(lVar1 != 0)" ( (binary_expression "lVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar2 = lVar1 - 1;\n    if (param_2 < uVar2) {\n      uVar2 = param_2;\n    }\n    do {\n      if (*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }" { (expression_statement "uVar2 = lVar1 - 1;" (assignment_expression "uVar2 = lVar1 - 1" identifier = (binary_expression "lVar1 - 1" identifier - number_literal)) ;) (if_statement "if (param_2 < uVar2) {\n      uVar2 = param_2;\n    }" if (parenthesized_expression "(param_2 < uVar2)" ( (binary_expression "param_2 < uVar2" identifier < identifier) )) (compound_statement "{\n      uVar2 = param_2;\n    }" { (expression_statement "uVar2 = param_2;" (assignment_expression "uVar2 = param_2" identifier = identifier) ;) })) (do_statement "do {\n      if (*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);" do (compound_statement "{\n      if (*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    }" { (if_statement "if (*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1) {\n        return;\n      }" if (parenthesized_expression "(*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1)" ( (binary_expression "*(wchar_t *)(*(long *)this + uVar2 * 4) != param_1" (pointer_expression "*(wchar_t *)(*(long *)this + uVar2 * 4)" * (cast_expression "(wchar_t *)(*(long *)this + uVar2 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)this + uVar2 * 4)" ( (binary_expression "*(long *)this + uVar2 * 4" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "uVar2 * 4" identifier * number_literal)) )))) != identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(uVar2 != 0xffffffffffffffff)" ( (binary_expression "uVar2 != 0xffffffffffffffff" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_003555d0(long *param_1,int param_2,ulong param_3)\n\n{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*param_1 + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}\n\n" (function_definition "void FUN_003555d0(long *param_1,int param_2,ulong param_3)\n\n{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*param_1 + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_003555d0(long *param_1,int param_2,ulong param_3)" identifier (parameter_list "(long *param_1,int param_2,ulong param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*param_1 + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "lVar1 = *(long *)(*param_1 + -0x18);" (assignment_expression "lVar1 = *(long *)(*param_1 + -0x18)" identifier = (pointer_expression "*(long *)(*param_1 + -0x18)" * (cast_expression "(long *)(*param_1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (if_statement "if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }" if (parenthesized_expression "(lVar1 != 0)" ( (binary_expression "lVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }" { (expression_statement "uVar2 = lVar1 - 1;" (assignment_expression "uVar2 = lVar1 - 1" identifier = (binary_expression "lVar1 - 1" identifier - number_literal)) ;) (if_statement "if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }" if (parenthesized_expression "(param_3 < uVar2)" ( (binary_expression "param_3 < uVar2" identifier < identifier) )) (compound_statement "{\n      uVar2 = param_3;\n    }" { (expression_statement "uVar2 = param_3;" (assignment_expression "uVar2 = param_3" identifier = identifier) ;) })) (do_statement "do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);" do (compound_statement "{\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    }" { (if_statement "if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }" if (parenthesized_expression "(*(int *)(*param_1 + uVar2 * 4) != param_2)" ( (binary_expression "*(int *)(*param_1 + uVar2 * 4) != param_2" (pointer_expression "*(int *)(*param_1 + uVar2 * 4)" * (cast_expression "(int *)(*param_1 + uVar2 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + uVar2 * 4)" ( (binary_expression "*param_1 + uVar2 * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "uVar2 * 4" identifier * number_literal)) )))) != identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(uVar2 != 0xffffffffffffffff)" ( (binary_expression "uVar2 != 0xffffffffffffffff" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression IDENT * LIT)) )))) != IDENT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (return_statement return ;) })))
(function_definition "void FUN_003555d0(long *param_1,int param_2,ulong param_3)\n\n{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*param_1 + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_003555d0(long *param_1,int param_2,ulong param_3)" (identifier "FUN_003555d0") (parameter_list "(long *param_1,int param_2,ulong param_3)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "ulong param_3" (type_identifier "ulong") (identifier "param_3")) () ")"))) (compound_statement "{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = *(long *)(*param_1 + -0x18);\n  if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }\n  return;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (expression_statement "lVar1 = *(long *)(*param_1 + -0x18);" (assignment_expression "lVar1 = *(long *)(*param_1 + -0x18)" (identifier "lVar1") (= "=") (pointer_expression "*(long *)(*param_1 + -0x18)" (* "*") (cast_expression "(long *)(*param_1 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0x18)" (( "(") (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0x18")) () ")"))))) (; ";")) (if_statement "if (lVar1 != 0) {\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }" (if "if") (parenthesized_expression "(lVar1 != 0)" (( "(") (binary_expression "lVar1 != 0" (identifier "lVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = lVar1 - 1;\n    if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }\n    do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);\n  }" ({ "{") (expression_statement "uVar2 = lVar1 - 1;" (assignment_expression "uVar2 = lVar1 - 1" (identifier "uVar2") (= "=") (binary_expression "lVar1 - 1" (identifier "lVar1") (- "-") (number_literal "1"))) (; ";")) (if_statement "if (param_3 < uVar2) {\n      uVar2 = param_3;\n    }" (if "if") (parenthesized_expression "(param_3 < uVar2)" (( "(") (binary_expression "param_3 < uVar2" (identifier "param_3") (< "<") (identifier "uVar2")) () ")")) (compound_statement "{\n      uVar2 = param_3;\n    }" ({ "{") (expression_statement "uVar2 = param_3;" (assignment_expression "uVar2 = param_3" (identifier "uVar2") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (do_statement "do {\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    } while (uVar2 != 0xffffffffffffffff);" (do "do") (compound_statement "{\n      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }\n      uVar2 = uVar2 - 1;\n    }" ({ "{") (if_statement "if (*(int *)(*param_1 + uVar2 * 4) != param_2) {\n        return;\n      }" (if "if") (parenthesized_expression "(*(int *)(*param_1 + uVar2 * 4) != param_2)" (( "(") (binary_expression "*(int *)(*param_1 + uVar2 * 4) != param_2" (pointer_expression "*(int *)(*param_1 + uVar2 * 4)" (* "*") (cast_expression "(int *)(*param_1 + uVar2 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + uVar2 * 4)" (( "(") (binary_expression "*param_1 + uVar2 * 4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (binary_expression "uVar2 * 4" (identifier "uVar2") (* "*") (number_literal "4"))) () ")")))) (!= "!=") (identifier "param_2")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" (identifier "uVar2") (= "=") (binary_expression "uVar2 - 1" (identifier "uVar2") (- "-") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar2 != 0xffffffffffffffff)" (( "(") (binary_expression "uVar2 != 0xffffffffffffffff" (identifier "uVar2") (!= "!=") (number_literal "0xffffffffffffffff")) () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::wstring::find_last_not_of(wchar_t, unsigned long) const */

void __thiscall std::type_1::function_1(type_1 *this,type_2 var_4,type_3 var_2)

{
  long var_1;
  type_3 var_3;
  
  var_1 = *(long *)(*(long *)this + -0x18);
  if (var_1 != 0) {
    var_3 = var_1 - 1;
    if (var_2 < var_3) {
      var_3 = var_2;
    }
    do {
      if (*(type_2 *)(*(long *)this + var_3 * 4) != var_4) {
        return;
      }
      var_3 = var_3 - 1;
    } while (var_3 != 0xffffffffffffffff);
  }
  return;
}


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

void MASKED(long *param_1,int param_2,ulong param_3)

{
  long lVar1;
  ulong uVar2;
  
  lVar1 = *(long *)(*param_1 + -0x18);
  if (lVar1 != 0) {
    uVar2 = lVar1 - 1;
    if (param_3 < uVar2) {
      uVar2 = param_3;
    }
    do {
      if (*(int *)(*param_1 + uVar2 * 4) != param_2) {
        return;
      }
      uVar2 = uVar2 - 1;
    } while (uVar2 != 0xffffffffffffffff);
  }
  return;
}

