
/* std::string::append(char const*, unsigned int) */

string * __thiscall std::string::append(string *this,char *param_1,uint param_2)

{
  char *pcVar1;
  int iVar2;
  uint uVar3;
  
  if (param_2 == 0) {
    return this;
  }
  pcVar1 = *(char **)this;
  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);
  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);
  }
  if (*(uint *)(pcVar1 + -8) < uVar3) {
LAB_0037861c:
    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {
      reserve(this,uVar3);
      iVar2 = *(int *)this;
      param_1 = param_1 + (iVar2 - (int)pcVar1);
      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));
      goto joined_r0x00378664;
    }
    reserve(this,uVar3);
    iVar2 = *(int *)this;
  }
  else {
    SYNC(0);
    if (0 < *(int *)(pcVar1 + -4)) {
      pcVar1 = *(char **)this;
      goto LAB_0037861c;
    }
    iVar2 = *(int *)this;
  }
  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));
joined_r0x00378664:
  if (param_2 == 1) {
    *pcVar1 = *param_1;
  }
  else {
    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);
  }
  iVar2 = *(int *)this;
  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {
    *(undefined4 *)(iVar2 + -4) = 0;
    *(uint *)(iVar2 + -0xc) = uVar3;
    *(undefined1 *)(iVar2 + uVar3) = 0;
  }
  return this;
}



/* std::string::append(char const*, unsigned int) */

string * __thiscall std::string::append(string *this,char *param_1,uint param_2)

{
  char *pcVar1;
  int iVar2;
  uint uVar3;
  
  if (param_2 == 0) {
    return this;
  }
  pcVar1 = *(char **)this;
  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);
  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);
  }
  if (*(uint *)(pcVar1 + -8) < uVar3) {
LAB_0037861c:
    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {
      reserve(this,uVar3);
      iVar2 = *(int *)this;
      param_1 = param_1 + (iVar2 - (int)pcVar1);
      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));
      goto joined_r0x00378664;
    }
    reserve(this,uVar3);
    iVar2 = *(int *)this;
  }
  else {
    SYNC(0);
    if (0 < *(int *)(pcVar1 + -4)) {
      pcVar1 = *(char **)this;
      goto LAB_0037861c;
    }
    iVar2 = *(int *)this;
  }
  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));
joined_r0x00378664:
  if (param_2 == 1) {
    *pcVar1 = *param_1;
  }
  else {
    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);
  }
  iVar2 = *(int *)this;
  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {
    *(undefined4 *)(iVar2 + -4) = 0;
    *(uint *)(iVar2 + -0xc) = uVar3;
    *(undefined1 *)(iVar2 + uVar3) = 0;
  }
  return this;
}


