
/* std::wstring::assign(wchar_t const*, unsigned int) */

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

{
  wchar_t *pwVar1;
  wstring *pwVar2;
  uint uVar3;
  undefined4 *puVar4;
  
  pwVar1 = *(wchar_t **)this;
  uVar3 = *(uint *)(pwVar1 + -6);
  if (0xffffffe < param_2) {
    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);
    return pwVar2;
  }
  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {
LAB_003d333c:
    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);
    return pwVar2;
  }
  SYNC(0);
  if (0 < *(int *)(pwVar1 + -2)) {
    uVar3 = *(uint *)(*(int *)this + -0xc);
    goto LAB_003d333c;
  }
  puVar4 = *(undefined4 **)this;
  uVar3 = (int)param_1 - (int)puVar4 >> 2;
  if (uVar3 < param_2) {
    if (uVar3 == 0) goto LAB_003d33d8;
    if (param_2 != 1) {
      if (param_2 != 0) {
        (*(code *)PTR_wmemmove_004c5c8c)();
        puVar4 = *(undefined4 **)this;
      }
      goto LAB_003d33d8;
    }
  }
  else if (param_2 != 1) {
    if (param_2 != 0) {
      (*(code *)PTR_wmemcpy_004c5c44)();
      puVar4 = *(undefined4 **)this;
    }
    goto LAB_003d33d8;
  }
  *puVar4 = *(undefined4 *)param_1;
LAB_003d33d8:
  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {
    return this;
  }
  puVar4[-1] = 0;
  puVar4[-3] = param_2;
  puVar4[param_2] = 0;
  return this;
}



/* std::wstring::assign(wchar_t const*, unsigned int) */

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

{
  wchar_t *pwVar1;
  wstring *pwVar2;
  uint uVar3;
  undefined4 *puVar4;
  
  pwVar1 = *(wchar_t **)this;
  uVar3 = *(uint *)(pwVar1 + -6);
  if (0xffffffe < param_2) {
    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);
    return pwVar2;
  }
  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {
LAB_003d333c:
    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);
    return pwVar2;
  }
  SYNC(0);
  if (0 < *(int *)(pwVar1 + -2)) {
    uVar3 = *(uint *)(*(int *)this + -0xc);
    goto LAB_003d333c;
  }
  puVar4 = *(undefined4 **)this;
  uVar3 = (int)param_1 - (int)puVar4 >> 2;
  if (uVar3 < param_2) {
    if (uVar3 == 0) goto LAB_003d33d8;
    if (param_2 != 1) {
      if (param_2 != 0) {
        (*(code *)PTR_wmemmove_004c5c8c)();
        puVar4 = *(undefined4 **)this;
      }
      goto LAB_003d33d8;
    }
  }
  else if (param_2 != 1) {
    if (param_2 != 0) {
      (*(code *)PTR_wmemcpy_004c5c44)();
      puVar4 = *(undefined4 **)this;
    }
    goto LAB_003d33d8;
  }
  *puVar4 = *(undefined4 *)param_1;
LAB_003d33d8:
  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {
    return this;
  }
  puVar4[-1] = 0;
  puVar4[-3] = param_2;
  puVar4[param_2] = 0;
  return this;
}


