
/* std::wstring::reserve(unsigned int) */

void __thiscall std::wstring::reserve(wstring *this,uint param_1)

{
  undefined4 *puVar1;
  uint uVar2;
  wstring *pwVar3;
  uint uVar4;
  wstring *pwVar5;
  uint local_res4 [3];
  
  uVar2 = *(uint *)(this + 4);
  local_res4[0] = param_1;
  if (param_1 < uVar2) {
    local_res4[0] = uVar2;
  }
  pwVar3 = *(wstring **)this;
  pwVar5 = this + 8;
  uVar4 = 3;
  if (pwVar5 != pwVar3) {
    uVar4 = *(uint *)(this + 8);
  }
  if (uVar4 != local_res4[0]) {
    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {
      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);
      pwVar3 = *(wstring **)this;
      if (*(int *)(this + 4) == 0) {
        *puVar1 = *(undefined4 *)pwVar3;
      }
      else if (*(int *)(this + 4) != -1) {
        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);
        pwVar3 = *(wstring **)this;
      }
      if (pwVar5 != pwVar3) {
        operator_delete(pwVar3);
      }
      *(undefined4 **)this = puVar1;
      *(uint *)(this + 8) = local_res4[0];
      return;
    }
    if (pwVar5 != pwVar3) {
      if (uVar2 == 0) {
        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;
      }
      else if (uVar2 != 0xffffffff) {
        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);
        pwVar3 = *(wstring **)this;
      }
      operator_delete(pwVar3);
      *(wstring **)this = pwVar5;
    }
  }
  return;
}



/* std::wstring::reserve(unsigned int) */

void __thiscall std::wstring::reserve(wstring *this,uint param_1)

{
  undefined4 *puVar1;
  uint uVar2;
  wstring *pwVar3;
  uint uVar4;
  wstring *pwVar5;
  uint local_res4 [3];
  
  uVar2 = *(uint *)(this + 4);
  local_res4[0] = param_1;
  if (param_1 < uVar2) {
    local_res4[0] = uVar2;
  }
  pwVar3 = *(wstring **)this;
  pwVar5 = this + 8;
  uVar4 = 3;
  if (pwVar5 != pwVar3) {
    uVar4 = *(uint *)(this + 8);
  }
  if (uVar4 != local_res4[0]) {
    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {
      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);
      pwVar3 = *(wstring **)this;
      if (*(int *)(this + 4) == 0) {
        *puVar1 = *(undefined4 *)pwVar3;
      }
      else if (*(int *)(this + 4) != -1) {
        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);
        pwVar3 = *(wstring **)this;
      }
      if (pwVar5 != pwVar3) {
        operator_delete(pwVar3);
      }
      *(undefined4 **)this = puVar1;
      *(uint *)(this + 8) = local_res4[0];
      return;
    }
    if (pwVar5 != pwVar3) {
      if (uVar2 == 0) {
        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;
      }
      else if (uVar2 != 0xffffffff) {
        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);
        pwVar3 = *(wstring **)this;
      }
      operator_delete(pwVar3);
      *(wstring **)this = pwVar5;
    }
  }
  return;
}


