
/* std::wstring::erase(unsigned int, unsigned int) */

wstring * __thiscall std::wstring::erase(wstring *this,uint param_1,uint param_2)

{
  uint uVar1;
  int iVar2;
  wstring *pwVar3;
  wstring *this_00;
  int iVar4;
  
  uVar1 = *(uint *)(*(int *)this + -0xc) - param_1;
  if (param_1 <= *(uint *)(*(int *)this + -0xc)) {
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    _M_mutate(this,param_1,param_2,0);
    return this;
  }
  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);
  this_00 = (wstring *)(PTR_s__0043226c + -0x28f0);
  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();
  iVar4 = *(int *)this_00;
  _M_mutate(this_00,(int)(param_1 - iVar4) >> 2,1,0);
  iVar2 = *(int *)this_00;
  *(undefined4 *)(iVar2 + -4) = 0xffffffff;
  *(uint *)pwVar3 = iVar2 + (param_1 - iVar4);
  return pwVar3;
}



wstring * FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  wstring *pwVar3;
  wstring *this;
  int iVar4;
  
  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;
  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {
    if (uVar1 <= param_3) {
      param_3 = uVar1;
    }
    std::wstring::_M_mutate(param_1,param_2,param_3,0);
    return param_1;
  }
  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);
  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);
  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();
  iVar4 = *(int *)this;
  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);
  iVar2 = *(int *)this;
  *(undefined4 *)(iVar2 + -4) = 0xffffffff;
  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);
  return pwVar3;
}