lui gp,0xf
addiu gp,gp,0x5f54
addu gp,gp,t9
addiu sp,sp,-0x30
lw v0,0x0(a0)
lui v1,0xfff
ori v1,v1,0xffff
sw gp,0x18(sp)
sltu v1,a2,v1
sw s0,0x24(sp)
or s0,a0,zero
sw ra,0x2c(sp)
sw s1,0x28(sp)
beq v1,zero,0x003d3434
_lw a0,-0xc(v0)
sltu v1,a1,v0
or s1,a2,zero
beq v1,zero,0x003d3364
_or a3,a1,zero
lw t9,-0x3a1c(gp)
or a1,zero,zero
or a2,a0,zero
sw s1,0x10(sp)
bal 0x003d3234
_or a0,s0,zero
lw ra,0x2c(sp)
lw s1,0x28(sp)
lw s0,0x24(sp)
jr ra
_addiu sp,sp,0x30
sll v1,a0,0x2
addu v1,v0,v1
sltu v1,v1,a1
bne v1,zero,0x003d333c
_lw t9,-0x3a1c(gp)
lw v0,-0x4(v0)
sync 0x0
blez v0,0x003d3394
_nop
lw v0,0x0(s0)
b 0x003d3338
_lw a0,-0xc(v0)
lw a0,0x0(s0)
subu v0,a1,a0
sra v0,v0,0x2
sltu v1,v0,a2
beq v1,zero,0x003d3400
_nop
beq v0,zero,0x003d33d8
_nop
li v0,0x1
beq a2,v0,0x003d3428
_nop
beq a2,zero,0x003d33d8
_lw t9,-0x35b4(gp)
jalr t9
_nop
lw gp,0x18(sp)
lw a0,0x0(s0)
lw a1,-0x7f04(gp)
addiu v1,a0,-0xc
beq v1,a1,0x003d3350
_or v0,s0,zero
sll v1,s1,0x2
sw zero,-0x4(a0)
sw s1,-0xc(a0)
addu a0,a0,v1
b 0x003d3350
_sw zero,0x0(a0)
li v0,0x1
beq a2,v0,0x003d3428
_nop
beq a2,zero,0x003d33d8
_lw t9,-0x35fc(gp)
jalr t9
_nop
lw gp,0x18(sp)
b 0x003d33d8
_lw a0,0x0(s0)
lw v0,0x0(a3)
b 0x003d33d8
_sw v0,0x0(a0)
lw a0,-0x7f64(gp)
lw t9,-0x73cc(gp)
jalr t9
_addiu a0,a0,-0x3ab8
(translation_unit "/* std::wstring::assign(wchar_t const*, unsigned int) */\n\nwstring * __thiscall std::wstring::assign(wstring *this,wchar_t *param_1,uint param_2)\n\n{\n  wchar_t *pwVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  pwVar1 = *(wchar_t **)this;\n  uVar3 = *(uint *)(pwVar1 + -6);\n  if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }\n  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }\n  SYNC(0);\n  if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }\n  puVar4 = *(undefined4 **)this;\n  uVar3 = (int)param_1 - (int)puVar4 >> 2;\n  if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }\n  *puVar4 = *(undefined4 *)param_1;\nLAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }\n  puVar4[-1] = 0;\n  puVar4[-3] = param_2;\n  puVar4[param_2] = 0;\n  return this;\n}\n\n" comment (ERROR "wstring * __thiscall std::wstring::assign(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::assign(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::assign(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  wchar_t *pwVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  pwVar1 = *(wchar_t **)this;\n  uVar3 = *(uint *)(pwVar1 + -6);\n  if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }\n  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }\n  SYNC(0);\n  if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }\n  puVar4 = *(undefined4 **)this;\n  uVar3 = (int)param_1 - (int)puVar4 >> 2;\n  if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }\n  *puVar4 = *(undefined4 *)param_1;\nLAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }\n  puVar4[-1] = 0;\n  puVar4[-3] = param_2;\n  puVar4[param_2] = 0;\n  return this;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wstring *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "pwVar1 = *(wchar_t **)this;" (assignment_expression "pwVar1 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = *(uint *)(pwVar1 + -6);" (assignment_expression "uVar3 = *(uint *)(pwVar1 + -6)" identifier = (pointer_expression "*(uint *)(pwVar1 + -6)" * (cast_expression "(uint *)(pwVar1 + -6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar1 + -6)" ( (binary_expression "pwVar1 + -6" identifier + number_literal) ))))) ;) (if_statement "if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }" if (parenthesized_expression "(0xffffffe < param_2)" ( (binary_expression "0xffffffe < param_2" number_literal < identifier) )) (compound_statement "{\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }" { (expression_statement "pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);" (assignment_expression "pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" identifier = (cast_expression "(wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" (parenthesized_expression "(*(code *)PTR___throw_length_error_004c1e74)" ( (pointer_expression "*(code *)PTR___throw_length_error_004c1e74" * (cast_expression "(code *)PTR___throw_length_error_004c1e74" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_UINT_004c12dc + -0x3ab8)" ( (binary_expression "PTR_UINT_004c12dc + -0x3ab8" identifier + number_literal) ))))) ;) (return_statement "return pwVar2;" return identifier ;) })) (if_statement "if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }" if (parenthesized_expression "((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1))" ( (binary_expression "(param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)" (parenthesized_expression "(param_1 < pwVar1)" ( (binary_expression "param_1 < pwVar1" identifier < identifier) )) || (parenthesized_expression "(pwVar1 + uVar3 * 2 < param_1)" ( (binary_expression "pwVar1 + uVar3 * 2 < param_1" (binary_expression "pwVar1 + uVar3 * 2" identifier + (binary_expression "uVar3 * 2" identifier * number_literal)) < identifier) ))) )) (compound_statement "{\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }" { (labeled_statement "LAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);" statement_identifier : (expression_statement "pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);" (assignment_expression "pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2)" identifier = (cast_expression "(wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_replace_safe(this,0,uVar3,param_1,param_2)" identifier (argument_list "(this,0,uVar3,param_1,param_2)" ( identifier , number_literal , identifier , identifier , identifier ))))) ;)) (return_statement "return pwVar2;" return identifier ;) })) (expression_statement "SYNC(0);" (call_expression "SYNC(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (if_statement "if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }" if (parenthesized_expression "(0 < *(int *)(pwVar1 + -2))" ( (binary_expression "0 < *(int *)(pwVar1 + -2)" number_literal < (pointer_expression "*(int *)(pwVar1 + -2)" * (cast_expression "(int *)(pwVar1 + -2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar1 + -2)" ( (binary_expression "pwVar1 + -2" identifier + number_literal) ))))) )) (compound_statement "{\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }" { (expression_statement "uVar3 = *(uint *)(*(int *)this + -0xc);" (assignment_expression "uVar3 = *(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) ))))) ;) (goto_statement "goto LAB_003d333c;" goto statement_identifier ;) })) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" identifier = (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = (int)param_1 - (int)puVar4 >> 2;" (assignment_expression "uVar3 = (int)param_1 - (int)puVar4 >> 2" identifier = (binary_expression "(int)param_1 - (int)puVar4 >> 2" (binary_expression "(int)param_1 - (int)puVar4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (if_statement "if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" if (parenthesized_expression "(uVar3 < param_2)" ( (binary_expression "uVar3 < param_2" identifier < identifier) )) (compound_statement "{\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }" { (if_statement "if (uVar3 == 0) goto LAB_003d33d8;" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_003d33d8;" goto statement_identifier ;)) (if_statement "if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }" { (if_statement "if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }" { (expression_statement "(*(code *)PTR_wmemmove_004c5c8c)();" (call_expression "(*(code *)PTR_wmemmove_004c5c8c)()" (parenthesized_expression "(*(code *)PTR_wmemmove_004c5c8c)" ( (pointer_expression "*(code *)PTR_wmemmove_004c5c8c" * (cast_expression "(code *)PTR_wmemmove_004c5c8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" identifier = (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (goto_statement "goto LAB_003d33d8;" goto statement_identifier ;) })) }) (else_clause "else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" else (if_statement "if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" { (if_statement "if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)();" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)()" (parenthesized_expression "(*(code *)PTR_wmemcpy_004c5c44)" ( (pointer_expression "*(code *)PTR_wmemcpy_004c5c44" * (cast_expression "(code *)PTR_wmemcpy_004c5c44" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" identifier = (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (goto_statement "goto LAB_003d33d8;" goto statement_identifier ;) })))) (expression_statement "*puVar4 = *(undefined4 *)param_1;" (assignment_expression "*puVar4 = *(undefined4 *)param_1" (pointer_expression "*puVar4" * identifier) = (pointer_expression "*(undefined4 *)param_1" * (cast_expression "(undefined4 *)param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (labeled_statement "LAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }" statement_identifier : (if_statement "if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }" if (parenthesized_expression "(puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c)" ( (binary_expression "puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c" (binary_expression "puVar4 + -3" identifier + number_literal) == (cast_expression "(undefined4 *)PTR__S_empty_rep_storage_004c133c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return this;\n  }" { (return_statement "return this;" return identifier ;) }))) (expression_statement "puVar4[-1] = 0;" (assignment_expression "puVar4[-1] = 0" (subscript_expression "puVar4[-1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[-3] = param_2;" (assignment_expression "puVar4[-3] = param_2" (subscript_expression "puVar4[-3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar4[param_2] = 0;" (assignment_expression "puVar4[param_2] = 0" (subscript_expression "puVar4[param_2]" identifier [ identifier ]) = number_literal) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit "/* std::wstring::assign(wchar_t const*, unsigned int) */\n\nwstring * __thiscall std::wstring::assign(wstring *this,wchar_t *param_1,uint param_2)\n\n{\n  wchar_t *pwVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  pwVar1 = *(wchar_t **)this;\n  uVar3 = *(uint *)(pwVar1 + -6);\n  if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }\n  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }\n  SYNC(0);\n  if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }\n  puVar4 = *(undefined4 **)this;\n  uVar3 = (int)param_1 - (int)puVar4 >> 2;\n  if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }\n  *puVar4 = *(undefined4 *)param_1;\nLAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }\n  puVar4[-1] = 0;\n  puVar4[-3] = param_2;\n  puVar4[param_2] = 0;\n  return this;\n}\n\n" comment (ERROR "wstring * __thiscall std::wstring::assign(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::assign(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::assign(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  wchar_t *pwVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  pwVar1 = *(wchar_t **)this;\n  uVar3 = *(uint *)(pwVar1 + -6);\n  if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }\n  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }\n  SYNC(0);\n  if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }\n  puVar4 = *(undefined4 **)this;\n  uVar3 = (int)param_1 - (int)puVar4 >> 2;\n  if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }\n  *puVar4 = *(undefined4 *)param_1;\nLAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }\n  puVar4[-1] = 0;\n  puVar4[-3] = param_2;\n  puVar4[param_2] = 0;\n  return this;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wstring *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "pwVar1 = *(wchar_t **)this;" (assignment_expression "pwVar1 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = *(uint *)(pwVar1 + -6);" (assignment_expression "uVar3 = *(uint *)(pwVar1 + -6)" identifier = (pointer_expression "*(uint *)(pwVar1 + -6)" * (cast_expression "(uint *)(pwVar1 + -6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar1 + -6)" ( (binary_expression "pwVar1 + -6" identifier + number_literal) ))))) ;) (if_statement "if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }" if (parenthesized_expression "(0xffffffe < param_2)" ( (binary_expression "0xffffffe < param_2" number_literal < identifier) )) (compound_statement "{\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }" { (expression_statement "pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);" (assignment_expression "pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" identifier = (cast_expression "(wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" (parenthesized_expression "(*(code *)PTR___throw_length_error_004c1e74)" ( (pointer_expression "*(code *)PTR___throw_length_error_004c1e74" * (cast_expression "(code *)PTR___throw_length_error_004c1e74" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_UINT_004c12dc + -0x3ab8)" ( (binary_expression "PTR_UINT_004c12dc + -0x3ab8" identifier + number_literal) ))))) ;) (return_statement "return pwVar2;" return identifier ;) })) (if_statement "if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }" if (parenthesized_expression "((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1))" ( (binary_expression "(param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)" (parenthesized_expression "(param_1 < pwVar1)" ( (binary_expression "param_1 < pwVar1" identifier < identifier) )) || (parenthesized_expression "(pwVar1 + uVar3 * 2 < param_1)" ( (binary_expression "pwVar1 + uVar3 * 2 < param_1" (binary_expression "pwVar1 + uVar3 * 2" identifier + (binary_expression "uVar3 * 2" identifier * number_literal)) < identifier) ))) )) (compound_statement "{\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }" { (labeled_statement "LAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);" statement_identifier : (expression_statement "pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);" (assignment_expression "pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2)" identifier = (cast_expression "(wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_replace_safe(this,0,uVar3,param_1,param_2)" identifier (argument_list "(this,0,uVar3,param_1,param_2)" ( identifier , number_literal , identifier , identifier , identifier ))))) ;)) (return_statement "return pwVar2;" return identifier ;) })) (expression_statement "SYNC(0);" (call_expression "SYNC(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (if_statement "if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }" if (parenthesized_expression "(0 < *(int *)(pwVar1 + -2))" ( (binary_expression "0 < *(int *)(pwVar1 + -2)" number_literal < (pointer_expression "*(int *)(pwVar1 + -2)" * (cast_expression "(int *)(pwVar1 + -2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar1 + -2)" ( (binary_expression "pwVar1 + -2" identifier + number_literal) ))))) )) (compound_statement "{\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }" { (expression_statement "uVar3 = *(uint *)(*(int *)this + -0xc);" (assignment_expression "uVar3 = *(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) ))))) ;) (goto_statement "goto LAB_003d333c;" goto statement_identifier ;) })) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" identifier = (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = (int)param_1 - (int)puVar4 >> 2;" (assignment_expression "uVar3 = (int)param_1 - (int)puVar4 >> 2" identifier = (binary_expression "(int)param_1 - (int)puVar4 >> 2" (binary_expression "(int)param_1 - (int)puVar4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (if_statement "if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" if (parenthesized_expression "(uVar3 < param_2)" ( (binary_expression "uVar3 < param_2" identifier < identifier) )) (compound_statement "{\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }" { (if_statement "if (uVar3 == 0) goto LAB_003d33d8;" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_003d33d8;" goto statement_identifier ;)) (if_statement "if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }" { (if_statement "if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }" { (expression_statement "(*(code *)PTR_wmemmove_004c5c8c)();" (call_expression "(*(code *)PTR_wmemmove_004c5c8c)()" (parenthesized_expression "(*(code *)PTR_wmemmove_004c5c8c)" ( (pointer_expression "*(code *)PTR_wmemmove_004c5c8c" * (cast_expression "(code *)PTR_wmemmove_004c5c8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" identifier = (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (goto_statement "goto LAB_003d33d8;" goto statement_identifier ;) })) }) (else_clause "else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" else (if_statement "if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" { (if_statement "if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)();" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)()" (parenthesized_expression "(*(code *)PTR_wmemcpy_004c5c44)" ( (pointer_expression "*(code *)PTR_wmemcpy_004c5c44" * (cast_expression "(code *)PTR_wmemcpy_004c5c44" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" identifier = (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (goto_statement "goto LAB_003d33d8;" goto statement_identifier ;) })))) (expression_statement "*puVar4 = *(undefined4 *)param_1;" (assignment_expression "*puVar4 = *(undefined4 *)param_1" (pointer_expression "*puVar4" * identifier) = (pointer_expression "*(undefined4 *)param_1" * (cast_expression "(undefined4 *)param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (labeled_statement "LAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }" statement_identifier : (if_statement "if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }" if (parenthesized_expression "(puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c)" ( (binary_expression "puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c" (binary_expression "puVar4 + -3" identifier + number_literal) == (cast_expression "(undefined4 *)PTR__S_empty_rep_storage_004c133c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return this;\n  }" { (return_statement "return this;" return identifier ;) }))) (expression_statement "puVar4[-1] = 0;" (assignment_expression "puVar4[-1] = 0" (subscript_expression "puVar4[-1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[-3] = param_2;" (assignment_expression "puVar4[-3] = param_2" (subscript_expression "puVar4[-3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar4[param_2] = 0;" (assignment_expression "puVar4[param_2] = 0" (subscript_expression "puVar4[param_2]" identifier [ identifier ]) = number_literal) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit "wstring * __thiscall std::wstring::assign(wstring *this,wchar_t *param_1,uint param_2)\n\n{\n  wchar_t *pwVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  pwVar1 = *(wchar_t **)this;\n  uVar3 = *(uint *)(pwVar1 + -6);\n  if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }\n  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }\n  SYNC(0);\n  if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }\n  puVar4 = *(undefined4 **)this;\n  uVar3 = (int)param_1 - (int)puVar4 >> 2;\n  if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }\n  *puVar4 = *(undefined4 *)param_1;\nLAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }\n  puVar4[-1] = 0;\n  puVar4[-3] = param_2;\n  puVar4[param_2] = 0;\n  return this;\n}\n\n" (ERROR "wstring * __thiscall std::wstring::assign(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::assign(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::assign(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  wchar_t *pwVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  pwVar1 = *(wchar_t **)this;\n  uVar3 = *(uint *)(pwVar1 + -6);\n  if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }\n  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }\n  SYNC(0);\n  if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }\n  puVar4 = *(undefined4 **)this;\n  uVar3 = (int)param_1 - (int)puVar4 >> 2;\n  if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }\n  *puVar4 = *(undefined4 *)param_1;\nLAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }\n  puVar4[-1] = 0;\n  puVar4[-3] = param_2;\n  puVar4[param_2] = 0;\n  return this;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wstring *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "pwVar1 = *(wchar_t **)this;" (assignment_expression "pwVar1 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = *(uint *)(pwVar1 + -6);" (assignment_expression "uVar3 = *(uint *)(pwVar1 + -6)" identifier = (pointer_expression "*(uint *)(pwVar1 + -6)" * (cast_expression "(uint *)(pwVar1 + -6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar1 + -6)" ( (binary_expression "pwVar1 + -6" identifier + number_literal) ))))) ;) (if_statement "if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }" if (parenthesized_expression "(0xffffffe < param_2)" ( (binary_expression "0xffffffe < param_2" number_literal < identifier) )) (compound_statement "{\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }" { (expression_statement "pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);" (assignment_expression "pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" identifier = (cast_expression "(wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" (parenthesized_expression "(*(code *)PTR___throw_length_error_004c1e74)" ( (pointer_expression "*(code *)PTR___throw_length_error_004c1e74" * (cast_expression "(code *)PTR___throw_length_error_004c1e74" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_UINT_004c12dc + -0x3ab8)" ( (binary_expression "PTR_UINT_004c12dc + -0x3ab8" identifier + number_literal) ))))) ;) (return_statement "return pwVar2;" return identifier ;) })) (if_statement "if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }" if (parenthesized_expression "((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1))" ( (binary_expression "(param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)" (parenthesized_expression "(param_1 < pwVar1)" ( (binary_expression "param_1 < pwVar1" identifier < identifier) )) || (parenthesized_expression "(pwVar1 + uVar3 * 2 < param_1)" ( (binary_expression "pwVar1 + uVar3 * 2 < param_1" (binary_expression "pwVar1 + uVar3 * 2" identifier + (binary_expression "uVar3 * 2" identifier * number_literal)) < identifier) ))) )) (compound_statement "{\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }" { (labeled_statement "LAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);" statement_identifier : (expression_statement "pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);" (assignment_expression "pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2)" identifier = (cast_expression "(wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_replace_safe(this,0,uVar3,param_1,param_2)" identifier (argument_list "(this,0,uVar3,param_1,param_2)" ( identifier , number_literal , identifier , identifier , identifier ))))) ;)) (return_statement "return pwVar2;" return identifier ;) })) (expression_statement "SYNC(0);" (call_expression "SYNC(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (if_statement "if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }" if (parenthesized_expression "(0 < *(int *)(pwVar1 + -2))" ( (binary_expression "0 < *(int *)(pwVar1 + -2)" number_literal < (pointer_expression "*(int *)(pwVar1 + -2)" * (cast_expression "(int *)(pwVar1 + -2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar1 + -2)" ( (binary_expression "pwVar1 + -2" identifier + number_literal) ))))) )) (compound_statement "{\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }" { (expression_statement "uVar3 = *(uint *)(*(int *)this + -0xc);" (assignment_expression "uVar3 = *(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) ))))) ;) (goto_statement "goto LAB_003d333c;" goto statement_identifier ;) })) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" identifier = (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = (int)param_1 - (int)puVar4 >> 2;" (assignment_expression "uVar3 = (int)param_1 - (int)puVar4 >> 2" identifier = (binary_expression "(int)param_1 - (int)puVar4 >> 2" (binary_expression "(int)param_1 - (int)puVar4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (if_statement "if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" if (parenthesized_expression "(uVar3 < param_2)" ( (binary_expression "uVar3 < param_2" identifier < identifier) )) (compound_statement "{\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }" { (if_statement "if (uVar3 == 0) goto LAB_003d33d8;" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_003d33d8;" goto statement_identifier ;)) (if_statement "if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }" { (if_statement "if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }" { (expression_statement "(*(code *)PTR_wmemmove_004c5c8c)();" (call_expression "(*(code *)PTR_wmemmove_004c5c8c)()" (parenthesized_expression "(*(code *)PTR_wmemmove_004c5c8c)" ( (pointer_expression "*(code *)PTR_wmemmove_004c5c8c" * (cast_expression "(code *)PTR_wmemmove_004c5c8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" identifier = (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (goto_statement "goto LAB_003d33d8;" goto statement_identifier ;) })) }) (else_clause "else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" else (if_statement "if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" { (if_statement "if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)();" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)()" (parenthesized_expression "(*(code *)PTR_wmemcpy_004c5c44)" ( (pointer_expression "*(code *)PTR_wmemcpy_004c5c44" * (cast_expression "(code *)PTR_wmemcpy_004c5c44" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" identifier = (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (goto_statement "goto LAB_003d33d8;" goto statement_identifier ;) })))) (expression_statement "*puVar4 = *(undefined4 *)param_1;" (assignment_expression "*puVar4 = *(undefined4 *)param_1" (pointer_expression "*puVar4" * identifier) = (pointer_expression "*(undefined4 *)param_1" * (cast_expression "(undefined4 *)param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (labeled_statement "LAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }" statement_identifier : (if_statement "if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }" if (parenthesized_expression "(puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c)" ( (binary_expression "puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c" (binary_expression "puVar4 + -3" identifier + number_literal) == (cast_expression "(undefined4 *)PTR__S_empty_rep_storage_004c133c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return this;\n  }" { (return_statement "return this;" return identifier ;) }))) (expression_statement "puVar4[-1] = 0;" (assignment_expression "puVar4[-1] = 0" (subscript_expression "puVar4[-1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[-3] = param_2;" (assignment_expression "puVar4[-3] = param_2" (subscript_expression "puVar4[-3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar4[param_2] = 0;" (assignment_expression "puVar4[param_2] = 0" (subscript_expression "puVar4[param_2]" identifier [ identifier ]) = number_literal) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit (ERROR (binary_expression (binary_expression IDENT * IDENT) (ERROR IDENT : : IDENT : : IDENT ( IDENT) * IDENT) , TYPE (pointer_declarator * IDENT) , IDENT IDENT )) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (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 LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) || (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) < IDENT) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , IDENT , IDENT ))))) ;)) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_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) ))))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (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 * (abstract_pointer_declarator *))) ) IDENT))) ;) })) (goto_statement goto statement_identifier ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (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 * (abstract_pointer_declarator *))) ) IDENT))) ;) })) (goto_statement goto statement_identifier ;) })))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = LIT) ;) (return_statement return IDENT ;) }))
(ERROR "wstring * __thiscall std::wstring::assign(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::assign(wstring *this" (binary_expression "wstring * __thiscall" (identifier "wstring") (* "*") (identifier "__thiscall")) (ERROR "std::wstring::assign(wstring" (identifier "std") (: ":") (: ":") (identifier "wstring") (: ":") (: ":") (identifier "assign") (( "(") (identifier "wstring")) (* "*") (identifier "this")) (, ",") (type_identifier "wchar_t") (pointer_declarator "*param_1" (* "*") (identifier "param_1")) (, ",") (identifier "uint") (identifier "param_2") () ")")) (compound_statement "{\n  wchar_t *pwVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  undefined4 *puVar4;\n  \n  pwVar1 = *(wchar_t **)this;\n  uVar3 = *(uint *)(pwVar1 + -6);\n  if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }\n  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }\n  SYNC(0);\n  if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }\n  puVar4 = *(undefined4 **)this;\n  uVar3 = (int)param_1 - (int)puVar4 >> 2;\n  if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }\n  *puVar4 = *(undefined4 *)param_1;\nLAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }\n  puVar4[-1] = 0;\n  puVar4[-3] = param_2;\n  puVar4[param_2] = 0;\n  return this;\n}" ({ "{") (declaration "wchar_t *pwVar1;" (type_identifier "wchar_t") (pointer_declarator "*pwVar1" (* "*") (identifier "pwVar1")) (; ";")) (declaration "wstring *pwVar2;" (type_identifier "wstring") (pointer_declarator "*pwVar2" (* "*") (identifier "pwVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (expression_statement "pwVar1 = *(wchar_t **)this;" (assignment_expression "pwVar1 = *(wchar_t **)this" (identifier "pwVar1") (= "=") (pointer_expression "*(wchar_t **)this" (* "*") (cast_expression "(wchar_t **)this" (( "(") (type_descriptor "wchar_t **" (type_identifier "wchar_t") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (expression_statement "uVar3 = *(uint *)(pwVar1 + -6);" (assignment_expression "uVar3 = *(uint *)(pwVar1 + -6)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(pwVar1 + -6)" (* "*") (cast_expression "(uint *)(pwVar1 + -6)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar1 + -6)" (( "(") (binary_expression "pwVar1 + -6" (identifier "pwVar1") (+ "+") (number_literal "-6")) () ")"))))) (; ";")) (if_statement "if (0xffffffe < param_2) {\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }" (if "if") (parenthesized_expression "(0xffffffe < param_2)" (( "(") (binary_expression "0xffffffe < param_2" (number_literal "0xffffffe") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);\n    return pwVar2;\n  }" ({ "{") (expression_statement "pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);" (assignment_expression "pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" (identifier "pwVar2") (= "=") (cast_expression "(wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" (( "(") (type_descriptor "wstring *" (type_identifier "wstring") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8)" (parenthesized_expression "(*(code *)PTR___throw_length_error_004c1e74)" (( "(") (pointer_expression "*(code *)PTR___throw_length_error_004c1e74" (* "*") (cast_expression "(code *)PTR___throw_length_error_004c1e74" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___throw_length_error_004c1e74"))) () ")")) (argument_list "(PTR_UINT_004c12dc + -0x3ab8)" (( "(") (binary_expression "PTR_UINT_004c12dc + -0x3ab8" (identifier "PTR_UINT_004c12dc") (+ "+") (number_literal "-0x3ab8")) () ")"))))) (; ";")) (return_statement "return pwVar2;" (return "return") (identifier "pwVar2") (; ";")) (} "}"))) (if_statement "if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }" (if "if") (parenthesized_expression "((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1))" (( "(") (binary_expression "(param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)" (parenthesized_expression "(param_1 < pwVar1)" (( "(") (binary_expression "param_1 < pwVar1" (identifier "param_1") (< "<") (identifier "pwVar1")) () ")")) (|| "||") (parenthesized_expression "(pwVar1 + uVar3 * 2 < param_1)" (( "(") (binary_expression "pwVar1 + uVar3 * 2 < param_1" (binary_expression "pwVar1 + uVar3 * 2" (identifier "pwVar1") (+ "+") (binary_expression "uVar3 * 2" (identifier "uVar3") (* "*") (number_literal "2"))) (< "<") (identifier "param_1")) () ")"))) () ")")) (compound_statement "{\nLAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);\n    return pwVar2;\n  }" ({ "{") (labeled_statement "LAB_003d333c:\n    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);" (statement_identifier "LAB_003d333c") (: ":") (expression_statement "pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);" (assignment_expression "pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2)" (identifier "pwVar2") (= "=") (cast_expression "(wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2)" (( "(") (type_descriptor "wstring *" (type_identifier "wstring") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "_M_replace_safe(this,0,uVar3,param_1,param_2)" (identifier "_M_replace_safe") (argument_list "(this,0,uVar3,param_1,param_2)" (( "(") (identifier "this") (, ",") (number_literal "0") (, ",") (identifier "uVar3") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")"))))) (; ";"))) (return_statement "return pwVar2;" (return "return") (identifier "pwVar2") (; ";")) (} "}"))) (expression_statement "SYNC(0);" (call_expression "SYNC(0)" (identifier "SYNC") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (if_statement "if (0 < *(int *)(pwVar1 + -2)) {\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }" (if "if") (parenthesized_expression "(0 < *(int *)(pwVar1 + -2))" (( "(") (binary_expression "0 < *(int *)(pwVar1 + -2)" (number_literal "0") (< "<") (pointer_expression "*(int *)(pwVar1 + -2)" (* "*") (cast_expression "(int *)(pwVar1 + -2)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar1 + -2)" (( "(") (binary_expression "pwVar1 + -2" (identifier "pwVar1") (+ "+") (number_literal "-2")) () ")"))))) () ")")) (compound_statement "{\n    uVar3 = *(uint *)(*(int *)this + -0xc);\n    goto LAB_003d333c;\n  }" ({ "{") (expression_statement "uVar3 = *(uint *)(*(int *)this + -0xc);" (assignment_expression "uVar3 = *(uint *)(*(int *)this + -0xc)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(*(int *)this + -0xc)" (* "*") (cast_expression "(uint *)(*(int *)this + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (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 "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this"))) (+ "+") (number_literal "-0xc")) () ")"))))) (; ";")) (goto_statement "goto LAB_003d333c;" (goto "goto") (statement_identifier "LAB_003d333c") (; ";")) (} "}"))) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" (identifier "puVar4") (= "=") (pointer_expression "*(undefined4 **)this" (* "*") (cast_expression "(undefined4 **)this" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (expression_statement "uVar3 = (int)param_1 - (int)puVar4 >> 2;" (assignment_expression "uVar3 = (int)param_1 - (int)puVar4 >> 2" (identifier "uVar3") (= "=") (binary_expression "(int)param_1 - (int)puVar4 >> 2" (binary_expression "(int)param_1 - (int)puVar4" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (- "-") (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4"))) (>> ">>") (number_literal "2"))) (; ";")) (if_statement "if (uVar3 < param_2) {\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" (if "if") (parenthesized_expression "(uVar3 < param_2)" (( "(") (binary_expression "uVar3 < param_2" (identifier "uVar3") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    if (uVar3 == 0) goto LAB_003d33d8;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }\n  }" ({ "{") (if_statement "if (uVar3 == 0) goto LAB_003d33d8;" (if "if") (parenthesized_expression "(uVar3 == 0)" (( "(") (binary_expression "uVar3 == 0" (identifier "uVar3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_003d33d8;" (goto "goto") (statement_identifier "LAB_003d33d8") (; ";"))) (if_statement "if (param_2 != 1) {\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }" (if "if") (parenthesized_expression "(param_2 != 1)" (( "(") (binary_expression "param_2 != 1" (identifier "param_2") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n      if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }\n      goto LAB_003d33d8;\n    }" ({ "{") (if_statement "if (param_2 != 0) {\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        (*(code *)PTR_wmemmove_004c5c8c)();\n        puVar4 = *(undefined4 **)this;\n      }" ({ "{") (expression_statement "(*(code *)PTR_wmemmove_004c5c8c)();" (call_expression "(*(code *)PTR_wmemmove_004c5c8c)()" (parenthesized_expression "(*(code *)PTR_wmemmove_004c5c8c)" (( "(") (pointer_expression "*(code *)PTR_wmemmove_004c5c8c" (* "*") (cast_expression "(code *)PTR_wmemmove_004c5c8c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wmemmove_004c5c8c"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" (identifier "puVar4") (= "=") (pointer_expression "*(undefined4 **)this" (* "*") (cast_expression "(undefined4 **)this" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (} "}"))) (goto_statement "goto LAB_003d33d8;" (goto "goto") (statement_identifier "LAB_003d33d8") (; ";")) (} "}"))) (} "}")) (else_clause "else if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" (else "else") (if_statement "if (param_2 != 1) {\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" (if "if") (parenthesized_expression "(param_2 != 1)" (( "(") (binary_expression "param_2 != 1" (identifier "param_2") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n    if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }\n    goto LAB_003d33d8;\n  }" ({ "{") (if_statement "if (param_2 != 0) {\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (*(code *)PTR_wmemcpy_004c5c44)();\n      puVar4 = *(undefined4 **)this;\n    }" ({ "{") (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)();" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)()" (parenthesized_expression "(*(code *)PTR_wmemcpy_004c5c44)" (( "(") (pointer_expression "*(code *)PTR_wmemcpy_004c5c44" (* "*") (cast_expression "(code *)PTR_wmemcpy_004c5c44" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wmemcpy_004c5c44"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "puVar4 = *(undefined4 **)this;" (assignment_expression "puVar4 = *(undefined4 **)this" (identifier "puVar4") (= "=") (pointer_expression "*(undefined4 **)this" (* "*") (cast_expression "(undefined4 **)this" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (} "}"))) (goto_statement "goto LAB_003d33d8;" (goto "goto") (statement_identifier "LAB_003d33d8") (; ";")) (} "}"))))) (expression_statement "*puVar4 = *(undefined4 *)param_1;" (assignment_expression "*puVar4 = *(undefined4 *)param_1" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (pointer_expression "*(undefined4 *)param_1" (* "*") (cast_expression "(undefined4 *)param_1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")))) (; ";")) (labeled_statement "LAB_003d33d8:\n  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }" (statement_identifier "LAB_003d33d8") (: ":") (if_statement "if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {\n    return this;\n  }" (if "if") (parenthesized_expression "(puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c)" (( "(") (binary_expression "puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c" (binary_expression "puVar4 + -3" (identifier "puVar4") (+ "+") (number_literal "-3")) (== "==") (cast_expression "(undefined4 *)PTR__S_empty_rep_storage_004c133c" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR__S_empty_rep_storage_004c133c"))) () ")")) (compound_statement "{\n    return this;\n  }" ({ "{") (return_statement "return this;" (return "return") (identifier "this") (; ";")) (} "}")))) (expression_statement "puVar4[-1] = 0;" (assignment_expression "puVar4[-1] = 0" (subscript_expression "puVar4[-1]" (identifier "puVar4") ([ "[") (number_literal "-1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4[-3] = param_2;" (assignment_expression "puVar4[-3] = param_2" (subscript_expression "puVar4[-3]" (identifier "puVar4") ([ "[") (number_literal "-3") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "puVar4[param_2] = 0;" (assignment_expression "puVar4[param_2] = 0" (subscript_expression "puVar4[param_2]" (identifier "puVar4") ([ "[") (identifier "param_2") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return this;" (return "return") (identifier "this") (; ";")) (} "}"))
(translation_unit (ERROR (binary_expression left: (binary_expression left: (identifier) right: (identifier)) (ERROR (identifier) (identifier) (identifier) (identifier)) right: (identifier)) type: (type_identifier) (pointer_declarator declarator: (identifier)) (identifier) (identifier)) (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator 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: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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 (binary_expression left: (identifier) right: (number_literal))))))) (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (identifier))))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier) (identifier) (identifier))))))) (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))))) (goto_statement label: (statement_identifier))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (number_literal))) (return_statement (identifier))))

/* std::wstring::MASKED(wchar_t const*, unsigned int) */

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

{
  wchar_t *pwVar1;
  wstring *pwVar2;
  uint uVar3;
  undefined4 *puVar4;
  
  pwVar1 = *(wchar_t **)this;
  uVar3 = *(uint *)(pwVar1 + -6);
  if (0xffffffe < param_2) {
    pwVar2 = (wstring *)(*(code *)PTR___throw_length_error_004c1e74)(PTR_UINT_004c12dc + -0x3ab8);
    return pwVar2;
  }
  if ((param_1 < pwVar1) || (pwVar1 + uVar3 * 2 < param_1)) {
LAB_003d333c:
    pwVar2 = (wstring *)_M_replace_safe(this,0,uVar3,param_1,param_2);
    return pwVar2;
  }
  SYNC(0);
  if (0 < *(int *)(pwVar1 + -2)) {
    uVar3 = *(uint *)(*(int *)this + -0xc);
    goto LAB_003d333c;
  }
  puVar4 = *(undefined4 **)this;
  uVar3 = (int)param_1 - (int)puVar4 >> 2;
  if (uVar3 < param_2) {
    if (uVar3 == 0) goto LAB_003d33d8;
    if (param_2 != 1) {
      if (param_2 != 0) {
        (*(code *)PTR_wmemmove_004c5c8c)();
        puVar4 = *(undefined4 **)this;
      }
      goto LAB_003d33d8;
    }
  }
  else if (param_2 != 1) {
    if (param_2 != 0) {
      (*(code *)PTR_wmemcpy_004c5c44)();
      puVar4 = *(undefined4 **)this;
    }
    goto LAB_003d33d8;
  }
  *puVar4 = *(undefined4 *)param_1;
LAB_003d33d8:
  if (puVar4 + -3 == (undefined4 *)PTR__S_empty_rep_storage_004c133c) {
    return this;
  }
  puVar4[-1] = 0;
  puVar4[-3] = param_2;
  puVar4[param_2] = 0;
  return this;
}

