
/* std::wstring::_M_create(unsigned long&, unsigned long) */

void __thiscall std::wstring::_M_create(wstring *this,ulong *param_1,ulong param_2)

{
  ulong uVar1;
  ulong uVar2;
  
  uVar2 = *param_1;
  if (0x1fffffffffffffff < uVar2) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error("basic_string::_M_create");
  }
  if ((param_2 < uVar2) && (uVar1 = param_2 * 2, uVar2 < uVar1)) {
    if (0x1fffffffffffffff < uVar1) {
      *param_1 = 0x1fffffffffffffff;
      operator_new(0x8000000000000000);
      return;
    }
    *param_1 = uVar1;
    uVar2 = uVar1;
  }
  operator_new(uVar2 * 4 + 4);
  return;
}



void FUN_0033c450(undefined8 param_1,ulong *param_2,ulong param_3)

{
  ulong uVar1;
  
  uVar1 = *param_2;
  if (0x1fffffffffffffff < uVar1) {
                    /* WARNING: Subroutine does not return */
    FUN_00377370("basic_string::_M_create");
  }
  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {
    if (0x1fffffffffffffff < param_3) {
      *param_2 = 0x1fffffffffffffff;
      FUN_00337270(0x8000000000000000);
      return;
    }
    *param_2 = param_3;
    uVar1 = param_3;
  }
  FUN_00337270(uVar1 * 4 + 4);
  return;
}