lui gp,0x15
addiu gp,gp,0xc80
addu gp,gp,t9
addiu sp,sp,-0x28
sw gp,0x10(sp)
sw s0,0x18(sp)
or s0,a0,zero
sw ra,0x24(sp)
sw s2,0x20(sp)
beq a2,zero,0x00378690
_sw s1,0x1c(sp)
lw v1,0x0(a0)
lui v0,0x3fff
ori v0,v0,0xfffc
lw s1,-0xc(v1)
subu v0,v0,s1
sltu v0,v0,a2
bne v0,zero,0x00378718
_addu s1,a2,s1
lw v0,-0x8(v1)
sltu v0,v0,s1
beq v0,zero,0x003786e8
_or s2,a1,zero
sltu v0,s2,v1
bne v0,zero,0x00378640
_lw t9,-0x665c(gp)
lw v0,-0xc(v1)
addu v0,v1,v0
sltu v0,v0,s2
beq v0,zero,0x003786ac
_or a1,s1,zero
lw t9,-0x665c(gp)
or a0,s0,zero
sw a2,0x30(sp)
bal 0x003781f8
_or a1,s1,zero
lw gp,0x10(sp)
lw a0,0x0(s0)
lw a2,0x30(sp)
lw v1,-0xc(a0)
li v0,0x1
beq a2,v0,0x003786dc
_addu a0,a0,v1
lw t9,-0x3698(gp)
jalr t9
_or a1,s2,zero
lw gp,0x10(sp)
lw v0,0x0(s0)
lw v1,-0x7f00(gp)
addiu a0,v0,-0xc
bne a0,v1,0x00378708
_addu v1,v0,s1
lw ra,0x24(sp)
or v0,s0,zero
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
or a0,s0,zero
sw a2,0x30(sp)
bal 0x003781f8
_subu s2,s2,v1
li v0,0x1
lw a0,0x0(s0)
lw a2,0x30(sp)
lw gp,0x10(sp)
addu s2,a0,s2
lw v1,-0xc(a0)
bne a2,v0,0x0037866c
_addu a0,a0,v1
lb v0,0x0(s2)
b 0x0037867c
_sb v0,0x0(a0)
lw v0,-0x4(v1)
sync 0x0
blez v0,0x00378700
_nop
b 0x0037861c
_lw v1,0x0(a0)
b 0x0037865c
_lw a0,0x0(a0)
sw zero,-0x4(v0)
sw s1,-0xc(v0)
b 0x00378690
_sb zero,0x0(v1)
lw a0,-0x7fc4(gp)
lw t9,-0x73cc(gp)
bal 0x0038977c
_addiu a0,a0,0x446c
(translation_unit "/* std::string::append(char const*, unsigned int) */\n\nstring * __thiscall std::string::append(string *this,char *param_1,uint param_2)\n\n{\n  char *pcVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_2 == 0) {\n    return this;\n  }\n  pcVar1 = *(char **)this;\n  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);\n  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }\n  if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }\n  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\njoined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }\n  iVar2 = *(int *)this;\n  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }\n  return this;\n}\n\n" comment (ERROR "string * __thiscall std::string::append(string *this,char *param_1,uint param_2)" (binary_expression "string * __thiscall std::string::append(string *this" (binary_expression "string * __thiscall" identifier * identifier) (ERROR "std::string::append(string" identifier : : identifier : : identifier ( identifier) * identifier) , primitive_type (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_2 == 0) {\n    return this;\n  }\n  pcVar1 = *(char **)this;\n  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);\n  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }\n  if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }\n  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\njoined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }\n  iVar2 = *(int *)this;\n  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }\n  return this;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (param_2 == 0) {\n    return this;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    return this;\n  }" { (return_statement "return this;" return identifier ;) })) (expression_statement "pcVar1 = *(char **)this;" (assignment_expression "pcVar1 = *(char **)this" identifier = (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = param_2 + *(int *)(pcVar1 + -0xc);" (assignment_expression "uVar3 = param_2 + *(int *)(pcVar1 + -0xc)" identifier = (binary_expression "param_2 + *(int *)(pcVar1 + -0xc)" identifier + (pointer_expression "*(int *)(pcVar1 + -0xc)" * (cast_expression "(int *)(pcVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -0xc)" ( (binary_expression "pcVar1 + -0xc" identifier + number_literal) )))))) ;) (if_statement "if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }" if (parenthesized_expression "(0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2)" ( (binary_expression "0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2" (binary_expression "0x3ffffffcU - *(int *)(pcVar1 + -0xc)" number_literal - (pointer_expression "*(int *)(pcVar1 + -0xc)" * (cast_expression "(int *)(pcVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -0xc)" ( (binary_expression "pcVar1 + -0xc" identifier + number_literal) ))))) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }" { comment (expression_statement "__throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);" (call_expression "__throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c)" identifier (argument_list "(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c)" ( (binary_expression "PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c" identifier + number_literal) ))) ;) })) (if_statement "if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" if (parenthesized_expression "(*(uint *)(pcVar1 + -8) < uVar3)" ( (binary_expression "*(uint *)(pcVar1 + -8) < uVar3" (pointer_expression "*(uint *)(pcVar1 + -8)" * (cast_expression "(uint *)(pcVar1 + -8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -8)" ( (binary_expression "pcVar1 + -8" identifier + number_literal) )))) < identifier) )) (compound_statement "{\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }" { (labeled_statement "LAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" statement_identifier : (if_statement "if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" if (parenthesized_expression "((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc)))" ( (binary_expression "(pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))" (parenthesized_expression "(pcVar1 <= param_1)" ( (binary_expression "pcVar1 <= param_1" identifier <= identifier) )) && (parenthesized_expression "(param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))" ( (binary_expression "param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc)" identifier <= (binary_expression "pcVar1 + *(int *)(pcVar1 + -0xc)" identifier + (pointer_expression "*(int *)(pcVar1 + -0xc)" * (cast_expression "(int *)(pcVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -0xc)" ( (binary_expression "pcVar1 + -0xc" identifier + number_literal) )))))) ))) )) (compound_statement "{\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" { (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" identifier (argument_list "(this,uVar3)" ( identifier , 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))) ;) (expression_statement "param_1 = param_1 + (iVar2 - (int)pcVar1);" (assignment_expression "param_1 = param_1 + (iVar2 - (int)pcVar1)" identifier = (binary_expression "param_1 + (iVar2 - (int)pcVar1)" identifier + (parenthesized_expression "(iVar2 - (int)pcVar1)" ( (binary_expression "iVar2 - (int)pcVar1" identifier - (cast_expression "(int)pcVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));" (assignment_expression "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc))" identifier = (cast_expression "(char *)(iVar2 + *(int *)(iVar2 + -0xc))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + *(int *)(iVar2 + -0xc))" ( (binary_expression "iVar2 + *(int *)(iVar2 + -0xc)" identifier + (pointer_expression "*(int *)(iVar2 + -0xc)" * (cast_expression "(int *)(iVar2 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))))) )))) ;) (goto_statement "goto joined_r0x00378664;" goto statement_identifier ;) }))) (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" identifier (argument_list "(this,uVar3)" ( identifier , 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))) ;) }) (else_clause "else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" else (compound_statement "{\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" { (expression_statement "SYNC(0);" (call_expression "SYNC(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (if_statement "if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }" if (parenthesized_expression "(0 < *(int *)(pcVar1 + -4))" ( (binary_expression "0 < *(int *)(pcVar1 + -4)" number_literal < (pointer_expression "*(int *)(pcVar1 + -4)" * (cast_expression "(int *)(pcVar1 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -4)" ( (binary_expression "pcVar1 + -4" identifier + number_literal) ))))) )) (compound_statement "{\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }" { (expression_statement "pcVar1 = *(char **)this;" (assignment_expression "pcVar1 = *(char **)this" identifier = (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (goto_statement "goto LAB_0037861c;" goto statement_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))) ;) }))) (expression_statement "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));" (assignment_expression "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc))" identifier = (cast_expression "(char *)(iVar2 + *(int *)(iVar2 + -0xc))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + *(int *)(iVar2 + -0xc))" ( (binary_expression "iVar2 + *(int *)(iVar2 + -0xc)" identifier + (pointer_expression "*(int *)(iVar2 + -0xc)" * (cast_expression "(int *)(iVar2 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))))) )))) ;) (labeled_statement "joined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" statement_identifier : (if_statement "if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    *pcVar1 = *param_1;\n  }" { (expression_statement "*pcVar1 = *param_1;" (assignment_expression "*pcVar1 = *param_1" (pointer_expression "*pcVar1" * identifier) = (pointer_expression "*param_1" * identifier)) ;) }) (else_clause "else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" else (compound_statement "{\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" { (expression_statement "(*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);" (call_expression "(*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1)" (parenthesized_expression "(*(code *)PTR_memcpy_004c5ba8)" ( (pointer_expression "*(code *)PTR_memcpy_004c5ba8" * (cast_expression "(code *)PTR_memcpy_004c5ba8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1,param_1)" ( identifier , 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 ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }" if (parenthesized_expression "((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340)" ( (binary_expression "(undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340" (cast_expression "(undefined *)(iVar2 + -0xc)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) != identifier) )) (compound_statement "{\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }" { (expression_statement "*(undefined4 *)(iVar2 + -4) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0" (pointer_expression "*(undefined4 *)(iVar2 + -4)" * (cast_expression "(undefined4 *)(iVar2 + -4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)(iVar2 + -0xc) = uVar3;" (assignment_expression "*(uint *)(iVar2 + -0xc) = uVar3" (pointer_expression "*(uint *)(iVar2 + -0xc)" * (cast_expression "(uint *)(iVar2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(iVar2 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + uVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + uVar3)" * (cast_expression "(undefined1 *)(iVar2 + uVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + uVar3)" ( (binary_expression "iVar2 + uVar3" identifier + identifier) )))) = number_literal) ;) })) (return_statement "return this;" return identifier ;) }))
(translation_unit "/* std::string::append(char const*, unsigned int) */\n\nstring * __thiscall std::string::append(string *this,char *param_1,uint param_2)\n\n{\n  char *pcVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_2 == 0) {\n    return this;\n  }\n  pcVar1 = *(char **)this;\n  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);\n  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }\n  if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }\n  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\njoined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }\n  iVar2 = *(int *)this;\n  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }\n  return this;\n}\n\n" comment (ERROR "string * __thiscall std::string::append(string *this,char *param_1,uint param_2)" (binary_expression "string * __thiscall std::string::append(string *this" (binary_expression "string * __thiscall" identifier * identifier) (ERROR "std::string::append(string" identifier : : identifier : : identifier ( identifier) * identifier) , primitive_type (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_2 == 0) {\n    return this;\n  }\n  pcVar1 = *(char **)this;\n  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);\n  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }\n  if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }\n  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\njoined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }\n  iVar2 = *(int *)this;\n  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }\n  return this;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (param_2 == 0) {\n    return this;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    return this;\n  }" { (return_statement "return this;" return identifier ;) })) (expression_statement "pcVar1 = *(char **)this;" (assignment_expression "pcVar1 = *(char **)this" identifier = (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = param_2 + *(int *)(pcVar1 + -0xc);" (assignment_expression "uVar3 = param_2 + *(int *)(pcVar1 + -0xc)" identifier = (binary_expression "param_2 + *(int *)(pcVar1 + -0xc)" identifier + (pointer_expression "*(int *)(pcVar1 + -0xc)" * (cast_expression "(int *)(pcVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -0xc)" ( (binary_expression "pcVar1 + -0xc" identifier + number_literal) )))))) ;) (if_statement "if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }" if (parenthesized_expression "(0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2)" ( (binary_expression "0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2" (binary_expression "0x3ffffffcU - *(int *)(pcVar1 + -0xc)" number_literal - (pointer_expression "*(int *)(pcVar1 + -0xc)" * (cast_expression "(int *)(pcVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -0xc)" ( (binary_expression "pcVar1 + -0xc" identifier + number_literal) ))))) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }" { comment (expression_statement "__throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);" (call_expression "__throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c)" identifier (argument_list "(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c)" ( (binary_expression "PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c" identifier + number_literal) ))) ;) })) (if_statement "if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" if (parenthesized_expression "(*(uint *)(pcVar1 + -8) < uVar3)" ( (binary_expression "*(uint *)(pcVar1 + -8) < uVar3" (pointer_expression "*(uint *)(pcVar1 + -8)" * (cast_expression "(uint *)(pcVar1 + -8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -8)" ( (binary_expression "pcVar1 + -8" identifier + number_literal) )))) < identifier) )) (compound_statement "{\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }" { (labeled_statement "LAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" statement_identifier : (if_statement "if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" if (parenthesized_expression "((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc)))" ( (binary_expression "(pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))" (parenthesized_expression "(pcVar1 <= param_1)" ( (binary_expression "pcVar1 <= param_1" identifier <= identifier) )) && (parenthesized_expression "(param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))" ( (binary_expression "param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc)" identifier <= (binary_expression "pcVar1 + *(int *)(pcVar1 + -0xc)" identifier + (pointer_expression "*(int *)(pcVar1 + -0xc)" * (cast_expression "(int *)(pcVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -0xc)" ( (binary_expression "pcVar1 + -0xc" identifier + number_literal) )))))) ))) )) (compound_statement "{\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" { (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" identifier (argument_list "(this,uVar3)" ( identifier , 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))) ;) (expression_statement "param_1 = param_1 + (iVar2 - (int)pcVar1);" (assignment_expression "param_1 = param_1 + (iVar2 - (int)pcVar1)" identifier = (binary_expression "param_1 + (iVar2 - (int)pcVar1)" identifier + (parenthesized_expression "(iVar2 - (int)pcVar1)" ( (binary_expression "iVar2 - (int)pcVar1" identifier - (cast_expression "(int)pcVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));" (assignment_expression "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc))" identifier = (cast_expression "(char *)(iVar2 + *(int *)(iVar2 + -0xc))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + *(int *)(iVar2 + -0xc))" ( (binary_expression "iVar2 + *(int *)(iVar2 + -0xc)" identifier + (pointer_expression "*(int *)(iVar2 + -0xc)" * (cast_expression "(int *)(iVar2 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))))) )))) ;) (goto_statement "goto joined_r0x00378664;" goto statement_identifier ;) }))) (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" identifier (argument_list "(this,uVar3)" ( identifier , 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))) ;) }) (else_clause "else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" else (compound_statement "{\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" { (expression_statement "SYNC(0);" (call_expression "SYNC(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (if_statement "if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }" if (parenthesized_expression "(0 < *(int *)(pcVar1 + -4))" ( (binary_expression "0 < *(int *)(pcVar1 + -4)" number_literal < (pointer_expression "*(int *)(pcVar1 + -4)" * (cast_expression "(int *)(pcVar1 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -4)" ( (binary_expression "pcVar1 + -4" identifier + number_literal) ))))) )) (compound_statement "{\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }" { (expression_statement "pcVar1 = *(char **)this;" (assignment_expression "pcVar1 = *(char **)this" identifier = (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (goto_statement "goto LAB_0037861c;" goto statement_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))) ;) }))) (expression_statement "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));" (assignment_expression "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc))" identifier = (cast_expression "(char *)(iVar2 + *(int *)(iVar2 + -0xc))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + *(int *)(iVar2 + -0xc))" ( (binary_expression "iVar2 + *(int *)(iVar2 + -0xc)" identifier + (pointer_expression "*(int *)(iVar2 + -0xc)" * (cast_expression "(int *)(iVar2 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))))) )))) ;) (labeled_statement "joined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" statement_identifier : (if_statement "if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    *pcVar1 = *param_1;\n  }" { (expression_statement "*pcVar1 = *param_1;" (assignment_expression "*pcVar1 = *param_1" (pointer_expression "*pcVar1" * identifier) = (pointer_expression "*param_1" * identifier)) ;) }) (else_clause "else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" else (compound_statement "{\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" { (expression_statement "(*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);" (call_expression "(*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1)" (parenthesized_expression "(*(code *)PTR_memcpy_004c5ba8)" ( (pointer_expression "*(code *)PTR_memcpy_004c5ba8" * (cast_expression "(code *)PTR_memcpy_004c5ba8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1,param_1)" ( identifier , 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 ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }" if (parenthesized_expression "((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340)" ( (binary_expression "(undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340" (cast_expression "(undefined *)(iVar2 + -0xc)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) != identifier) )) (compound_statement "{\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }" { (expression_statement "*(undefined4 *)(iVar2 + -4) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0" (pointer_expression "*(undefined4 *)(iVar2 + -4)" * (cast_expression "(undefined4 *)(iVar2 + -4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)(iVar2 + -0xc) = uVar3;" (assignment_expression "*(uint *)(iVar2 + -0xc) = uVar3" (pointer_expression "*(uint *)(iVar2 + -0xc)" * (cast_expression "(uint *)(iVar2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(iVar2 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + uVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + uVar3)" * (cast_expression "(undefined1 *)(iVar2 + uVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + uVar3)" ( (binary_expression "iVar2 + uVar3" identifier + identifier) )))) = number_literal) ;) })) (return_statement "return this;" return identifier ;) }))
(translation_unit "string * __thiscall std::string::append(string *this,char *param_1,uint param_2)\n\n{\n  char *pcVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_2 == 0) {\n    return this;\n  }\n  pcVar1 = *(char **)this;\n  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);\n  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    \n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }\n  if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }\n  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\njoined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }\n  iVar2 = *(int *)this;\n  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }\n  return this;\n}\n\n" (ERROR "string * __thiscall std::string::append(string *this,char *param_1,uint param_2)" (binary_expression "string * __thiscall std::string::append(string *this" (binary_expression "string * __thiscall" identifier * identifier) (ERROR "std::string::append(string" identifier : : identifier : : identifier ( identifier) * identifier) , primitive_type (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_2 == 0) {\n    return this;\n  }\n  pcVar1 = *(char **)this;\n  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);\n  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    \n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }\n  if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }\n  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\njoined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }\n  iVar2 = *(int *)this;\n  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }\n  return this;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (param_2 == 0) {\n    return this;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    return this;\n  }" { (return_statement "return this;" return identifier ;) })) (expression_statement "pcVar1 = *(char **)this;" (assignment_expression "pcVar1 = *(char **)this" identifier = (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = param_2 + *(int *)(pcVar1 + -0xc);" (assignment_expression "uVar3 = param_2 + *(int *)(pcVar1 + -0xc)" identifier = (binary_expression "param_2 + *(int *)(pcVar1 + -0xc)" identifier + (pointer_expression "*(int *)(pcVar1 + -0xc)" * (cast_expression "(int *)(pcVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -0xc)" ( (binary_expression "pcVar1 + -0xc" identifier + number_literal) )))))) ;) (if_statement "if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    \n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }" if (parenthesized_expression "(0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2)" ( (binary_expression "0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2" (binary_expression "0x3ffffffcU - *(int *)(pcVar1 + -0xc)" number_literal - (pointer_expression "*(int *)(pcVar1 + -0xc)" * (cast_expression "(int *)(pcVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -0xc)" ( (binary_expression "pcVar1 + -0xc" identifier + number_literal) ))))) < identifier) )) (compound_statement "{\n                    \n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }" { (expression_statement "__throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);" (call_expression "__throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c)" identifier (argument_list "(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c)" ( (binary_expression "PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c" identifier + number_literal) ))) ;) })) (if_statement "if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" if (parenthesized_expression "(*(uint *)(pcVar1 + -8) < uVar3)" ( (binary_expression "*(uint *)(pcVar1 + -8) < uVar3" (pointer_expression "*(uint *)(pcVar1 + -8)" * (cast_expression "(uint *)(pcVar1 + -8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -8)" ( (binary_expression "pcVar1 + -8" identifier + number_literal) )))) < identifier) )) (compound_statement "{\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }" { (labeled_statement "LAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" statement_identifier : (if_statement "if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" if (parenthesized_expression "((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc)))" ( (binary_expression "(pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))" (parenthesized_expression "(pcVar1 <= param_1)" ( (binary_expression "pcVar1 <= param_1" identifier <= identifier) )) && (parenthesized_expression "(param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))" ( (binary_expression "param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc)" identifier <= (binary_expression "pcVar1 + *(int *)(pcVar1 + -0xc)" identifier + (pointer_expression "*(int *)(pcVar1 + -0xc)" * (cast_expression "(int *)(pcVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -0xc)" ( (binary_expression "pcVar1 + -0xc" identifier + number_literal) )))))) ))) )) (compound_statement "{\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" { (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" identifier (argument_list "(this,uVar3)" ( identifier , 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))) ;) (expression_statement "param_1 = param_1 + (iVar2 - (int)pcVar1);" (assignment_expression "param_1 = param_1 + (iVar2 - (int)pcVar1)" identifier = (binary_expression "param_1 + (iVar2 - (int)pcVar1)" identifier + (parenthesized_expression "(iVar2 - (int)pcVar1)" ( (binary_expression "iVar2 - (int)pcVar1" identifier - (cast_expression "(int)pcVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));" (assignment_expression "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc))" identifier = (cast_expression "(char *)(iVar2 + *(int *)(iVar2 + -0xc))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + *(int *)(iVar2 + -0xc))" ( (binary_expression "iVar2 + *(int *)(iVar2 + -0xc)" identifier + (pointer_expression "*(int *)(iVar2 + -0xc)" * (cast_expression "(int *)(iVar2 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))))) )))) ;) (goto_statement "goto joined_r0x00378664;" goto statement_identifier ;) }))) (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" identifier (argument_list "(this,uVar3)" ( identifier , 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))) ;) }) (else_clause "else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" else (compound_statement "{\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" { (expression_statement "SYNC(0);" (call_expression "SYNC(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (if_statement "if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }" if (parenthesized_expression "(0 < *(int *)(pcVar1 + -4))" ( (binary_expression "0 < *(int *)(pcVar1 + -4)" number_literal < (pointer_expression "*(int *)(pcVar1 + -4)" * (cast_expression "(int *)(pcVar1 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + -4)" ( (binary_expression "pcVar1 + -4" identifier + number_literal) ))))) )) (compound_statement "{\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }" { (expression_statement "pcVar1 = *(char **)this;" (assignment_expression "pcVar1 = *(char **)this" identifier = (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (goto_statement "goto LAB_0037861c;" goto statement_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))) ;) }))) (expression_statement "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));" (assignment_expression "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc))" identifier = (cast_expression "(char *)(iVar2 + *(int *)(iVar2 + -0xc))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + *(int *)(iVar2 + -0xc))" ( (binary_expression "iVar2 + *(int *)(iVar2 + -0xc)" identifier + (pointer_expression "*(int *)(iVar2 + -0xc)" * (cast_expression "(int *)(iVar2 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))))) )))) ;) (labeled_statement "joined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" statement_identifier : (if_statement "if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    *pcVar1 = *param_1;\n  }" { (expression_statement "*pcVar1 = *param_1;" (assignment_expression "*pcVar1 = *param_1" (pointer_expression "*pcVar1" * identifier) = (pointer_expression "*param_1" * identifier)) ;) }) (else_clause "else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" else (compound_statement "{\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" { (expression_statement "(*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);" (call_expression "(*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1)" (parenthesized_expression "(*(code *)PTR_memcpy_004c5ba8)" ( (pointer_expression "*(code *)PTR_memcpy_004c5ba8" * (cast_expression "(code *)PTR_memcpy_004c5ba8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1,param_1)" ( identifier , 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 ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }" if (parenthesized_expression "((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340)" ( (binary_expression "(undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340" (cast_expression "(undefined *)(iVar2 + -0xc)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) != identifier) )) (compound_statement "{\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }" { (expression_statement "*(undefined4 *)(iVar2 + -4) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0" (pointer_expression "*(undefined4 *)(iVar2 + -4)" * (cast_expression "(undefined4 *)(iVar2 + -4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)(iVar2 + -0xc) = uVar3;" (assignment_expression "*(uint *)(iVar2 + -0xc) = uVar3" (pointer_expression "*(uint *)(iVar2 + -0xc)" * (cast_expression "(uint *)(iVar2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(iVar2 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + uVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + uVar3)" * (cast_expression "(undefined1 *)(iVar2 + uVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + uVar3)" ( (binary_expression "iVar2 + uVar3" identifier + identifier) )))) = number_literal) ;) })) (return_statement "return this;" return identifier ;) }))
(translation_unit (ERROR (binary_expression (binary_expression IDENT * IDENT) (ERROR IDENT : : IDENT : : IDENT ( IDENT) * IDENT) , TYPE (pointer_declarator * IDENT) , IDENT IDENT )) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return 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 + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression LIT - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) && (parenthesized_expression ( (binary_expression IDENT <= (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) ;) (goto_statement goto statement_identifier ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) }) (else_clause else (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 *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) != IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = LIT) ;) })) (return_statement return IDENT ;) }))
(ERROR "string * __thiscall std::string::append(string *this,char *param_1,uint param_2)" (binary_expression "string * __thiscall std::string::append(string *this" (binary_expression "string * __thiscall" (identifier "string") (* "*") (identifier "__thiscall")) (ERROR "std::string::append(string" (identifier "std") (: ":") (: ":") (identifier "string") (: ":") (: ":") (identifier "append") (( "(") (identifier "string")) (* "*") (identifier "this")) (, ",") (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1")) (, ",") (identifier "uint") (identifier "param_2") () ")")) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (param_2 == 0) {\n    return this;\n  }\n  pcVar1 = *(char **)this;\n  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);\n  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    \n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }\n  if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }\n  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\njoined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }\n  iVar2 = *(int *)this;\n  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }\n  return this;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (if_statement "if (param_2 == 0) {\n    return this;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return this;\n  }" ({ "{") (return_statement "return this;" (return "return") (identifier "this") (; ";")) (} "}"))) (expression_statement "pcVar1 = *(char **)this;" (assignment_expression "pcVar1 = *(char **)this" (identifier "pcVar1") (= "=") (pointer_expression "*(char **)this" (* "*") (cast_expression "(char **)this" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (expression_statement "uVar3 = param_2 + *(int *)(pcVar1 + -0xc);" (assignment_expression "uVar3 = param_2 + *(int *)(pcVar1 + -0xc)" (identifier "uVar3") (= "=") (binary_expression "param_2 + *(int *)(pcVar1 + -0xc)" (identifier "param_2") (+ "+") (pointer_expression "*(int *)(pcVar1 + -0xc)" (* "*") (cast_expression "(int *)(pcVar1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar1 + -0xc)" (( "(") (binary_expression "pcVar1 + -0xc" (identifier "pcVar1") (+ "+") (number_literal "-0xc")) () ")")))))) (; ";")) (if_statement "if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {\n                    \n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }" (if "if") (parenthesized_expression "(0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2)" (( "(") (binary_expression "0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2" (binary_expression "0x3ffffffcU - *(int *)(pcVar1 + -0xc)" (number_literal "0x3ffffffcU") (- "-") (pointer_expression "*(int *)(pcVar1 + -0xc)" (* "*") (cast_expression "(int *)(pcVar1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar1 + -0xc)" (( "(") (binary_expression "pcVar1 + -0xc" (identifier "pcVar1") (+ "+") (number_literal "-0xc")) () ")"))))) (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n                    \n    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);\n  }" ({ "{") (expression_statement "__throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);" (call_expression "__throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c)" (identifier "__throw_length_error") (argument_list "(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c)" (( "(") (binary_expression "PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c" (identifier "PTR_s_ral_options14Struct_no_crefE_004c127c") (+ "+") (number_literal "0x446c")) () ")"))) (; ";")) (} "}"))) (if_statement "if (*(uint *)(pcVar1 + -8) < uVar3) {\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }\n  else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" (if "if") (parenthesized_expression "(*(uint *)(pcVar1 + -8) < uVar3)" (( "(") (binary_expression "*(uint *)(pcVar1 + -8) < uVar3" (pointer_expression "*(uint *)(pcVar1 + -8)" (* "*") (cast_expression "(uint *)(pcVar1 + -8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar1 + -8)" (( "(") (binary_expression "pcVar1 + -8" (identifier "pcVar1") (+ "+") (number_literal "-8")) () ")")))) (< "<") (identifier "uVar3")) () ")")) (compound_statement "{\nLAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }\n    reserve(this,uVar3);\n    iVar2 = *(int *)this;\n  }" ({ "{") (labeled_statement "LAB_0037861c:\n    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" (statement_identifier "LAB_0037861c") (: ":") (if_statement "if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" (if "if") (parenthesized_expression "((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc)))" (( "(") (binary_expression "(pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))" (parenthesized_expression "(pcVar1 <= param_1)" (( "(") (binary_expression "pcVar1 <= param_1" (identifier "pcVar1") (<= "<=") (identifier "param_1")) () ")")) (&& "&&") (parenthesized_expression "(param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))" (( "(") (binary_expression "param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc)" (identifier "param_1") (<= "<=") (binary_expression "pcVar1 + *(int *)(pcVar1 + -0xc)" (identifier "pcVar1") (+ "+") (pointer_expression "*(int *)(pcVar1 + -0xc)" (* "*") (cast_expression "(int *)(pcVar1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar1 + -0xc)" (( "(") (binary_expression "pcVar1 + -0xc" (identifier "pcVar1") (+ "+") (number_literal "-0xc")) () ")")))))) () ")"))) () ")")) (compound_statement "{\n      reserve(this,uVar3);\n      iVar2 = *(int *)this;\n      param_1 = param_1 + (iVar2 - (int)pcVar1);\n      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));\n      goto joined_r0x00378664;\n    }" ({ "{") (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" (identifier "reserve") (argument_list "(this,uVar3)" (( "(") (identifier "this") (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" (identifier "iVar2") (= "=") (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this")))) (; ";")) (expression_statement "param_1 = param_1 + (iVar2 - (int)pcVar1);" (assignment_expression "param_1 = param_1 + (iVar2 - (int)pcVar1)" (identifier "param_1") (= "=") (binary_expression "param_1 + (iVar2 - (int)pcVar1)" (identifier "param_1") (+ "+") (parenthesized_expression "(iVar2 - (int)pcVar1)" (( "(") (binary_expression "iVar2 - (int)pcVar1" (identifier "iVar2") (- "-") (cast_expression "(int)pcVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar1"))) () ")")))) (; ";")) (expression_statement "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));" (assignment_expression "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc))" (identifier "pcVar1") (= "=") (cast_expression "(char *)(iVar2 + *(int *)(iVar2 + -0xc))" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + *(int *)(iVar2 + -0xc))" (( "(") (binary_expression "iVar2 + *(int *)(iVar2 + -0xc)" (identifier "iVar2") (+ "+") (pointer_expression "*(int *)(iVar2 + -0xc)" (* "*") (cast_expression "(int *)(iVar2 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -0xc)" (( "(") (binary_expression "iVar2 + -0xc" (identifier "iVar2") (+ "+") (number_literal "-0xc")) () ")"))))) () ")")))) (; ";")) (goto_statement "goto joined_r0x00378664;" (goto "goto") (statement_identifier "joined_r0x00378664") (; ";")) (} "}")))) (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" (identifier "reserve") (argument_list "(this,uVar3)" (( "(") (identifier "this") (, ",") (identifier "uVar3") () ")"))) (; ";")) (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")))) (; ";")) (} "}")) (else_clause "else {\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" (else "else") (compound_statement "{\n    SYNC(0);\n    if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }\n    iVar2 = *(int *)this;\n  }" ({ "{") (expression_statement "SYNC(0);" (call_expression "SYNC(0)" (identifier "SYNC") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (if_statement "if (0 < *(int *)(pcVar1 + -4)) {\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }" (if "if") (parenthesized_expression "(0 < *(int *)(pcVar1 + -4))" (( "(") (binary_expression "0 < *(int *)(pcVar1 + -4)" (number_literal "0") (< "<") (pointer_expression "*(int *)(pcVar1 + -4)" (* "*") (cast_expression "(int *)(pcVar1 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar1 + -4)" (( "(") (binary_expression "pcVar1 + -4" (identifier "pcVar1") (+ "+") (number_literal "-4")) () ")"))))) () ")")) (compound_statement "{\n      pcVar1 = *(char **)this;\n      goto LAB_0037861c;\n    }" ({ "{") (expression_statement "pcVar1 = *(char **)this;" (assignment_expression "pcVar1 = *(char **)this" (identifier "pcVar1") (= "=") (pointer_expression "*(char **)this" (* "*") (cast_expression "(char **)this" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (goto_statement "goto LAB_0037861c;" (goto "goto") (statement_identifier "LAB_0037861c") (; ";")) (} "}"))) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" (identifier "iVar2") (= "=") (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this")))) (; ";")) (} "}")))) (expression_statement "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));" (assignment_expression "pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc))" (identifier "pcVar1") (= "=") (cast_expression "(char *)(iVar2 + *(int *)(iVar2 + -0xc))" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + *(int *)(iVar2 + -0xc))" (( "(") (binary_expression "iVar2 + *(int *)(iVar2 + -0xc)" (identifier "iVar2") (+ "+") (pointer_expression "*(int *)(iVar2 + -0xc)" (* "*") (cast_expression "(int *)(iVar2 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -0xc)" (( "(") (binary_expression "iVar2 + -0xc" (identifier "iVar2") (+ "+") (number_literal "-0xc")) () ")"))))) () ")")))) (; ";")) (labeled_statement "joined_r0x00378664:\n  if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" (statement_identifier "joined_r0x00378664") (: ":") (if_statement "if (param_2 == 1) {\n    *pcVar1 = *param_1;\n  }\n  else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    *pcVar1 = *param_1;\n  }" ({ "{") (expression_statement "*pcVar1 = *param_1;" (assignment_expression "*pcVar1 = *param_1" (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1")) (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}")) (else_clause "else {\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" (else "else") (compound_statement "{\n    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);\n  }" ({ "{") (expression_statement "(*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);" (call_expression "(*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1)" (parenthesized_expression "(*(code *)PTR_memcpy_004c5ba8)" (( "(") (pointer_expression "*(code *)PTR_memcpy_004c5ba8" (* "*") (cast_expression "(code *)PTR_memcpy_004c5ba8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_004c5ba8"))) () ")")) (argument_list "(pcVar1,param_1)" (( "(") (identifier "pcVar1") (, ",") (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 ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }" (if "if") (parenthesized_expression "((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340)" (( "(") (binary_expression "(undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340" (cast_expression "(undefined *)(iVar2 + -0xc)" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -0xc)" (( "(") (binary_expression "iVar2 + -0xc" (identifier "iVar2") (+ "+") (number_literal "-0xc")) () ")"))) (!= "!=") (identifier "PTR__S_empty_rep_storage_004c1340")) () ")")) (compound_statement "{\n    *(undefined4 *)(iVar2 + -4) = 0;\n    *(uint *)(iVar2 + -0xc) = uVar3;\n    *(undefined1 *)(iVar2 + uVar3) = 0;\n  }" ({ "{") (expression_statement "*(undefined4 *)(iVar2 + -4) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + -4) = 0" (pointer_expression "*(undefined4 *)(iVar2 + -4)" (* "*") (cast_expression "(undefined4 *)(iVar2 + -4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -4)" (( "(") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(uint *)(iVar2 + -0xc) = uVar3;" (assignment_expression "*(uint *)(iVar2 + -0xc) = uVar3" (pointer_expression "*(uint *)(iVar2 + -0xc)" (* "*") (cast_expression "(uint *)(iVar2 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -0xc)" (( "(") (binary_expression "iVar2 + -0xc" (identifier "iVar2") (+ "+") (number_literal "-0xc")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "*(undefined1 *)(iVar2 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + uVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + uVar3)" (* "*") (cast_expression "(undefined1 *)(iVar2 + uVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + uVar3)" (( "(") (binary_expression "iVar2 + uVar3" (identifier "iVar2") (+ "+") (identifier "uVar3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return this;" (return "return") (identifier "this") (; ";")) (} "}"))
(translation_unit (ERROR (binary_expression left: (binary_expression left: (identifier) right: (identifier)) (ERROR (identifier) (identifier) (identifier) (identifier)) right: (identifier)) type: (primitive_type) (pointer_declarator declarator: (identifier)) (identifier) (identifier)) (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) 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)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (number_literal) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_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: (identifier))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (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))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) 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)))))))))) (goto_statement label: (statement_identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (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)))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))) (goto_statement label: (statement_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)))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) 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)))))))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier))))) 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 (identifier) (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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (identifier))) 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: (number_literal))) (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: (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: (identifier))))) right: (number_literal))))) (return_statement (identifier))))

