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

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

{
  char cVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  int iVar7;
  
  iVar7 = *(int *)this;
  uVar5 = *(uint *)(iVar7 + -0xc);
  if (param_3 == 0) {
    uVar4 = 0xffffffff;
    if (param_2 <= uVar5) {
      uVar4 = param_2;
    }
    return uVar4;
  }
  if (param_2 < uVar5) {
    iVar6 = iVar7 + param_2;
    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {
      cVar1 = *param_1;
      do {
        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);
        if (iVar2 == 0) {
          return 0xffffffff;
        }
        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);
        iVar6 = iVar2 + 1;
        if (iVar3 == 0) {
          return iVar2 - iVar7;
        }
        uVar4 = (iVar7 + uVar5) - iVar6;
        if (uVar4 < param_3) {
          return 0xffffffff;
        }
      } while ((1 - param_3) + uVar4 != 0);
    }
  }
  return 0xffffffff;
}



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

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

{
  char cVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  int iVar7;
  
  iVar7 = *(int *)this;
  uVar5 = *(uint *)(iVar7 + -0xc);
  if (param_3 == 0) {
    uVar4 = 0xffffffff;
    if (param_2 <= uVar5) {
      uVar4 = param_2;
    }
    return uVar4;
  }
  if (param_2 < uVar5) {
    iVar6 = iVar7 + param_2;
    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {
      cVar1 = *param_1;
      do {
        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);
        if (iVar2 == 0) {
          return 0xffffffff;
        }
        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);
        iVar6 = iVar2 + 1;
        if (iVar3 == 0) {
          return iVar2 - iVar7;
        }
        uVar4 = (iVar7 + uVar5) - iVar6;
        if (uVar4 < param_3) {
          return 0xffffffff;
        }
      } while ((1 - param_3) + uVar4 != 0);
    }
  }
  return 0xffffffff;
}


