
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::insert(unsigned int, wchar_t const*, unsigned int) */

wstring * __thiscall std::wstring::insert(wstring *this,uint param_1,wchar_t *param_2,uint param_3)

{
  wchar_t *__s1;
  wchar_t *pwVar1;
  wchar_t wVar2;
  wchar_t *__s2;
  int iVar3;
  size_t sVar4;
  
  pwVar1 = *(wchar_t **)this;
  wVar2 = pwVar1[-3];
  if ((uint)wVar2 < param_1) {
                    /* WARNING: Subroutine does not return */
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",
               param_1,wVar2);
  }
  if (param_3 <= (uint)(0xffffffeU - wVar2)) {
    if (((param_2 < pwVar1) || (pwVar1 + wVar2 < param_2)) || (L'\0' < pwVar1[-1])) {
      this = (wstring *)_M_replace_safe(this,param_1,0,param_2,param_3);
    }
    else {
      iVar3 = *(int *)this;
      _M_mutate(this,param_1,0,param_3);
      pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3));
      __s1 = (wchar_t *)(*(int *)this + param_1 * 4);
      __s2 = pwVar1 + param_3;
      if (__s1 < __s2) {
        if (pwVar1 < __s1) {
          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);
          sVar4 = iVar3 >> 2;
          if (sVar4 == 1) {
            *__s1 = *pwVar1;
          }
          else if (sVar4 != 0) {
            wmemcpy(__s1,pwVar1,sVar4);
          }
          pwVar1 = (wchar_t *)((int)__s1 + iVar3);
          sVar4 = param_3 - sVar4;
          if (sVar4 == 1) {
            *pwVar1 = __s1[param_3];
          }
          else if (sVar4 != 0) {
            wmemcpy(pwVar1,__s1 + param_3,sVar4);
          }
        }
        else if (param_3 == 1) {
          *__s1 = *__s2;
        }
        else if (param_3 != 0) {
          wmemcpy(__s1,__s2,param_3);
        }
      }
      else if (param_3 == 1) {
        *__s1 = *pwVar1;
      }
      else if (param_3 != 0) {
        wmemcpy(__s1,pwVar1,param_3);
      }
    }
    return this;
  }
                    /* WARNING: Subroutine does not return */
  __throw_length_error("basic_string::insert");
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint * FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)