lui gp,0xe
addiu gp,gp,0x24e0
addu gp,gp,t9
lw v0,0x0(a0)
addiu sp,sp,-0x20
sw gp,0x10(sp)
sw ra,0x1c(sp)
sw s0,0x18(sp)
lw a3,-0xc(v0)
sltu v0,a3,a1
bne v0,zero,0x00357d4c
_subu v1,a3,a1
lw t9,-0x669c(gp)
or a3,zero,zero
sltu v0,a2,v1
movz a2,v1,v0
bal 0x003576e0
_or s0,a0,zero
or v0,s0,zero
lw ra,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
or a2,a1,zero
lw a0,-0x7e1c(gp)
lw a1,-0x7f64(gp)
lw t9,-0x71e8(gp)
addiu a0,a0,-0x25a4
jalr t9
_addiu a1,a1,-0x28f0
(translation_unit "wstring * FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;\n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this;\n  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);\n  return pwVar3;\n}\n\n" (function_definition "wstring * FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;\n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this;\n  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);\n  return pwVar3;\n}" type_identifier (pointer_declarator "* FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)" * (function_declarator "FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)" identifier (parameter_list "(wstring *param_1,uint param_2,uint param_3)" ( (parameter_declaration "wstring *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;\n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this;\n  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);\n  return pwVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "wstring *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "wstring *this;" type_identifier (pointer_declarator "*this" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;" (assignment_expression "uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2" identifier = (binary_expression "*(uint *)(*(int *)param_1 + -0xc) - param_2" (pointer_expression "*(uint *)(*(int *)param_1 + -0xc)" * (cast_expression "(uint *)(*(int *)param_1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) - identifier)) ;) (if_statement "if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }" if (parenthesized_expression "(param_2 <= *(uint *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_2 <= *(uint *)(*(int *)param_1 + -0xc)" identifier <= (pointer_expression "*(uint *)(*(int *)param_1 + -0xc)" * (cast_expression "(uint *)(*(int *)param_1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (compound_statement "{\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }" { (if_statement "if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }" if (parenthesized_expression "(uVar1 <= param_3)" ( (binary_expression "uVar1 <= param_3" identifier <= identifier) )) (compound_statement "{\n      param_3 = uVar1;\n    }" { (expression_statement "param_3 = uVar1;" (assignment_expression "param_3 = uVar1" identifier = identifier) ;) })) (labeled_statement "std::wstring::_M_mutate(param_1,param_2,param_3,0);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_mutate(param_1,param_2,param_3,0);" statement_identifier : (ERROR ":" :) (expression_statement "_M_mutate(param_1,param_2,param_3,0);" (call_expression "_M_mutate(param_1,param_2,param_3,0)" identifier (argument_list "(param_1,param_2,param_3,0)" ( identifier , identifier , identifier , number_literal ))) ;))) (return_statement "return param_1;" return identifier ;) })) (expression_statement "pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);" (assignment_expression "pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4)" identifier = (cast_expression "(wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_alize_xindex_004323b4 + -0x25a4)" ( (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" identifier + number_literal) )))) ;) (expression_statement "this = (wstring *)(PTR_DAT_0043226c + -0x28f0);" (assignment_expression "this = (wstring *)(PTR_DAT_0043226c + -0x28f0)" identifier = (cast_expression "(wstring *)(PTR_DAT_0043226c + -0x28f0)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0043226c + -0x28f0)" ( (binary_expression "PTR_DAT_0043226c + -0x28f0" identifier + number_literal) )))) ;) (expression_statement "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)();" (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)()" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)" ( (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_00432fe8" * (cast_expression "(code *)PTR___throw_out_of_range_fmt_00432fe8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar4 = *(int *)this;" (assignment_expression "iVar4 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (labeled_statement "std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);" statement_identifier : (ERROR ":" :) (expression_statement "_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);" (call_expression "_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0)" identifier (argument_list "(this,(int)(param_2 - iVar4) >> 2,1,0)" ( identifier , (binary_expression "(int)(param_2 - iVar4) >> 2" (cast_expression "(int)(param_2 - iVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 - iVar4)" ( (binary_expression "param_2 - iVar4" identifier - identifier) ))) >> number_literal) , number_literal , number_literal ))) ;))) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)(iVar2 + -4) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar2 + -4)" * (cast_expression "(undefined4 *)(iVar2 + -4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)pwVar3 = iVar2 + (param_2 - iVar4);" (assignment_expression "*(uint *)pwVar3 = iVar2 + (param_2 - iVar4)" (pointer_expression "*(uint *)pwVar3" * (cast_expression "(uint *)pwVar3" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "iVar2 + (param_2 - iVar4)" identifier + (parenthesized_expression "(param_2 - iVar4)" ( (binary_expression "param_2 - iVar4" identifier - identifier) )))) ;) (return_statement "return pwVar3;" return identifier ;) })))
(translation_unit "/* std::wstring::erase(unsigned int, unsigned int) */\n\nwstring * __thiscall std::wstring::erase(wstring *this,uint param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this_00;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)this + -0xc) - param_1;\n  if (param_1 <= *(uint *)(*(int *)this + -0xc)) {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    _M_mutate(this,param_1,param_2,0);\n    return this;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this_00 = (wstring *)(PTR_s__0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this_00;\n  _M_mutate(this_00,(int)(param_1 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this_00;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_1 - iVar4);\n  return pwVar3;\n}\n\n" comment (ERROR "wstring * __thiscall std::wstring::erase(wstring *this,uint param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::erase(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::erase(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier identifier , identifier identifier )) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this_00;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)this + -0xc) - param_1;\n  if (param_1 <= *(uint *)(*(int *)this + -0xc)) {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    _M_mutate(this,param_1,param_2,0);\n    return this;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this_00 = (wstring *)(PTR_s__0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this_00;\n  _M_mutate(this_00,(int)(param_1 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this_00;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_1 - iVar4);\n  return pwVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "wstring *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "wstring *this_00;" type_identifier (pointer_declarator "*this_00" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "uVar1 = *(uint *)(*(int *)this + -0xc) - param_1;" (assignment_expression "uVar1 = *(uint *)(*(int *)this + -0xc) - param_1" identifier = (binary_expression "*(uint *)(*(int *)this + -0xc) - param_1" (pointer_expression "*(uint *)(*(int *)this + -0xc)" * (cast_expression "(uint *)(*(int *)this + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) - identifier)) ;) (if_statement "if (param_1 <= *(uint *)(*(int *)this + -0xc)) {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    _M_mutate(this,param_1,param_2,0);\n    return this;\n  }" if (parenthesized_expression "(param_1 <= *(uint *)(*(int *)this + -0xc))" ( (binary_expression "param_1 <= *(uint *)(*(int *)this + -0xc)" identifier <= (pointer_expression "*(uint *)(*(int *)this + -0xc)" * (cast_expression "(uint *)(*(int *)this + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (compound_statement "{\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    _M_mutate(this,param_1,param_2,0);\n    return this;\n  }" { (if_statement "if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }" if (parenthesized_expression "(uVar1 <= param_2)" ( (binary_expression "uVar1 <= param_2" identifier <= identifier) )) (compound_statement "{\n      param_2 = uVar1;\n    }" { (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" identifier = identifier) ;) })) (expression_statement "_M_mutate(this,param_1,param_2,0);" (call_expression "_M_mutate(this,param_1,param_2,0)" identifier (argument_list "(this,param_1,param_2,0)" ( identifier , identifier , identifier , number_literal ))) ;) (return_statement "return this;" return identifier ;) })) (expression_statement "pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);" (assignment_expression "pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4)" identifier = (cast_expression "(wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_alize_xindex_004323b4 + -0x25a4)" ( (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" identifier + number_literal) )))) ;) (expression_statement "this_00 = (wstring *)(PTR_s__0043226c + -0x28f0);" (assignment_expression "this_00 = (wstring *)(PTR_s__0043226c + -0x28f0)" identifier = (cast_expression "(wstring *)(PTR_s__0043226c + -0x28f0)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s__0043226c + -0x28f0)" ( (binary_expression "PTR_s__0043226c + -0x28f0" identifier + number_literal) )))) ;) (expression_statement "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)();" (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)()" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)" ( (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_00432fe8" * (cast_expression "(code *)PTR___throw_out_of_range_fmt_00432fe8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar4 = *(int *)this_00;" (assignment_expression "iVar4 = *(int *)this_00" identifier = (pointer_expression "*(int *)this_00" * (cast_expression "(int *)this_00" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "_M_mutate(this_00,(int)(param_1 - iVar4) >> 2,1,0);" (call_expression "_M_mutate(this_00,(int)(param_1 - iVar4) >> 2,1,0)" identifier (argument_list "(this_00,(int)(param_1 - iVar4) >> 2,1,0)" ( identifier , (binary_expression "(int)(param_1 - iVar4) >> 2" (cast_expression "(int)(param_1 - iVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_1 - iVar4)" ( (binary_expression "param_1 - iVar4" identifier - identifier) ))) >> number_literal) , number_literal , number_literal ))) ;) (expression_statement "iVar2 = *(int *)this_00;" (assignment_expression "iVar2 = *(int *)this_00" identifier = (pointer_expression "*(int *)this_00" * (cast_expression "(int *)this_00" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)(iVar2 + -4) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar2 + -4)" * (cast_expression "(undefined4 *)(iVar2 + -4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)pwVar3 = iVar2 + (param_1 - iVar4);" (assignment_expression "*(uint *)pwVar3 = iVar2 + (param_1 - iVar4)" (pointer_expression "*(uint *)pwVar3" * (cast_expression "(uint *)pwVar3" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "iVar2 + (param_1 - iVar4)" identifier + (parenthesized_expression "(param_1 - iVar4)" ( (binary_expression "param_1 - iVar4" identifier - identifier) )))) ;) (return_statement "return pwVar3;" return identifier ;) }))
(translation_unit "wstring * FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;\n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this;\n  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);\n  return pwVar3;\n}\n\n" (function_definition "wstring * FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;\n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this;\n  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);\n  return pwVar3;\n}" type_identifier (pointer_declarator "* FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)" * (function_declarator "FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)" identifier (parameter_list "(wstring *param_1,uint param_2,uint param_3)" ( (parameter_declaration "wstring *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;\n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this;\n  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);\n  return pwVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "wstring *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "wstring *this;" type_identifier (pointer_declarator "*this" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;" (assignment_expression "uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2" identifier = (binary_expression "*(uint *)(*(int *)param_1 + -0xc) - param_2" (pointer_expression "*(uint *)(*(int *)param_1 + -0xc)" * (cast_expression "(uint *)(*(int *)param_1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) - identifier)) ;) (if_statement "if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }" if (parenthesized_expression "(param_2 <= *(uint *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_2 <= *(uint *)(*(int *)param_1 + -0xc)" identifier <= (pointer_expression "*(uint *)(*(int *)param_1 + -0xc)" * (cast_expression "(uint *)(*(int *)param_1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (compound_statement "{\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }" { (if_statement "if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }" if (parenthesized_expression "(uVar1 <= param_3)" ( (binary_expression "uVar1 <= param_3" identifier <= identifier) )) (compound_statement "{\n      param_3 = uVar1;\n    }" { (expression_statement "param_3 = uVar1;" (assignment_expression "param_3 = uVar1" identifier = identifier) ;) })) (labeled_statement "std::wstring::_M_mutate(param_1,param_2,param_3,0);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_mutate(param_1,param_2,param_3,0);" statement_identifier : (ERROR ":" :) (expression_statement "_M_mutate(param_1,param_2,param_3,0);" (call_expression "_M_mutate(param_1,param_2,param_3,0)" identifier (argument_list "(param_1,param_2,param_3,0)" ( identifier , identifier , identifier , number_literal ))) ;))) (return_statement "return param_1;" return identifier ;) })) (expression_statement "pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);" (assignment_expression "pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4)" identifier = (cast_expression "(wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_alize_xindex_004323b4 + -0x25a4)" ( (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" identifier + number_literal) )))) ;) (expression_statement "this = (wstring *)(PTR_DAT_0043226c + -0x28f0);" (assignment_expression "this = (wstring *)(PTR_DAT_0043226c + -0x28f0)" identifier = (cast_expression "(wstring *)(PTR_DAT_0043226c + -0x28f0)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0043226c + -0x28f0)" ( (binary_expression "PTR_DAT_0043226c + -0x28f0" identifier + number_literal) )))) ;) (expression_statement "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)();" (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)()" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)" ( (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_00432fe8" * (cast_expression "(code *)PTR___throw_out_of_range_fmt_00432fe8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar4 = *(int *)this;" (assignment_expression "iVar4 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (labeled_statement "std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);" statement_identifier : (ERROR ":" :) (expression_statement "_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);" (call_expression "_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0)" identifier (argument_list "(this,(int)(param_2 - iVar4) >> 2,1,0)" ( identifier , (binary_expression "(int)(param_2 - iVar4) >> 2" (cast_expression "(int)(param_2 - iVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 - iVar4)" ( (binary_expression "param_2 - iVar4" identifier - identifier) ))) >> number_literal) , number_literal , number_literal ))) ;))) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)(iVar2 + -4) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar2 + -4)" * (cast_expression "(undefined4 *)(iVar2 + -4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)pwVar3 = iVar2 + (param_2 - iVar4);" (assignment_expression "*(uint *)pwVar3 = iVar2 + (param_2 - iVar4)" (pointer_expression "*(uint *)pwVar3" * (cast_expression "(uint *)pwVar3" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "iVar2 + (param_2 - iVar4)" identifier + (parenthesized_expression "(param_2 - iVar4)" ( (binary_expression "param_2 - iVar4" identifier - identifier) )))) ;) (return_statement "return pwVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + LIT) )))) - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + LIT) ))))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT ))) ;))) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) >> LIT) , LIT , LIT ))) ;))) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - IDENT) )))) ;) (return_statement return IDENT ;) })))
(function_definition "wstring * FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;\n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this;\n  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);\n  return pwVar3;\n}" (type_identifier "wstring") (pointer_declarator "* FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)" (* "*") (function_declarator "FUN_00357cf0(wstring *param_1,uint param_2,uint param_3)" (identifier "FUN_00357cf0") (parameter_list "(wstring *param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "wstring *param_1" (type_identifier "wstring") (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  uint uVar1;\n  int iVar2;\n  wstring *pwVar3;\n  wstring *this;\n  int iVar4;\n  \n  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;\n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }\n  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);\n  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);\n  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();\n  iVar4 = *(int *)this;\n  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);\n  iVar2 = *(int *)this;\n  *(undefined4 *)(iVar2 + -4) = 0xffffffff;\n  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);\n  return pwVar3;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "wstring *pwVar3;" (type_identifier "wstring") (pointer_declarator "*pwVar3" (* "*") (identifier "pwVar3")) (; ";")) (declaration "wstring *this;" (type_identifier "wstring") (pointer_declarator "*this" (* "*") (identifier "this")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;" (assignment_expression "uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2" (identifier "uVar1") (= "=") (binary_expression "*(uint *)(*(int *)param_1 + -0xc) - param_2" (pointer_expression "*(uint *)(*(int *)param_1 + -0xc)" (* "*") (cast_expression "(uint *)(*(int *)param_1 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)param_1 + -0xc)" (( "(") (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" (* "*") (cast_expression "(int *)param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1"))) (+ "+") (number_literal "-0xc")) () ")")))) (- "-") (identifier "param_2"))) (; ";")) (if_statement "if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }" (if "if") (parenthesized_expression "(param_2 <= *(uint *)(*(int *)param_1 + -0xc))" (( "(") (binary_expression "param_2 <= *(uint *)(*(int *)param_1 + -0xc)" (identifier "param_2") (<= "<=") (pointer_expression "*(uint *)(*(int *)param_1 + -0xc)" (* "*") (cast_expression "(uint *)(*(int *)param_1 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)param_1 + -0xc)" (( "(") (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" (* "*") (cast_expression "(int *)param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1"))) (+ "+") (number_literal "-0xc")) () ")"))))) () ")")) (compound_statement "{\n    if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }\n    std::wstring::_M_mutate(param_1,param_2,param_3,0);\n    return param_1;\n  }" ({ "{") (if_statement "if (uVar1 <= param_3) {\n      param_3 = uVar1;\n    }" (if "if") (parenthesized_expression "(uVar1 <= param_3)" (( "(") (binary_expression "uVar1 <= param_3" (identifier "uVar1") (<= "<=") (identifier "param_3")) () ")")) (compound_statement "{\n      param_3 = uVar1;\n    }" ({ "{") (expression_statement "param_3 = uVar1;" (assignment_expression "param_3 = uVar1" (identifier "param_3") (= "=") (identifier "uVar1")) (; ";")) (} "}"))) (labeled_statement "std::wstring::_M_mutate(param_1,param_2,param_3,0);" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "wstring::_M_mutate(param_1,param_2,param_3,0);" (statement_identifier "wstring") (: ":") (ERROR ":" (: ":")) (expression_statement "_M_mutate(param_1,param_2,param_3,0);" (call_expression "_M_mutate(param_1,param_2,param_3,0)" (identifier "_M_mutate") (argument_list "(param_1,param_2,param_3,0)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (number_literal "0") () ")"))) (; ";")))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);" (assignment_expression "pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4)" (identifier "pwVar3") (= "=") (cast_expression "(wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4)" (( "(") (type_descriptor "wstring *" (type_identifier "wstring") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_s_alize_xindex_004323b4 + -0x25a4)" (( "(") (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" (identifier "PTR_s_alize_xindex_004323b4") (+ "+") (number_literal "-0x25a4")) () ")")))) (; ";")) (expression_statement "this = (wstring *)(PTR_DAT_0043226c + -0x28f0);" (assignment_expression "this = (wstring *)(PTR_DAT_0043226c + -0x28f0)" (identifier "this") (= "=") (cast_expression "(wstring *)(PTR_DAT_0043226c + -0x28f0)" (( "(") (type_descriptor "wstring *" (type_identifier "wstring") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0043226c + -0x28f0)" (( "(") (binary_expression "PTR_DAT_0043226c + -0x28f0" (identifier "PTR_DAT_0043226c") (+ "+") (number_literal "-0x28f0")) () ")")))) (; ";")) (expression_statement "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)();" (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)()" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)" (( "(") (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_00432fe8" (* "*") (cast_expression "(code *)PTR___throw_out_of_range_fmt_00432fe8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___throw_out_of_range_fmt_00432fe8"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar4 = *(int *)this;" (assignment_expression "iVar4 = *(int *)this" (identifier "iVar4") (= "=") (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this")))) (; ";")) (labeled_statement "std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);" (statement_identifier "wstring") (: ":") (ERROR ":" (: ":")) (expression_statement "_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);" (call_expression "_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0)" (identifier "_M_mutate") (argument_list "(this,(int)(param_2 - iVar4) >> 2,1,0)" (( "(") (identifier "this") (, ",") (binary_expression "(int)(param_2 - iVar4) >> 2" (cast_expression "(int)(param_2 - iVar4)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(param_2 - iVar4)" (( "(") (binary_expression "param_2 - iVar4" (identifier "param_2") (- "-") (identifier "iVar4")) () ")"))) (>> ">>") (number_literal "2")) (, ",") (number_literal "1") (, ",") (number_literal "0") () ")"))) (; ";")))) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" (identifier "iVar2") (= "=") (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this")))) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + -4) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar2 + -4)" (* "*") (cast_expression "(undefined4 *)(iVar2 + -4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -4)" (( "(") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "*(uint *)pwVar3 = iVar2 + (param_2 - iVar4);" (assignment_expression "*(uint *)pwVar3 = iVar2 + (param_2 - iVar4)" (pointer_expression "*(uint *)pwVar3" (* "*") (cast_expression "(uint *)pwVar3" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pwVar3"))) (= "=") (binary_expression "iVar2 + (param_2 - iVar4)" (identifier "iVar2") (+ "+") (parenthesized_expression "(param_2 - iVar4)" (( "(") (binary_expression "param_2 - iVar4" (identifier "param_2") (- "-") (identifier "iVar4")) () ")")))) (; ";")) (return_statement "return pwVar3;" (return "return") (identifier "pwVar3") (; ";")) (} "}")))

