
/* std::wstring::_Rep::_M_clone(std::allocator<wchar_t> const&, unsigned int) */

int * __thiscall std::wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)

{
  int *piVar1;
  int iVar2;
  
  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);
  iVar2 = *(int *)this;
  if (iVar2 != 0) {
    if (iVar2 == 1) {
      piVar1[3] = *(int *)(this + 0xc);
    }
    else {
      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);
      iVar2 = *(int *)this;
    }
  }
  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {
    piVar1[2] = 0;
    *piVar1 = iVar2;
    piVar1[iVar2 + 3] = 0;
  }
  return piVar1 + 3;
}



/* std::wstring::_Rep::_M_clone(std::allocator<wchar_t> const&, unsigned int) */

int * __thiscall std::wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)

{
  int *piVar1;
  int iVar2;
  
  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);
  iVar2 = *(int *)this;
  if (iVar2 != 0) {
    if (iVar2 == 1) {
      piVar1[3] = *(int *)(this + 0xc);
    }
    else {
      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);
      iVar2 = *(int *)this;
    }
  }
  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {
    piVar1[2] = 0;
    *piVar1 = iVar2;
    piVar1[iVar2 + 3] = 0;
  }
  return piVar1 + 3;
}


lui gp,0xf
addiu gp,gp,0x5884
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x3ac8(gp)
sw s0,0x18(sp)
or s0,a0,zero
lw a0,0x0(a0)
sw gp,0x10(sp)
sw s1,0x1c(sp)
addu a0,a2,a0
sw ra,0x24(sp)
or a2,a1,zero
sw s2,0x20(sp)
bal 0x003d2250
_lw a1,0x4(s0)
lw a2,0x0(s0)
or s1,v0,zero
bne a2,zero,0x003d3a38
_lw gp,0x10(sp)
addiu s2,v0,0xc
lw v0,-0x7f04(gp)
bne s1,v0,0x003d3a68
_sll v0,a2,0x2
lw ra,0x24(sp)
or v0,s2,zero
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
li v0,0x1
beq a2,v0,0x003d3a7c
_addiu s2,s1,0xc
lw t9,-0x35fc(gp)
addiu a1,s0,0xc
jalr t9
_or a0,s2,zero
lw gp,0x10(sp)
lw v0,-0x7f04(gp)
beq s1,v0,0x003d3a1c
_lw a2,0x0(s0)
sll v0,a2,0x2
sw zero,0x8(s1)
sw a2,0x0(s1)
addu s1,s1,v0
b 0x003d3a1c
_sw zero,0xc(s1)
lw v0,0xc(s0)
b 0x003d3a10
_sw v0,0xc(s1)
(translation_unit "/* std::wstring::_Rep::_M_clone(std::allocator<wchar_t> const&, unsigned int) */\n\nint * __thiscall std::wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}\n\n" comment (declaration "int * __thiscall" primitive_type (pointer_declarator "* __thiscall" * identifier) ;) (labeled_statement "std::wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" statement_identifier : (ERROR ":_M_clone(_Rep *this,allocator *param_1,uint param_2)" : (call_expression "_M_clone(_Rep *this,allocator *param_1,uint param_2)" identifier (argument_list "(_Rep *this,allocator *param_1,uint param_2)" ( (binary_expression "_Rep *this" identifier * identifier) , (binary_expression "allocator *param_1" identifier * identifier) , (ERROR "uint" identifier) identifier )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);" (assignment_expression "piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" identifier = (cast_expression "(int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" identifier (argument_list "(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" ( (binary_expression "param_2 + *(int *)this" identifier + (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) 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) )))) , identifier ))))) ;) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }" { (if_statement "if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" if (parenthesized_expression "(iVar2 == 1)" ( (binary_expression "iVar2 == 1" identifier == number_literal) )) (compound_statement "{\n      piVar1[3] = *(int *)(this + 0xc);\n    }" { (expression_statement "piVar1[3] = *(int *)(this + 0xc);" (assignment_expression "piVar1[3] = *(int *)(this + 0xc)" (subscript_expression "piVar1[3]" identifier [ number_literal ]) = (pointer_expression "*(int *)(this + 0xc)" * (cast_expression "(int *)(this + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" else (compound_statement "{\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc)" (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 "(piVar1 + 3,this + 0xc)" ( (binary_expression "piVar1 + 3" identifier + number_literal) , (binary_expression "this + 0xc" identifier + number_literal) ))) ;) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) }))) })) (if_statement "if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }" if (parenthesized_expression "(piVar1 != (int *)PTR__S_empty_rep_storage_004c133c)" ( (binary_expression "piVar1 != (int *)PTR__S_empty_rep_storage_004c133c" identifier != (cast_expression "(int *)PTR__S_empty_rep_storage_004c133c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }" { (expression_statement "piVar1[2] = 0;" (assignment_expression "piVar1[2] = 0" (subscript_expression "piVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar1 = iVar2;" (assignment_expression "*piVar1 = iVar2" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "piVar1[iVar2 + 3] = 0;" (assignment_expression "piVar1[iVar2 + 3] = 0" (subscript_expression "piVar1[iVar2 + 3]" identifier [ (binary_expression "iVar2 + 3" identifier + number_literal) ]) = number_literal) ;) })) (return_statement "return piVar1 + 3;" return (binary_expression "piVar1 + 3" identifier + number_literal) ;) })))))
(translation_unit "/* std::wstring::_Rep::_M_clone(std::allocator<wchar_t> const&, unsigned int) */\n\nint * __thiscall std::wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}\n\n" comment (declaration "int * __thiscall" primitive_type (pointer_declarator "* __thiscall" * identifier) ;) (labeled_statement "std::wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" statement_identifier : (ERROR ":_M_clone(_Rep *this,allocator *param_1,uint param_2)" : (call_expression "_M_clone(_Rep *this,allocator *param_1,uint param_2)" identifier (argument_list "(_Rep *this,allocator *param_1,uint param_2)" ( (binary_expression "_Rep *this" identifier * identifier) , (binary_expression "allocator *param_1" identifier * identifier) , (ERROR "uint" identifier) identifier )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);" (assignment_expression "piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" identifier = (cast_expression "(int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" identifier (argument_list "(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" ( (binary_expression "param_2 + *(int *)this" identifier + (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) 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) )))) , identifier ))))) ;) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }" { (if_statement "if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" if (parenthesized_expression "(iVar2 == 1)" ( (binary_expression "iVar2 == 1" identifier == number_literal) )) (compound_statement "{\n      piVar1[3] = *(int *)(this + 0xc);\n    }" { (expression_statement "piVar1[3] = *(int *)(this + 0xc);" (assignment_expression "piVar1[3] = *(int *)(this + 0xc)" (subscript_expression "piVar1[3]" identifier [ number_literal ]) = (pointer_expression "*(int *)(this + 0xc)" * (cast_expression "(int *)(this + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" else (compound_statement "{\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc)" (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 "(piVar1 + 3,this + 0xc)" ( (binary_expression "piVar1 + 3" identifier + number_literal) , (binary_expression "this + 0xc" identifier + number_literal) ))) ;) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) }))) })) (if_statement "if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }" if (parenthesized_expression "(piVar1 != (int *)PTR__S_empty_rep_storage_004c133c)" ( (binary_expression "piVar1 != (int *)PTR__S_empty_rep_storage_004c133c" identifier != (cast_expression "(int *)PTR__S_empty_rep_storage_004c133c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }" { (expression_statement "piVar1[2] = 0;" (assignment_expression "piVar1[2] = 0" (subscript_expression "piVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar1 = iVar2;" (assignment_expression "*piVar1 = iVar2" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "piVar1[iVar2 + 3] = 0;" (assignment_expression "piVar1[iVar2 + 3] = 0" (subscript_expression "piVar1[iVar2 + 3]" identifier [ (binary_expression "iVar2 + 3" identifier + number_literal) ]) = number_literal) ;) })) (return_statement "return piVar1 + 3;" return (binary_expression "piVar1 + 3" identifier + number_literal) ;) })))))
(translation_unit "int * __thiscall std::wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}\n\n" (declaration "int * __thiscall" primitive_type (pointer_declarator "* __thiscall" * identifier) ;) (labeled_statement "std::wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" statement_identifier : (ERROR ":_M_clone(_Rep *this,allocator *param_1,uint param_2)" : (call_expression "_M_clone(_Rep *this,allocator *param_1,uint param_2)" identifier (argument_list "(_Rep *this,allocator *param_1,uint param_2)" ( (binary_expression "_Rep *this" identifier * identifier) , (binary_expression "allocator *param_1" identifier * identifier) , (ERROR "uint" identifier) identifier )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);" (assignment_expression "piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" identifier = (cast_expression "(int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" identifier (argument_list "(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" ( (binary_expression "param_2 + *(int *)this" identifier + (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) 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) )))) , identifier ))))) ;) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }" { (if_statement "if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" if (parenthesized_expression "(iVar2 == 1)" ( (binary_expression "iVar2 == 1" identifier == number_literal) )) (compound_statement "{\n      piVar1[3] = *(int *)(this + 0xc);\n    }" { (expression_statement "piVar1[3] = *(int *)(this + 0xc);" (assignment_expression "piVar1[3] = *(int *)(this + 0xc)" (subscript_expression "piVar1[3]" identifier [ number_literal ]) = (pointer_expression "*(int *)(this + 0xc)" * (cast_expression "(int *)(this + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" else (compound_statement "{\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" { (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc)" (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 "(piVar1 + 3,this + 0xc)" ( (binary_expression "piVar1 + 3" identifier + number_literal) , (binary_expression "this + 0xc" identifier + number_literal) ))) ;) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) }))) })) (if_statement "if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }" if (parenthesized_expression "(piVar1 != (int *)PTR__S_empty_rep_storage_004c133c)" ( (binary_expression "piVar1 != (int *)PTR__S_empty_rep_storage_004c133c" identifier != (cast_expression "(int *)PTR__S_empty_rep_storage_004c133c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }" { (expression_statement "piVar1[2] = 0;" (assignment_expression "piVar1[2] = 0" (subscript_expression "piVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar1 = iVar2;" (assignment_expression "*piVar1 = iVar2" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "piVar1[iVar2 + 3] = 0;" (assignment_expression "piVar1[iVar2 + 3] = 0" (subscript_expression "piVar1[iVar2 + 3]" identifier [ (binary_expression "iVar2 + 3" identifier + number_literal) ]) = number_literal) ;) })) (return_statement "return piVar1 + 3;" return (binary_expression "piVar1 + 3" identifier + number_literal) ;) })))))
(translation_unit (declaration TYPE (pointer_declarator * IDENT) ;) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR : (call_expression IDENT (argument_list ( (binary_expression IDENT * IDENT) , (binary_expression IDENT * IDENT) , (ERROR IDENT) IDENT )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) }))) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) = LIT) ;) })) (return_statement return (binary_expression IDENT + LIT) ;) })))))
(declaration "int * __thiscall" (primitive_type "int") (pointer_declarator "* __thiscall" (* "*") (identifier "__thiscall")) (; "")) (labeled_statement "std::wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "wstring::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" (statement_identifier "wstring") (: ":") (ERROR ":" (: ":")) (labeled_statement "_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" (statement_identifier "_Rep") (: ":") (ERROR ":_M_clone(_Rep *this,allocator *param_1,uint param_2)" (: ":") (call_expression "_M_clone(_Rep *this,allocator *param_1,uint param_2)" (identifier "_M_clone") (argument_list "(_Rep *this,allocator *param_1,uint param_2)" (( "(") (binary_expression "_Rep *this" (identifier "_Rep") (* "*") (identifier "this")) (, ",") (binary_expression "allocator *param_1" (identifier "allocator") (* "*") (identifier "param_1")) (, ",") (ERROR "uint" (identifier "uint")) (identifier "param_2") () ")")))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);\n  iVar2 = *(int *)this;\n  if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }\n  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }\n  return piVar1 + 3;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);" (assignment_expression "piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" (identifier "piVar1") (= "=") (cast_expression "(int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" (identifier "_S_create") (argument_list "(param_2 + *(int *)this,*(uint *)(this + 4),param_1)" (( "(") (binary_expression "param_2 + *(int *)this" (identifier "param_2") (+ "+") (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this")))) (, ",") (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")) () ")")))) (, ",") (identifier "param_1") () ")"))))) (; ";")) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" (identifier "iVar2") (= "=") (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }\n  }" ({ "{") (if_statement "if (iVar2 == 1) {\n      piVar1[3] = *(int *)(this + 0xc);\n    }\n    else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" (if "if") (parenthesized_expression "(iVar2 == 1)" (( "(") (binary_expression "iVar2 == 1" (identifier "iVar2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      piVar1[3] = *(int *)(this + 0xc);\n    }" ({ "{") (expression_statement "piVar1[3] = *(int *)(this + 0xc);" (assignment_expression "piVar1[3] = *(int *)(this + 0xc)" (subscript_expression "piVar1[3]" (identifier "piVar1") ([ "[") (number_literal "3") (] "]")) (= "=") (pointer_expression "*(int *)(this + 0xc)" (* "*") (cast_expression "(int *)(this + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0xc)" (( "(") (binary_expression "this + 0xc" (identifier "this") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" (else "else") (compound_statement "{\n      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);\n      iVar2 = *(int *)this;\n    }" ({ "{") (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc)" (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 "(piVar1 + 3,this + 0xc)" (( "(") (binary_expression "piVar1 + 3" (identifier "piVar1") (+ "+") (number_literal "3")) (, ",") (binary_expression "this + 0xc" (identifier "this") (+ "+") (number_literal "0xc")) () ")"))) (; ";")) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" (identifier "iVar2") (= "=") (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this")))) (; ";")) (} "}")))) (} "}"))) (if_statement "if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }" (if "if") (parenthesized_expression "(piVar1 != (int *)PTR__S_empty_rep_storage_004c133c)" (( "(") (binary_expression "piVar1 != (int *)PTR__S_empty_rep_storage_004c133c" (identifier "piVar1") (!= "!=") (cast_expression "(int *)PTR__S_empty_rep_storage_004c133c" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR__S_empty_rep_storage_004c133c"))) () ")")) (compound_statement "{\n    piVar1[2] = 0;\n    *piVar1 = iVar2;\n    piVar1[iVar2 + 3] = 0;\n  }" ({ "{") (expression_statement "piVar1[2] = 0;" (assignment_expression "piVar1[2] = 0" (subscript_expression "piVar1[2]" (identifier "piVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*piVar1 = iVar2;" (assignment_expression "*piVar1 = iVar2" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "piVar1[iVar2 + 3] = 0;" (assignment_expression "piVar1[iVar2 + 3] = 0" (subscript_expression "piVar1[iVar2 + 3]" (identifier "piVar1") ([ "[") (binary_expression "iVar2 + 3" (identifier "iVar2") (+ "+") (number_literal "3")) (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return piVar1 + 3;" (return "return") (binary_expression "piVar1 + 3" (identifier "piVar1") (+ "+") (number_literal "3")) (; ";")) (} "}")))))

/* std::wstring::_Rep::_M_clone(std::allocator<wchar_t> const&, unsigned int) */

int * __thiscall std::wstring::_Rep::_M_clone(_Rep *var_3,allocator *param_1,type_1 var_2)

{
  int *var_5;
  int var_4;
  
  var_5 = (int *)var_1(var_2 + *(int *)var_3,*(type_1 *)(var_3 + 4),param_1);
  var_4 = *(int *)var_3;
  if (var_4 != 0) {
    if (var_4 == 1) {
      var_5[3] = *(int *)(var_3 + 0xc);
    }
    else {
      (*(type_2 *)PTR_wmemcpy_004c5c44)(var_5 + 3,var_3 + 0xc);
      var_4 = *(int *)var_3;
    }
  }
  if (var_5 != (int *)PTR__S_empty_rep_storage_004c133c) {
    var_5[2] = 0;
    *var_5 = var_4;
    var_5[var_4 + 3] = 0;
  }
  return var_5 + 3;
}


(translation_unit (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier)) (MISSING ";")) (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (binary_expression left: (identifier) right: (identifier)) (ERROR (identifier)) (identifier)))) (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)))) (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))))) (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) alternative: (else_clause (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 (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) (return_statement (binary_expression left: (identifier) right: (number_literal))))))))

/* std::wstring::_Rep::MASKED(std::allocator<wchar_t> const&, unsigned int) */

int * __thiscall std::wstring::_Rep::MASKED(_Rep *this,allocator *param_1,uint param_2)

{
  int *piVar1;
  int iVar2;
  
  piVar1 = (int *)_S_create(param_2 + *(int *)this,*(uint *)(this + 4),param_1);
  iVar2 = *(int *)this;
  if (iVar2 != 0) {
    if (iVar2 == 1) {
      piVar1[3] = *(int *)(this + 0xc);
    }
    else {
      (*(code *)PTR_wmemcpy_004c5c44)(piVar1 + 3,this + 0xc);
      iVar2 = *(int *)this;
    }
  }
  if (piVar1 != (int *)PTR__S_empty_rep_storage_004c133c) {
    piVar1[2] = 0;
    *piVar1 = iVar2;
    piVar1[iVar2 + 3] = 0;
  }
  return piVar1 + 3;
}