{
  wchar_t *pwVar1;
  wchar_t *__s1;
  uint uVar2;
  uint uVar3;
  wchar_t *__s2;
  int iVar4;
  size_t sVar5;
  
  uVar2 = *param_1;
  uVar3 = *(uint *)(uVar2 - 0xc);
  if (uVar3 < param_2) {
                    /* WARNING: Subroutine does not return */
    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",
                 param_2,uVar3);
  }
  if (param_4 <= 0xffffffe - uVar3) {
    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {
      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);
    }
    else {
      uVar2 = *param_1;
      FUN_00269ee0(param_1,param_2,0,param_4);
      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));
      __s1 = (wchar_t *)(*param_1 + param_2 * 4);
      __s2 = pwVar1 + param_4;
      if (__s1 < __s2) {
        if (pwVar1 < __s1) {
          iVar4 = param_2 * 4 - (param_3 - uVar2);
          sVar5 = iVar4 >> 2;
          if (sVar5 == 1) {
            *__s1 = *pwVar1;
          }
          else if (sVar5 != 0) {
            wmemcpy(__s1,pwVar1,sVar5);
          }
          pwVar1 = (wchar_t *)((int)__s1 + iVar4);
          sVar5 = param_4 - sVar5;
          if (sVar5 == 1) {
            *pwVar1 = __s1[param_4];
          }
          else if (sVar5 != 0) {
            wmemcpy(pwVar1,__s1 + param_4,sVar5);
          }
        }
        else if (param_4 == 1) {
          *__s1 = *__s2;
        }
        else if (param_4 != 0) {
          wmemcpy(__s1,__s2,param_4);
        }
      }
      else if (param_4 == 1) {
        *__s1 = *pwVar1;
      }
      else if (param_4 != 0) {
        wmemcpy(__s1,pwVar1,param_4);
      }
    }
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c7a0("basic_string::insert");
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x124617
SUB ESP,0x1c
MOV ESI,dword ptr [ESP + 0x30]
MOV EDI,dword ptr [ESP + 0x34]
MOV ECX,dword ptr [ESP + 0x38]
MOV EDX,dword ptr [ESI]
MOV EBP,dword ptr [EDX + -0xc]
CMP EDI,EBP
JA 0x0026ab6d
MOV EAX,0xffffffe
SUB EAX,EBP
CMP dword ptr [ESP + 0x3c],EAX
JA 0x0026ab5e
CMP EDX,ECX
JBE 0x0026aa40
SUB ESP,0xc
PUSH dword ptr [ESP + 0x48]
PUSH ECX
PUSH 0x0
PUSH EDI
PUSH ESI
CALL 0x0026a740
ADD ESP,0x20
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EDX + EBP*0x4]
CMP ECX,EAX
JA 0x0026aa20
MOV EAX,dword ptr [EDX + -0x4]
TEST EAX,EAX
JG 0x0026aa20
SUB ECX,dword ptr [ESI]
PUSH dword ptr [ESP + 0x3c]
PUSH 0x0
MOV EBP,ECX
PUSH EDI
SHL EDI,0x2
PUSH ESI
CALL 0x00269ee0
MOV EAX,dword ptr [ESI]
LEA EDX,[EAX + EBP*0x1]
LEA ECX,[EAX + EDI*0x1]
MOV EAX,dword ptr [ESP + 0x4c]
SHL EAX,0x2
MOV dword ptr [ESP + 0x18],EAX
ADD EAX,EDX
ADD ESP,0x10
CMP EAX,ECX
JA 0x0026aab0
CMP dword ptr [ESP + 0x3c],0x1
JZ 0x0026ab37
MOV EDI,dword ptr [ESP + 0x3c]
TEST EDI,EDI
JZ 0x0026ab30
SUB ESP,0x4
PUSH dword ptr [ESP + 0x40]
PUSH EDX
PUSH ECX
CALL 0x00029370
ADD ESP,0x10
MOV EAX,ESI
JMP 0x0026aa34
CMP EDX,ECX
JC 0x0026aadf
CMP dword ptr [ESP + 0x3c],0x1
JZ 0x0026ab48
MOV EDX,dword ptr [ESP + 0x3c]
TEST EDX,EDX
JZ 0x0026ab30
SUB ESP,0x4
PUSH dword ptr [ESP + 0x40]
PUSH EAX
PUSH ECX
CALL 0x00029370
ADD ESP,0x10
MOV EAX,ESI
JMP 0x0026aa34
SUB EDI,EBP
MOV EBP,EDI
SAR EDI,0x2
CMP EDI,0x1
JZ 0x0026ab42
TEST EDI,EDI
JZ 0x0026ab05
SUB ESP,0x4
PUSH EDI
PUSH EDX
PUSH ECX
MOV dword ptr [ESP + 0x1c],ECX
CALL 0x00029370
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
MOV EDX,dword ptr [ESP + 0x3c]
LEA EAX,[ECX + EBP*0x1]
SUB EDX,EDI
MOV EDI,dword ptr [ESP + 0x8]
ADD EDI,ECX
CMP EDX,0x1
JZ 0x0026ab53
TEST EDX,EDX
JZ 0x0026ab30
SUB ESP,0x4
PUSH EDX
PUSH EDI
PUSH EAX
CALL 0x00029370
ADD ESP,0x10
LEA ESI,[ESI]
NOP
MOV EAX,ESI
JMP 0x0026aa34
MOV EAX,dword ptr [EDX]
MOV dword ptr [ECX],EAX
MOV EAX,ESI
JMP 0x0026aa34
MOV EAX,dword ptr [EDX]
MOV dword ptr [ECX],EAX
JMP 0x0026ab05
MOV EAX,dword ptr [EAX]
MOV dword ptr [ECX],EAX
MOV EAX,ESI
JMP 0x0026aa34
MOV EDX,dword ptr [EDI]
MOV dword ptr [EAX],EDX
MOV EAX,ESI
JMP 0x0026aa34
SUB ESP,0xc
LEA EAX,[EBX + 0xfff14d3d]
PUSH EAX
CALL 0x0022c7a0
LEA EAX,[EBX + 0xfff14d3d]
PUSH EBP
PUSH EDI
PUSH EAX
LEA EAX,[EBX + 0xffefbec4]
PUSH EAX
CALL 0x0022c840
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint * FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *__s1;\n  uint uVar2;\n  uint uVar3;\n  wchar_t *__s2;\n  int iVar4;\n  size_t sVar5;\n  \n  uVar2 = *param_1;\n  uVar3 = *(uint *)(uVar2 - 0xc);\n  if (uVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }\n  if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c7a0("basic_string::insert");\n}\n\n" comment (function_definition "uint * FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *__s1;\n  uint uVar2;\n  uint uVar3;\n  wchar_t *__s2;\n  int iVar4;\n  size_t sVar5;\n  \n  uVar2 = *param_1;\n  uVar3 = *(uint *)(uVar2 - 0xc);\n  if (uVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }\n  if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c7a0("basic_string::insert");\n}" type_identifier (pointer_declarator "* FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)" * (function_declarator "FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)" identifier (parameter_list "(uint *param_1,uint param_2,uint param_3,uint param_4)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) )))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *__s1;\n  uint uVar2;\n  uint uVar3;\n  wchar_t *__s2;\n  int iVar4;\n  size_t sVar5;\n  \n  uVar2 = *param_1;\n  uVar3 = *(uint *)(uVar2 - 0xc);\n  if (uVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }\n  if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c7a0("basic_string::insert");\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "wchar_t *__s2;" type_identifier (pointer_declarator "*__s2" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar3 = *(uint *)(uVar2 - 0xc);" (assignment_expression "uVar3 = *(uint *)(uVar2 - 0xc)" identifier = (pointer_expression "*(uint *)(uVar2 - 0xc)" * (cast_expression "(uint *)(uVar2 - 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 - 0xc)" ( (binary_expression "uVar2 - 0xc" identifier - number_literal) ))))) ;) (if_statement "if (uVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }" if (parenthesized_expression "(uVar3 < param_2)" ( (binary_expression "uVar3 < param_2" identifier < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }" { comment (expression_statement "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);" (call_expression "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3)" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3)" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::insert"" " string_content ") , identifier , identifier ))) ;) })) (if_statement "if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }" if (parenthesized_expression "(param_4 <= 0xffffffe - uVar3)" ( (binary_expression "param_4 <= 0xffffffe - uVar3" identifier <= (binary_expression "0xffffffe - uVar3" number_literal - identifier)) )) (compound_statement "{\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }" { (if_statement "if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }" if (parenthesized_expression "(((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4)))" ( (binary_expression "((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))" (parenthesized_expression "((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3))" ( (binary_expression "(param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)" (parenthesized_expression "(param_3 < uVar2)" ( (binary_expression "param_3 < uVar2" identifier < identifier) )) || (parenthesized_expression "(uVar2 + uVar3 * 4 < param_3)" ( (binary_expression "uVar2 + uVar3 * 4 < param_3" (binary_expression "uVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) < identifier) ))) )) || (parenthesized_expression "(0 < *(int *)(uVar2 - 4))" ( (binary_expression "0 < *(int *)(uVar2 - 4)" number_literal < (pointer_expression "*(int *)(uVar2 - 4)" * (cast_expression "(int *)(uVar2 - 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 - 4)" ( (binary_expression "uVar2 - 4" identifier - number_literal) ))))) ))) )) (compound_statement "{\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }" { (expression_statement "param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);" (assignment_expression "param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4)" identifier = (cast_expression "(uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0026a740(param_1,param_2,0,param_3,param_4)" identifier (argument_list "(param_1,param_2,0,param_3,param_4)" ( identifier , identifier , number_literal , identifier , identifier ))))) ;) }) (else_clause "else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }" else (compound_statement "{\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }" { (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "FUN_00269ee0(param_1,param_2,0,param_4);" (call_expression "FUN_00269ee0(param_1,param_2,0,param_4)" identifier (argument_list "(param_1,param_2,0,param_4)" ( identifier , identifier , number_literal , identifier ))) ;) (expression_statement "pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));" (assignment_expression "pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2))" identifier = (cast_expression "(wchar_t *)(*param_1 + (param_3 - uVar2))" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + (param_3 - uVar2))" ( (binary_expression "*param_1 + (param_3 - uVar2)" (pointer_expression "*param_1" * identifier) + (parenthesized_expression "(param_3 - uVar2)" ( (binary_expression "param_3 - uVar2" identifier - identifier) ))) )))) ;) (expression_statement "__s1 = (wchar_t *)(*param_1 + param_2 * 4);" (assignment_expression "__s1 = (wchar_t *)(*param_1 + param_2 * 4)" identifier = (cast_expression "(wchar_t *)(*param_1 + param_2 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + param_2 * 4)" ( (binary_expression "*param_1 + param_2 * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) ;) (expression_statement "__s2 = pwVar1 + param_4;" (assignment_expression "__s2 = pwVar1 + param_4" identifier = (binary_expression "pwVar1 + param_4" identifier + identifier)) ;) (if_statement "if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" if (parenthesized_expression "(__s1 < __s2)" ( (binary_expression "__s1 < __s2" identifier < identifier) )) (compound_statement "{\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }" { (if_statement "if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" if (parenthesized_expression "(pwVar1 < __s1)" ( (binary_expression "pwVar1 < __s1" identifier < identifier) )) (compound_statement "{\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }" { (expression_statement "iVar4 = param_2 * 4 - (param_3 - uVar2);" (assignment_expression "iVar4 = param_2 * 4 - (param_3 - uVar2)" identifier = (binary_expression "param_2 * 4 - (param_3 - uVar2)" (binary_expression "param_2 * 4" identifier * number_literal) - (parenthesized_expression "(param_3 - uVar2)" ( (binary_expression "param_3 - uVar2" identifier - identifier) )))) ;) (expression_statement "sVar5 = iVar4 >> 2;" (assignment_expression "sVar5 = iVar4 >> 2" identifier = (binary_expression "iVar4 >> 2" identifier >> number_literal)) ;) (if_statement "if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n            *__s1 = *pwVar1;\n          }" { (expression_statement "*__s1 = *pwVar1;" (assignment_expression "*__s1 = *pwVar1" (pointer_expression "*__s1" * identifier) = (pointer_expression "*pwVar1" * identifier)) ;) }) (else_clause "else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" else (if_statement "if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" if (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) (compound_statement "{\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" { (expression_statement "wmemcpy(__s1,pwVar1,sVar5);" (call_expression "wmemcpy(__s1,pwVar1,sVar5)" identifier (argument_list "(__s1,pwVar1,sVar5)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "pwVar1 = (wchar_t *)((int)__s1 + iVar4);" (assignment_expression "pwVar1 = (wchar_t *)((int)__s1 + iVar4)" identifier = (cast_expression "(wchar_t *)((int)__s1 + iVar4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s1 + iVar4)" ( (binary_expression "(int)__s1 + iVar4" (cast_expression "(int)__s1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "sVar5 = param_4 - sVar5;" (assignment_expression "sVar5 = param_4 - sVar5" identifier = (binary_expression "param_4 - sVar5" identifier - identifier)) ;) (if_statement "if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n            *pwVar1 = __s1[param_4];\n          }" { (expression_statement "*pwVar1 = __s1[param_4];" (assignment_expression "*pwVar1 = __s1[param_4]" (pointer_expression "*pwVar1" * identifier) = (subscript_expression "__s1[param_4]" identifier [ identifier ])) ;) }) (else_clause "else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" else (if_statement "if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" if (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) (compound_statement "{\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" { (expression_statement "wmemcpy(pwVar1,__s1 + param_4,sVar5);" (call_expression "wmemcpy(pwVar1,__s1 + param_4,sVar5)" identifier (argument_list "(pwVar1,__s1 + param_4,sVar5)" ( identifier , (binary_expression "__s1 + param_4" identifier + identifier) , identifier ))) ;) })))) }) (else_clause "else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" else (if_statement "if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n          *__s1 = *__s2;\n        }" { (expression_statement "*__s1 = *__s2;" (assignment_expression "*__s1 = *__s2" (pointer_expression "*__s1" * identifier) = (pointer_expression "*__s2" * identifier)) ;) }) (else_clause "else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" else (if_statement "if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n          wmemcpy(__s1,__s2,param_4);\n        }" { (expression_statement "wmemcpy(__s1,__s2,param_4);" (call_expression "wmemcpy(__s1,__s2,param_4)" identifier (argument_list "(__s1,__s2,param_4)" ( identifier , identifier , identifier ))) ;) })))))) }) (else_clause "else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" else (if_statement "if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n        *__s1 = *pwVar1;\n      }" { (expression_statement "*__s1 = *pwVar1;" (assignment_expression "*__s1 = *pwVar1" (pointer_expression "*__s1" * identifier) = (pointer_expression "*pwVar1" * identifier)) ;) }) (else_clause "else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" else (if_statement "if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n        wmemcpy(__s1,pwVar1,param_4);\n      }" { (expression_statement "wmemcpy(__s1,pwVar1,param_4);" (call_expression "wmemcpy(__s1,pwVar1,param_4)" identifier (argument_list "(__s1,pwVar1,param_4)" ( identifier , identifier , identifier ))) ;) })))))) }))) (return_statement "return param_1;" return identifier ;) })) comment (expression_statement "FUN_0022c7a0("basic_string::insert");" (call_expression "FUN_0022c7a0("basic_string::insert")" identifier (argument_list "("basic_string::insert")" ( (string_literal ""basic_string::insert"" " string_content ") ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::wstring::insert(unsigned int, wchar_t const*, unsigned int) */\n\nwstring * __thiscall std::wstring::insert(wstring *this,uint param_1,wchar_t *param_2,uint param_3)\n\n{\n  wchar_t *__s1;\n  wchar_t *pwVar1;\n  wchar_t wVar2;\n  wchar_t *__s2;\n  int iVar3;\n  size_t sVar4;\n  \n  pwVar1 = *(wchar_t **)this;\n  wVar2 = pwVar1[-3];\n  if ((uint)wVar2 < param_1) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt\n              ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_1,wVar2);\n  }\n  if (param_3 <= (uint)(0xffffffeU - wVar2)) {\n    if (((param_2 < pwVar1) || (pwVar1 + wVar2 < param_2)) || (L'\0' < pwVar1[-1])) {\n      this = (wstring *)_M_replace_safe(this,param_1,0,param_2,param_3);\n    }\n    else {\n      iVar3 = *(int *)this;\n      _M_mutate(this,param_1,0,param_3);\n      pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3));\n      __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n      __s2 = pwVar1 + param_3;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }\n      }\n      else if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }\n    }\n    return this;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_length_error("basic_string::insert");\n}\n\n" comment comment (ERROR "wstring * __thiscall std::wstring::insert(wstring *this,uint param_1,wchar_t *param_2,uint param_3)" (binary_expression "wstring * __thiscall std::wstring::insert(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::insert(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier identifier , (ERROR "wchar_t" identifier) (pointer_declarator "*param_2" * identifier) , identifier identifier )) (compound_statement "{\n  wchar_t *__s1;\n  wchar_t *pwVar1;\n  wchar_t wVar2;\n  wchar_t *__s2;\n  int iVar3;\n  size_t sVar4;\n  \n  pwVar1 = *(wchar_t **)this;\n  wVar2 = pwVar1[-3];\n  if ((uint)wVar2 < param_1) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt\n              ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_1,wVar2);\n  }\n  if (param_3 <= (uint)(0xffffffeU - wVar2)) {\n    if (((param_2 < pwVar1) || (pwVar1 + wVar2 < param_2)) || (L'\0' < pwVar1[-1])) {\n      this = (wstring *)_M_replace_safe(this,param_1,0,param_2,param_3);\n    }\n    else {\n      iVar3 = *(int *)this;\n      _M_mutate(this,param_1,0,param_3);\n      pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3));\n      __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n      __s2 = pwVar1 + param_3;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }\n      }\n      else if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }\n    }\n    return this;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_length_error("basic_string::insert");\n}" { (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t wVar2;" type_identifier identifier ;) (declaration "wchar_t *__s2;" type_identifier (pointer_declarator "*__s2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (expression_statement "pwVar1 = *(wchar_t **)this;" (assignment_expression "pwVar1 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "wVar2 = pwVar1[-3];" (assignment_expression "wVar2 = pwVar1[-3]" identifier = (subscript_expression "pwVar1[-3]" identifier [ number_literal ])) ;) (if_statement "if ((uint)wVar2 < param_1) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt\n              ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_1,wVar2);\n  }" if (parenthesized_expression "((uint)wVar2 < param_1)" ( (binary_expression "(uint)wVar2 < param_1" (cast_expression "(uint)wVar2" ( (type_descriptor "uint" type_identifier) ) identifier) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt\n              ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_1,wVar2);\n  }" { comment (expression_statement "__throw_out_of_range_fmt\n              ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_1,wVar2);" (call_expression "__throw_out_of_range_fmt\n              ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_1,wVar2)" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_1,wVar2)" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::insert"" " string_content ") , identifier , identifier ))) ;) })) (if_statement "if (param_3 <= (uint)(0xffffffeU - wVar2)) {\n    if (((param_2 < pwVar1) || (pwVar1 + wVar2 < param_2)) || (L'\0' < pwVar1[-1])) {\n      this = (wstring *)_M_replace_safe(this,param_1,0,param_2,param_3);\n    }\n    else {\n      iVar3 = *(int *)this;\n      _M_mutate(this,param_1,0,param_3);\n      pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3));\n      __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n      __s2 = pwVar1 + param_3;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }\n      }\n      else if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }\n    }\n    return this;\n  }" if (parenthesized_expression "(param_3 <= (uint)(0xffffffeU - wVar2))" ( (binary_expression "param_3 <= (uint)(0xffffffeU - wVar2)" identifier <= (call_expression "(uint)(0xffffffeU - wVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffeU - wVar2)" ( (binary_expression "0xffffffeU - wVar2" number_literal - identifier) )))) )) (compound_statement "{\n    if (((param_2 < pwVar1) || (pwVar1 + wVar2 < param_2)) || (L'\0' < pwVar1[-1])) {\n      this = (wstring *)_M_replace_safe(this,param_1,0,param_2,param_3);\n    }\n    else {\n      iVar3 = *(int *)this;\n      _M_mutate(this,param_1,0,param_3);\n      pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3));\n      __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n      __s2 = pwVar1 + param_3;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }\n      }\n      else if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }\n    }\n    return this;\n  }" { (if_statement "if (((param_2 < pwVar1) || (pwVar1 + wVar2 < param_2)) || (L'\0' < pwVar1[-1])) {\n      this = (wstring *)_M_replace_safe(this,param_1,0,param_2,param_3);\n    }\n    else {\n      iVar3 = *(int *)this;\n      _M_mutate(this,param_1,0,param_3);\n      pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3));\n      __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n      __s2 = pwVar1 + param_3;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }\n      }\n      else if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }\n    }" if (parenthesized_expression "(((param_2 < pwVar1) || (pwVar1 + wVar2 < param_2)) || (L'\0' < pwVar1[-1]))" ( (binary_expression "((param_2 < pwVar1) || (pwVar1 + wVar2 < param_2)) || (L'\0' < pwVar1[-1])" (parenthesized_expression "((param_2 < pwVar1) || (pwVar1 + wVar2 < param_2))" ( (binary_expression "(param_2 < pwVar1) || (pwVar1 + wVar2 < param_2)" (parenthesized_expression "(param_2 < pwVar1)" ( (binary_expression "param_2 < pwVar1" identifier < identifier) )) || (parenthesized_expression "(pwVar1 + wVar2 < param_2)" ( (binary_expression "pwVar1 + wVar2 < param_2" (binary_expression "pwVar1 + wVar2" identifier + identifier) < identifier) ))) )) || (parenthesized_expression "(L'\0' < pwVar1[-1])" ( (binary_expression "L'\0' < pwVar1[-1]" (char_literal "L'\0'" L' escape_sequence ') < (subscript_expression "pwVar1[-1]" identifier [ number_literal ])) ))) )) (compound_statement "{\n      this = (wstring *)_M_replace_safe(this,param_1,0,param_2,param_3);\n    }" { (expression_statement "this = (wstring *)_M_replace_safe(this,param_1,0,param_2,param_3);" (assignment_expression "this = (wstring *)_M_replace_safe(this,param_1,0,param_2,param_3)" identifier = (cast_expression "(wstring *)_M_replace_safe(this,param_1,0,param_2,param_3)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_replace_safe(this,param_1,0,param_2,param_3)" identifier (argument_list "(this,param_1,0,param_2,param_3)" ( identifier , identifier , number_literal , identifier , identifier ))))) ;) }) (else_clause "else {\n      iVar3 = *(int *)this;\n      _M_mutate(this,param_1,0,param_3);\n      pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3));\n      __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n      __s2 = pwVar1 + param_3;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }\n      }\n      else if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }\n    }" else (compound_statement "{\n      iVar3 = *(int *)this;\n      _M_mutate(this,param_1,0,param_3);\n      pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3));\n      __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n      __s2 = pwVar1 + param_3;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }\n      }\n      else if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }\n    }" { (expression_statement "iVar3 = *(int *)this;" (assignment_expression "iVar3 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "_M_mutate(this,param_1,0,param_3);" (call_expression "_M_mutate(this,param_1,0,param_3)" identifier (argument_list "(this,param_1,0,param_3)" ( identifier , identifier , number_literal , identifier ))) ;) (expression_statement "pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3));" (assignment_expression "pwVar1 = (wchar_t *)(*(int *)this + ((int)param_2 - iVar3))" identifier = (cast_expression "(wchar_t *)(*(int *)this + ((int)param_2 - iVar3))" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + ((int)param_2 - iVar3))" ( (binary_expression "*(int *)this + ((int)param_2 - iVar3)" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (parenthesized_expression "((int)param_2 - iVar3)" ( (binary_expression "(int)param_2 - iVar3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) ))) )))) ;) (expression_statement "__s1 = (wchar_t *)(*(int *)this + param_1 * 4);" (assignment_expression "__s1 = (wchar_t *)(*(int *)this + param_1 * 4)" identifier = (cast_expression "(wchar_t *)(*(int *)this + param_1 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_1 * 4)" ( (binary_expression "*(int *)this + param_1 * 4" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "param_1 * 4" identifier * number_literal)) )))) ;) (expression_statement "__s2 = pwVar1 + param_3;" (assignment_expression "__s2 = pwVar1 + param_3" identifier = (binary_expression "pwVar1 + param_3" identifier + identifier)) ;) (if_statement "if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }\n      }\n      else if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }" if (parenthesized_expression "(__s1 < __s2)" ( (binary_expression "__s1 < __s2" identifier < identifier) )) (compound_statement "{\n        if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }\n      }" { (if_statement "if (pwVar1 < __s1) {\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }\n        else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }" if (parenthesized_expression "(pwVar1 < __s1)" ( (binary_expression "pwVar1 < __s1" identifier < identifier) )) (compound_statement "{\n          iVar3 = param_1 * 4 - ((int)param_2 - iVar3);\n          sVar4 = iVar3 >> 2;\n          if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar3);\n          sVar4 = param_3 - sVar4;\n          if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }\n        }" { (expression_statement "iVar3 = param_1 * 4 - ((int)param_2 - iVar3);" (assignment_expression "iVar3 = param_1 * 4 - ((int)param_2 - iVar3)" identifier = (binary_expression "param_1 * 4 - ((int)param_2 - iVar3)" (binary_expression "param_1 * 4" identifier * number_literal) - (parenthesized_expression "((int)param_2 - iVar3)" ( (binary_expression "(int)param_2 - iVar3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) )))) ;) (expression_statement "sVar4 = iVar3 >> 2;" (assignment_expression "sVar4 = iVar3 >> 2" identifier = (binary_expression "iVar3 >> 2" identifier >> number_literal)) ;) (if_statement "if (sVar4 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 1" identifier == number_literal) )) (compound_statement "{\n            *__s1 = *pwVar1;\n          }" { (expression_statement "*__s1 = *pwVar1;" (assignment_expression "*__s1 = *pwVar1" (pointer_expression "*__s1" * identifier) = (pointer_expression "*pwVar1" * identifier)) ;) }) (else_clause "else if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }" else (if_statement "if (sVar4 != 0) {\n            wmemcpy(__s1,pwVar1,sVar4);\n          }" if (parenthesized_expression "(sVar4 != 0)" ( (binary_expression "sVar4 != 0" identifier != number_literal) )) (compound_statement "{\n            wmemcpy(__s1,pwVar1,sVar4);\n          }" { (expression_statement "wmemcpy(__s1,pwVar1,sVar4);" (call_expression "wmemcpy(__s1,pwVar1,sVar4)" identifier (argument_list "(__s1,pwVar1,sVar4)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "pwVar1 = (wchar_t *)((int)__s1 + iVar3);" (assignment_expression "pwVar1 = (wchar_t *)((int)__s1 + iVar3)" identifier = (cast_expression "(wchar_t *)((int)__s1 + iVar3)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s1 + iVar3)" ( (binary_expression "(int)__s1 + iVar3" (cast_expression "(int)__s1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "sVar4 = param_3 - sVar4;" (assignment_expression "sVar4 = param_3 - sVar4" identifier = (binary_expression "param_3 - sVar4" identifier - identifier)) ;) (if_statement "if (sVar4 == 1) {\n            *pwVar1 = __s1[param_3];\n          }\n          else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 1" identifier == number_literal) )) (compound_statement "{\n            *pwVar1 = __s1[param_3];\n          }" { (expression_statement "*pwVar1 = __s1[param_3];" (assignment_expression "*pwVar1 = __s1[param_3]" (pointer_expression "*pwVar1" * identifier) = (subscript_expression "__s1[param_3]" identifier [ identifier ])) ;) }) (else_clause "else if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }" else (if_statement "if (sVar4 != 0) {\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }" if (parenthesized_expression "(sVar4 != 0)" ( (binary_expression "sVar4 != 0" identifier != number_literal) )) (compound_statement "{\n            wmemcpy(pwVar1,__s1 + param_3,sVar4);\n          }" { (expression_statement "wmemcpy(pwVar1,__s1 + param_3,sVar4);" (call_expression "wmemcpy(pwVar1,__s1 + param_3,sVar4)" identifier (argument_list "(pwVar1,__s1 + param_3,sVar4)" ( identifier , (binary_expression "__s1 + param_3" identifier + identifier) , identifier ))) ;) })))) }) (else_clause "else if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }" else (if_statement "if (param_3 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }" if (parenthesized_expression "(param_3 == 1)" ( (binary_expression "param_3 == 1" identifier == number_literal) )) (compound_statement "{\n          *__s1 = *__s2;\n        }" { (expression_statement "*__s1 = *__s2;" (assignment_expression "*__s1 = *__s2" (pointer_expression "*__s1" * identifier) = (pointer_expression "*__s2" * identifier)) ;) }) (else_clause "else if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }" else (if_statement "if (param_3 != 0) {\n          wmemcpy(__s1,__s2,param_3);\n        }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n          wmemcpy(__s1,__s2,param_3);\n        }" { (expression_statement "wmemcpy(__s1,__s2,param_3);" (call_expression "wmemcpy(__s1,__s2,param_3)" identifier (argument_list "(__s1,__s2,param_3)" ( identifier , identifier , identifier ))) ;) })))))) }) (else_clause "else if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }" else (if_statement "if (param_3 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }" if (parenthesized_expression "(param_3 == 1)" ( (binary_expression "param_3 == 1" identifier == number_literal) )) (compound_statement "{\n        *__s1 = *pwVar1;\n      }" { (expression_statement "*__s1 = *pwVar1;" (assignment_expression "*__s1 = *pwVar1" (pointer_expression "*__s1" * identifier) = (pointer_expression "*pwVar1" * identifier)) ;) }) (else_clause "else if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }" else (if_statement "if (param_3 != 0) {\n        wmemcpy(__s1,pwVar1,param_3);\n      }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n        wmemcpy(__s1,pwVar1,param_3);\n      }" { (expression_statement "wmemcpy(__s1,pwVar1,param_3);" (call_expression "wmemcpy(__s1,pwVar1,param_3)" identifier (argument_list "(__s1,pwVar1,param_3)" ( identifier , identifier , identifier ))) ;) })))))) }))) (return_statement "return this;" return identifier ;) })) comment (expression_statement "__throw_length_error("basic_string::insert");" (call_expression "__throw_length_error("basic_string::insert")" identifier (argument_list "("basic_string::insert")" ( (string_literal ""basic_string::insert"" " string_content ") ))) ;) }))
(translation_unit "uint * FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *__s1;\n  uint uVar2;\n  uint uVar3;\n  wchar_t *__s2;\n  int iVar4;\n  size_t sVar5;\n  \n  uVar2 = *param_1;\n  uVar3 = *(uint *)(uVar2 - 0xc);\n  if (uVar3 < param_2) {\n                    \n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }\n  if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c7a0("basic_string::insert");\n}\n\n" (function_definition "uint * FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *__s1;\n  uint uVar2;\n  uint uVar3;\n  wchar_t *__s2;\n  int iVar4;\n  size_t sVar5;\n  \n  uVar2 = *param_1;\n  uVar3 = *(uint *)(uVar2 - 0xc);\n  if (uVar3 < param_2) {\n                    \n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }\n  if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c7a0("basic_string::insert");\n}" type_identifier (pointer_declarator "* FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)" * (function_declarator "FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)" identifier (parameter_list "(uint *param_1,uint param_2,uint param_3,uint param_4)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) )))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *__s1;\n  uint uVar2;\n  uint uVar3;\n  wchar_t *__s2;\n  int iVar4;\n  size_t sVar5;\n  \n  uVar2 = *param_1;\n  uVar3 = *(uint *)(uVar2 - 0xc);\n  if (uVar3 < param_2) {\n                    \n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }\n  if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c7a0("basic_string::insert");\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "wchar_t *__s2;" type_identifier (pointer_declarator "*__s2" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar3 = *(uint *)(uVar2 - 0xc);" (assignment_expression "uVar3 = *(uint *)(uVar2 - 0xc)" identifier = (pointer_expression "*(uint *)(uVar2 - 0xc)" * (cast_expression "(uint *)(uVar2 - 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 - 0xc)" ( (binary_expression "uVar2 - 0xc" identifier - number_literal) ))))) ;) (if_statement "if (uVar3 < param_2) {\n                    \n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }" if (parenthesized_expression "(uVar3 < param_2)" ( (binary_expression "uVar3 < param_2" identifier < identifier) )) (compound_statement "{\n                    \n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }" { (expression_statement "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);" (call_expression "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3)" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3)" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::insert"" " string_content ") , identifier , identifier ))) ;) })) (if_statement "if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }" if (parenthesized_expression "(param_4 <= 0xffffffe - uVar3)" ( (binary_expression "param_4 <= 0xffffffe - uVar3" identifier <= (binary_expression "0xffffffe - uVar3" number_literal - identifier)) )) (compound_statement "{\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }" { (if_statement "if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }" if (parenthesized_expression "(((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4)))" ( (binary_expression "((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))" (parenthesized_expression "((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3))" ( (binary_expression "(param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)" (parenthesized_expression "(param_3 < uVar2)" ( (binary_expression "param_3 < uVar2" identifier < identifier) )) || (parenthesized_expression "(uVar2 + uVar3 * 4 < param_3)" ( (binary_expression "uVar2 + uVar3 * 4 < param_3" (binary_expression "uVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) < identifier) ))) )) || (parenthesized_expression "(0 < *(int *)(uVar2 - 4))" ( (binary_expression "0 < *(int *)(uVar2 - 4)" number_literal < (pointer_expression "*(int *)(uVar2 - 4)" * (cast_expression "(int *)(uVar2 - 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 - 4)" ( (binary_expression "uVar2 - 4" identifier - number_literal) ))))) ))) )) (compound_statement "{\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }" { (expression_statement "param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);" (assignment_expression "param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4)" identifier = (cast_expression "(uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0026a740(param_1,param_2,0,param_3,param_4)" identifier (argument_list "(param_1,param_2,0,param_3,param_4)" ( identifier , identifier , number_literal , identifier , identifier ))))) ;) }) (else_clause "else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }" else (compound_statement "{\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }" { (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "FUN_00269ee0(param_1,param_2,0,param_4);" (call_expression "FUN_00269ee0(param_1,param_2,0,param_4)" identifier (argument_list "(param_1,param_2,0,param_4)" ( identifier , identifier , number_literal , identifier ))) ;) (expression_statement "pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));" (assignment_expression "pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2))" identifier = (cast_expression "(wchar_t *)(*param_1 + (param_3 - uVar2))" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + (param_3 - uVar2))" ( (binary_expression "*param_1 + (param_3 - uVar2)" (pointer_expression "*param_1" * identifier) + (parenthesized_expression "(param_3 - uVar2)" ( (binary_expression "param_3 - uVar2" identifier - identifier) ))) )))) ;) (expression_statement "__s1 = (wchar_t *)(*param_1 + param_2 * 4);" (assignment_expression "__s1 = (wchar_t *)(*param_1 + param_2 * 4)" identifier = (cast_expression "(wchar_t *)(*param_1 + param_2 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + param_2 * 4)" ( (binary_expression "*param_1 + param_2 * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) ;) (expression_statement "__s2 = pwVar1 + param_4;" (assignment_expression "__s2 = pwVar1 + param_4" identifier = (binary_expression "pwVar1 + param_4" identifier + identifier)) ;) (if_statement "if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" if (parenthesized_expression "(__s1 < __s2)" ( (binary_expression "__s1 < __s2" identifier < identifier) )) (compound_statement "{\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }" { (if_statement "if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" if (parenthesized_expression "(pwVar1 < __s1)" ( (binary_expression "pwVar1 < __s1" identifier < identifier) )) (compound_statement "{\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }" { (expression_statement "iVar4 = param_2 * 4 - (param_3 - uVar2);" (assignment_expression "iVar4 = param_2 * 4 - (param_3 - uVar2)" identifier = (binary_expression "param_2 * 4 - (param_3 - uVar2)" (binary_expression "param_2 * 4" identifier * number_literal) - (parenthesized_expression "(param_3 - uVar2)" ( (binary_expression "param_3 - uVar2" identifier - identifier) )))) ;) (expression_statement "sVar5 = iVar4 >> 2;" (assignment_expression "sVar5 = iVar4 >> 2" identifier = (binary_expression "iVar4 >> 2" identifier >> number_literal)) ;) (if_statement "if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n            *__s1 = *pwVar1;\n          }" { (expression_statement "*__s1 = *pwVar1;" (assignment_expression "*__s1 = *pwVar1" (pointer_expression "*__s1" * identifier) = (pointer_expression "*pwVar1" * identifier)) ;) }) (else_clause "else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" else (if_statement "if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" if (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) (compound_statement "{\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" { (expression_statement "wmemcpy(__s1,pwVar1,sVar5);" (call_expression "wmemcpy(__s1,pwVar1,sVar5)" identifier (argument_list "(__s1,pwVar1,sVar5)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "pwVar1 = (wchar_t *)((int)__s1 + iVar4);" (assignment_expression "pwVar1 = (wchar_t *)((int)__s1 + iVar4)" identifier = (cast_expression "(wchar_t *)((int)__s1 + iVar4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s1 + iVar4)" ( (binary_expression "(int)__s1 + iVar4" (cast_expression "(int)__s1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "sVar5 = param_4 - sVar5;" (assignment_expression "sVar5 = param_4 - sVar5" identifier = (binary_expression "param_4 - sVar5" identifier - identifier)) ;) (if_statement "if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n            *pwVar1 = __s1[param_4];\n          }" { (expression_statement "*pwVar1 = __s1[param_4];" (assignment_expression "*pwVar1 = __s1[param_4]" (pointer_expression "*pwVar1" * identifier) = (subscript_expression "__s1[param_4]" identifier [ identifier ])) ;) }) (else_clause "else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" else (if_statement "if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" if (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) (compound_statement "{\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" { (expression_statement "wmemcpy(pwVar1,__s1 + param_4,sVar5);" (call_expression "wmemcpy(pwVar1,__s1 + param_4,sVar5)" identifier (argument_list "(pwVar1,__s1 + param_4,sVar5)" ( identifier , (binary_expression "__s1 + param_4" identifier + identifier) , identifier ))) ;) })))) }) (else_clause "else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" else (if_statement "if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n          *__s1 = *__s2;\n        }" { (expression_statement "*__s1 = *__s2;" (assignment_expression "*__s1 = *__s2" (pointer_expression "*__s1" * identifier) = (pointer_expression "*__s2" * identifier)) ;) }) (else_clause "else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" else (if_statement "if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n          wmemcpy(__s1,__s2,param_4);\n        }" { (expression_statement "wmemcpy(__s1,__s2,param_4);" (call_expression "wmemcpy(__s1,__s2,param_4)" identifier (argument_list "(__s1,__s2,param_4)" ( identifier , identifier , identifier ))) ;) })))))) }) (else_clause "else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" else (if_statement "if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n        *__s1 = *pwVar1;\n      }" { (expression_statement "*__s1 = *pwVar1;" (assignment_expression "*__s1 = *pwVar1" (pointer_expression "*__s1" * identifier) = (pointer_expression "*pwVar1" * identifier)) ;) }) (else_clause "else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" else (if_statement "if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n        wmemcpy(__s1,pwVar1,param_4);\n      }" { (expression_statement "wmemcpy(__s1,pwVar1,param_4);" (call_expression "wmemcpy(__s1,pwVar1,param_4)" identifier (argument_list "(__s1,pwVar1,param_4)" ( identifier , identifier , identifier ))) ;) })))))) }))) (return_statement "return param_1;" return identifier ;) })) (expression_statement "FUN_0022c7a0("basic_string::insert");" (call_expression "FUN_0022c7a0("basic_string::insert")" identifier (argument_list "("basic_string::insert")" ( (string_literal ""basic_string::insert"" " string_content ") ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT - LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , IDENT , IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (binary_expression LIT - IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) || (parenthesized_expression ( (binary_expression (binary_expression IDENT + (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 (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT , IDENT ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * LIT) - (parenthesized_expression ( (binary_expression IDENT - IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ IDENT ])) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + IDENT) , IDENT ))) ;) })))) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })))))) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })))))) }))) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })))
(function_definition "uint * FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *__s1;\n  uint uVar2;\n  uint uVar3;\n  wchar_t *__s2;\n  int iVar4;\n  size_t sVar5;\n  \n  uVar2 = *param_1;\n  uVar3 = *(uint *)(uVar2 - 0xc);\n  if (uVar3 < param_2) {\n                    \n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }\n  if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c7a0("basic_string::insert");\n}" (type_identifier "uint") (pointer_declarator "* FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)" (* "*") (function_declarator "FUN_0026a9e0(uint *param_1,uint param_2,uint param_3,uint param_4)" (identifier "FUN_0026a9e0") (parameter_list "(uint *param_1,uint param_2,uint param_3,uint param_4)" (( "(") (parameter_declaration "uint *param_1" (type_identifier "uint") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")")))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *__s1;\n  uint uVar2;\n  uint uVar3;\n  wchar_t *__s2;\n  int iVar4;\n  size_t sVar5;\n  \n  uVar2 = *param_1;\n  uVar3 = *(uint *)(uVar2 - 0xc);\n  if (uVar3 < param_2) {\n                    \n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }\n  if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }\n                    \n  FUN_0022c7a0("basic_string::insert");\n}" ({ "{") (declaration "wchar_t *pwVar1;" (type_identifier "wchar_t") (pointer_declarator "*pwVar1" (* "*") (identifier "pwVar1")) (; ";")) (declaration "wchar_t *__s1;" (type_identifier "wchar_t") (pointer_declarator "*__s1" (* "*") (identifier "__s1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "wchar_t *__s2;" (type_identifier "wchar_t") (pointer_declarator "*__s2" (* "*") (identifier "__s2")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "size_t sVar5;" (primitive_type "size_t") (identifier "sVar5") (; ";")) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" (identifier "uVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar3 = *(uint *)(uVar2 - 0xc);" (assignment_expression "uVar3 = *(uint *)(uVar2 - 0xc)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(uVar2 - 0xc)" (* "*") (cast_expression "(uint *)(uVar2 - 0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar2 - 0xc)" (( "(") (binary_expression "uVar2 - 0xc" (identifier "uVar2") (- "-") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if (uVar3 < param_2) {\n                    \n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }" (if "if") (parenthesized_expression "(uVar3 < param_2)" (( "(") (binary_expression "uVar3 < param_2" (identifier "uVar3") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n                    \n    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);\n  }" ({ "{") (expression_statement "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3);" (call_expression "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3)" (identifier "FUN_0022c840") (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n                 param_2,uVar3)" (( "(") (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" (" """) (string_content "%s: __pos (which is %zu) > this->size() (which is %zu)") (" """)) (, ",") (string_literal ""basic_string::insert"" (" """) (string_content "basic_string::insert") (" """)) (, ",") (identifier "param_2") (, ",") (identifier "uVar3") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_4 <= 0xffffffe - uVar3) {\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }" (if "if") (parenthesized_expression "(param_4 <= 0xffffffe - uVar3)" (( "(") (binary_expression "param_4 <= 0xffffffe - uVar3" (identifier "param_4") (<= "<=") (binary_expression "0xffffffe - uVar3" (number_literal "0xffffffe") (- "-") (identifier "uVar3"))) () ")")) (compound_statement "{\n    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }\n    return param_1;\n  }" ({ "{") (if_statement "if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }\n    else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }" (if "if") (parenthesized_expression "(((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4)))" (( "(") (binary_expression "((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))" (parenthesized_expression "((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3))" (( "(") (binary_expression "(param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)" (parenthesized_expression "(param_3 < uVar2)" (( "(") (binary_expression "param_3 < uVar2" (identifier "param_3") (< "<") (identifier "uVar2")) () ")")) (|| "||") (parenthesized_expression "(uVar2 + uVar3 * 4 < param_3)" (( "(") (binary_expression "uVar2 + uVar3 * 4 < param_3" (binary_expression "uVar2 + uVar3 * 4" (identifier "uVar2") (+ "+") (binary_expression "uVar3 * 4" (identifier "uVar3") (* "*") (number_literal "4"))) (< "<") (identifier "param_3")) () ")"))) () ")")) (|| "||") (parenthesized_expression "(0 < *(int *)(uVar2 - 4))" (( "(") (binary_expression "0 < *(int *)(uVar2 - 4)" (number_literal "0") (< "<") (pointer_expression "*(int *)(uVar2 - 4)" (* "*") (cast_expression "(int *)(uVar2 - 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar2 - 4)" (( "(") (binary_expression "uVar2 - 4" (identifier "uVar2") (- "-") (number_literal "4")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);\n    }" ({ "{") (expression_statement "param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);" (assignment_expression "param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4)" (identifier "param_1") (= "=") (cast_expression "(uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0026a740(param_1,param_2,0,param_3,param_4)" (identifier "FUN_0026a740") (argument_list "(param_1,param_2,0,param_3,param_4)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (number_literal "0") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")"))))) (; ";")) (} "}")) (else_clause "else {\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }" (else "else") (compound_statement "{\n      uVar2 = *param_1;\n      FUN_00269ee0(param_1,param_2,0,param_4);\n      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));\n      __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n      __s2 = pwVar1 + param_4;\n      if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }\n    }" ({ "{") (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" (identifier "uVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "FUN_00269ee0(param_1,param_2,0,param_4);" (call_expression "FUN_00269ee0(param_1,param_2,0,param_4)" (identifier "FUN_00269ee0") (argument_list "(param_1,param_2,0,param_4)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (number_literal "0") (, ",") (identifier "param_4") () ")"))) (; ";")) (expression_statement "pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));" (assignment_expression "pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2))" (identifier "pwVar1") (= "=") (cast_expression "(wchar_t *)(*param_1 + (param_3 - uVar2))" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + (param_3 - uVar2))" (( "(") (binary_expression "*param_1 + (param_3 - uVar2)" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (parenthesized_expression "(param_3 - uVar2)" (( "(") (binary_expression "param_3 - uVar2" (identifier "param_3") (- "-") (identifier "uVar2")) () ")"))) () ")")))) (; ";")) (expression_statement "__s1 = (wchar_t *)(*param_1 + param_2 * 4);" (assignment_expression "__s1 = (wchar_t *)(*param_1 + param_2 * 4)" (identifier "__s1") (= "=") (cast_expression "(wchar_t *)(*param_1 + param_2 * 4)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + param_2 * 4)" (( "(") (binary_expression "*param_1 + param_2 * 4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4"))) () ")")))) (; ";")) (expression_statement "__s2 = pwVar1 + param_4;" (assignment_expression "__s2 = pwVar1 + param_4" (identifier "__s2") (= "=") (binary_expression "pwVar1 + param_4" (identifier "pwVar1") (+ "+") (identifier "param_4"))) (; ";")) (if_statement "if (__s1 < __s2) {\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }\n      else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" (if "if") (parenthesized_expression "(__s1 < __s2)" (( "(") (binary_expression "__s1 < __s2" (identifier "__s1") (< "<") (identifier "__s2")) () ")")) (compound_statement "{\n        if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }\n      }" ({ "{") (if_statement "if (pwVar1 < __s1) {\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }\n        else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" (if "if") (parenthesized_expression "(pwVar1 < __s1)" (( "(") (binary_expression "pwVar1 < __s1" (identifier "pwVar1") (< "<") (identifier "__s1")) () ")")) (compound_statement "{\n          iVar4 = param_2 * 4 - (param_3 - uVar2);\n          sVar5 = iVar4 >> 2;\n          if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }\n          pwVar1 = (wchar_t *)((int)__s1 + iVar4);\n          sVar5 = param_4 - sVar5;\n          if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }\n        }" ({ "{") (expression_statement "iVar4 = param_2 * 4 - (param_3 - uVar2);" (assignment_expression "iVar4 = param_2 * 4 - (param_3 - uVar2)" (identifier "iVar4") (= "=") (binary_expression "param_2 * 4 - (param_3 - uVar2)" (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4")) (- "-") (parenthesized_expression "(param_3 - uVar2)" (( "(") (binary_expression "param_3 - uVar2" (identifier "param_3") (- "-") (identifier "uVar2")) () ")")))) (; ";")) (expression_statement "sVar5 = iVar4 >> 2;" (assignment_expression "sVar5 = iVar4 >> 2" (identifier "sVar5") (= "=") (binary_expression "iVar4 >> 2" (identifier "iVar4") (>> ">>") (number_literal "2"))) (; ";")) (if_statement "if (sVar5 == 1) {\n            *__s1 = *pwVar1;\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" (if "if") (parenthesized_expression "(sVar5 == 1)" (( "(") (binary_expression "sVar5 == 1" (identifier "sVar5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n            *__s1 = *pwVar1;\n          }" ({ "{") (expression_statement "*__s1 = *pwVar1;" (assignment_expression "*__s1 = *pwVar1" (pointer_expression "*__s1" (* "*") (identifier "__s1")) (= "=") (pointer_expression "*pwVar1" (* "*") (identifier "pwVar1"))) (; ";")) (} "}")) (else_clause "else if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" (else "else") (if_statement "if (sVar5 != 0) {\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" (if "if") (parenthesized_expression "(sVar5 != 0)" (( "(") (binary_expression "sVar5 != 0" (identifier "sVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            wmemcpy(__s1,pwVar1,sVar5);\n          }" ({ "{") (expression_statement "wmemcpy(__s1,pwVar1,sVar5);" (call_expression "wmemcpy(__s1,pwVar1,sVar5)" (identifier "wmemcpy") (argument_list "(__s1,pwVar1,sVar5)" (( "(") (identifier "__s1") (, ",") (identifier "pwVar1") (, ",") (identifier "sVar5") () ")"))) (; ";")) (} "}"))))) (expression_statement "pwVar1 = (wchar_t *)((int)__s1 + iVar4);" (assignment_expression "pwVar1 = (wchar_t *)((int)__s1 + iVar4)" (identifier "pwVar1") (= "=") (cast_expression "(wchar_t *)((int)__s1 + iVar4)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__s1 + iVar4)" (( "(") (binary_expression "(int)__s1 + iVar4" (cast_expression "(int)__s1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s1")) (+ "+") (identifier "iVar4")) () ")")))) (; ";")) (expression_statement "sVar5 = param_4 - sVar5;" (assignment_expression "sVar5 = param_4 - sVar5" (identifier "sVar5") (= "=") (binary_expression "param_4 - sVar5" (identifier "param_4") (- "-") (identifier "sVar5"))) (; ";")) (if_statement "if (sVar5 == 1) {\n            *pwVar1 = __s1[param_4];\n          }\n          else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" (if "if") (parenthesized_expression "(sVar5 == 1)" (( "(") (binary_expression "sVar5 == 1" (identifier "sVar5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n            *pwVar1 = __s1[param_4];\n          }" ({ "{") (expression_statement "*pwVar1 = __s1[param_4];" (assignment_expression "*pwVar1 = __s1[param_4]" (pointer_expression "*pwVar1" (* "*") (identifier "pwVar1")) (= "=") (subscript_expression "__s1[param_4]" (identifier "__s1") ([ "[") (identifier "param_4") (] "]"))) (; ";")) (} "}")) (else_clause "else if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" (else "else") (if_statement "if (sVar5 != 0) {\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" (if "if") (parenthesized_expression "(sVar5 != 0)" (( "(") (binary_expression "sVar5 != 0" (identifier "sVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            wmemcpy(pwVar1,__s1 + param_4,sVar5);\n          }" ({ "{") (expression_statement "wmemcpy(pwVar1,__s1 + param_4,sVar5);" (call_expression "wmemcpy(pwVar1,__s1 + param_4,sVar5)" (identifier "wmemcpy") (argument_list "(pwVar1,__s1 + param_4,sVar5)" (( "(") (identifier "pwVar1") (, ",") (binary_expression "__s1 + param_4" (identifier "__s1") (+ "+") (identifier "param_4")) (, ",") (identifier "sVar5") () ")"))) (; ";")) (} "}"))))) (} "}")) (else_clause "else if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" (else "else") (if_statement "if (param_4 == 1) {\n          *__s1 = *__s2;\n        }\n        else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" (if "if") (parenthesized_expression "(param_4 == 1)" (( "(") (binary_expression "param_4 == 1" (identifier "param_4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n          *__s1 = *__s2;\n        }" ({ "{") (expression_statement "*__s1 = *__s2;" (assignment_expression "*__s1 = *__s2" (pointer_expression "*__s1" (* "*") (identifier "__s1")) (= "=") (pointer_expression "*__s2" (* "*") (identifier "__s2"))) (; ";")) (} "}")) (else_clause "else if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" (else "else") (if_statement "if (param_4 != 0) {\n          wmemcpy(__s1,__s2,param_4);\n        }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          wmemcpy(__s1,__s2,param_4);\n        }" ({ "{") (expression_statement "wmemcpy(__s1,__s2,param_4);" (call_expression "wmemcpy(__s1,__s2,param_4)" (identifier "wmemcpy") (argument_list "(__s1,__s2,param_4)" (( "(") (identifier "__s1") (, ",") (identifier "__s2") (, ",") (identifier "param_4") () ")"))) (; ";")) (} "}"))))))) (} "}")) (else_clause "else if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" (else "else") (if_statement "if (param_4 == 1) {\n        *__s1 = *pwVar1;\n      }\n      else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" (if "if") (parenthesized_expression "(param_4 == 1)" (( "(") (binary_expression "param_4 == 1" (identifier "param_4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        *__s1 = *pwVar1;\n      }" ({ "{") (expression_statement "*__s1 = *pwVar1;" (assignment_expression "*__s1 = *pwVar1" (pointer_expression "*__s1" (* "*") (identifier "__s1")) (= "=") (pointer_expression "*pwVar1" (* "*") (identifier "pwVar1"))) (; ";")) (} "}")) (else_clause "else if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" (else "else") (if_statement "if (param_4 != 0) {\n        wmemcpy(__s1,pwVar1,param_4);\n      }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        wmemcpy(__s1,pwVar1,param_4);\n      }" ({ "{") (expression_statement "wmemcpy(__s1,pwVar1,param_4);" (call_expression "wmemcpy(__s1,pwVar1,param_4)" (identifier "wmemcpy") (argument_list "(__s1,pwVar1,param_4)" (( "(") (identifier "__s1") (, ",") (identifier "pwVar1") (, ",") (identifier "param_4") () ")"))) (; ";")) (} "}"))))))) (} "}")))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "FUN_0022c7a0("basic_string::insert");" (call_expression "FUN_0022c7a0("basic_string::insert")" (identifier "FUN_0022c7a0") (argument_list "("basic_string::insert")" (( "(") (string_literal ""basic_string::insert"" (" """) (string_content "basic_string::insert") (" """)) () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::insert(unsigned int, wchar_t const*, unsigned int) */

type_3 * __thiscall std::type_3::insert(type_3 *this,type_2 var_1,type_1 *var_5,type_2 var_3)

{
  type_1 *var_10;
  type_1 *var_6;
  type_1 var_4;
  type_1 *var_11;
  int var_9;
  size_t var_12;
  
  var_6 = *(type_1 **)this;
  var_4 = var_6[-3];
  if ((type_2)var_4 < var_1) {
                    /* WARNING: Subroutine does not return */
    var_2
              ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",
               var_1,var_4);
  }
  if (var_3 <= (type_2)(0xffffffeU - var_4)) {
    if (((var_5 < var_6) || (var_6 + var_4 < var_5)) || (L'\0' < var_6[-1])) {
      this = (type_3 *)var_7(this,var_1,0,var_5,var_3);
    }
    else {
      var_9 = *(int *)this;
      var_8(this,var_1,0,var_3);
      var_6 = (type_1 *)(*(int *)this + ((int)var_5 - var_9));
      var_10 = (type_1 *)(*(int *)this + var_1 * 4);
      var_11 = var_6 + var_3;
      if (var_10 < var_11) {
        if (var_6 < var_10) {
          var_9 = var_1 * 4 - ((int)var_5 - var_9);
          var_12 = var_9 >> 2;
          if (var_12 == 1) {
            *var_10 = *var_6;
          }
          else if (var_12 != 0) {
            var_13(var_10,var_6,var_12);
          }
          var_6 = (type_1 *)((int)var_10 + var_9);
          var_12 = var_3 - var_12;
          if (var_12 == 1) {
            *var_6 = var_10[var_3];
          }
          else if (var_12 != 0) {
            var_13(var_6,var_10 + var_3,var_12);
          }
        }
        else if (var_3 == 1) {
          *var_10 = *var_11;
        }
        else if (var_3 != 0) {
          var_13(var_10,var_11,var_3);
        }
      }
      else if (var_3 == 1) {
        *var_10 = *var_6;
      }
      else if (var_3 != 0) {
        var_13(var_10,var_6,var_3);
      }
    }
    return this;
  }
                    /* WARNING: Subroutine does not return */
  var_14("basic_string::insert");
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint * MASKED(uint *param_1,uint param_2,uint param_3,uint param_4)

{
  wchar_t *pwVar1;
  wchar_t *__s1;
  uint uVar2;
  uint uVar3;
  wchar_t *__s2;
  int iVar4;
  size_t sVar5;
  
  uVar2 = *param_1;
  uVar3 = *(uint *)(uVar2 - 0xc);
  if (uVar3 < param_2) {
                    /* WARNING: Subroutine does not return */
    FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",
                 param_2,uVar3);
  }
  if (param_4 <= 0xffffffe - uVar3) {
    if (((param_3 < uVar2) || (uVar2 + uVar3 * 4 < param_3)) || (0 < *(int *)(uVar2 - 4))) {
      param_1 = (uint *)FUN_0026a740(param_1,param_2,0,param_3,param_4);
    }
    else {
      uVar2 = *param_1;
      FUN_00269ee0(param_1,param_2,0,param_4);
      pwVar1 = (wchar_t *)(*param_1 + (param_3 - uVar2));
      __s1 = (wchar_t *)(*param_1 + param_2 * 4);
      __s2 = pwVar1 + param_4;
      if (__s1 < __s2) {
        if (pwVar1 < __s1) {
          iVar4 = param_2 * 4 - (param_3 - uVar2);
          sVar5 = iVar4 >> 2;
          if (sVar5 == 1) {
            *__s1 = *pwVar1;
          }
          else if (sVar5 != 0) {
            wmemcpy(__s1,pwVar1,sVar5);
          }
          pwVar1 = (wchar_t *)((int)__s1 + iVar4);
          sVar5 = param_4 - sVar5;
          if (sVar5 == 1) {
            *pwVar1 = __s1[param_4];
          }
          else if (sVar5 != 0) {
            wmemcpy(pwVar1,__s1 + param_4,sVar5);
          }
        }
        else if (param_4 == 1) {
          *__s1 = *__s2;
        }
        else if (param_4 != 0) {
          wmemcpy(__s1,__s2,param_4);
        }
      }
      else if (param_4 == 1) {
        *__s1 = *pwVar1;
      }
      else if (param_4 != 0) {
        wmemcpy(__s1,pwVar1,param_4);
      }
    }
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c7a0("basic_string::insert");
}