MOV RCX,0x1fffffffffffffff
MOV RAX,qword ptr [RSI]
CMP RAX,RCX
JA 0x0033c4a3
CMP RAX,RDX
JBE 0x0033c496
ADD RDX,RDX
CMP RAX,RDX
JNC 0x0033c496
CMP RDX,RCX
JBE 0x0033c490
MOV RDI,-0x8000000000000000
MOV qword ptr [RSI],RCX
JMP 0x00337270
MOV qword ptr [RSI],RDX
MOV RAX,RDX
LEA RDI,[0x4 + RAX*0x4]
JMP 0x00337270
PUSH RAX
LEA RDI,[0x3ff614]
CALL 0x00377370
(translation_unit "void FUN_0033c450(undefined8 param_1,ulong *param_2,ulong param_3)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *param_2;\n  if (0x1fffffffffffffff < uVar1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00377370("basic_string::_M_create");\n  }\n  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }\n  FUN_00337270(uVar1 * 4 + 4);\n  return;\n}\n\n" (function_definition "void FUN_0033c450(undefined8 param_1,ulong *param_2,ulong param_3)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *param_2;\n  if (0x1fffffffffffffff < uVar1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00377370("basic_string::_M_create");\n  }\n  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }\n  FUN_00337270(uVar1 * 4 + 4);\n  return;\n}" primitive_type (function_declarator "FUN_0033c450(undefined8 param_1,ulong *param_2,ulong param_3)" identifier (parameter_list "(undefined8 param_1,ulong *param_2,ulong param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "ulong *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "ulong param_3" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  \n  uVar1 = *param_2;\n  if (0x1fffffffffffffff < uVar1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00377370("basic_string::_M_create");\n  }\n  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }\n  FUN_00337270(uVar1 * 4 + 4);\n  return;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *param_2;" (assignment_expression "uVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (0x1fffffffffffffff < uVar1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00377370("basic_string::_M_create");\n  }" if (parenthesized_expression "(0x1fffffffffffffff < uVar1)" ( (binary_expression "0x1fffffffffffffff < uVar1" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_00377370("basic_string::_M_create");\n  }" { comment (expression_statement "FUN_00377370("basic_string::_M_create");" (call_expression "FUN_00377370("basic_string::_M_create")" identifier (argument_list "("basic_string::_M_create")" ( (string_literal ""basic_string::_M_create"" " string_content ") ))) ;) })) (if_statement "if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }" if (parenthesized_expression "((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3))" ( (binary_expression "(param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)" (parenthesized_expression "(param_3 < uVar1)" ( (binary_expression "param_3 < uVar1" identifier < identifier) )) && (parenthesized_expression "(param_3 = param_3 * 2, uVar1 < param_3)" ( (comma_expression "param_3 = param_3 * 2, uVar1 < param_3" (assignment_expression "param_3 = param_3 * 2" identifier = (binary_expression "param_3 * 2" identifier * number_literal)) , (binary_expression "uVar1 < param_3" identifier < identifier)) ))) )) (compound_statement "{\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }" { (if_statement "if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }" if (parenthesized_expression "(0x1fffffffffffffff < param_3)" ( (binary_expression "0x1fffffffffffffff < param_3" number_literal < identifier) )) (compound_statement "{\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }" { (expression_statement "*param_2 = 0x1fffffffffffffff;" (assignment_expression "*param_2 = 0x1fffffffffffffff" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "FUN_00337270(0x8000000000000000);" (call_expression "FUN_00337270(0x8000000000000000)" identifier (argument_list "(0x8000000000000000)" ( number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "*param_2 = param_3;" (assignment_expression "*param_2 = param_3" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "uVar1 = param_3;" (assignment_expression "uVar1 = param_3" identifier = identifier) ;) })) (expression_statement "FUN_00337270(uVar1 * 4 + 4);" (call_expression "FUN_00337270(uVar1 * 4 + 4)" identifier (argument_list "(uVar1 * 4 + 4)" ( (binary_expression "uVar1 * 4 + 4" (binary_expression "uVar1 * 4" identifier * number_literal) + number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* std::wstring::_M_create(unsigned long&, unsigned long) */\n\nvoid __thiscall std::wstring::_M_create(wstring *this,ulong *param_1,ulong param_2)\n\n{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = *param_1;\n  if (0x1fffffffffffffff < uVar2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_create");\n  }\n  if ((param_2 < uVar2) && (uVar1 = param_2 * 2, uVar2 < uVar1)) {\n    if (0x1fffffffffffffff < uVar1) {\n      *param_1 = 0x1fffffffffffffff;\n      operator_new(0x8000000000000000);\n      return;\n    }\n    *param_1 = uVar1;\n    uVar2 = uVar1;\n  }\n  operator_new(uVar2 * 4 + 4);\n  return;\n}\n\n" comment (function_definition "void __thiscall std::wstring::_M_create(wstring *this,ulong *param_1,ulong param_2)\n\n{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = *param_1;\n  if (0x1fffffffffffffff < uVar2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_create");\n  }\n  if ((param_2 < uVar2) && (uVar1 = param_2 * 2, uVar2 < uVar1)) {\n    if (0x1fffffffffffffff < uVar1) {\n      *param_1 = 0x1fffffffffffffff;\n      operator_new(0x8000000000000000);\n      return;\n    }\n    *param_1 = uVar1;\n    uVar2 = uVar1;\n  }\n  operator_new(uVar2 * 4 + 4);\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "_M_create(wstring *this,ulong *param_1,ulong param_2)" identifier (parameter_list "(wstring *this,ulong *param_1,ulong param_2)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "ulong *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = *param_1;\n  if (0x1fffffffffffffff < uVar2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_create");\n  }\n  if ((param_2 < uVar2) && (uVar1 = param_2 * 2, uVar2 < uVar1)) {\n    if (0x1fffffffffffffff < uVar1) {\n      *param_1 = 0x1fffffffffffffff;\n      operator_new(0x8000000000000000);\n      return;\n    }\n    *param_1 = uVar1;\n    uVar2 = uVar1;\n  }\n  operator_new(uVar2 * 4 + 4);\n  return;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (0x1fffffffffffffff < uVar2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_create");\n  }" if (parenthesized_expression "(0x1fffffffffffffff < uVar2)" ( (binary_expression "0x1fffffffffffffff < uVar2" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_create");\n  }" { comment (expression_statement "__throw_length_error("basic_string::_M_create");" (call_expression "__throw_length_error("basic_string::_M_create")" identifier (argument_list "("basic_string::_M_create")" ( (string_literal ""basic_string::_M_create"" " string_content ") ))) ;) })) (if_statement "if ((param_2 < uVar2) && (uVar1 = param_2 * 2, uVar2 < uVar1)) {\n    if (0x1fffffffffffffff < uVar1) {\n      *param_1 = 0x1fffffffffffffff;\n      operator_new(0x8000000000000000);\n      return;\n    }\n    *param_1 = uVar1;\n    uVar2 = uVar1;\n  }" if (parenthesized_expression "((param_2 < uVar2) && (uVar1 = param_2 * 2, uVar2 < uVar1))" ( (binary_expression "(param_2 < uVar2) && (uVar1 = param_2 * 2, uVar2 < uVar1)" (parenthesized_expression "(param_2 < uVar2)" ( (binary_expression "param_2 < uVar2" identifier < identifier) )) && (parenthesized_expression "(uVar1 = param_2 * 2, uVar2 < uVar1)" ( (comma_expression "uVar1 = param_2 * 2, uVar2 < uVar1" (assignment_expression "uVar1 = param_2 * 2" identifier = (binary_expression "param_2 * 2" identifier * number_literal)) , (binary_expression "uVar2 < uVar1" identifier < identifier)) ))) )) (compound_statement "{\n    if (0x1fffffffffffffff < uVar1) {\n      *param_1 = 0x1fffffffffffffff;\n      operator_new(0x8000000000000000);\n      return;\n    }\n    *param_1 = uVar1;\n    uVar2 = uVar1;\n  }" { (if_statement "if (0x1fffffffffffffff < uVar1) {\n      *param_1 = 0x1fffffffffffffff;\n      operator_new(0x8000000000000000);\n      return;\n    }" if (parenthesized_expression "(0x1fffffffffffffff < uVar1)" ( (binary_expression "0x1fffffffffffffff < uVar1" number_literal < identifier) )) (compound_statement "{\n      *param_1 = 0x1fffffffffffffff;\n      operator_new(0x8000000000000000);\n      return;\n    }" { (expression_statement "*param_1 = 0x1fffffffffffffff;" (assignment_expression "*param_1 = 0x1fffffffffffffff" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "operator_new(0x8000000000000000);" (call_expression "operator_new(0x8000000000000000)" identifier (argument_list "(0x8000000000000000)" ( number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "*param_1 = uVar1;" (assignment_expression "*param_1 = uVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "uVar2 = uVar1;" (assignment_expression "uVar2 = uVar1" identifier = identifier) ;) })) (expression_statement "operator_new(uVar2 * 4 + 4);" (call_expression "operator_new(uVar2 * 4 + 4)" identifier (argument_list "(uVar2 * 4 + 4)" ( (binary_expression "uVar2 * 4 + 4" (binary_expression "uVar2 * 4" identifier * number_literal) + number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0033c450(undefined8 param_1,ulong *param_2,ulong param_3)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *param_2;\n  if (0x1fffffffffffffff < uVar1) {\n                    \n    FUN_00377370("basic_string::_M_create");\n  }\n  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }\n  FUN_00337270(uVar1 * 4 + 4);\n  return;\n}\n\n" (function_definition "void FUN_0033c450(undefined8 param_1,ulong *param_2,ulong param_3)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *param_2;\n  if (0x1fffffffffffffff < uVar1) {\n                    \n    FUN_00377370("basic_string::_M_create");\n  }\n  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }\n  FUN_00337270(uVar1 * 4 + 4);\n  return;\n}" primitive_type (function_declarator "FUN_0033c450(undefined8 param_1,ulong *param_2,ulong param_3)" identifier (parameter_list "(undefined8 param_1,ulong *param_2,ulong param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "ulong *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "ulong param_3" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  \n  uVar1 = *param_2;\n  if (0x1fffffffffffffff < uVar1) {\n                    \n    FUN_00377370("basic_string::_M_create");\n  }\n  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }\n  FUN_00337270(uVar1 * 4 + 4);\n  return;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *param_2;" (assignment_expression "uVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (0x1fffffffffffffff < uVar1) {\n                    \n    FUN_00377370("basic_string::_M_create");\n  }" if (parenthesized_expression "(0x1fffffffffffffff < uVar1)" ( (binary_expression "0x1fffffffffffffff < uVar1" number_literal < identifier) )) (compound_statement "{\n                    \n    FUN_00377370("basic_string::_M_create");\n  }" { (expression_statement "FUN_00377370("basic_string::_M_create");" (call_expression "FUN_00377370("basic_string::_M_create")" identifier (argument_list "("basic_string::_M_create")" ( (string_literal ""basic_string::_M_create"" " string_content ") ))) ;) })) (if_statement "if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }" if (parenthesized_expression "((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3))" ( (binary_expression "(param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)" (parenthesized_expression "(param_3 < uVar1)" ( (binary_expression "param_3 < uVar1" identifier < identifier) )) && (parenthesized_expression "(param_3 = param_3 * 2, uVar1 < param_3)" ( (comma_expression "param_3 = param_3 * 2, uVar1 < param_3" (assignment_expression "param_3 = param_3 * 2" identifier = (binary_expression "param_3 * 2" identifier * number_literal)) , (binary_expression "uVar1 < param_3" identifier < identifier)) ))) )) (compound_statement "{\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }" { (if_statement "if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }" if (parenthesized_expression "(0x1fffffffffffffff < param_3)" ( (binary_expression "0x1fffffffffffffff < param_3" number_literal < identifier) )) (compound_statement "{\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }" { (expression_statement "*param_2 = 0x1fffffffffffffff;" (assignment_expression "*param_2 = 0x1fffffffffffffff" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "FUN_00337270(0x8000000000000000);" (call_expression "FUN_00337270(0x8000000000000000)" identifier (argument_list "(0x8000000000000000)" ( number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "*param_2 = param_3;" (assignment_expression "*param_2 = param_3" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "uVar1 = param_3;" (assignment_expression "uVar1 = param_3" identifier = identifier) ;) })) (expression_statement "FUN_00337270(uVar1 * 4 + 4);" (call_expression "FUN_00337270(uVar1 * 4 + 4)" identifier (argument_list "(uVar1 * 4 + 4)" ( (binary_expression "uVar1 * 4 + 4" (binary_expression "uVar1 * 4" identifier * number_literal) + number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT * LIT)) , (binary_expression IDENT < IDENT)) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (binary_expression IDENT * LIT) + LIT) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0033c450(undefined8 param_1,ulong *param_2,ulong param_3)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *param_2;\n  if (0x1fffffffffffffff < uVar1) {\n                    \n    FUN_00377370("basic_string::_M_create");\n  }\n  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }\n  FUN_00337270(uVar1 * 4 + 4);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0033c450(undefined8 param_1,ulong *param_2,ulong param_3)" (identifier "FUN_0033c450") (parameter_list "(undefined8 param_1,ulong *param_2,ulong param_3)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "ulong *param_2" (type_identifier "ulong") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "ulong param_3" (type_identifier "ulong") (identifier "param_3")) () ")"))) (compound_statement "{\n  ulong uVar1;\n  \n  uVar1 = *param_2;\n  if (0x1fffffffffffffff < uVar1) {\n                    \n    FUN_00377370("basic_string::_M_create");\n  }\n  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }\n  FUN_00337270(uVar1 * 4 + 4);\n  return;\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = *param_2;" (assignment_expression "uVar1 = *param_2" (identifier "uVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (0x1fffffffffffffff < uVar1) {\n                    \n    FUN_00377370("basic_string::_M_create");\n  }" (if "if") (parenthesized_expression "(0x1fffffffffffffff < uVar1)" (( "(") (binary_expression "0x1fffffffffffffff < uVar1" (number_literal "0x1fffffffffffffff") (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n                    \n    FUN_00377370("basic_string::_M_create");\n  }" ({ "{") (expression_statement "FUN_00377370("basic_string::_M_create");" (call_expression "FUN_00377370("basic_string::_M_create")" (identifier "FUN_00377370") (argument_list "("basic_string::_M_create")" (( "(") (string_literal ""basic_string::_M_create"" (" """) (string_content "basic_string::_M_create") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }" (if "if") (parenthesized_expression "((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3))" (( "(") (binary_expression "(param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)" (parenthesized_expression "(param_3 < uVar1)" (( "(") (binary_expression "param_3 < uVar1" (identifier "param_3") (< "<") (identifier "uVar1")) () ")")) (&& "&&") (parenthesized_expression "(param_3 = param_3 * 2, uVar1 < param_3)" (( "(") (comma_expression "param_3 = param_3 * 2, uVar1 < param_3" (assignment_expression "param_3 = param_3 * 2" (identifier "param_3") (= "=") (binary_expression "param_3 * 2" (identifier "param_3") (* "*") (number_literal "2"))) (, ",") (binary_expression "uVar1 < param_3" (identifier "uVar1") (< "<") (identifier "param_3"))) () ")"))) () ")")) (compound_statement "{\n    if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }\n    *param_2 = param_3;\n    uVar1 = param_3;\n  }" ({ "{") (if_statement "if (0x1fffffffffffffff < param_3) {\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }" (if "if") (parenthesized_expression "(0x1fffffffffffffff < param_3)" (( "(") (binary_expression "0x1fffffffffffffff < param_3" (number_literal "0x1fffffffffffffff") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n      *param_2 = 0x1fffffffffffffff;\n      FUN_00337270(0x8000000000000000);\n      return;\n    }" ({ "{") (expression_statement "*param_2 = 0x1fffffffffffffff;" (assignment_expression "*param_2 = 0x1fffffffffffffff" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0x1fffffffffffffff")) (; ";")) (expression_statement "FUN_00337270(0x8000000000000000);" (call_expression "FUN_00337270(0x8000000000000000)" (identifier "FUN_00337270") (argument_list "(0x8000000000000000)" (( "(") (number_literal "0x8000000000000000") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "*param_2 = param_3;" (assignment_expression "*param_2 = param_3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "uVar1 = param_3;" (assignment_expression "uVar1 = param_3" (identifier "uVar1") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (expression_statement "FUN_00337270(uVar1 * 4 + 4);" (call_expression "FUN_00337270(uVar1 * 4 + 4)" (identifier "FUN_00337270") (argument_list "(uVar1 * 4 + 4)" (( "(") (binary_expression "uVar1 * 4 + 4" (binary_expression "uVar1 * 4" (identifier "uVar1") (* "*") (number_literal "4")) (+ "+") (number_literal "4")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::wstring::_M_create(unsigned long&, unsigned long) */

void __thiscall std::type_1::function_1(type_1 *this,type_2 *param_1,type_2 var_3)

{
  type_2 var_4;
  type_2 var_1;
  
  var_1 = *param_1;
  if (0x1fffffffffffffff < var_1) {
                    /* WARNING: Subroutine does not return */
    var_2("basic_string::_M_create");
  }
  if ((var_3 < var_1) && (var_4 = var_3 * 2, var_1 < var_4)) {
    if (0x1fffffffffffffff < var_4) {
      *param_1 = 0x1fffffffffffffff;
      var_5(0x8000000000000000);
      return;
    }
    *param_1 = var_4;
    var_1 = var_4;
  }
  var_5(var_1 * 4 + 4);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (identifier) right: (identifier)))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (return_statement))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))))) (return_statement))))

void MASKED(undefined8 param_1,ulong *param_2,ulong param_3)

{
  ulong uVar1;
  
  uVar1 = *param_2;
  if (0x1fffffffffffffff < uVar1) {
                    /* WARNING: Subroutine does not return */
    FUN_00377370("basic_string::_M_create");
  }
  if ((param_3 < uVar1) && (param_3 = param_3 * 2, uVar1 < param_3)) {
    if (0x1fffffffffffffff < param_3) {
      *param_2 = 0x1fffffffffffffff;
      FUN_00337270(0x8000000000000000);
      return;
    }
    *param_2 = param_3;
    uVar1 = param_3;
  }
  FUN_00337270(uVar1 * 4 + 4);
  return;
}