/* std::string::MASKED(char const*, unsigned int) */

string * __thiscall std::string::MASKED(string *this,char *param_1,uint param_2)

{
  char *pcVar1;
  int iVar2;
  uint uVar3;
  
  if (param_2 == 0) {
    return this;
  }
  pcVar1 = *(char **)this;
  uVar3 = param_2 + *(int *)(pcVar1 + -0xc);
  if (0x3ffffffcU - *(int *)(pcVar1 + -0xc) < param_2) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error(PTR_s_ral_options14Struct_no_crefE_004c127c + 0x446c);
  }
  if (*(uint *)(pcVar1 + -8) < uVar3) {
LAB_0037861c:
    if ((pcVar1 <= param_1) && (param_1 <= pcVar1 + *(int *)(pcVar1 + -0xc))) {
      reserve(this,uVar3);
      iVar2 = *(int *)this;
      param_1 = param_1 + (iVar2 - (int)pcVar1);
      pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));
      goto joined_r0x00378664;
    }
    reserve(this,uVar3);
    iVar2 = *(int *)this;
  }
  else {
    SYNC(0);
    if (0 < *(int *)(pcVar1 + -4)) {
      pcVar1 = *(char **)this;
      goto LAB_0037861c;
    }
    iVar2 = *(int *)this;
  }
  pcVar1 = (char *)(iVar2 + *(int *)(iVar2 + -0xc));
joined_r0x00378664:
  if (param_2 == 1) {
    *pcVar1 = *param_1;
  }
  else {
    (*(code *)PTR_memcpy_004c5ba8)(pcVar1,param_1);
  }
  iVar2 = *(int *)this;
  if ((undefined *)(iVar2 + -0xc) != PTR__S_empty_rep_storage_004c1340) {
    *(undefined4 *)(iVar2 + -4) = 0;
    *(uint *)(iVar2 + -0xc) = uVar3;
    *(undefined1 *)(iVar2 + uVar3) = 0;
  }
  return this;
}