lui gp,0x15
addiu gp,gp,0x364c
addu gp,gp,t9
addiu sp,sp,-0x38
sw s4,0x28(sp)
sw gp,0x10(sp)
sw ra,0x34(sp)
sw s6,0x30(sp)
sw s5,0x2c(sp)
sw s3,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
lw s4,0x0(a0)
beq a3,zero,0x00375cf0
_lw v1,-0xc(s4)
sltu v0,a2,v1
beq v0,zero,0x00375cc4
_subu v0,v1,a2
addu a0,s4,a2
sltu a2,v0,a3
bne a2,zero,0x00375cc4
_addu s5,s4,v1
li s3,0x1
subu s3,s3,a3
addu a2,s3,v0
beq a2,zero,0x00375cc4
_or s2,a1,zero
lb s6,0x0(a1)
or s1,a3,zero
lw t9,-0x3778(gp)
jalr t9
_or a1,s6,zero
or a2,s1,zero
lw gp,0x10(sp)
or a1,s2,zero
or s0,v0,zero
or a0,v0,zero
beq v0,zero,0x00375cc4
_lw t9,-0x354c(gp)
jalr t9
_nop
addiu a0,s0,0x1
beq v0,zero,0x00375d24
_lw gp,0x10(sp)
subu v0,s5,a0
addu a2,s3,v0
sltu v0,v0,s1
bne v0,zero,0x00375cc8
_li v0,-0x1
bne a2,zero,0x00375c70
_lw t9,-0x3778(gp)
li v0,-0x1
lw ra,0x34(sp)
lw s6,0x30(sp)
lw s5,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x38
lw ra,0x34(sp)
li v0,-0x1
sltu v1,v1,a2
lw s6,0x30(sp)
lw s5,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
addiu sp,sp,0x38
jr ra
_movz v0,a2,v1
b 0x00375cc8
_subu v0,s0,s4
(translation_unit "/* std::string::find(char const*, unsigned int, unsigned int) const */\n\nuint __thiscall std::string::find(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}\n\n" comment (function_definition "uint __thiscall std::string::find(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "find(string *this,char *param_1,uint param_2,uint param_3)" identifier (parameter_list "(string *this,char *param_1,uint param_2,uint param_3)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (expression_statement "iVar7 = *(int *)this;" (assignment_expression "iVar7 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar5 = *(uint *)(iVar7 + -0xc);" (assignment_expression "uVar5 = *(uint *)(iVar7 + -0xc)" identifier = (pointer_expression "*(uint *)(iVar7 + -0xc)" * (cast_expression "(uint *)(iVar7 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + -0xc)" ( (binary_expression "iVar7 + -0xc" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }" if (parenthesized_expression "(param_2 <= uVar5)" ( (binary_expression "param_2 <= uVar5" identifier <= identifier) )) (compound_statement "{\n      uVar4 = param_2;\n    }" { (expression_statement "uVar4 = param_2;" (assignment_expression "uVar4 = param_2" identifier = identifier) ;) })) (return_statement "return uVar4;" return identifier ;) })) (if_statement "if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }" if (parenthesized_expression "(param_2 < uVar5)" ( (binary_expression "param_2 < uVar5" identifier < identifier) )) (compound_statement "{\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }" { (expression_statement "iVar6 = iVar7 + param_2;" (assignment_expression "iVar6 = iVar7 + param_2" identifier = (binary_expression "iVar7 + param_2" identifier + identifier)) ;) (if_statement "if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }" if (parenthesized_expression "((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0))" ( (binary_expression "(param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)" (parenthesized_expression "(param_3 <= uVar5 - param_2)" ( (binary_expression "param_3 <= uVar5 - param_2" identifier <= (binary_expression "uVar5 - param_2" identifier - identifier)) )) && (parenthesized_expression "((1 - param_3) + (uVar5 - param_2) != 0)" ( (binary_expression "(1 - param_3) + (uVar5 - param_2) != 0" (binary_expression "(1 - param_3) + (uVar5 - param_2)" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + (parenthesized_expression "(uVar5 - param_2)" ( (binary_expression "uVar5 - param_2" identifier - identifier) ))) != number_literal) ))) )) (compound_statement "{\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }" { (expression_statement "cVar1 = *param_1;" (assignment_expression "cVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (do_statement "do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);" do (compound_statement "{\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      }" { (expression_statement "iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);" (assignment_expression "iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1)" identifier = (call_expression "(*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1)" (parenthesized_expression "(*(code *)PTR_memchr_004c5ac8)" ( (pointer_expression "*(code *)PTR_memchr_004c5ac8" * (cast_expression "(code *)PTR_memchr_004c5ac8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar6,(int)cVar1)" ( identifier , (cast_expression "(int)cVar1" ( (type_descriptor "int" primitive_type) ) identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);" (assignment_expression "iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3)" identifier = (call_expression "(*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3)" (parenthesized_expression "(*(code *)PTR_memcmp_004c5cf4)" ( (pointer_expression "*(code *)PTR_memcmp_004c5cf4" * (cast_expression "(code *)PTR_memcmp_004c5cf4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_1,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "iVar6 = iVar2 + 1;" (assignment_expression "iVar6 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          return iVar2 - iVar7;\n        }" { (return_statement "return iVar2 - iVar7;" return (binary_expression "iVar2 - iVar7" identifier - identifier) ;) })) (expression_statement "uVar4 = (iVar7 + uVar5) - iVar6;" (assignment_expression "uVar4 = (iVar7 + uVar5) - iVar6" identifier = (binary_expression "(iVar7 + uVar5) - iVar6" (parenthesized_expression "(iVar7 + uVar5)" ( (binary_expression "iVar7 + uVar5" identifier + identifier) )) - identifier)) ;) (if_statement "if (uVar4 < param_3) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(uVar4 < param_3)" ( (binary_expression "uVar4 < param_3" identifier < identifier) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) }) while (parenthesized_expression "((1 - param_3) + uVar4 != 0)" ( (binary_expression "(1 - param_3) + uVar4 != 0" (binary_expression "(1 - param_3) + uVar4" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + identifier) != number_literal) )) ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* std::string::find(char const*, unsigned int, unsigned int) const */\n\nuint __thiscall std::string::find(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}\n\n" comment (function_definition "uint __thiscall std::string::find(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "find(string *this,char *param_1,uint param_2,uint param_3)" identifier (parameter_list "(string *this,char *param_1,uint param_2,uint param_3)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (expression_statement "iVar7 = *(int *)this;" (assignment_expression "iVar7 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar5 = *(uint *)(iVar7 + -0xc);" (assignment_expression "uVar5 = *(uint *)(iVar7 + -0xc)" identifier = (pointer_expression "*(uint *)(iVar7 + -0xc)" * (cast_expression "(uint *)(iVar7 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + -0xc)" ( (binary_expression "iVar7 + -0xc" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }" if (parenthesized_expression "(param_2 <= uVar5)" ( (binary_expression "param_2 <= uVar5" identifier <= identifier) )) (compound_statement "{\n      uVar4 = param_2;\n    }" { (expression_statement "uVar4 = param_2;" (assignment_expression "uVar4 = param_2" identifier = identifier) ;) })) (return_statement "return uVar4;" return identifier ;) })) (if_statement "if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }" if (parenthesized_expression "(param_2 < uVar5)" ( (binary_expression "param_2 < uVar5" identifier < identifier) )) (compound_statement "{\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }" { (expression_statement "iVar6 = iVar7 + param_2;" (assignment_expression "iVar6 = iVar7 + param_2" identifier = (binary_expression "iVar7 + param_2" identifier + identifier)) ;) (if_statement "if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }" if (parenthesized_expression "((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0))" ( (binary_expression "(param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)" (parenthesized_expression "(param_3 <= uVar5 - param_2)" ( (binary_expression "param_3 <= uVar5 - param_2" identifier <= (binary_expression "uVar5 - param_2" identifier - identifier)) )) && (parenthesized_expression "((1 - param_3) + (uVar5 - param_2) != 0)" ( (binary_expression "(1 - param_3) + (uVar5 - param_2) != 0" (binary_expression "(1 - param_3) + (uVar5 - param_2)" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + (parenthesized_expression "(uVar5 - param_2)" ( (binary_expression "uVar5 - param_2" identifier - identifier) ))) != number_literal) ))) )) (compound_statement "{\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }" { (expression_statement "cVar1 = *param_1;" (assignment_expression "cVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (do_statement "do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);" do (compound_statement "{\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      }" { (expression_statement "iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);" (assignment_expression "iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1)" identifier = (call_expression "(*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1)" (parenthesized_expression "(*(code *)PTR_memchr_004c5ac8)" ( (pointer_expression "*(code *)PTR_memchr_004c5ac8" * (cast_expression "(code *)PTR_memchr_004c5ac8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar6,(int)cVar1)" ( identifier , (cast_expression "(int)cVar1" ( (type_descriptor "int" primitive_type) ) identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);" (assignment_expression "iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3)" identifier = (call_expression "(*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3)" (parenthesized_expression "(*(code *)PTR_memcmp_004c5cf4)" ( (pointer_expression "*(code *)PTR_memcmp_004c5cf4" * (cast_expression "(code *)PTR_memcmp_004c5cf4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_1,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "iVar6 = iVar2 + 1;" (assignment_expression "iVar6 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          return iVar2 - iVar7;\n        }" { (return_statement "return iVar2 - iVar7;" return (binary_expression "iVar2 - iVar7" identifier - identifier) ;) })) (expression_statement "uVar4 = (iVar7 + uVar5) - iVar6;" (assignment_expression "uVar4 = (iVar7 + uVar5) - iVar6" identifier = (binary_expression "(iVar7 + uVar5) - iVar6" (parenthesized_expression "(iVar7 + uVar5)" ( (binary_expression "iVar7 + uVar5" identifier + identifier) )) - identifier)) ;) (if_statement "if (uVar4 < param_3) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(uVar4 < param_3)" ( (binary_expression "uVar4 < param_3" identifier < identifier) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) }) while (parenthesized_expression "((1 - param_3) + uVar4 != 0)" ( (binary_expression "(1 - param_3) + uVar4 != 0" (binary_expression "(1 - param_3) + uVar4" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + identifier) != number_literal) )) ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "uint __thiscall std::string::find(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "uint __thiscall std::string::find(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "find(string *this,char *param_1,uint param_2,uint param_3)" identifier (parameter_list "(string *this,char *param_1,uint param_2,uint param_3)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (expression_statement "iVar7 = *(int *)this;" (assignment_expression "iVar7 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar5 = *(uint *)(iVar7 + -0xc);" (assignment_expression "uVar5 = *(uint *)(iVar7 + -0xc)" identifier = (pointer_expression "*(uint *)(iVar7 + -0xc)" * (cast_expression "(uint *)(iVar7 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + -0xc)" ( (binary_expression "iVar7 + -0xc" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }" if (parenthesized_expression "(param_2 <= uVar5)" ( (binary_expression "param_2 <= uVar5" identifier <= identifier) )) (compound_statement "{\n      uVar4 = param_2;\n    }" { (expression_statement "uVar4 = param_2;" (assignment_expression "uVar4 = param_2" identifier = identifier) ;) })) (return_statement "return uVar4;" return identifier ;) })) (if_statement "if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }" if (parenthesized_expression "(param_2 < uVar5)" ( (binary_expression "param_2 < uVar5" identifier < identifier) )) (compound_statement "{\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }" { (expression_statement "iVar6 = iVar7 + param_2;" (assignment_expression "iVar6 = iVar7 + param_2" identifier = (binary_expression "iVar7 + param_2" identifier + identifier)) ;) (if_statement "if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }" if (parenthesized_expression "((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0))" ( (binary_expression "(param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)" (parenthesized_expression "(param_3 <= uVar5 - param_2)" ( (binary_expression "param_3 <= uVar5 - param_2" identifier <= (binary_expression "uVar5 - param_2" identifier - identifier)) )) && (parenthesized_expression "((1 - param_3) + (uVar5 - param_2) != 0)" ( (binary_expression "(1 - param_3) + (uVar5 - param_2) != 0" (binary_expression "(1 - param_3) + (uVar5 - param_2)" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + (parenthesized_expression "(uVar5 - param_2)" ( (binary_expression "uVar5 - param_2" identifier - identifier) ))) != number_literal) ))) )) (compound_statement "{\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }" { (expression_statement "cVar1 = *param_1;" (assignment_expression "cVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (do_statement "do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);" do (compound_statement "{\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      }" { (expression_statement "iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);" (assignment_expression "iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1)" identifier = (call_expression "(*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1)" (parenthesized_expression "(*(code *)PTR_memchr_004c5ac8)" ( (pointer_expression "*(code *)PTR_memchr_004c5ac8" * (cast_expression "(code *)PTR_memchr_004c5ac8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar6,(int)cVar1)" ( identifier , (cast_expression "(int)cVar1" ( (type_descriptor "int" primitive_type) ) identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);" (assignment_expression "iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3)" identifier = (call_expression "(*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3)" (parenthesized_expression "(*(code *)PTR_memcmp_004c5cf4)" ( (pointer_expression "*(code *)PTR_memcmp_004c5cf4" * (cast_expression "(code *)PTR_memcmp_004c5cf4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_1,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "iVar6 = iVar2 + 1;" (assignment_expression "iVar6 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          return iVar2 - iVar7;\n        }" { (return_statement "return iVar2 - iVar7;" return (binary_expression "iVar2 - iVar7" identifier - identifier) ;) })) (expression_statement "uVar4 = (iVar7 + uVar5) - iVar6;" (assignment_expression "uVar4 = (iVar7 + uVar5) - iVar6" identifier = (binary_expression "(iVar7 + uVar5) - iVar6" (parenthesized_expression "(iVar7 + uVar5)" ( (binary_expression "iVar7 + uVar5" identifier + identifier) )) - identifier)) ;) (if_statement "if (uVar4 < param_3) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(uVar4 < param_3)" ( (binary_expression "uVar4 < param_3" identifier < identifier) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) }) while (parenthesized_expression "((1 - param_3) + uVar4 != 0)" ( (binary_expression "(1 - param_3) + uVar4 != 0" (binary_expression "(1 - param_3) + uVar4" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + identifier) != number_literal) )) ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ms_call_modifier __thiscall) (ERROR IDENT : : IDENT : :) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (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 IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= (binary_expression IDENT - IDENT)) )) && (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression LIT - IDENT) )) + (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (binary_expression IDENT - IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) }) while (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression LIT - IDENT) )) + IDENT) != LIT) )) ;) })) })) (return_statement return LIT ;) })))
(function_definition "uint __thiscall std::string::find(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}" (type_identifier "uint") (ms_call_modifier "__thiscall" (__thiscall "__thiscall")) (ERROR "std::string::" (identifier "std") (: ":") (: ":") (identifier "string") (: ":") (: ":")) (function_declarator "find(string *this,char *param_1,uint param_2,uint param_3)" (identifier "find") (parameter_list "(string *this,char *param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "string *this" (type_identifier "string") (pointer_declarator "*this" (* "*") (identifier "this"))) (, ",") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar7 = *(int *)this;\n  uVar5 = *(uint *)(iVar7 + -0xc);\n  if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }\n  if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }\n  return 0xffffffff;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (expression_statement "iVar7 = *(int *)this;" (assignment_expression "iVar7 = *(int *)this" (identifier "iVar7") (= "=") (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this")))) (; ";")) (expression_statement "uVar5 = *(uint *)(iVar7 + -0xc);" (assignment_expression "uVar5 = *(uint *)(iVar7 + -0xc)" (identifier "uVar5") (= "=") (pointer_expression "*(uint *)(iVar7 + -0xc)" (* "*") (cast_expression "(uint *)(iVar7 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar7 + -0xc)" (( "(") (binary_expression "iVar7 + -0xc" (identifier "iVar7") (+ "+") (number_literal "-0xc")) () ")"))))) (; ";")) (if_statement "if (param_3 == 0) {\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar4 = 0xffffffff;\n    if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }\n    return uVar4;\n  }" ({ "{") (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (param_2 <= uVar5) {\n      uVar4 = param_2;\n    }" (if "if") (parenthesized_expression "(param_2 <= uVar5)" (( "(") (binary_expression "param_2 <= uVar5" (identifier "param_2") (<= "<=") (identifier "uVar5")) () ")")) (compound_statement "{\n      uVar4 = param_2;\n    }" ({ "{") (expression_statement "uVar4 = param_2;" (assignment_expression "uVar4 = param_2" (identifier "uVar4") (= "=") (identifier "param_2")) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (if_statement "if (param_2 < uVar5) {\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }" (if "if") (parenthesized_expression "(param_2 < uVar5)" (( "(") (binary_expression "param_2 < uVar5" (identifier "param_2") (< "<") (identifier "uVar5")) () ")")) (compound_statement "{\n    iVar6 = iVar7 + param_2;\n    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }\n  }" ({ "{") (expression_statement "iVar6 = iVar7 + param_2;" (assignment_expression "iVar6 = iVar7 + param_2" (identifier "iVar6") (= "=") (binary_expression "iVar7 + param_2" (identifier "iVar7") (+ "+") (identifier "param_2"))) (; ";")) (if_statement "if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }" (if "if") (parenthesized_expression "((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0))" (( "(") (binary_expression "(param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)" (parenthesized_expression "(param_3 <= uVar5 - param_2)" (( "(") (binary_expression "param_3 <= uVar5 - param_2" (identifier "param_3") (<= "<=") (binary_expression "uVar5 - param_2" (identifier "uVar5") (- "-") (identifier "param_2"))) () ")")) (&& "&&") (parenthesized_expression "((1 - param_3) + (uVar5 - param_2) != 0)" (( "(") (binary_expression "(1 - param_3) + (uVar5 - param_2) != 0" (binary_expression "(1 - param_3) + (uVar5 - param_2)" (parenthesized_expression "(1 - param_3)" (( "(") (binary_expression "1 - param_3" (number_literal "1") (- "-") (identifier "param_3")) () ")")) (+ "+") (parenthesized_expression "(uVar5 - param_2)" (( "(") (binary_expression "uVar5 - param_2" (identifier "uVar5") (- "-") (identifier "param_2")) () ")"))) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      cVar1 = *param_1;\n      do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);\n    }" ({ "{") (expression_statement "cVar1 = *param_1;" (assignment_expression "cVar1 = *param_1" (identifier "cVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (do_statement "do {\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar4 != 0);" (do "do") (compound_statement "{\n        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);\n        if (iVar2 == 0) {\n          return 0xffffffff;\n        }\n        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);\n        iVar6 = iVar2 + 1;\n        if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }\n        uVar4 = (iVar7 + uVar5) - iVar6;\n        if (uVar4 < param_3) {\n          return 0xffffffff;\n        }\n      }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);" (assignment_expression "iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1)" (parenthesized_expression "(*(code *)PTR_memchr_004c5ac8)" (( "(") (pointer_expression "*(code *)PTR_memchr_004c5ac8" (* "*") (cast_expression "(code *)PTR_memchr_004c5ac8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memchr_004c5ac8"))) () ")")) (argument_list "(iVar6,(int)cVar1)" (( "(") (identifier "iVar6") (, ",") (cast_expression "(int)cVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "cVar1")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n          return 0xffffffff;\n        }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return 0xffffffff;\n        }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);" (assignment_expression "iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3)" (parenthesized_expression "(*(code *)PTR_memcmp_004c5cf4)" (( "(") (pointer_expression "*(code *)PTR_memcmp_004c5cf4" (* "*") (cast_expression "(code *)PTR_memcmp_004c5cf4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcmp_004c5cf4"))) () ")")) (argument_list "(iVar2,param_1,param_3)" (( "(") (identifier "iVar2") (, ",") (identifier "param_1") (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "iVar6 = iVar2 + 1;" (assignment_expression "iVar6 = iVar2 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar3 == 0) {\n          return iVar2 - iVar7;\n        }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return iVar2 - iVar7;\n        }" ({ "{") (return_statement "return iVar2 - iVar7;" (return "return") (binary_expression "iVar2 - iVar7" (identifier "iVar2") (- "-") (identifier "iVar7")) (; ";")) (} "}"))) (expression_statement "uVar4 = (iVar7 + uVar5) - iVar6;" (assignment_expression "uVar4 = (iVar7 + uVar5) - iVar6" (identifier "uVar4") (= "=") (binary_expression "(iVar7 + uVar5) - iVar6" (parenthesized_expression "(iVar7 + uVar5)" (( "(") (binary_expression "iVar7 + uVar5" (identifier "iVar7") (+ "+") (identifier "uVar5")) () ")")) (- "-") (identifier "iVar6"))) (; ";")) (if_statement "if (uVar4 < param_3) {\n          return 0xffffffff;\n        }" (if "if") (parenthesized_expression "(uVar4 < param_3)" (( "(") (binary_expression "uVar4 < param_3" (identifier "uVar4") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n          return 0xffffffff;\n        }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "((1 - param_3) + uVar4 != 0)" (( "(") (binary_expression "(1 - param_3) + uVar4 != 0" (binary_expression "(1 - param_3) + uVar4" (parenthesized_expression "(1 - param_3)" (( "(") (binary_expression "1 - param_3" (number_literal "1") (- "-") (identifier "param_3")) () ")")) (+ "+") (identifier "uVar4")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) (ms_call_modifier) (ERROR (identifier) (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (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: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_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))))) (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (binary_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (number_literal))))) condition: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (identifier)) right: (number_literal)))))))) (return_statement (number_literal)))))

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

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

{
  char cVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  int iVar7;
  
  iVar7 = *(int *)this;
  uVar5 = *(uint *)(iVar7 + -0xc);
  if (param_3 == 0) {
    uVar4 = 0xffffffff;
    if (param_2 <= uVar5) {
      uVar4 = param_2;
    }
    return uVar4;
  }
  if (param_2 < uVar5) {
    iVar6 = iVar7 + param_2;
    if ((param_3 <= uVar5 - param_2) && ((1 - param_3) + (uVar5 - param_2) != 0)) {
      cVar1 = *param_1;
      do {
        iVar2 = (*(code *)PTR_memchr_004c5ac8)(iVar6,(int)cVar1);
        if (iVar2 == 0) {
          return 0xffffffff;
        }
        iVar3 = (*(code *)PTR_memcmp_004c5cf4)(iVar2,param_1,param_3);
        iVar6 = iVar2 + 1;
        if (iVar3 == 0) {
          return iVar2 - iVar7;
        }
        uVar4 = (iVar7 + uVar5) - iVar6;
        if (uVar4 < param_3) {
          return 0xffffffff;
        }
      } while ((1 - param_3) + uVar4 != 0);
    }
  }
  return 0xffffffff;
}