/* std::wstring::erase(unsigned int, unsigned int) */

type_2 * __thiscall std::type_2::erase(type_2 *this,type_1 var_1,type_1 var_3)

{
  type_1 var_2;
  int var_8;
  type_2 *pwVar3;
  type_2 *this_00;
  int var_7;
  
  var_2 = *(type_1 *)(*(int *)this + -0xc) - var_1;
  if (var_1 <= *(type_1 *)(*(int *)this + -0xc)) {
    if (var_2 <= var_3) {
      var_3 = var_2;
    }
    var_4(this,var_1,var_3,0);
    return this;
  }
  pwVar3 = (type_2 *)(var_5 + -0x25a4);
  this_00 = (type_2 *)(var_6 + -0x28f0);
  (*(type_3 *)PTR___throw_out_of_range_fmt_00432fe8)();
  var_7 = *(int *)this_00;
  var_4(this_00,(int)(var_1 - var_7) >> 2,1,0);
  var_8 = *(int *)this_00;
  *(type_4 *)(var_8 + -4) = 0xffffffff;
  *(type_1 *)pwVar3 = var_8 + (var_1 - var_7);
  return pwVar3;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (number_literal)))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (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))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (number_literal)) (number_literal) (number_literal)))))) (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: (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))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (return_statement (identifier)))))

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

{
  uint uVar1;
  int iVar2;
  wstring *pwVar3;
  wstring *this;
  int iVar4;
  
  uVar1 = *(uint *)(*(int *)param_1 + -0xc) - param_2;
  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {
    if (uVar1 <= param_3) {
      param_3 = uVar1;
    }
    std::wstring::_M_mutate(param_1,param_2,param_3,0);
    return param_1;
  }
  pwVar3 = (wstring *)(PTR_s_alize_xindex_004323b4 + -0x25a4);
  this = (wstring *)(PTR_DAT_0043226c + -0x28f0);
  (*(code *)PTR___throw_out_of_range_fmt_00432fe8)();
  iVar4 = *(int *)this;
  std::wstring::_M_mutate(this,(int)(param_2 - iVar4) >> 2,1,0);
  iVar2 = *(int *)this;
  *(undefined4 *)(iVar2 + -4) = 0xffffffff;
  *(uint *)pwVar3 = iVar2 + (param_2 - iVar4);
  return pwVar3;
}

