
/* std::string::append(unsigned long, char) */

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

{
  long lVar1;
  char *__s;
  ulong uVar2;
  
  if (param_1 != 0) {
    lVar1 = *(long *)this;
    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_1) {
                    /* WARNING: Subroutine does not return */
      __throw_length_error("basic_string::append");
    }
    uVar2 = *(long *)(lVar1 + -0x18) + param_1;
    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {
      reserve(this,uVar2);
    }
    __s = (char *)(*(long *)this + *(long *)(*(long *)this + -0x18));
    if (param_1 == 1) {
      *__s = param_2;
    }
    else {
      memset(__s,(int)param_2,param_1);
    }
    lVar1 = *(long *)this;
    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_0045bc38) {
      *(undefined4 *)(lVar1 + -8) = 0;
      *(ulong *)(lVar1 + -0x18) = uVar2;
      *(undefined1 *)(lVar1 + uVar2) = 0;
    }
  }
  return this;
}



long * FUN_00325d60(long *param_1,ulong param_2,char param_3)

{
  long lVar1;
  char *__s;
  ulong uVar2;
  
  if (param_2 != 0) {
    lVar1 = *param_1;
    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {
                    /* WARNING: Subroutine does not return */
      FUN_00330790("basic_string::append");
    }
    uVar2 = *(long *)(lVar1 + -0x18) + param_2;
    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {
      FUN_00325990(param_1,uVar2);
    }
    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));
    if (param_2 == 1) {
      *__s = param_3;
    }
    else {
      memset(__s,(int)param_3,param_2);
    }
    lVar1 = *param_1;
    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {
      *(undefined4 *)(lVar1 + -8) = 0;
      *(ulong *)(lVar1 + -0x18) = uVar2;
      *(undefined1 *)(lVar1 + uVar2) = 0;
    }
  }
  return param_1;
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
TEST RSI,RSI
JZ 0x00325dd5
MOV RAX,0x3ffffffffffffff9
MOV R13D,EDX
MOV RDX,qword ptr [RDI]
MOV RBP,RSI
MOV R12,qword ptr [RDX + -0x18]
SUB RAX,R12
CMP RSI,RAX
JA 0x00325e02
ADD R12,RSI
CMP R12,qword ptr [RDX + -0x10]
JA 0x00325da1
MOV EAX,dword ptr [RDX + -0x8]
TEST EAX,EAX
JLE 0x00325dac
MOV RSI,R12
MOV RDI,RBX
CALL 0x00325990
MOV RDI,qword ptr [RBX]
ADD RDI,qword ptr [RDI + -0x18]
CMP RBP,0x1
JZ 0x00325de8
MOVSX ESI,R13B
MOV RDX,RBP
CALL 0x00149100
MOV RAX,qword ptr [RBX]
LEA RDX,[RAX + -0x18]
CMP RDX,qword ptr [0x0045bc38]
JNZ 0x00325df0
ADD RSP,0x8
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
RET
MOV byte ptr [RDI],R13B
JMP 0x00325dc5
MOV dword ptr [RAX + -0x8],0x0
MOV qword ptr [RAX + -0x18],R12
MOV byte ptr [RAX + R12*0x1],0x0
JMP 0x00325dd5
LEA RDI,[0x38bceb]
CALL 0x00330790
(translation_unit "long * FUN_00325d60(long *param_1,ulong param_2,char param_3)\n\n{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return param_1;\n}\n\n" (function_definition "long * FUN_00325d60(long *param_1,ulong param_2,char param_3)\n\n{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return param_1;\n}" (sized_type_specifier "long" long) (pointer_declarator "* FUN_00325d60(long *param_1,ulong param_2,char param_3)" * (function_declarator "FUN_00325d60(long *param_1,ulong param_2,char param_3)" identifier (parameter_list "(long *param_1,ulong param_2,char param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "char param_3" primitive_type identifier) )))) (compound_statement "{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return param_1;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (if_statement "if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }" { (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00330790("basic_string::append");\n    }" if (parenthesized_expression "(0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2)" ( (binary_expression "0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2" (binary_expression "0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18)" number_literal - (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) ))))) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      FUN_00330790("basic_string::append");\n    }" { comment (expression_statement "FUN_00330790("basic_string::append");" (call_expression "FUN_00330790("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) (expression_statement "uVar2 = *(long *)(lVar1 + -0x18) + param_2;" (assignment_expression "uVar2 = *(long *)(lVar1 + -0x18) + param_2" identifier = (binary_expression "*(long *)(lVar1 + -0x18) + param_2" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }" if (parenthesized_expression "((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8)))" ( (binary_expression "(*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))" (parenthesized_expression "(*(ulong *)(lVar1 + -0x10) < uVar2)" ( (binary_expression "*(ulong *)(lVar1 + -0x10) < uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x10)" * (cast_expression "(ulong *)(lVar1 + -0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x10)" ( (binary_expression "lVar1 + -0x10" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(0 < *(int *)(lVar1 + -8))" ( (binary_expression "0 < *(int *)(lVar1 + -8)" number_literal < (pointer_expression "*(int *)(lVar1 + -8)" * (cast_expression "(int *)(lVar1 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      FUN_00325990(param_1,uVar2);\n    }" { (expression_statement "FUN_00325990(param_1,uVar2);" (call_expression "FUN_00325990(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "__s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));" (assignment_expression "__s = (char *)(*param_1 + *(long *)(*param_1 + -0x18))" identifier = (cast_expression "(char *)(*param_1 + *(long *)(*param_1 + -0x18))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + *(long *)(*param_1 + -0x18))" ( (binary_expression "*param_1 + *(long *)(*param_1 + -0x18)" (pointer_expression "*param_1" * identifier) + (pointer_expression "*(long *)(*param_1 + -0x18)" * (cast_expression "(long *)(*param_1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )))) ;) (if_statement "if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n      *__s = param_3;\n    }" { (expression_statement "*__s = param_3;" (assignment_expression "*__s = param_3" (pointer_expression "*__s" * identifier) = identifier) ;) }) (else_clause "else {\n      memset(__s,(int)param_3,param_2);\n    }" else (compound_statement "{\n      memset(__s,(int)param_3,param_2);\n    }" { (expression_statement "memset(__s,(int)param_3,param_2);" (call_expression "memset(__s,(int)param_3,param_2)" identifier (argument_list "(__s,(int)param_3,param_2)" ( identifier , (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) , identifier ))) ;) }))) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }" if (parenthesized_expression "((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38)" ( (binary_expression "(undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38" (cast_expression "(undefined *)(lVar1 + -0x18)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) ))) != identifier) )) (compound_statement "{\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }" { (expression_statement "*(undefined4 *)(lVar1 + -8) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + -8) = 0" (pointer_expression "*(undefined4 *)(lVar1 + -8)" * (cast_expression "(undefined4 *)(lVar1 + -8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ulong *)(lVar1 + -0x18) = uVar2;" (assignment_expression "*(ulong *)(lVar1 + -0x18) = uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x18)" * (cast_expression "(ulong *)(lVar1 + -0x18)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(lVar1 + uVar2) = 0;" (assignment_expression "*(undefined1 *)(lVar1 + uVar2) = 0" (pointer_expression "*(undefined1 *)(lVar1 + uVar2)" * (cast_expression "(undefined1 *)(lVar1 + uVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + uVar2)" ( (binary_expression "lVar1 + uVar2" identifier + identifier) )))) = number_literal) ;) })) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* std::string::append(unsigned long, char) */\n\nstring * __thiscall std::string::append(string *this,ulong param_1,char param_2)\n\n{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_1 != 0) {\n    lVar1 = *(long *)this;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_1) {\n                    /* WARNING: Subroutine does not return */\n      __throw_length_error("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_1;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }\n    __s = (char *)(*(long *)this + *(long *)(*(long *)this + -0x18));\n    if (param_1 == 1) {\n      *__s = param_2;\n    }\n    else {\n      memset(__s,(int)param_2,param_1);\n    }\n    lVar1 = *(long *)this;\n    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return this;\n}\n\n" comment (ERROR "string * __thiscall std::string::append(string *this,ulong param_1,char 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) , type_identifier identifier , identifier identifier )) (compound_statement "{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_1 != 0) {\n    lVar1 = *(long *)this;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_1) {\n                    /* WARNING: Subroutine does not return */\n      __throw_length_error("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_1;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }\n    __s = (char *)(*(long *)this + *(long *)(*(long *)this + -0x18));\n    if (param_1 == 1) {\n      *__s = param_2;\n    }\n    else {\n      memset(__s,(int)param_2,param_1);\n    }\n    lVar1 = *(long *)this;\n    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return this;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (if_statement "if (param_1 != 0) {\n    lVar1 = *(long *)this;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_1) {\n                    /* WARNING: Subroutine does not return */\n      __throw_length_error("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_1;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }\n    __s = (char *)(*(long *)this + *(long *)(*(long *)this + -0x18));\n    if (param_1 == 1) {\n      *__s = param_2;\n    }\n    else {\n      memset(__s,(int)param_2,param_1);\n    }\n    lVar1 = *(long *)this;\n    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    lVar1 = *(long *)this;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_1) {\n                    /* WARNING: Subroutine does not return */\n      __throw_length_error("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_1;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }\n    __s = (char *)(*(long *)this + *(long *)(*(long *)this + -0x18));\n    if (param_1 == 1) {\n      *__s = param_2;\n    }\n    else {\n      memset(__s,(int)param_2,param_1);\n    }\n    lVar1 = *(long *)this;\n    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }" { (expression_statement "lVar1 = *(long *)this;" (assignment_expression "lVar1 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_1) {\n                    /* WARNING: Subroutine does not return */\n      __throw_length_error("basic_string::append");\n    }" if (parenthesized_expression "(0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_1)" ( (binary_expression "0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_1" (binary_expression "0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18)" number_literal - (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) ))))) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __throw_length_error("basic_string::append");\n    }" { comment (expression_statement "__throw_length_error("basic_string::append");" (call_expression "__throw_length_error("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) (expression_statement "uVar2 = *(long *)(lVar1 + -0x18) + param_1;" (assignment_expression "uVar2 = *(long *)(lVar1 + -0x18) + param_1" identifier = (binary_expression "*(long *)(lVar1 + -0x18) + param_1" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }" if (parenthesized_expression "((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8)))" ( (binary_expression "(*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))" (parenthesized_expression "(*(ulong *)(lVar1 + -0x10) < uVar2)" ( (binary_expression "*(ulong *)(lVar1 + -0x10) < uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x10)" * (cast_expression "(ulong *)(lVar1 + -0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x10)" ( (binary_expression "lVar1 + -0x10" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(0 < *(int *)(lVar1 + -8))" ( (binary_expression "0 < *(int *)(lVar1 + -8)" number_literal < (pointer_expression "*(int *)(lVar1 + -8)" * (cast_expression "(int *)(lVar1 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      reserve(this,uVar2);\n    }" { (expression_statement "reserve(this,uVar2);" (call_expression "reserve(this,uVar2)" identifier (argument_list "(this,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "__s = (char *)(*(long *)this + *(long *)(*(long *)this + -0x18));" (assignment_expression "__s = (char *)(*(long *)this + *(long *)(*(long *)this + -0x18))" identifier = (cast_expression "(char *)(*(long *)this + *(long *)(*(long *)this + -0x18))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)this + *(long *)(*(long *)this + -0x18))" ( (binary_expression "*(long *)this + *(long *)(*(long *)this + -0x18)" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + (pointer_expression "*(long *)(*(long *)this + -0x18)" * (cast_expression "(long *)(*(long *)this + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)this + -0x18)" ( (binary_expression "*(long *)this + -0x18" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) (if_statement "if (param_1 == 1) {\n      *__s = param_2;\n    }\n    else {\n      memset(__s,(int)param_2,param_1);\n    }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n      *__s = param_2;\n    }" { (expression_statement "*__s = param_2;" (assignment_expression "*__s = param_2" (pointer_expression "*__s" * identifier) = identifier) ;) }) (else_clause "else {\n      memset(__s,(int)param_2,param_1);\n    }" else (compound_statement "{\n      memset(__s,(int)param_2,param_1);\n    }" { (expression_statement "memset(__s,(int)param_2,param_1);" (call_expression "memset(__s,(int)param_2,param_1)" identifier (argument_list "(__s,(int)param_2,param_1)" ( identifier , (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) , identifier ))) ;) }))) (expression_statement "lVar1 = *(long *)this;" (assignment_expression "lVar1 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }" if (parenthesized_expression "((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_0045bc38)" ( (binary_expression "(undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_0045bc38" (cast_expression "(undefined *)(lVar1 + -0x18)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) ))) != identifier) )) (compound_statement "{\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }" { (expression_statement "*(undefined4 *)(lVar1 + -8) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + -8) = 0" (pointer_expression "*(undefined4 *)(lVar1 + -8)" * (cast_expression "(undefined4 *)(lVar1 + -8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ulong *)(lVar1 + -0x18) = uVar2;" (assignment_expression "*(ulong *)(lVar1 + -0x18) = uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x18)" * (cast_expression "(ulong *)(lVar1 + -0x18)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(lVar1 + uVar2) = 0;" (assignment_expression "*(undefined1 *)(lVar1 + uVar2) = 0" (pointer_expression "*(undefined1 *)(lVar1 + uVar2)" * (cast_expression "(undefined1 *)(lVar1 + uVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + uVar2)" ( (binary_expression "lVar1 + uVar2" identifier + identifier) )))) = number_literal) ;) })) })) (return_statement "return this;" return identifier ;) }))
(translation_unit "long * FUN_00325d60(long *param_1,ulong param_2,char param_3)\n\n{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return param_1;\n}\n\n" (function_definition "long * FUN_00325d60(long *param_1,ulong param_2,char param_3)\n\n{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return param_1;\n}" (sized_type_specifier "long" long) (pointer_declarator "* FUN_00325d60(long *param_1,ulong param_2,char param_3)" * (function_declarator "FUN_00325d60(long *param_1,ulong param_2,char param_3)" identifier (parameter_list "(long *param_1,ulong param_2,char param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "char param_3" primitive_type identifier) )))) (compound_statement "{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return param_1;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (if_statement "if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }" { (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }" if (parenthesized_expression "(0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2)" ( (binary_expression "0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2" (binary_expression "0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18)" number_literal - (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) ))))) < identifier) )) (compound_statement "{\n                    \n      FUN_00330790("basic_string::append");\n    }" { (expression_statement "FUN_00330790("basic_string::append");" (call_expression "FUN_00330790("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) (expression_statement "uVar2 = *(long *)(lVar1 + -0x18) + param_2;" (assignment_expression "uVar2 = *(long *)(lVar1 + -0x18) + param_2" identifier = (binary_expression "*(long *)(lVar1 + -0x18) + param_2" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }" if (parenthesized_expression "((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8)))" ( (binary_expression "(*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))" (parenthesized_expression "(*(ulong *)(lVar1 + -0x10) < uVar2)" ( (binary_expression "*(ulong *)(lVar1 + -0x10) < uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x10)" * (cast_expression "(ulong *)(lVar1 + -0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x10)" ( (binary_expression "lVar1 + -0x10" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(0 < *(int *)(lVar1 + -8))" ( (binary_expression "0 < *(int *)(lVar1 + -8)" number_literal < (pointer_expression "*(int *)(lVar1 + -8)" * (cast_expression "(int *)(lVar1 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      FUN_00325990(param_1,uVar2);\n    }" { (expression_statement "FUN_00325990(param_1,uVar2);" (call_expression "FUN_00325990(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "__s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));" (assignment_expression "__s = (char *)(*param_1 + *(long *)(*param_1 + -0x18))" identifier = (cast_expression "(char *)(*param_1 + *(long *)(*param_1 + -0x18))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + *(long *)(*param_1 + -0x18))" ( (binary_expression "*param_1 + *(long *)(*param_1 + -0x18)" (pointer_expression "*param_1" * identifier) + (pointer_expression "*(long *)(*param_1 + -0x18)" * (cast_expression "(long *)(*param_1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )))) ;) (if_statement "if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n      *__s = param_3;\n    }" { (expression_statement "*__s = param_3;" (assignment_expression "*__s = param_3" (pointer_expression "*__s" * identifier) = identifier) ;) }) (else_clause "else {\n      memset(__s,(int)param_3,param_2);\n    }" else (compound_statement "{\n      memset(__s,(int)param_3,param_2);\n    }" { (expression_statement "memset(__s,(int)param_3,param_2);" (call_expression "memset(__s,(int)param_3,param_2)" identifier (argument_list "(__s,(int)param_3,param_2)" ( identifier , (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) , identifier ))) ;) }))) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }" if (parenthesized_expression "((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38)" ( (binary_expression "(undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38" (cast_expression "(undefined *)(lVar1 + -0x18)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) ))) != identifier) )) (compound_statement "{\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }" { (expression_statement "*(undefined4 *)(lVar1 + -8) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + -8) = 0" (pointer_expression "*(undefined4 *)(lVar1 + -8)" * (cast_expression "(undefined4 *)(lVar1 + -8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ulong *)(lVar1 + -0x18) = uVar2;" (assignment_expression "*(ulong *)(lVar1 + -0x18) = uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x18)" * (cast_expression "(ulong *)(lVar1 + -0x18)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(lVar1 + uVar2) = 0;" (assignment_expression "*(undefined1 *)(lVar1 + uVar2) = 0" (pointer_expression "*(undefined1 *)(lVar1 + uVar2)" * (cast_expression "(undefined1 *)(lVar1 + uVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + uVar2)" ( (binary_expression "lVar1 + uVar2" identifier + identifier) )))) = number_literal) ;) })) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition (sized_type_specifier long) (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression LIT - (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )) || (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 (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) IDENT) , IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (pointer_expression * 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 ;) })))
(function_definition "long * FUN_00325d60(long *param_1,ulong param_2,char param_3)\n\n{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return param_1;\n}" (sized_type_specifier "long" (long "long")) (pointer_declarator "* FUN_00325d60(long *param_1,ulong param_2,char param_3)" (* "*") (function_declarator "FUN_00325d60(long *param_1,ulong param_2,char param_3)" (identifier "FUN_00325d60") (parameter_list "(long *param_1,ulong param_2,char param_3)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) (, ",") (parameter_declaration "char param_3" (primitive_type "char") (identifier "param_3")) () ")")))) (compound_statement "{\n  long lVar1;\n  char *__s;\n  ulong uVar2;\n  \n  if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }\n  return param_1;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (if_statement "if (param_2 != 0) {\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    lVar1 = *param_1;\n    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }\n    uVar2 = *(long *)(lVar1 + -0x18) + param_2;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }\n    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));\n    if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }\n    lVar1 = *param_1;\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }\n  }" ({ "{") (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {\n                    \n      FUN_00330790("basic_string::append");\n    }" (if "if") (parenthesized_expression "(0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2)" (( "(") (binary_expression "0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2" (binary_expression "0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18)" (number_literal "0x3ffffffffffffff9U") (- "-") (pointer_expression "*(long *)(lVar1 + -0x18)" (* "*") (cast_expression "(long *)(lVar1 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x18)" (( "(") (binary_expression "lVar1 + -0x18" (identifier "lVar1") (+ "+") (number_literal "-0x18")) () ")"))))) (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n                    \n      FUN_00330790("basic_string::append");\n    }" ({ "{") (expression_statement "FUN_00330790("basic_string::append");" (call_expression "FUN_00330790("basic_string::append")" (identifier "FUN_00330790") (argument_list "("basic_string::append")" (( "(") (string_literal ""basic_string::append"" (" """) (string_content "basic_string::append") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar2 = *(long *)(lVar1 + -0x18) + param_2;" (assignment_expression "uVar2 = *(long *)(lVar1 + -0x18) + param_2" (identifier "uVar2") (= "=") (binary_expression "*(long *)(lVar1 + -0x18) + param_2" (pointer_expression "*(long *)(lVar1 + -0x18)" (* "*") (cast_expression "(long *)(lVar1 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x18)" (( "(") (binary_expression "lVar1 + -0x18" (identifier "lVar1") (+ "+") (number_literal "-0x18")) () ")")))) (+ "+") (identifier "param_2"))) (; ";")) (if_statement "if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_00325990(param_1,uVar2);\n    }" (if "if") (parenthesized_expression "((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8)))" (( "(") (binary_expression "(*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))" (parenthesized_expression "(*(ulong *)(lVar1 + -0x10) < uVar2)" (( "(") (binary_expression "*(ulong *)(lVar1 + -0x10) < uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x10)" (* "*") (cast_expression "(ulong *)(lVar1 + -0x10)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x10)" (( "(") (binary_expression "lVar1 + -0x10" (identifier "lVar1") (+ "+") (number_literal "-0x10")) () ")")))) (< "<") (identifier "uVar2")) () ")")) (|| "||") (parenthesized_expression "(0 < *(int *)(lVar1 + -8))" (( "(") (binary_expression "0 < *(int *)(lVar1 + -8)" (number_literal "0") (< "<") (pointer_expression "*(int *)(lVar1 + -8)" (* "*") (cast_expression "(int *)(lVar1 + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -8)" (( "(") (binary_expression "lVar1 + -8" (identifier "lVar1") (+ "+") (number_literal "-8")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      FUN_00325990(param_1,uVar2);\n    }" ({ "{") (expression_statement "FUN_00325990(param_1,uVar2);" (call_expression "FUN_00325990(param_1,uVar2)" (identifier "FUN_00325990") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}"))) (expression_statement "__s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));" (assignment_expression "__s = (char *)(*param_1 + *(long *)(*param_1 + -0x18))" (identifier "__s") (= "=") (cast_expression "(char *)(*param_1 + *(long *)(*param_1 + -0x18))" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + *(long *)(*param_1 + -0x18))" (( "(") (binary_expression "*param_1 + *(long *)(*param_1 + -0x18)" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (pointer_expression "*(long *)(*param_1 + -0x18)" (* "*") (cast_expression "(long *)(*param_1 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0x18)" (( "(") (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0x18")) () ")"))))) () ")")))) (; ";")) (if_statement "if (param_2 == 1) {\n      *__s = param_3;\n    }\n    else {\n      memset(__s,(int)param_3,param_2);\n    }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      *__s = param_3;\n    }" ({ "{") (expression_statement "*__s = param_3;" (assignment_expression "*__s = param_3" (pointer_expression "*__s" (* "*") (identifier "__s")) (= "=") (identifier "param_3")) (; ";")) (} "}")) (else_clause "else {\n      memset(__s,(int)param_3,param_2);\n    }" (else "else") (compound_statement "{\n      memset(__s,(int)param_3,param_2);\n    }" ({ "{") (expression_statement "memset(__s,(int)param_3,param_2);" (call_expression "memset(__s,(int)param_3,param_2)" (identifier "memset") (argument_list "(__s,(int)param_3,param_2)" (( "(") (identifier "__s") (, ",") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (, ",") (identifier "param_2") () ")"))) (; ";")) (} "}")))) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }" (if "if") (parenthesized_expression "((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38)" (( "(") (binary_expression "(undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38" (cast_expression "(undefined *)(lVar1 + -0x18)" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x18)" (( "(") (binary_expression "lVar1 + -0x18" (identifier "lVar1") (+ "+") (number_literal "-0x18")) () ")"))) (!= "!=") (identifier "PTR_DAT_0045bc38")) () ")")) (compound_statement "{\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined1 *)(lVar1 + uVar2) = 0;\n    }" ({ "{") (expression_statement "*(undefined4 *)(lVar1 + -8) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + -8) = 0" (pointer_expression "*(undefined4 *)(lVar1 + -8)" (* "*") (cast_expression "(undefined4 *)(lVar1 + -8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -8)" (( "(") (binary_expression "lVar1 + -8" (identifier "lVar1") (+ "+") (number_literal "-8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(ulong *)(lVar1 + -0x18) = uVar2;" (assignment_expression "*(ulong *)(lVar1 + -0x18) = uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x18)" (* "*") (cast_expression "(ulong *)(lVar1 + -0x18)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x18)" (( "(") (binary_expression "lVar1 + -0x18" (identifier "lVar1") (+ "+") (number_literal "-0x18")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*(undefined1 *)(lVar1 + uVar2) = 0;" (assignment_expression "*(undefined1 *)(lVar1 + uVar2) = 0" (pointer_expression "*(undefined1 *)(lVar1 + uVar2)" (* "*") (cast_expression "(undefined1 *)(lVar1 + uVar2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + uVar2)" (( "(") (binary_expression "lVar1 + uVar2" (identifier "lVar1") (+ "+") (identifier "uVar2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* std::string::append(unsigned long, char) */

string * __thiscall std::string::append(string *this,type_1 var_1,char param_2)

{
  long var_2;
  char *__s;
  type_1 var_4;
  
  if (var_1 != 0) {
    var_2 = *(long *)this;
    if (0x3ffffffffffffff9U - *(long *)(var_2 + -0x18) < var_1) {
                    /* WARNING: Subroutine does not return */
      var_3("basic_string::append");
    }
    var_4 = *(long *)(var_2 + -0x18) + var_1;
    if ((*(type_1 *)(var_2 + -0x10) < var_4) || (0 < *(int *)(var_2 + -8))) {
      var_5(this,var_4);
    }
    __s = (char *)(*(long *)this + *(long *)(*(long *)this + -0x18));
    if (var_1 == 1) {
      *__s = param_2;
    }
    else {
      var_6(__s,(int)param_2,var_1);
    }
    var_2 = *(long *)this;
    if ((type_2 *)(var_2 + -0x18) != var_7) {
      *(type_3 *)(var_2 + -8) = 0;
      *(type_1 *)(var_2 + -0x18) = var_4;
      *(type_4 *)(var_2 + var_4) = 0;
    }
  }
  return this;
}


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

long * MASKED(long *param_1,ulong param_2,char param_3)

{
  long lVar1;
  char *__s;
  ulong uVar2;
  
  if (param_2 != 0) {
    lVar1 = *param_1;
    if (0x3ffffffffffffff9U - *(long *)(lVar1 + -0x18) < param_2) {
                    /* WARNING: Subroutine does not return */
      FUN_00330790("basic_string::append");
    }
    uVar2 = *(long *)(lVar1 + -0x18) + param_2;
    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {
      FUN_00325990(param_1,uVar2);
    }
    __s = (char *)(*param_1 + *(long *)(*param_1 + -0x18));
    if (param_2 == 1) {
      *__s = param_3;
    }
    else {
      memset(__s,(int)param_3,param_2);
    }
    lVar1 = *param_1;
    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_0045bc38) {
      *(undefined4 *)(lVar1 + -8) = 0;
      *(ulong *)(lVar1 + -0x18) = uVar2;
      *(undefined1 *)(lVar1 + uVar2) = 0;
    }
  }
  return param_1;
}