lui gp,0x19
addiu gp,gp,0x2720
addu gp,gp,t9
addiu sp,sp,-0x28
lw v1,0x4(a0)
sltu v0,a1,v1
sw gp,0x10(sp)
sw s0,0x18(sp)
or s0,a0,zero
sw ra,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
beq v0,zero,0x00336b60
_sw a1,0x2c(sp)
sw v1,0x2c(sp)
or a1,v1,zero
lw a0,0x0(s0)
addiu s1,s0,0x8
beq s1,a0,0x00336b74
_li a2,0x3
lw a2,0x8(s0)
beq a2,a1,0x00336bcc
_sltu v0,a2,a1
bne v0,zero,0x00336be4
_sltiu v0,a1,0x4
beq v0,zero,0x00336be8
_lw t9,-0x3fe8(gp)
beq s1,a0,0x00336bd0
_lw ra,0x24(sp)
beq v1,zero,0x00336c6c
_addiu a2,v1,0x1
beq a2,zero,0x00336bc0
_lw t9,-0x7f44(gp)
lw t9,-0x35fc(gp)
or a1,a0,zero
jalr t9
_or a0,s1,zero
lw gp,0x10(sp)
lw a0,0x0(s0)
lw t9,-0x7f44(gp)
bal 0x00330ee0
_nop
sw s1,0x0(s0)
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
lw t9,-0x3fe8(gp)
addiu a1,sp,0x2c
bal 0x00335edc
_or a0,s0,zero
lw v1,0x4(s0)
or s2,v0,zero
lw gp,0x10(sp)
lw a0,0x0(s0)
beq v1,zero,0x00336c60
_addiu a2,v1,0x1
bne a2,zero,0x00336c48
_lw t9,-0x35fc(gp)
beq s1,a0,0x00336c24
_lw t9,-0x7f44(gp)
bal 0x00330ee0
_nop
lw v0,0x2c(sp)
lw ra,0x24(sp)
lw s1,0x1c(sp)
sw s2,0x0(s0)
sw v0,0x8(s0)
lw s2,0x20(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
or a1,a0,zero
jalr t9
_or a0,v0,zero
lw gp,0x10(sp)
b 0x00336c14
_lw a0,0x0(s0)
lw v0,0x0(a0)
b 0x00336c14
_sw v0,0x0(s2)
lw v0,0x0(a0)
b 0x00336bbc
_sw v0,0x8(s0)
(translation_unit "/* std::wstring::reserve(unsigned int) */\n\nvoid __thiscall std::wstring::reserve(wstring *this,uint param_1)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void __thiscall std::wstring::reserve(wstring *this,uint param_1)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "reserve(wstring *this,uint param_1)" identifier (parameter_list "(wstring *this,uint param_1)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "wstring *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "wstring *pwVar5;" type_identifier (pointer_declarator "*pwVar5" * identifier) ;) (declaration "uint local_res4 [3];" type_identifier (array_declarator "local_res4 [3]" identifier [ number_literal ]) ;) (expression_statement "uVar2 = *(uint *)(this + 4);" (assignment_expression "uVar2 = *(uint *)(this + 4)" identifier = (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) ))))) ;) (expression_statement "local_res4[0] = param_1;" (assignment_expression "local_res4[0] = param_1" (subscript_expression "local_res4[0]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }" if (parenthesized_expression "(param_1 < uVar2)" ( (binary_expression "param_1 < uVar2" identifier < identifier) )) (compound_statement "{\n    local_res4[0] = uVar2;\n  }" { (expression_statement "local_res4[0] = uVar2;" (assignment_expression "local_res4[0] = uVar2" (subscript_expression "local_res4[0]" identifier [ number_literal ]) = identifier) ;) })) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "pwVar5 = this + 8;" (assignment_expression "pwVar5 = this + 8" identifier = (binary_expression "this + 8" identifier + number_literal)) ;) (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" identifier = number_literal) ;) (if_statement "if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }" if (parenthesized_expression "(pwVar5 != pwVar3)" ( (binary_expression "pwVar5 != pwVar3" identifier != identifier) )) (compound_statement "{\n    uVar4 = *(uint *)(this + 8);\n  }" { (expression_statement "uVar4 = *(uint *)(this + 8);" (assignment_expression "uVar4 = *(uint *)(this + 8)" identifier = (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) })) (if_statement "if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }" if (parenthesized_expression "(uVar4 != local_res4[0])" ( (binary_expression "uVar4 != local_res4[0]" identifier != (subscript_expression "local_res4[0]" identifier [ number_literal ])) )) (compound_statement "{\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }" { (if_statement "if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }" if (parenthesized_expression "((uVar4 < local_res4[0]) || (3 < local_res4[0]))" ( (binary_expression "(uVar4 < local_res4[0]) || (3 < local_res4[0])" (parenthesized_expression "(uVar4 < local_res4[0])" ( (binary_expression "uVar4 < local_res4[0]" identifier < (subscript_expression "local_res4[0]" identifier [ number_literal ])) )) || (parenthesized_expression "(3 < local_res4[0])" ( (binary_expression "3 < local_res4[0]" number_literal < (subscript_expression "local_res4[0]" identifier [ number_literal ])) ))) )) (compound_statement "{\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }" { (expression_statement "puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);" (assignment_expression "puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4)" identifier = (cast_expression "(undefined4 *)_M_create(this,local_res4,uVar4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_create(this,local_res4,uVar4)" identifier (argument_list "(this,local_res4,uVar4)" ( identifier , identifier , identifier ))))) ;) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(*(int *)(this + 4) == 0)" ( (binary_expression "*(int *)(this + 4) == 0" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        *puVar1 = *(undefined4 *)pwVar3;\n      }" { (expression_statement "*puVar1 = *(undefined4 *)pwVar3;" (assignment_expression "*puVar1 = *(undefined4 *)pwVar3" (pointer_expression "*puVar1" * identifier) = (pointer_expression "*(undefined4 *)pwVar3" * (cast_expression "(undefined4 *)pwVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) }) (else_clause "else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" else (if_statement "if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(*(int *)(this + 4) != -1)" ( (binary_expression "*(int *)(this + 4) != -1" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3)" (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 "(puVar1,pwVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })))) (if_statement "if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }" if (parenthesized_expression "(pwVar5 != pwVar3)" ( (binary_expression "pwVar5 != pwVar3" identifier != identifier) )) (compound_statement "{\n        operator_delete(pwVar3);\n      }" { (expression_statement "operator_delete(pwVar3);" (call_expression "operator_delete(pwVar3)" identifier (argument_list "(pwVar3)" ( identifier ))) ;) })) (expression_statement "*(undefined4 **)this = puVar1;" (assignment_expression "*(undefined4 **)this = puVar1" (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "*(uint *)(this + 8) = local_res4[0];" (assignment_expression "*(uint *)(this + 8) = local_res4[0]" (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (subscript_expression "local_res4[0]" identifier [ number_literal ])) ;) (return_statement "return;" return ;) })) (if_statement "if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }" if (parenthesized_expression "(pwVar5 != pwVar3)" ( (binary_expression "pwVar5 != pwVar3" identifier != identifier) )) (compound_statement "{\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }" { (if_statement "if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }" { (expression_statement "*(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;" (assignment_expression "*(undefined4 *)(this + 8) = *(undefined4 *)pwVar3" (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)pwVar3" * (cast_expression "(undefined4 *)pwVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) }) (else_clause "else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" else (if_statement "if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(uVar2 != 0xffffffff)" ( (binary_expression "uVar2 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3)" (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 "(pwVar5,pwVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })))) (expression_statement "operator_delete(pwVar3);" (call_expression "operator_delete(pwVar3)" identifier (argument_list "(pwVar3)" ( identifier ))) ;) (expression_statement "*(wstring **)this = pwVar5;" (assignment_expression "*(wstring **)this = pwVar5" (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* std::wstring::reserve(unsigned int) */\n\nvoid __thiscall std::wstring::reserve(wstring *this,uint param_1)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void __thiscall std::wstring::reserve(wstring *this,uint param_1)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "reserve(wstring *this,uint param_1)" identifier (parameter_list "(wstring *this,uint param_1)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "wstring *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "wstring *pwVar5;" type_identifier (pointer_declarator "*pwVar5" * identifier) ;) (declaration "uint local_res4 [3];" type_identifier (array_declarator "local_res4 [3]" identifier [ number_literal ]) ;) (expression_statement "uVar2 = *(uint *)(this + 4);" (assignment_expression "uVar2 = *(uint *)(this + 4)" identifier = (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) ))))) ;) (expression_statement "local_res4[0] = param_1;" (assignment_expression "local_res4[0] = param_1" (subscript_expression "local_res4[0]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }" if (parenthesized_expression "(param_1 < uVar2)" ( (binary_expression "param_1 < uVar2" identifier < identifier) )) (compound_statement "{\n    local_res4[0] = uVar2;\n  }" { (expression_statement "local_res4[0] = uVar2;" (assignment_expression "local_res4[0] = uVar2" (subscript_expression "local_res4[0]" identifier [ number_literal ]) = identifier) ;) })) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "pwVar5 = this + 8;" (assignment_expression "pwVar5 = this + 8" identifier = (binary_expression "this + 8" identifier + number_literal)) ;) (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" identifier = number_literal) ;) (if_statement "if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }" if (parenthesized_expression "(pwVar5 != pwVar3)" ( (binary_expression "pwVar5 != pwVar3" identifier != identifier) )) (compound_statement "{\n    uVar4 = *(uint *)(this + 8);\n  }" { (expression_statement "uVar4 = *(uint *)(this + 8);" (assignment_expression "uVar4 = *(uint *)(this + 8)" identifier = (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) })) (if_statement "if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }" if (parenthesized_expression "(uVar4 != local_res4[0])" ( (binary_expression "uVar4 != local_res4[0]" identifier != (subscript_expression "local_res4[0]" identifier [ number_literal ])) )) (compound_statement "{\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }" { (if_statement "if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }" if (parenthesized_expression "((uVar4 < local_res4[0]) || (3 < local_res4[0]))" ( (binary_expression "(uVar4 < local_res4[0]) || (3 < local_res4[0])" (parenthesized_expression "(uVar4 < local_res4[0])" ( (binary_expression "uVar4 < local_res4[0]" identifier < (subscript_expression "local_res4[0]" identifier [ number_literal ])) )) || (parenthesized_expression "(3 < local_res4[0])" ( (binary_expression "3 < local_res4[0]" number_literal < (subscript_expression "local_res4[0]" identifier [ number_literal ])) ))) )) (compound_statement "{\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }" { (expression_statement "puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);" (assignment_expression "puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4)" identifier = (cast_expression "(undefined4 *)_M_create(this,local_res4,uVar4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_create(this,local_res4,uVar4)" identifier (argument_list "(this,local_res4,uVar4)" ( identifier , identifier , identifier ))))) ;) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(*(int *)(this + 4) == 0)" ( (binary_expression "*(int *)(this + 4) == 0" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        *puVar1 = *(undefined4 *)pwVar3;\n      }" { (expression_statement "*puVar1 = *(undefined4 *)pwVar3;" (assignment_expression "*puVar1 = *(undefined4 *)pwVar3" (pointer_expression "*puVar1" * identifier) = (pointer_expression "*(undefined4 *)pwVar3" * (cast_expression "(undefined4 *)pwVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) }) (else_clause "else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" else (if_statement "if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(*(int *)(this + 4) != -1)" ( (binary_expression "*(int *)(this + 4) != -1" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3)" (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 "(puVar1,pwVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })))) (if_statement "if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }" if (parenthesized_expression "(pwVar5 != pwVar3)" ( (binary_expression "pwVar5 != pwVar3" identifier != identifier) )) (compound_statement "{\n        operator_delete(pwVar3);\n      }" { (expression_statement "operator_delete(pwVar3);" (call_expression "operator_delete(pwVar3)" identifier (argument_list "(pwVar3)" ( identifier ))) ;) })) (expression_statement "*(undefined4 **)this = puVar1;" (assignment_expression "*(undefined4 **)this = puVar1" (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "*(uint *)(this + 8) = local_res4[0];" (assignment_expression "*(uint *)(this + 8) = local_res4[0]" (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (subscript_expression "local_res4[0]" identifier [ number_literal ])) ;) (return_statement "return;" return ;) })) (if_statement "if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }" if (parenthesized_expression "(pwVar5 != pwVar3)" ( (binary_expression "pwVar5 != pwVar3" identifier != identifier) )) (compound_statement "{\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }" { (if_statement "if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }" { (expression_statement "*(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;" (assignment_expression "*(undefined4 *)(this + 8) = *(undefined4 *)pwVar3" (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)pwVar3" * (cast_expression "(undefined4 *)pwVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) }) (else_clause "else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" else (if_statement "if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(uVar2 != 0xffffffff)" ( (binary_expression "uVar2 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3)" (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 "(pwVar5,pwVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })))) (expression_statement "operator_delete(pwVar3);" (call_expression "operator_delete(pwVar3)" identifier (argument_list "(pwVar3)" ( identifier ))) ;) (expression_statement "*(wstring **)this = pwVar5;" (assignment_expression "*(wstring **)this = pwVar5" (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void __thiscall std::wstring::reserve(wstring *this,uint param_1)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}\n\n" (function_definition "void __thiscall std::wstring::reserve(wstring *this,uint param_1)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "reserve(wstring *this,uint param_1)" identifier (parameter_list "(wstring *this,uint param_1)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "wstring *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "wstring *pwVar5;" type_identifier (pointer_declarator "*pwVar5" * identifier) ;) (declaration "uint local_res4 [3];" type_identifier (array_declarator "local_res4 [3]" identifier [ number_literal ]) ;) (expression_statement "uVar2 = *(uint *)(this + 4);" (assignment_expression "uVar2 = *(uint *)(this + 4)" identifier = (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) ))))) ;) (expression_statement "local_res4[0] = param_1;" (assignment_expression "local_res4[0] = param_1" (subscript_expression "local_res4[0]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }" if (parenthesized_expression "(param_1 < uVar2)" ( (binary_expression "param_1 < uVar2" identifier < identifier) )) (compound_statement "{\n    local_res4[0] = uVar2;\n  }" { (expression_statement "local_res4[0] = uVar2;" (assignment_expression "local_res4[0] = uVar2" (subscript_expression "local_res4[0]" identifier [ number_literal ]) = identifier) ;) })) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "pwVar5 = this + 8;" (assignment_expression "pwVar5 = this + 8" identifier = (binary_expression "this + 8" identifier + number_literal)) ;) (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" identifier = number_literal) ;) (if_statement "if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }" if (parenthesized_expression "(pwVar5 != pwVar3)" ( (binary_expression "pwVar5 != pwVar3" identifier != identifier) )) (compound_statement "{\n    uVar4 = *(uint *)(this + 8);\n  }" { (expression_statement "uVar4 = *(uint *)(this + 8);" (assignment_expression "uVar4 = *(uint *)(this + 8)" identifier = (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) })) (if_statement "if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }" if (parenthesized_expression "(uVar4 != local_res4[0])" ( (binary_expression "uVar4 != local_res4[0]" identifier != (subscript_expression "local_res4[0]" identifier [ number_literal ])) )) (compound_statement "{\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }" { (if_statement "if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }" if (parenthesized_expression "((uVar4 < local_res4[0]) || (3 < local_res4[0]))" ( (binary_expression "(uVar4 < local_res4[0]) || (3 < local_res4[0])" (parenthesized_expression "(uVar4 < local_res4[0])" ( (binary_expression "uVar4 < local_res4[0]" identifier < (subscript_expression "local_res4[0]" identifier [ number_literal ])) )) || (parenthesized_expression "(3 < local_res4[0])" ( (binary_expression "3 < local_res4[0]" number_literal < (subscript_expression "local_res4[0]" identifier [ number_literal ])) ))) )) (compound_statement "{\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }" { (expression_statement "puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);" (assignment_expression "puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4)" identifier = (cast_expression "(undefined4 *)_M_create(this,local_res4,uVar4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_create(this,local_res4,uVar4)" identifier (argument_list "(this,local_res4,uVar4)" ( identifier , identifier , identifier ))))) ;) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(*(int *)(this + 4) == 0)" ( (binary_expression "*(int *)(this + 4) == 0" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        *puVar1 = *(undefined4 *)pwVar3;\n      }" { (expression_statement "*puVar1 = *(undefined4 *)pwVar3;" (assignment_expression "*puVar1 = *(undefined4 *)pwVar3" (pointer_expression "*puVar1" * identifier) = (pointer_expression "*(undefined4 *)pwVar3" * (cast_expression "(undefined4 *)pwVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) }) (else_clause "else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" else (if_statement "if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(*(int *)(this + 4) != -1)" ( (binary_expression "*(int *)(this + 4) != -1" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3)" (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 "(puVar1,pwVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })))) (if_statement "if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }" if (parenthesized_expression "(pwVar5 != pwVar3)" ( (binary_expression "pwVar5 != pwVar3" identifier != identifier) )) (compound_statement "{\n        operator_delete(pwVar3);\n      }" { (expression_statement "operator_delete(pwVar3);" (call_expression "operator_delete(pwVar3)" identifier (argument_list "(pwVar3)" ( identifier ))) ;) })) (expression_statement "*(undefined4 **)this = puVar1;" (assignment_expression "*(undefined4 **)this = puVar1" (pointer_expression "*(undefined4 **)this" * (cast_expression "(undefined4 **)this" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "*(uint *)(this + 8) = local_res4[0];" (assignment_expression "*(uint *)(this + 8) = local_res4[0]" (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (subscript_expression "local_res4[0]" identifier [ number_literal ])) ;) (return_statement "return;" return ;) })) (if_statement "if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }" if (parenthesized_expression "(pwVar5 != pwVar3)" ( (binary_expression "pwVar5 != pwVar3" identifier != identifier) )) (compound_statement "{\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }" { (if_statement "if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }" { (expression_statement "*(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;" (assignment_expression "*(undefined4 *)(this + 8) = *(undefined4 *)pwVar3" (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)pwVar3" * (cast_expression "(undefined4 *)pwVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) }) (else_clause "else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" else (if_statement "if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" if (parenthesized_expression "(uVar2 != 0xffffffff)" ( (binary_expression "uVar2 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3)" (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 "(pwVar5,pwVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })))) (expression_statement "operator_delete(pwVar3);" (call_expression "operator_delete(pwVar3)" identifier (argument_list "(pwVar3)" ( identifier ))) ;) (expression_statement "*(wstring **)this = pwVar5;" (assignment_expression "*(wstring **)this = pwVar5" (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ms_call_modifier __thiscall) (ERROR IDENT : : IDENT : :) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = 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 = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (subscript_expression IDENT [ LIT ])) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < (subscript_expression IDENT [ LIT ])) )) || (parenthesized_expression ( (binary_expression LIT < (subscript_expression IDENT [ LIT ])) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) })))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (subscript_expression IDENT [ LIT ])) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) }) (else_clause else (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 ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) })))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) = IDENT) ;) })) })) (return_statement return ;) })))
(function_definition "void __thiscall std::wstring::reserve(wstring *this,uint param_1)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}" (primitive_type "void") (ms_call_modifier "__thiscall" (__thiscall "__thiscall")) (ERROR "std::wstring::" (identifier "std") (: ":") (: ":") (identifier "wstring") (: ":") (: ":")) (function_declarator "reserve(wstring *this,uint param_1)" (identifier "reserve") (parameter_list "(wstring *this,uint param_1)" (( "(") (parameter_declaration "wstring *this" (type_identifier "wstring") (pointer_declarator "*this" (* "*") (identifier "this"))) (, ",") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  wstring *pwVar3;\n  uint uVar4;\n  wstring *pwVar5;\n  uint local_res4 [3];\n  \n  uVar2 = *(uint *)(this + 4);\n  local_res4[0] = param_1;\n  if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }\n  pwVar3 = *(wstring **)this;\n  pwVar5 = this + 8;\n  uVar4 = 3;\n  if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }\n  if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }\n  return;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "wstring *pwVar3;" (type_identifier "wstring") (pointer_declarator "*pwVar3" (* "*") (identifier "pwVar3")) (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "wstring *pwVar5;" (type_identifier "wstring") (pointer_declarator "*pwVar5" (* "*") (identifier "pwVar5")) (; ";")) (declaration "uint local_res4 [3];" (type_identifier "uint") (array_declarator "local_res4 [3]" (identifier "local_res4") ([ "[") (number_literal "3") (] "]")) (; ";")) (expression_statement "uVar2 = *(uint *)(this + 4);" (assignment_expression "uVar2 = *(uint *)(this + 4)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(this + 4)" (* "*") (cast_expression "(uint *)(this + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "local_res4[0] = param_1;" (assignment_expression "local_res4[0] = param_1" (subscript_expression "local_res4[0]" (identifier "local_res4") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "param_1")) (; ";")) (if_statement "if (param_1 < uVar2) {\n    local_res4[0] = uVar2;\n  }" (if "if") (parenthesized_expression "(param_1 < uVar2)" (( "(") (binary_expression "param_1 < uVar2" (identifier "param_1") (< "<") (identifier "uVar2")) () ")")) (compound_statement "{\n    local_res4[0] = uVar2;\n  }" ({ "{") (expression_statement "local_res4[0] = uVar2;" (assignment_expression "local_res4[0] = uVar2" (subscript_expression "local_res4[0]" (identifier "local_res4") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (} "}"))) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" (identifier "pwVar3") (= "=") (pointer_expression "*(wstring **)this" (* "*") (cast_expression "(wstring **)this" (( "(") (type_descriptor "wstring **" (type_identifier "wstring") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (expression_statement "pwVar5 = this + 8;" (assignment_expression "pwVar5 = this + 8" (identifier "pwVar5") (= "=") (binary_expression "this + 8" (identifier "this") (+ "+") (number_literal "8"))) (; ";")) (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" (identifier "uVar4") (= "=") (number_literal "3")) (; ";")) (if_statement "if (pwVar5 != pwVar3) {\n    uVar4 = *(uint *)(this + 8);\n  }" (if "if") (parenthesized_expression "(pwVar5 != pwVar3)" (( "(") (binary_expression "pwVar5 != pwVar3" (identifier "pwVar5") (!= "!=") (identifier "pwVar3")) () ")")) (compound_statement "{\n    uVar4 = *(uint *)(this + 8);\n  }" ({ "{") (expression_statement "uVar4 = *(uint *)(this + 8);" (assignment_expression "uVar4 = *(uint *)(this + 8)" (identifier "uVar4") (= "=") (pointer_expression "*(uint *)(this + 8)" (* "*") (cast_expression "(uint *)(this + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 8)" (( "(") (binary_expression "this + 8" (identifier "this") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (} "}"))) (if_statement "if (uVar4 != local_res4[0]) {\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }" (if "if") (parenthesized_expression "(uVar4 != local_res4[0])" (( "(") (binary_expression "uVar4 != local_res4[0]" (identifier "uVar4") (!= "!=") (subscript_expression "local_res4[0]" (identifier "local_res4") ([ "[") (number_literal "0") (] "]"))) () ")")) (compound_statement "{\n    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }\n    if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }\n  }" ({ "{") (if_statement "if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }" (if "if") (parenthesized_expression "((uVar4 < local_res4[0]) || (3 < local_res4[0]))" (( "(") (binary_expression "(uVar4 < local_res4[0]) || (3 < local_res4[0])" (parenthesized_expression "(uVar4 < local_res4[0])" (( "(") (binary_expression "uVar4 < local_res4[0]" (identifier "uVar4") (< "<") (subscript_expression "local_res4[0]" (identifier "local_res4") ([ "[") (number_literal "0") (] "]"))) () ")")) (|| "||") (parenthesized_expression "(3 < local_res4[0])" (( "(") (binary_expression "3 < local_res4[0]" (number_literal "3") (< "<") (subscript_expression "local_res4[0]" (identifier "local_res4") ([ "[") (number_literal "0") (] "]"))) () ")"))) () ")")) (compound_statement "{\n      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);\n      pwVar3 = *(wstring **)this;\n      if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }\n      *(undefined4 **)this = puVar1;\n      *(uint *)(this + 8) = local_res4[0];\n      return;\n    }" ({ "{") (expression_statement "puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);" (assignment_expression "puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)_M_create(this,local_res4,uVar4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "_M_create(this,local_res4,uVar4)" (identifier "_M_create") (argument_list "(this,local_res4,uVar4)" (( "(") (identifier "this") (, ",") (identifier "local_res4") (, ",") (identifier "uVar4") () ")"))))) (; ";")) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" (identifier "pwVar3") (= "=") (pointer_expression "*(wstring **)this" (* "*") (cast_expression "(wstring **)this" (( "(") (type_descriptor "wstring **" (type_identifier "wstring") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (if_statement "if (*(int *)(this + 4) == 0) {\n        *puVar1 = *(undefined4 *)pwVar3;\n      }\n      else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" (if "if") (parenthesized_expression "(*(int *)(this + 4) == 0)" (( "(") (binary_expression "*(int *)(this + 4) == 0" (pointer_expression "*(int *)(this + 4)" (* "*") (cast_expression "(int *)(this + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        *puVar1 = *(undefined4 *)pwVar3;\n      }" ({ "{") (expression_statement "*puVar1 = *(undefined4 *)pwVar3;" (assignment_expression "*puVar1 = *(undefined4 *)pwVar3" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (pointer_expression "*(undefined4 *)pwVar3" (* "*") (cast_expression "(undefined4 *)pwVar3" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pwVar3")))) (; ";")) (} "}")) (else_clause "else if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" (else "else") (if_statement "if (*(int *)(this + 4) != -1) {\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" (if "if") (parenthesized_expression "(*(int *)(this + 4) != -1)" (( "(") (binary_expression "*(int *)(this + 4) != -1" (pointer_expression "*(int *)(this + 4)" (* "*") (cast_expression "(int *)(this + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" ({ "{") (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3)" (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 "(puVar1,pwVar3)" (( "(") (identifier "puVar1") (, ",") (identifier "pwVar3") () ")"))) (; ";")) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" (identifier "pwVar3") (= "=") (pointer_expression "*(wstring **)this" (* "*") (cast_expression "(wstring **)this" (( "(") (type_descriptor "wstring **" (type_identifier "wstring") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (} "}"))))) (if_statement "if (pwVar5 != pwVar3) {\n        operator_delete(pwVar3);\n      }" (if "if") (parenthesized_expression "(pwVar5 != pwVar3)" (( "(") (binary_expression "pwVar5 != pwVar3" (identifier "pwVar5") (!= "!=") (identifier "pwVar3")) () ")")) (compound_statement "{\n        operator_delete(pwVar3);\n      }" ({ "{") (expression_statement "operator_delete(pwVar3);" (call_expression "operator_delete(pwVar3)" (identifier "operator_delete") (argument_list "(pwVar3)" (( "(") (identifier "pwVar3") () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 **)this = puVar1;" (assignment_expression "*(undefined4 **)this = puVar1" (pointer_expression "*(undefined4 **)this" (* "*") (cast_expression "(undefined4 **)this" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this"))) (= "=") (identifier "puVar1")) (; ";")) (expression_statement "*(uint *)(this + 8) = local_res4[0];" (assignment_expression "*(uint *)(this + 8) = local_res4[0]" (pointer_expression "*(uint *)(this + 8)" (* "*") (cast_expression "(uint *)(this + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 8)" (( "(") (binary_expression "this + 8" (identifier "this") (+ "+") (number_literal "8")) () ")")))) (= "=") (subscript_expression "local_res4[0]" (identifier "local_res4") ([ "[") (number_literal "0") (] "]"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (pwVar5 != pwVar3) {\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }" (if "if") (parenthesized_expression "(pwVar5 != pwVar3)" (( "(") (binary_expression "pwVar5 != pwVar3" (identifier "pwVar5") (!= "!=") (identifier "pwVar3")) () ")")) (compound_statement "{\n      if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }\n      operator_delete(pwVar3);\n      *(wstring **)this = pwVar5;\n    }" ({ "{") (if_statement "if (uVar2 == 0) {\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }\n      else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" (if "if") (parenthesized_expression "(uVar2 == 0)" (( "(") (binary_expression "uVar2 == 0" (identifier "uVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;\n      }" ({ "{") (expression_statement "*(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;" (assignment_expression "*(undefined4 *)(this + 8) = *(undefined4 *)pwVar3" (pointer_expression "*(undefined4 *)(this + 8)" (* "*") (cast_expression "(undefined4 *)(this + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 8)" (( "(") (binary_expression "this + 8" (identifier "this") (+ "+") (number_literal "8")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)pwVar3" (* "*") (cast_expression "(undefined4 *)pwVar3" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pwVar3")))) (; ";")) (} "}")) (else_clause "else if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" (else "else") (if_statement "if (uVar2 != 0xffffffff) {\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" (if "if") (parenthesized_expression "(uVar2 != 0xffffffff)" (( "(") (binary_expression "uVar2 != 0xffffffff" (identifier "uVar2") (!= "!=") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);\n        pwVar3 = *(wstring **)this;\n      }" ({ "{") (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3)" (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 "(pwVar5,pwVar3)" (( "(") (identifier "pwVar5") (, ",") (identifier "pwVar3") () ")"))) (; ";")) (expression_statement "pwVar3 = *(wstring **)this;" (assignment_expression "pwVar3 = *(wstring **)this" (identifier "pwVar3") (= "=") (pointer_expression "*(wstring **)this" (* "*") (cast_expression "(wstring **)this" (( "(") (type_descriptor "wstring **" (type_identifier "wstring") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (} "}"))))) (expression_statement "operator_delete(pwVar3);" (call_expression "operator_delete(pwVar3)" (identifier "operator_delete") (argument_list "(pwVar3)" (( "(") (identifier "pwVar3") () ")"))) (; ";")) (expression_statement "*(wstring **)this = pwVar5;" (assignment_expression "*(wstring **)this = pwVar5" (pointer_expression "*(wstring **)this" (* "*") (cast_expression "(wstring **)this" (( "(") (type_descriptor "wstring **" (type_identifier "wstring") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this"))) (= "=") (identifier "pwVar5")) (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) (ms_call_modifier) (ERROR (identifier) (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) 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))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (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))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (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: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (subscript_expression argument: (identifier) index: (number_literal)))))) 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: (identifier) arguments: (argument_list (identifier) (identifier) (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))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (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)))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) 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 (identifier) (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))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (subscript_expression argument: (identifier) index: (number_literal)))) (return_statement))) (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: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))))) alternative: (else_clause (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 (identifier) (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 (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))) right: (identifier))))))) (return_statement))))

