
/* std::wstring::erase(__normal_iterator<wchar_t const*, std::wstring >, __normal_iterator<wchar_t
   const*, std::wstring >) */

undefined4 * __thiscall std::wstring::erase(wstring *this,undefined4 *param_2,long param_3)

{
  long lVar1;
  ulong uVar2;
  
  lVar1 = (long)param_2 - *(long *)this;
  uVar2 = lVar1 >> 2;
  if (param_3 != *(long *)this + *(long *)(this + 8) * 4) {
    _M_erase(this,uVar2,param_3 - (long)param_2 >> 2);
    return (undefined4 *)(*(long *)this + lVar1);
  }
  *(ulong *)(this + 8) = uVar2;
  *param_2 = 0;
  return param_2;
}



undefined4 * FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)

{
  long lVar1;
  long lVar2;
  
  lVar1 = (long)param_2 - *param_1;
  lVar2 = lVar1 >> 2;
  if (param_3 != *param_1 + param_1[1] * 4) {
    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);
    return (undefined4 *)(*param_1 + lVar1);
  }
  param_1[1] = lVar2;
  *param_2 = 0;
  return param_2;
}


PUSH RBP
MOV RBP,RSI
MOV RAX,RSI
PUSH RBX
SUB RSP,0x8
MOV RCX,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
SUB RBP,RCX
LEA RCX,[RCX + R8*0x4]
MOV RSI,RBP
SAR RSI,0x2
CMP RDX,RCX
JZ 0x002df438
SUB RDX,RAX
MOV RBX,RDI
SAR RDX,0x2
CALL 0x002deba0
MOV RAX,qword ptr [RBX]
ADD RSP,0x8
POP RBX
ADD RAX,RBP
POP RBP
RET
MOV qword ptr [RDI + 0x8],RSI
MOV dword ptr [RAX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
(translation_unit "undefined4 * FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = (long)param_2 - *param_1;\n  lVar2 = lVar1 >> 2;\n  if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }\n  param_1[1] = lVar2;\n  *param_2 = 0;\n  return param_2;\n}\n\n" (function_definition "undefined4 * FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = (long)param_2 - *param_1;\n  lVar2 = lVar1 >> 2;\n  if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }\n  param_1[1] = lVar2;\n  *param_2 = 0;\n  return param_2;\n}" type_identifier (pointer_declarator "* FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)" * (function_declarator "FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)" identifier (parameter_list "(long *param_1,undefined4 *param_2,long param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) )))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = (long)param_2 - *param_1;\n  lVar2 = lVar1 >> 2;\n  if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }\n  param_1[1] = lVar2;\n  *param_2 = 0;\n  return param_2;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar1 = (long)param_2 - *param_1;" (assignment_expression "lVar1 = (long)param_2 - *param_1" identifier = (binary_expression "(long)param_2 - *param_1" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (pointer_expression "*param_1" * identifier))) ;) (expression_statement "lVar2 = lVar1 >> 2;" (assignment_expression "lVar2 = lVar1 >> 2" identifier = (binary_expression "lVar1 >> 2" identifier >> number_literal)) ;) (if_statement "if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }" if (parenthesized_expression "(param_3 != *param_1 + param_1[1] * 4)" ( (binary_expression "param_3 != *param_1 + param_1[1] * 4" identifier != (binary_expression "*param_1 + param_1[1] * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "param_1[1] * 4" (subscript_expression "param_1[1]" identifier [ number_literal ]) * number_literal))) )) (compound_statement "{\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }" { (expression_statement "FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);" (call_expression "FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2)" identifier (argument_list "(param_1,lVar2,param_3 - (long)param_2 >> 2)" ( identifier , identifier , (binary_expression "param_3 - (long)param_2 >> 2" (binary_expression "param_3 - (long)param_2" identifier - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) >> number_literal) ))) ;) (return_statement "return (undefined4 *)(*param_1 + lVar1);" return (cast_expression "(undefined4 *)(*param_1 + lVar1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + lVar1)" ( (binary_expression "*param_1 + lVar1" (pointer_expression "*param_1" * identifier) + identifier) ))) ;) })) (expression_statement "param_1[1] = lVar2;" (assignment_expression "param_1[1] = lVar2" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "/* std::wstring::erase(__normal_iterator<wchar_t const*, std::wstring >, __normal_iterator<wchar_t\n   const*, std::wstring >) */\n\nundefined4 * __thiscall std::wstring::erase(wstring *this,undefined4 *param_2,long param_3)\n\n{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = (long)param_2 - *(long *)this;\n  uVar2 = lVar1 >> 2;\n  if (param_3 != *(long *)this + *(long *)(this + 8) * 4) {\n    _M_erase(this,uVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*(long *)this + lVar1);\n  }\n  *(ulong *)(this + 8) = uVar2;\n  *param_2 = 0;\n  return param_2;\n}\n\n" comment (ERROR "undefined4 * __thiscall std::wstring::erase(wstring *this,undefined4 *param_2,long param_3)" (binary_expression "undefined4 * __thiscall std::wstring::erase(wstring *this" (binary_expression "undefined4 * __thiscall" identifier * identifier) (ERROR "std::wstring::erase(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier (pointer_declarator "*param_2" * identifier) , identifier identifier )) (compound_statement "{\n  long lVar1;\n  ulong uVar2;\n  \n  lVar1 = (long)param_2 - *(long *)this;\n  uVar2 = lVar1 >> 2;\n  if (param_3 != *(long *)this + *(long *)(this + 8) * 4) {\n    _M_erase(this,uVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*(long *)this + lVar1);\n  }\n  *(ulong *)(this + 8) = uVar2;\n  *param_2 = 0;\n  return param_2;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "lVar1 = (long)param_2 - *(long *)this;" (assignment_expression "lVar1 = (long)param_2 - *(long *)this" identifier = (binary_expression "(long)param_2 - *(long *)this" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)))) ;) (expression_statement "uVar2 = lVar1 >> 2;" (assignment_expression "uVar2 = lVar1 >> 2" identifier = (binary_expression "lVar1 >> 2" identifier >> number_literal)) ;) (if_statement "if (param_3 != *(long *)this + *(long *)(this + 8) * 4) {\n    _M_erase(this,uVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*(long *)this + lVar1);\n  }" if (parenthesized_expression "(param_3 != *(long *)this + *(long *)(this + 8) * 4)" ( (binary_expression "param_3 != *(long *)this + *(long *)(this + 8) * 4" identifier != (binary_expression "*(long *)this + *(long *)(this + 8) * 4" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "*(long *)(this + 8) * 4" (pointer_expression "*(long *)(this + 8)" * (cast_expression "(long *)(this + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) * number_literal))) )) (compound_statement "{\n    _M_erase(this,uVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*(long *)this + lVar1);\n  }" { (expression_statement "_M_erase(this,uVar2,param_3 - (long)param_2 >> 2);" (call_expression "_M_erase(this,uVar2,param_3 - (long)param_2 >> 2)" identifier (argument_list "(this,uVar2,param_3 - (long)param_2 >> 2)" ( identifier , identifier , (binary_expression "param_3 - (long)param_2 >> 2" (binary_expression "param_3 - (long)param_2" identifier - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) >> number_literal) ))) ;) (return_statement "return (undefined4 *)(*(long *)this + lVar1);" return (cast_expression "(undefined4 *)(*(long *)this + lVar1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)this + lVar1)" ( (binary_expression "*(long *)this + lVar1" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + identifier) ))) ;) })) (expression_statement "*(ulong *)(this + 8) = uVar2;" (assignment_expression "*(ulong *)(this + 8) = uVar2" (pointer_expression "*(ulong *)(this + 8)" * (cast_expression "(ulong *)(this + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (return_statement "return param_2;" return identifier ;) }))
(translation_unit "undefined4 * FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = (long)param_2 - *param_1;\n  lVar2 = lVar1 >> 2;\n  if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }\n  param_1[1] = lVar2;\n  *param_2 = 0;\n  return param_2;\n}\n\n" (function_definition "undefined4 * FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = (long)param_2 - *param_1;\n  lVar2 = lVar1 >> 2;\n  if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }\n  param_1[1] = lVar2;\n  *param_2 = 0;\n  return param_2;\n}" type_identifier (pointer_declarator "* FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)" * (function_declarator "FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)" identifier (parameter_list "(long *param_1,undefined4 *param_2,long param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) )))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = (long)param_2 - *param_1;\n  lVar2 = lVar1 >> 2;\n  if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }\n  param_1[1] = lVar2;\n  *param_2 = 0;\n  return param_2;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar1 = (long)param_2 - *param_1;" (assignment_expression "lVar1 = (long)param_2 - *param_1" identifier = (binary_expression "(long)param_2 - *param_1" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (pointer_expression "*param_1" * identifier))) ;) (expression_statement "lVar2 = lVar1 >> 2;" (assignment_expression "lVar2 = lVar1 >> 2" identifier = (binary_expression "lVar1 >> 2" identifier >> number_literal)) ;) (if_statement "if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }" if (parenthesized_expression "(param_3 != *param_1 + param_1[1] * 4)" ( (binary_expression "param_3 != *param_1 + param_1[1] * 4" identifier != (binary_expression "*param_1 + param_1[1] * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "param_1[1] * 4" (subscript_expression "param_1[1]" identifier [ number_literal ]) * number_literal))) )) (compound_statement "{\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }" { (expression_statement "FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);" (call_expression "FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2)" identifier (argument_list "(param_1,lVar2,param_3 - (long)param_2 >> 2)" ( identifier , identifier , (binary_expression "param_3 - (long)param_2 >> 2" (binary_expression "param_3 - (long)param_2" identifier - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) >> number_literal) ))) ;) (return_statement "return (undefined4 *)(*param_1 + lVar1);" return (cast_expression "(undefined4 *)(*param_1 + lVar1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + lVar1)" ( (binary_expression "*param_1 + lVar1" (pointer_expression "*param_1" * identifier) + identifier) ))) ;) })) (expression_statement "param_1[1] = lVar2;" (assignment_expression "param_1[1] = lVar2" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) )))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) - (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (binary_expression (pointer_expression * IDENT) + (binary_expression (subscript_expression IDENT [ LIT ]) * LIT))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression (binary_expression IDENT - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) >> LIT) ))) ;) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + IDENT) ))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 * FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = (long)param_2 - *param_1;\n  lVar2 = lVar1 >> 2;\n  if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }\n  param_1[1] = lVar2;\n  *param_2 = 0;\n  return param_2;\n}" (type_identifier "undefined4") (pointer_declarator "* FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)" (* "*") (function_declarator "FUN_002df3f0(long *param_1,undefined4 *param_2,long param_3)" (identifier "FUN_002df3f0") (parameter_list "(long *param_1,undefined4 *param_2,long param_3)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) () ")")))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = (long)param_2 - *param_1;\n  lVar2 = lVar1 >> 2;\n  if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }\n  param_1[1] = lVar2;\n  *param_2 = 0;\n  return param_2;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (expression_statement "lVar1 = (long)param_2 - *param_1;" (assignment_expression "lVar1 = (long)param_2 - *param_1" (identifier "lVar1") (= "=") (binary_expression "(long)param_2 - *param_1" (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")) (- "-") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "lVar2 = lVar1 >> 2;" (assignment_expression "lVar2 = lVar1 >> 2" (identifier "lVar2") (= "=") (binary_expression "lVar1 >> 2" (identifier "lVar1") (>> ">>") (number_literal "2"))) (; ";")) (if_statement "if (param_3 != *param_1 + param_1[1] * 4) {\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }" (if "if") (parenthesized_expression "(param_3 != *param_1 + param_1[1] * 4)" (( "(") (binary_expression "param_3 != *param_1 + param_1[1] * 4" (identifier "param_3") (!= "!=") (binary_expression "*param_1 + param_1[1] * 4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (binary_expression "param_1[1] * 4" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (* "*") (number_literal "4")))) () ")")) (compound_statement "{\n    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);\n    return (undefined4 *)(*param_1 + lVar1);\n  }" ({ "{") (expression_statement "FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);" (call_expression "FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2)" (identifier "FUN_002deba0") (argument_list "(param_1,lVar2,param_3 - (long)param_2 >> 2)" (( "(") (identifier "param_1") (, ",") (identifier "lVar2") (, ",") (binary_expression "param_3 - (long)param_2 >> 2" (binary_expression "param_3 - (long)param_2" (identifier "param_3") (- "-") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2"))) (>> ">>") (number_literal "2")) () ")"))) (; ";")) (return_statement "return (undefined4 *)(*param_1 + lVar1);" (return "return") (cast_expression "(undefined4 *)(*param_1 + lVar1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + lVar1)" (( "(") (binary_expression "*param_1 + lVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (identifier "lVar1")) () ")"))) (; ";")) (} "}"))) (expression_statement "param_1[1] = lVar2;" (assignment_expression "param_1[1] = lVar2" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "lVar2")) (; ";")) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0")) (; ";")) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))

/* std::wstring::erase(__normal_iterator<wchar_t const*, std::wstring >, __normal_iterator<wchar_t
   const*, std::wstring >) */

type_2 * __thiscall std::wstring::erase(wstring *var_3,type_2 *param_2,long var_2)

{
  long var_1;
  type_1 uVar2;
  
  var_1 = (long)param_2 - *(long *)var_3;
  uVar2 = var_1 >> 2;
  if (var_2 != *(long *)var_3 + *(long *)(var_3 + 8) * 4) {
    var_4(var_3,uVar2,var_2 - (long)param_2 >> 2);
    return (type_2 *)(*(long *)var_3 + var_1);
  }
  *(type_1 *)(var_3 + 8) = uVar2;
  *param_2 = 0;
  return param_2;
}


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

undefined4 * MASKED(long *param_1,undefined4 *param_2,long param_3)

{
  long lVar1;
  long lVar2;
  
  lVar1 = (long)param_2 - *param_1;
  lVar2 = lVar1 >> 2;
  if (param_3 != *param_1 + param_1[1] * 4) {
    FUN_002deba0(param_1,lVar2,param_3 - (long)param_2 >> 2);
    return (undefined4 *)(*param_1 + lVar1);
  }
  param_1[1] = lVar2;
  *param_2 = 0;
  return param_2;
}

