
/* std::string::replace(unsigned int, unsigned int, std::string const&, unsigned int, unsigned int)
    */

void __thiscall
std::string::replace
          (string *this,uint param_1,uint param_2,string *param_3,uint param_4,uint param_5)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  uint extraout_v1;
  undefined *puVar4;
  undefined *puVar5;
  
  uVar1 = *(uint *)(param_3 + 4);
  puVar5 = (undefined *)param_4;
  uVar3 = uVar1;
  if (param_4 <= uVar1) {
    uVar3 = *(uint *)(this + 4);
    uVar2 = uVar1 - param_4;
    if (param_5 < uVar1 - param_4) {
      uVar2 = param_5;
    }
    puVar5 = (undefined *)param_1;
    if (param_1 <= uVar3) {
      if (uVar3 - param_1 <= param_2) {
        param_2 = uVar3 - param_1;
      }
      _M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2);
      return;
    }
  }
  do {
    puVar4 = PTR_UINT_004c12dc + -0x3aec;
    (*(code *)PTR___throw_out_of_range_fmt_004c225c)(PTR_s__s_004c1a50 + -0xe00,puVar4,puVar5,uVar3)
    ;
    puVar5 = puVar4;
    uVar3 = extraout_v1;
  } while( true );
}



void FUN_0033cc00(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,
                 uint param_6)

{
  undefined *puVar1;
  uint uVar2;
  undefined *puVar3;
  undefined *extraout_v1;
  undefined *puVar4;
  
  puVar1 = (undefined *)param_4[1];
  puVar4 = param_5;
  puVar3 = puVar1;
  if (param_5 <= puVar1) {
    puVar3 = *(undefined **)(param_1 + 4);
    uVar2 = (int)puVar1 - (int)param_5;
    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {
      uVar2 = param_6;
    }
    puVar4 = param_2;
    if (param_2 <= puVar3) {
      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {
        param_3 = (int)puVar3 - (int)param_2;
      }
      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);
      return;
    }
  }
  do {
    puVar1 = PTR_UINT_004c12dc + -0x3aec;
    (*(code *)PTR___throw_out_of_range_fmt_004c225c)
              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);
    puVar4 = puVar1;
    puVar3 = extraout_v1;
  } while( true );
}