/* std::wstring::MASKED(unsigned int) */

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

{
  undefined4 *puVar1;
  uint uVar2;
  wstring *pwVar3;
  uint uVar4;
  wstring *pwVar5;
  uint local_res4 [3];
  
  uVar2 = *(uint *)(this + 4);
  local_res4[0] = param_1;
  if (param_1 < uVar2) {
    local_res4[0] = uVar2;
  }
  pwVar3 = *(wstring **)this;
  pwVar5 = this + 8;
  uVar4 = 3;
  if (pwVar5 != pwVar3) {
    uVar4 = *(uint *)(this + 8);
  }
  if (uVar4 != local_res4[0]) {
    if ((uVar4 < local_res4[0]) || (3 < local_res4[0])) {
      puVar1 = (undefined4 *)_M_create(this,local_res4,uVar4);
      pwVar3 = *(wstring **)this;
      if (*(int *)(this + 4) == 0) {
        *puVar1 = *(undefined4 *)pwVar3;
      }
      else if (*(int *)(this + 4) != -1) {
        (*(code *)PTR_wmemcpy_004c5c44)(puVar1,pwVar3);
        pwVar3 = *(wstring **)this;
      }
      if (pwVar5 != pwVar3) {
        operator_delete(pwVar3);
      }
      *(undefined4 **)this = puVar1;
      *(uint *)(this + 8) = local_res4[0];
      return;
    }
    if (pwVar5 != pwVar3) {
      if (uVar2 == 0) {
        *(undefined4 *)(this + 8) = *(undefined4 *)pwVar3;
      }
      else if (uVar2 != 0xffffffff) {
        (*(code *)PTR_wmemcpy_004c5c44)(pwVar5,pwVar3);
        pwVar3 = *(wstring **)this;
      }
      operator_delete(pwVar3);
      *(wstring **)this = pwVar5;
    }
  }
  return;
}