lui gp,0x19
addiu gp,gp,-0x39c0
addu gp,gp,t9
addiu sp,sp,-0x20
lw t0,0x30(sp)
sw gp,0x10(sp)
sw ra,0x1c(sp)
lw v0,0x4(a3)
lw t2,0x34(sp)
sltu v1,v0,t0
bne v1,zero,0x0033cc6c
_lw a3,0x0(a3)
lw v1,0x4(a0)
subu v0,v0,t0
addu a3,a3,t0
sltu t0,t2,v0
sltu t3,v1,a1
bne t3,zero,0x0033cc8c
_movn v0,t2,t0
subu v1,v1,a1
lw ra,0x1c(sp)
lw t9,-0x71a0(gp)
sw v0,0x30(sp)
sltu v0,a2,v1
movz a2,v1,v0
b 0x0033bed4
_addiu sp,sp,0x20
or a3,v0,zero
or a2,t0,zero
lw a1,-0x7f64(gp)
lw a0,-0x77f0(gp)
lw t9,-0x6fe4(gp)
addiu a1,a1,-0x3aec
jalr t9
_addiu a0,a0,-0xe00
or a3,v1,zero
b 0x0033cc74
_or a2,a1,zero
(translation_unit "void FUN_0033cc00(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  undefined *puVar3;\n  undefined *extraout_v1;\n  undefined *puVar4;\n  \n  puVar1 = (undefined *)param_4[1];\n  puVar4 = param_5;\n  puVar3 = puVar1;\n  if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }\n  do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );\n}\n\n" (function_definition "void FUN_0033cc00(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  undefined *puVar3;\n  undefined *extraout_v1;\n  undefined *puVar4;\n  \n  puVar1 = (undefined *)param_4[1];\n  puVar4 = param_5;\n  puVar3 = puVar1;\n  if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }\n  do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );\n}" primitive_type (function_declarator "FUN_0033cc00(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)" identifier (parameter_list "(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)" ( (parameter_declaration "string *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "uint param_6" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  undefined *puVar3;\n  undefined *extraout_v1;\n  undefined *puVar4;\n  \n  puVar1 = (undefined *)param_4[1];\n  puVar4 = param_5;\n  puVar3 = puVar1;\n  if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }\n  do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined *extraout_v1;" type_identifier (pointer_declarator "*extraout_v1" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "puVar1 = (undefined *)param_4[1];" (assignment_expression "puVar1 = (undefined *)param_4[1]" identifier = (cast_expression "(undefined *)param_4[1]" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_4[1]" identifier [ number_literal ]))) ;) (expression_statement "puVar4 = param_5;" (assignment_expression "puVar4 = param_5" identifier = identifier) ;) (expression_statement "puVar3 = puVar1;" (assignment_expression "puVar3 = puVar1" identifier = identifier) ;) (if_statement "if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }" if (parenthesized_expression "(param_5 <= puVar1)" ( (binary_expression "param_5 <= puVar1" identifier <= identifier) )) (compound_statement "{\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }" { (expression_statement "puVar3 = *(undefined **)(param_1 + 4);" (assignment_expression "puVar3 = *(undefined **)(param_1 + 4)" identifier = (pointer_expression "*(undefined **)(param_1 + 4)" * (cast_expression "(undefined **)(param_1 + 4)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = (int)puVar1 - (int)param_5;" (assignment_expression "uVar2 = (int)puVar1 - (int)param_5" identifier = (binary_expression "(int)puVar1 - (int)param_5" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_5" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }" if (parenthesized_expression "(param_6 < (uint)((int)puVar1 - (int)param_5))" ( (binary_expression "param_6 < (uint)((int)puVar1 - (int)param_5)" identifier < (call_expression "(uint)((int)puVar1 - (int)param_5)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar1 - (int)param_5)" ( (binary_expression "(int)puVar1 - (int)param_5" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_5" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      uVar2 = param_6;\n    }" { (expression_statement "uVar2 = param_6;" (assignment_expression "uVar2 = param_6" identifier = identifier) ;) })) (expression_statement "puVar4 = param_2;" (assignment_expression "puVar4 = param_2" identifier = identifier) ;) (if_statement "if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }" if (parenthesized_expression "(param_2 <= puVar3)" ( (binary_expression "param_2 <= puVar3" identifier <= identifier) )) (compound_statement "{\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }" { (if_statement "if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }" if (parenthesized_expression "((uint)((int)puVar3 - (int)param_2) <= param_3)" ( (binary_expression "(uint)((int)puVar3 - (int)param_2) <= param_3" (call_expression "(uint)((int)puVar3 - (int)param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar3 - (int)param_2)" ( (binary_expression "(int)puVar3 - (int)param_2" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) <= identifier) )) (compound_statement "{\n        param_3 = (int)puVar3 - (int)param_2;\n      }" { (expression_statement "param_3 = (int)puVar3 - (int)param_2;" (assignment_expression "param_3 = (int)puVar3 - (int)param_2" identifier = (binary_expression "(int)puVar3 - (int)param_2" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (labeled_statement "std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);" statement_identifier : (ERROR ":" :) (labeled_statement "string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);" statement_identifier : (ERROR ":" :) (expression_statement "_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);" (call_expression "_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2)" identifier (argument_list "(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2)" ( identifier , (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) , identifier , (binary_expression "param_5 + *param_4" identifier + (pointer_expression "*param_4" * identifier)) , identifier ))) ;))) (return_statement "return;" return ;) })) })) (do_statement "do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );" do (compound_statement "{\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  }" { (expression_statement "puVar1 = PTR_UINT_004c12dc + -0x3aec;" (assignment_expression "puVar1 = PTR_UINT_004c12dc + -0x3aec" identifier = (binary_expression "PTR_UINT_004c12dc + -0x3aec" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);" (call_expression "(*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3)" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_004c225c)" ( (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_004c225c" * (cast_expression "(code *)PTR___throw_out_of_range_fmt_004c225c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3)" ( (binary_expression "PTR_s__s_004c1a50 + -0xe00" identifier + number_literal) , identifier , identifier , identifier ))) ;) (expression_statement "puVar4 = puVar1;" (assignment_expression "puVar4 = puVar1" identifier = identifier) ;) (expression_statement "puVar3 = extraout_v1;" (assignment_expression "puVar3 = extraout_v1" identifier = identifier) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "/* std::string::replace(unsigned int, unsigned int, std::string const&, unsigned int, unsigned int)\n    */\n\nvoid __thiscall\nstd::string::replace\n          (string *this,uint param_1,uint param_2,string *param_3,uint param_4,uint param_5)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  uint extraout_v1;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  uVar1 = *(uint *)(param_3 + 4);\n  puVar5 = (undefined *)param_4;\n  uVar3 = uVar1;\n  if (param_4 <= uVar1) {\n    uVar3 = *(uint *)(this + 4);\n    uVar2 = uVar1 - param_4;\n    if (param_5 < uVar1 - param_4) {\n      uVar2 = param_5;\n    }\n    puVar5 = (undefined *)param_1;\n    if (param_1 <= uVar3) {\n      if (uVar3 - param_1 <= param_2) {\n        param_2 = uVar3 - param_1;\n      }\n      _M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2);\n      return;\n    }\n  }\n  do {\n    puVar4 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)(PTR_s__s_004c1a50 + -0xe00,puVar4,puVar5,uVar3)\n    ;\n    puVar5 = puVar4;\n    uVar3 = extraout_v1;\n  } while( true );\n}\n\n" comment (function_definition "void __thiscall\nstd::string::replace\n          (string *this,uint param_1,uint param_2,string *param_3,uint param_4,uint param_5)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  uint extraout_v1;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  uVar1 = *(uint *)(param_3 + 4);\n  puVar5 = (undefined *)param_4;\n  uVar3 = uVar1;\n  if (param_4 <= uVar1) {\n    uVar3 = *(uint *)(this + 4);\n    uVar2 = uVar1 - param_4;\n    if (param_5 < uVar1 - param_4) {\n      uVar2 = param_5;\n    }\n    puVar5 = (undefined *)param_1;\n    if (param_1 <= uVar3) {\n      if (uVar3 - param_1 <= param_2) {\n        param_2 = uVar3 - param_1;\n      }\n      _M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2);\n      return;\n    }\n  }\n  do {\n    puVar4 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)(PTR_s__s_004c1a50 + -0xe00,puVar4,puVar5,uVar3)\n    ;\n    puVar5 = puVar4;\n    uVar3 = extraout_v1;\n  } while( true );\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "replace\n          (string *this,uint param_1,uint param_2,string *param_3,uint param_4,uint param_5)" identifier (parameter_list "(string *this,uint param_1,uint param_2,string *param_3,uint param_4,uint param_5)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "string *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "uint param_5" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  uint extraout_v1;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  uVar1 = *(uint *)(param_3 + 4);\n  puVar5 = (undefined *)param_4;\n  uVar3 = uVar1;\n  if (param_4 <= uVar1) {\n    uVar3 = *(uint *)(this + 4);\n    uVar2 = uVar1 - param_4;\n    if (param_5 < uVar1 - param_4) {\n      uVar2 = param_5;\n    }\n    puVar5 = (undefined *)param_1;\n    if (param_1 <= uVar3) {\n      if (uVar3 - param_1 <= param_2) {\n        param_2 = uVar3 - param_1;\n      }\n      _M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2);\n      return;\n    }\n  }\n  do {\n    puVar4 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)(PTR_s__s_004c1a50 + -0xe00,puVar4,puVar5,uVar3)\n    ;\n    puVar5 = puVar4;\n    uVar3 = extraout_v1;\n  } while( true );\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint extraout_v1;" type_identifier identifier ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (expression_statement "uVar1 = *(uint *)(param_3 + 4);" (assignment_expression "uVar1 = *(uint *)(param_3 + 4)" identifier = (pointer_expression "*(uint *)(param_3 + 4)" * (cast_expression "(uint *)(param_3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) ))))) ;) (expression_statement "puVar5 = (undefined *)param_4;" (assignment_expression "puVar5 = (undefined *)param_4" identifier = (cast_expression "(undefined *)param_4" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "uVar3 = uVar1;" (assignment_expression "uVar3 = uVar1" identifier = identifier) ;) (if_statement "if (param_4 <= uVar1) {\n    uVar3 = *(uint *)(this + 4);\n    uVar2 = uVar1 - param_4;\n    if (param_5 < uVar1 - param_4) {\n      uVar2 = param_5;\n    }\n    puVar5 = (undefined *)param_1;\n    if (param_1 <= uVar3) {\n      if (uVar3 - param_1 <= param_2) {\n        param_2 = uVar3 - param_1;\n      }\n      _M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2);\n      return;\n    }\n  }" if (parenthesized_expression "(param_4 <= uVar1)" ( (binary_expression "param_4 <= uVar1" identifier <= identifier) )) (compound_statement "{\n    uVar3 = *(uint *)(this + 4);\n    uVar2 = uVar1 - param_4;\n    if (param_5 < uVar1 - param_4) {\n      uVar2 = param_5;\n    }\n    puVar5 = (undefined *)param_1;\n    if (param_1 <= uVar3) {\n      if (uVar3 - param_1 <= param_2) {\n        param_2 = uVar3 - param_1;\n      }\n      _M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2);\n      return;\n    }\n  }" { (expression_statement "uVar3 = *(uint *)(this + 4);" (assignment_expression "uVar3 = *(uint *)(this + 4)" identifier = (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = uVar1 - param_4;" (assignment_expression "uVar2 = uVar1 - param_4" identifier = (binary_expression "uVar1 - param_4" identifier - identifier)) ;) (if_statement "if (param_5 < uVar1 - param_4) {\n      uVar2 = param_5;\n    }" if (parenthesized_expression "(param_5 < uVar1 - param_4)" ( (binary_expression "param_5 < uVar1 - param_4" identifier < (binary_expression "uVar1 - param_4" identifier - identifier)) )) (compound_statement "{\n      uVar2 = param_5;\n    }" { (expression_statement "uVar2 = param_5;" (assignment_expression "uVar2 = param_5" identifier = identifier) ;) })) (expression_statement "puVar5 = (undefined *)param_1;" (assignment_expression "puVar5 = (undefined *)param_1" identifier = (cast_expression "(undefined *)param_1" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (param_1 <= uVar3) {\n      if (uVar3 - param_1 <= param_2) {\n        param_2 = uVar3 - param_1;\n      }\n      _M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2);\n      return;\n    }" if (parenthesized_expression "(param_1 <= uVar3)" ( (binary_expression "param_1 <= uVar3" identifier <= identifier) )) (compound_statement "{\n      if (uVar3 - param_1 <= param_2) {\n        param_2 = uVar3 - param_1;\n      }\n      _M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2);\n      return;\n    }" { (if_statement "if (uVar3 - param_1 <= param_2) {\n        param_2 = uVar3 - param_1;\n      }" if (parenthesized_expression "(uVar3 - param_1 <= param_2)" ( (binary_expression "uVar3 - param_1 <= param_2" (binary_expression "uVar3 - param_1" identifier - identifier) <= identifier) )) (compound_statement "{\n        param_2 = uVar3 - param_1;\n      }" { (expression_statement "param_2 = uVar3 - param_1;" (assignment_expression "param_2 = uVar3 - param_1" identifier = (binary_expression "uVar3 - param_1" identifier - identifier)) ;) })) (expression_statement "_M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2);" (call_expression "_M_replace(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2)" identifier (argument_list "(this,param_1,param_2,(char *)(*(int *)param_3 + param_4),uVar2)" ( identifier , identifier , identifier , (cast_expression "(char *)(*(int *)param_3 + param_4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_3 + param_4)" ( (binary_expression "*(int *)param_3 + param_4" (pointer_expression "*(int *)param_3" * (cast_expression "(int *)param_3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + identifier) ))) , identifier ))) ;) (return_statement "return;" return ;) })) })) (do_statement "do {\n    puVar4 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)(PTR_s__s_004c1a50 + -0xe00,puVar4,puVar5,uVar3)\n    ;\n    puVar5 = puVar4;\n    uVar3 = extraout_v1;\n  } while( true );" do (compound_statement "{\n    puVar4 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)(PTR_s__s_004c1a50 + -0xe00,puVar4,puVar5,uVar3)\n    ;\n    puVar5 = puVar4;\n    uVar3 = extraout_v1;\n  }" { (expression_statement "puVar4 = PTR_UINT_004c12dc + -0x3aec;" (assignment_expression "puVar4 = PTR_UINT_004c12dc + -0x3aec" identifier = (binary_expression "PTR_UINT_004c12dc + -0x3aec" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR___throw_out_of_range_fmt_004c225c)(PTR_s__s_004c1a50 + -0xe00,puVar4,puVar5,uVar3)\n    ;" (call_expression "(*(code *)PTR___throw_out_of_range_fmt_004c225c)(PTR_s__s_004c1a50 + -0xe00,puVar4,puVar5,uVar3)" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_004c225c)" ( (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_004c225c" * (cast_expression "(code *)PTR___throw_out_of_range_fmt_004c225c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s__s_004c1a50 + -0xe00,puVar4,puVar5,uVar3)" ( (binary_expression "PTR_s__s_004c1a50 + -0xe00" identifier + number_literal) , identifier , identifier , identifier ))) ;) (expression_statement "puVar5 = puVar4;" (assignment_expression "puVar5 = puVar4" identifier = identifier) ;) (expression_statement "uVar3 = extraout_v1;" (assignment_expression "uVar3 = extraout_v1" identifier = identifier) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "void FUN_0033cc00(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  undefined *puVar3;\n  undefined *extraout_v1;\n  undefined *puVar4;\n  \n  puVar1 = (undefined *)param_4[1];\n  puVar4 = param_5;\n  puVar3 = puVar1;\n  if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }\n  do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );\n}\n\n" (function_definition "void FUN_0033cc00(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  undefined *puVar3;\n  undefined *extraout_v1;\n  undefined *puVar4;\n  \n  puVar1 = (undefined *)param_4[1];\n  puVar4 = param_5;\n  puVar3 = puVar1;\n  if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }\n  do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );\n}" primitive_type (function_declarator "FUN_0033cc00(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)" identifier (parameter_list "(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)" ( (parameter_declaration "string *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "uint param_6" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  undefined *puVar3;\n  undefined *extraout_v1;\n  undefined *puVar4;\n  \n  puVar1 = (undefined *)param_4[1];\n  puVar4 = param_5;\n  puVar3 = puVar1;\n  if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }\n  do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined *extraout_v1;" type_identifier (pointer_declarator "*extraout_v1" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "puVar1 = (undefined *)param_4[1];" (assignment_expression "puVar1 = (undefined *)param_4[1]" identifier = (cast_expression "(undefined *)param_4[1]" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_4[1]" identifier [ number_literal ]))) ;) (expression_statement "puVar4 = param_5;" (assignment_expression "puVar4 = param_5" identifier = identifier) ;) (expression_statement "puVar3 = puVar1;" (assignment_expression "puVar3 = puVar1" identifier = identifier) ;) (if_statement "if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }" if (parenthesized_expression "(param_5 <= puVar1)" ( (binary_expression "param_5 <= puVar1" identifier <= identifier) )) (compound_statement "{\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }" { (expression_statement "puVar3 = *(undefined **)(param_1 + 4);" (assignment_expression "puVar3 = *(undefined **)(param_1 + 4)" identifier = (pointer_expression "*(undefined **)(param_1 + 4)" * (cast_expression "(undefined **)(param_1 + 4)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = (int)puVar1 - (int)param_5;" (assignment_expression "uVar2 = (int)puVar1 - (int)param_5" identifier = (binary_expression "(int)puVar1 - (int)param_5" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_5" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }" if (parenthesized_expression "(param_6 < (uint)((int)puVar1 - (int)param_5))" ( (binary_expression "param_6 < (uint)((int)puVar1 - (int)param_5)" identifier < (call_expression "(uint)((int)puVar1 - (int)param_5)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar1 - (int)param_5)" ( (binary_expression "(int)puVar1 - (int)param_5" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_5" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      uVar2 = param_6;\n    }" { (expression_statement "uVar2 = param_6;" (assignment_expression "uVar2 = param_6" identifier = identifier) ;) })) (expression_statement "puVar4 = param_2;" (assignment_expression "puVar4 = param_2" identifier = identifier) ;) (if_statement "if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }" if (parenthesized_expression "(param_2 <= puVar3)" ( (binary_expression "param_2 <= puVar3" identifier <= identifier) )) (compound_statement "{\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }" { (if_statement "if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }" if (parenthesized_expression "((uint)((int)puVar3 - (int)param_2) <= param_3)" ( (binary_expression "(uint)((int)puVar3 - (int)param_2) <= param_3" (call_expression "(uint)((int)puVar3 - (int)param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar3 - (int)param_2)" ( (binary_expression "(int)puVar3 - (int)param_2" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) <= identifier) )) (compound_statement "{\n        param_3 = (int)puVar3 - (int)param_2;\n      }" { (expression_statement "param_3 = (int)puVar3 - (int)param_2;" (assignment_expression "param_3 = (int)puVar3 - (int)param_2" identifier = (binary_expression "(int)puVar3 - (int)param_2" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (labeled_statement "std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);" statement_identifier : (ERROR ":" :) (labeled_statement "string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);" statement_identifier : (ERROR ":" :) (expression_statement "_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);" (call_expression "_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2)" identifier (argument_list "(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2)" ( identifier , (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) , identifier , (binary_expression "param_5 + *param_4" identifier + (pointer_expression "*param_4" * identifier)) , identifier ))) ;))) (return_statement "return;" return ;) })) })) (do_statement "do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );" do (compound_statement "{\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  }" { (expression_statement "puVar1 = PTR_UINT_004c12dc + -0x3aec;" (assignment_expression "puVar1 = PTR_UINT_004c12dc + -0x3aec" identifier = (binary_expression "PTR_UINT_004c12dc + -0x3aec" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);" (call_expression "(*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3)" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_004c225c)" ( (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_004c225c" * (cast_expression "(code *)PTR___throw_out_of_range_fmt_004c225c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3)" ( (binary_expression "PTR_s__s_004c1a50 + -0xe00" identifier + number_literal) , identifier , identifier , identifier ))) ;) (expression_statement "puVar4 = puVar1;" (assignment_expression "puVar4 = puVar1" identifier = identifier) ;) (expression_statement "puVar3 = extraout_v1;" (assignment_expression "puVar3 = extraout_v1" identifier = identifier) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) })) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) IDENT) , IDENT , (binary_expression IDENT + (pointer_expression * IDENT)) , IDENT ))) ;))) (return_statement return ;) })) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "void FUN_0033cc00(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  undefined *puVar3;\n  undefined *extraout_v1;\n  undefined *puVar4;\n  \n  puVar1 = (undefined *)param_4[1];\n  puVar4 = param_5;\n  puVar3 = puVar1;\n  if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }\n  do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );\n}" (primitive_type "void") (function_declarator "FUN_0033cc00(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)" (identifier "FUN_0033cc00") (parameter_list "(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,\n                 uint param_6)" (( "(") (parameter_declaration "string *param_1" (type_identifier "string") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined *param_2" (type_identifier "undefined") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int *param_4" (primitive_type "int") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "undefined *param_5" (type_identifier "undefined") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "uint param_6" (type_identifier "uint") (identifier "param_6")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  undefined *puVar3;\n  undefined *extraout_v1;\n  undefined *puVar4;\n  \n  puVar1 = (undefined *)param_4[1];\n  puVar4 = param_5;\n  puVar3 = puVar1;\n  if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }\n  do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined *extraout_v1;" (type_identifier "undefined") (pointer_declarator "*extraout_v1" (* "*") (identifier "extraout_v1")) (; ";")) (declaration "undefined *puVar4;" (type_identifier "undefined") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (expression_statement "puVar1 = (undefined *)param_4[1];" (assignment_expression "puVar1 = (undefined *)param_4[1]" (identifier "puVar1") (= "=") (cast_expression "(undefined *)param_4[1]" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_4[1]" (identifier "param_4") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "puVar4 = param_5;" (assignment_expression "puVar4 = param_5" (identifier "puVar4") (= "=") (identifier "param_5")) (; ";")) (expression_statement "puVar3 = puVar1;" (assignment_expression "puVar3 = puVar1" (identifier "puVar3") (= "=") (identifier "puVar1")) (; ";")) (if_statement "if (param_5 <= puVar1) {\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }" (if "if") (parenthesized_expression "(param_5 <= puVar1)" (( "(") (binary_expression "param_5 <= puVar1" (identifier "param_5") (<= "<=") (identifier "puVar1")) () ")")) (compound_statement "{\n    puVar3 = *(undefined **)(param_1 + 4);\n    uVar2 = (int)puVar1 - (int)param_5;\n    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }\n    puVar4 = param_2;\n    if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }\n  }" ({ "{") (expression_statement "puVar3 = *(undefined **)(param_1 + 4);" (assignment_expression "puVar3 = *(undefined **)(param_1 + 4)" (identifier "puVar3") (= "=") (pointer_expression "*(undefined **)(param_1 + 4)" (* "*") (cast_expression "(undefined **)(param_1 + 4)" (( "(") (type_descriptor "undefined **" (type_identifier "undefined") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "uVar2 = (int)puVar1 - (int)param_5;" (assignment_expression "uVar2 = (int)puVar1 - (int)param_5" (identifier "uVar2") (= "=") (binary_expression "(int)puVar1 - (int)param_5" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (- "-") (cast_expression "(int)param_5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_5")))) (; ";")) (if_statement "if (param_6 < (uint)((int)puVar1 - (int)param_5)) {\n      uVar2 = param_6;\n    }" (if "if") (parenthesized_expression "(param_6 < (uint)((int)puVar1 - (int)param_5))" (( "(") (binary_expression "param_6 < (uint)((int)puVar1 - (int)param_5)" (identifier "param_6") (< "<") (call_expression "(uint)((int)puVar1 - (int)param_5)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((int)puVar1 - (int)param_5)" (( "(") (binary_expression "(int)puVar1 - (int)param_5" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (- "-") (cast_expression "(int)param_5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_5"))) () ")")))) () ")")) (compound_statement "{\n      uVar2 = param_6;\n    }" ({ "{") (expression_statement "uVar2 = param_6;" (assignment_expression "uVar2 = param_6" (identifier "uVar2") (= "=") (identifier "param_6")) (; ";")) (} "}"))) (expression_statement "puVar4 = param_2;" (assignment_expression "puVar4 = param_2" (identifier "puVar4") (= "=") (identifier "param_2")) (; ";")) (if_statement "if (param_2 <= puVar3) {\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }" (if "if") (parenthesized_expression "(param_2 <= puVar3)" (( "(") (binary_expression "param_2 <= puVar3" (identifier "param_2") (<= "<=") (identifier "puVar3")) () ")")) (compound_statement "{\n      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }\n      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);\n      return;\n    }" ({ "{") (if_statement "if ((uint)((int)puVar3 - (int)param_2) <= param_3) {\n        param_3 = (int)puVar3 - (int)param_2;\n      }" (if "if") (parenthesized_expression "((uint)((int)puVar3 - (int)param_2) <= param_3)" (( "(") (binary_expression "(uint)((int)puVar3 - (int)param_2) <= param_3" (call_expression "(uint)((int)puVar3 - (int)param_2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((int)puVar3 - (int)param_2)" (( "(") (binary_expression "(int)puVar3 - (int)param_2" (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3")) (- "-") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")"))) (<= "<=") (identifier "param_3")) () ")")) (compound_statement "{\n        param_3 = (int)puVar3 - (int)param_2;\n      }" ({ "{") (expression_statement "param_3 = (int)puVar3 - (int)param_2;" (assignment_expression "param_3 = (int)puVar3 - (int)param_2" (identifier "param_3") (= "=") (binary_expression "(int)puVar3 - (int)param_2" (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3")) (- "-") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")))) (; ";")) (} "}"))) (labeled_statement "std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);" (statement_identifier "string") (: ":") (ERROR ":" (: ":")) (expression_statement "_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);" (call_expression "_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2)" (identifier "_M_replace") (argument_list "(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2)" (( "(") (identifier "param_1") (, ",") (cast_expression "(uint)param_2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_2")) (, ",") (identifier "param_3") (, ",") (binary_expression "param_5 + *param_4" (identifier "param_5") (+ "+") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) (, ",") (identifier "uVar2") () ")"))) (; ";")))) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (do_statement "do {\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  } while( true );" (do "do") (compound_statement "{\n    puVar1 = PTR_UINT_004c12dc + -0x3aec;\n    (*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);\n    puVar4 = puVar1;\n    puVar3 = extraout_v1;\n  }" ({ "{") (expression_statement "puVar1 = PTR_UINT_004c12dc + -0x3aec;" (assignment_expression "puVar1 = PTR_UINT_004c12dc + -0x3aec" (identifier "puVar1") (= "=") (binary_expression "PTR_UINT_004c12dc + -0x3aec" (identifier "PTR_UINT_004c12dc") (+ "+") (number_literal "-0x3aec"))) (; ";")) (expression_statement "(*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);" (call_expression "(*(code *)PTR___throw_out_of_range_fmt_004c225c)\n              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3)" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_004c225c)" (( "(") (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_004c225c" (* "*") (cast_expression "(code *)PTR___throw_out_of_range_fmt_004c225c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___throw_out_of_range_fmt_004c225c"))) () ")")) (argument_list "(PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3)" (( "(") (binary_expression "PTR_s__s_004c1a50 + -0xe00" (identifier "PTR_s__s_004c1a50") (+ "+") (number_literal "-0xe00")) (, ",") (identifier "puVar1") (, ",") (identifier "puVar4") (, ",") (identifier "puVar3") () ")"))) (; ";")) (expression_statement "puVar4 = puVar1;" (assignment_expression "puVar4 = puVar1" (identifier "puVar4") (= "=") (identifier "puVar1")) (; ";")) (expression_statement "puVar3 = extraout_v1;" (assignment_expression "puVar3 = extraout_v1" (identifier "puVar3") (= "=") (identifier "extraout_v1")) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator 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: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) (identifier) (binary_expression left: (identifier) right: (pointer_expression argument: (identifier))) (identifier)))))) (return_statement))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (true))))))

void MASKED(string *param_1,undefined *param_2,uint param_3,int *param_4,undefined *param_5,
                 uint param_6)

{
  undefined *puVar1;
  uint uVar2;
  undefined *puVar3;
  undefined *extraout_v1;
  undefined *puVar4;
  
  puVar1 = (undefined *)param_4[1];
  puVar4 = param_5;
  puVar3 = puVar1;
  if (param_5 <= puVar1) {
    puVar3 = *(undefined **)(param_1 + 4);
    uVar2 = (int)puVar1 - (int)param_5;
    if (param_6 < (uint)((int)puVar1 - (int)param_5)) {
      uVar2 = param_6;
    }
    puVar4 = param_2;
    if (param_2 <= puVar3) {
      if ((uint)((int)puVar3 - (int)param_2) <= param_3) {
        param_3 = (int)puVar3 - (int)param_2;
      }
      std::string::_M_replace(param_1,(uint)param_2,param_3,param_5 + *param_4,uVar2);
      return;
    }
  }
  do {
    puVar1 = PTR_UINT_004c12dc + -0x3aec;
    (*(code *)PTR___throw_out_of_range_fmt_004c225c)
              (PTR_s__s_004c1a50 + -0xe00,puVar1,puVar4,puVar3);
    puVar4 = puVar1;
    puVar3 = extraout_v1;
  } while( true );
}

