
/* std::string::_M_replace(unsigned long, unsigned long, char const*, unsigned long) */

string * __thiscall
std::string::_M_replace(string *this,ulong param_1,ulong param_2,char *param_3,ulong param_4)

{
  ulong uVar1;
  string *__dest;
  long lVar2;
  size_t __n;
  string *psVar3;
  ulong uVar4;
  size_t sVar5;
  bool bVar6;
  bool bVar7;
  
  lVar2 = *(long *)(this + 8);
  if ((param_2 + 0x7fffffffffffffff) - lVar2 < param_4) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error("basic_string::_M_replace");
  }
  psVar3 = *(string **)this;
  uVar1 = lVar2 + (param_4 - param_2);
  if (psVar3 == this + 0x10) {
    uVar4 = 0xf;
  }
  else {
    uVar4 = *(ulong *)(this + 0x10);
  }
  if (uVar4 < uVar1) {
    _M_mutate(this,param_1,param_2,param_3,param_4);
    goto LAB_0027e718;
  }
  __dest = psVar3 + param_1;
  sVar5 = lVar2 - (param_1 + param_2);
  bVar6 = sVar5 == 0;
  bVar7 = param_2 == param_4;
  if ((param_3 < psVar3) || (psVar3 + lVar2 < param_3)) {
    if (!bVar6 && !bVar7) {
      if (sVar5 == 1) {
        __dest[param_4] = __dest[param_2];
      }
      else {
        memmove(__dest + param_4,__dest + param_2,sVar5);
      }
    }
    if (param_4 == 0) goto LAB_0027e718;
    if (param_4 != 1) {
      memcpy(__dest,param_3,param_4);
      goto LAB_0027e718;
    }
  }
  else {
    if ((param_4 == 0) || (param_2 < param_4)) {
LAB_0027e856:
      if (!bVar6 && !bVar7) goto LAB_0027e798;
    }
    else {
      if (param_4 == 1) {
        *__dest = (string)*param_3;
        goto LAB_0027e856;
      }
      memmove(__dest,param_3,param_4);
      if (bVar6 || bVar7) goto LAB_0027e718;
LAB_0027e798:
      if (sVar5 == 1) {
        __dest[param_4] = __dest[param_2];
      }
      else {
        memmove(__dest + param_4,__dest + param_2,sVar5);
      }
    }
    if (param_4 <= param_2) goto LAB_0027e718;
    psVar3 = __dest + param_2;
    if (psVar3 < (string *)(param_3 + param_4)) {
      if (param_3 < psVar3) {
        sVar5 = (long)psVar3 - (long)param_3;
        if (sVar5 == 1) {
          *__dest = (string)*param_3;
        }
        else if (sVar5 != 0) {
          memmove(__dest,param_3,sVar5);
        }
        __n = param_4 - sVar5;
        if (__n == 1) {
          __dest[sVar5] = __dest[param_4];
        }
        else if (__n != 0) {
          memcpy(__dest + sVar5,__dest + param_4,__n);
        }
      }
      else if (param_4 == 1) {
        *__dest = *(string *)(param_3 + (param_4 - param_2));
      }
      else {
        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);
      }
      goto LAB_0027e718;
    }
    if (param_4 != 1) {
      memmove(__dest,param_3,param_4);
      goto LAB_0027e718;
    }
  }
  *__dest = (string)*param_3;
LAB_0027e718:
  *(ulong *)(this + 8) = uVar1;
  *(undefined1 *)(*(long *)this + uVar1) = 0;
  return this;
}



long * FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)

{
  ulong uVar1;
  undefined1 *__dest;
  undefined1 *__src;
  long lVar2;
  size_t __n;
  long *plVar3;
  ulong uVar4;
  size_t sVar5;
  bool bVar6;
  bool bVar7;
  
  lVar2 = param_1[1];
  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {
                    /* WARNING: Subroutine does not return */
    FUN_002b5650("basic_string::_M_replace");
  }
  plVar3 = (long *)*param_1;
  uVar1 = lVar2 + (param_5 - param_3);
  if (plVar3 == param_1 + 2) {
    uVar4 = 0xf;
  }
  else {
    uVar4 = param_1[2];
  }
  if (uVar4 < uVar1) {
    FUN_0027da10(param_1,param_2,param_3);
    goto LAB_0027e718;
  }
  __dest = (undefined1 *)((long)plVar3 + param_2);
  sVar5 = lVar2 - (param_2 + param_3);
  bVar6 = sVar5 == 0;
  bVar7 = param_3 == param_5;
  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {
    if (!bVar6 && !bVar7) {
      if (sVar5 == 1) {
        __dest[param_5] = __dest[param_3];
      }
      else {
        memmove(__dest + param_5,__dest + param_3,sVar5);
      }
    }
    if (param_5 == 0) goto LAB_0027e718;
    if (param_5 != 1) {
      memcpy(__dest,param_4,param_5);
      goto LAB_0027e718;
    }
  }
  else {
    if ((param_5 == 0) || (param_3 < param_5)) {
LAB_0027e856:
      if (!bVar6 && !bVar7) goto LAB_0027e798;
    }
    else {
      if (param_5 == 1) {
        *__dest = (char)*param_4;
        goto LAB_0027e856;
      }
      memmove(__dest,param_4,param_5);
      if (bVar6 || bVar7) goto LAB_0027e718;
LAB_0027e798:
      if (sVar5 == 1) {
        __dest[param_5] = __dest[param_3];
      }
      else {
        memmove(__dest + param_5,__dest + param_3,sVar5);
      }
    }
    if (param_5 <= param_3) goto LAB_0027e718;
    plVar3 = (long *)(__dest + param_3);
    if (plVar3 < (long *)((long)param_4 + param_5)) {
      if (param_4 < plVar3) {
        sVar5 = (long)plVar3 - (long)param_4;
        if (sVar5 == 1) {
          *__dest = (char)*param_4;
        }
        else if (sVar5 != 0) {
          memmove(__dest,param_4,sVar5);
        }
        __n = param_5 - sVar5;
        if (__n == 1) {
          __dest[sVar5] = __dest[param_5];
        }
        else if (__n != 0) {
          memcpy(__dest + sVar5,__dest + param_5,__n);
        }
      }
      else {
        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));
        if (param_5 == 1) {
          *__dest = *__src;
        }
        else {
          memcpy(__dest,__src,param_5);
        }
      }
      goto LAB_0027e718;
    }
    if (param_5 != 1) {
      memmove(__dest,param_4,param_5);
      goto LAB_0027e718;
    }
  }
  *__dest = (char)*param_4;
LAB_0027e718:
  param_1[1] = uVar1;
  *(undefined1 *)(*param_1 + uVar1) = 0;
  return param_1;
}


MOV RAX,0x7fffffffffffffff
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDX
PUSH RBX
ADD RAX,RBP
SUB RSP,0x28
MOV RDX,qword ptr [RDI + 0x8]
SUB RAX,RDX
CMP R8,RAX
JA 0x0027e902
MOV R14,R8
MOV RAX,qword ptr [RDI]
MOV RBX,RDI
LEA RDI,[RDI + 0x10]
SUB R14,RBP
LEA R12,[RDX + R14*0x1]
CMP RAX,RDI
JZ 0x0027e840
MOV RDI,qword ptr [RBX + 0x10]
CMP RDI,R12
JC 0x0027e810
LEA R15,[RAX + RSI*0x1]
MOV R9,RDX
ADD RSI,RBP
SUB R9,RSI
SETNZ R13B
CMP RBP,R8
SETNZ SIL
AND R13D,ESI
CMP RAX,RCX
JBE 0x0027e740
TEST R13B,R13B
JZ 0x0027e6fb
LEA RSI,[R15 + RBP*0x1]
LEA RDI,[R15 + R8*0x1]
CMP R9,0x1
JZ 0x0027e830
MOV RDX,R9
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x8],RCX
CALL 0x0013e6d0
MOV R8,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
TEST R8,R8
JZ 0x0027e718
CMP R8,0x1
JZ 0x0027e820
MOV RDX,R8
MOV RSI,RCX
MOV RDI,R15
CALL 0x0013eaa0
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBX + 0x8],R12
MOV byte ptr [RAX + R12*0x1],0x0
ADD RSP,0x28
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
ADD RDX,RAX
CMP RCX,RDX
JA 0x0027e6c8
TEST R8,R8
JZ 0x0027e856
CMP RBP,R8
JC 0x0027e856
CMP R8,0x1
JZ 0x0027e850
MOV RDX,R8
MOV RSI,RCX
MOV RDI,R15
MOV qword ptr [RSP + 0x18],R9
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x8],RCX
CALL 0x0013e6d0
TEST R13B,R13B
MOV RCX,qword ptr [RSP + 0x8]
MOV R8,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
JZ 0x0027e718
NOP dword ptr [RAX]
LEA RSI,[R15 + RBP*0x1]
LEA RDI,[R15 + R8*0x1]
CMP R9,0x1
JZ 0x0027e888
MOV RDX,R9
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x8],RCX
CALL 0x0013e6d0
MOV R8,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
CMP RBP,R8
JNC 0x0027e718
ADD RBP,R15
LEA RAX,[RCX + R8*0x1]
CMP RBP,RAX
JNC 0x0027e868
CMP RBP,RCX
JA 0x0027e898
LEA RSI,[RCX + R14*0x1]
CMP R8,0x1
JZ 0x0027e8f7
MOV RDX,R8
MOV RDI,R15
CALL 0x0013eaa0
JMP 0x0027e718
MOV RDX,RBP
MOV RDI,RBX
CALL 0x0027da10
JMP 0x0027e718
MOVZX EAX,byte ptr [RCX]
MOV byte ptr [R15],AL
JMP 0x0027e718
MOVZX EAX,byte ptr [RSI]
MOV byte ptr [RDI],AL
JMP 0x0027e6fb
MOV EDI,0xf
JMP 0x0027e69f
MOVZX EAX,byte ptr [RCX]
MOV byte ptr [R15],AL
TEST R13B,R13B
JZ 0x0027e7c6
JMP 0x0027e798
CMP R8,0x1
JZ 0x0027e820
MOV RDX,R8
MOV RSI,RCX
MOV RDI,R15
CALL 0x0013e6d0
JMP 0x0027e718
MOVZX EAX,byte ptr [RSI]
MOV byte ptr [RDI],AL
JMP 0x0027e7c6
SUB RBP,RCX
CMP RBP,0x1
JZ 0x0027e8e5
TEST RBP,RBP
JZ 0x0027e8be
MOV RDX,RBP
MOV RSI,RCX
MOV RDI,R15
MOV qword ptr [RSP + 0x8],R8
CALL 0x0013e6d0
MOV R8,qword ptr [RSP + 0x8]
MOV RDX,R8
LEA RSI,[R15 + R8*0x1]
LEA RDI,[R15 + RBP*0x1]
SUB RDX,RBP
CMP RDX,0x1
JZ 0x0027e8ed
TEST RDX,RDX
JZ 0x0027e718
CALL 0x0013eaa0
JMP 0x0027e718
MOVZX EAX,byte ptr [RCX]
MOV byte ptr [R15],AL
JMP 0x0027e8be
MOVZX EAX,byte ptr [RSI]
MOV byte ptr [RDI],AL
JMP 0x0027e718
MOVZX EAX,byte ptr [RSI]
MOV byte ptr [R15],AL
JMP 0x0027e718
LEA RDI,[0x32929c]
CALL 0x002b5650
(translation_unit "long * FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)\n\n{\n  ulong uVar1;\n  undefined1 *__dest;\n  undefined1 *__src;\n  long lVar2;\n  size_t __n;\n  long *plVar3;\n  ulong uVar4;\n  size_t sVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  lVar2 = param_1[1];\n  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002b5650("basic_string::_M_replace");\n  }\n  plVar3 = (long *)*param_1;\n  uVar1 = lVar2 + (param_5 - param_3);\n  if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }\n  if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }\n  __dest = (undefined1 *)((long)plVar3 + param_2);\n  sVar5 = lVar2 - (param_2 + param_3);\n  bVar6 = sVar5 == 0;\n  bVar7 = param_3 == param_5;\n  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_0027e718:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}\n\n" (function_definition "long * FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)\n\n{\n  ulong uVar1;\n  undefined1 *__dest;\n  undefined1 *__src;\n  long lVar2;\n  size_t __n;\n  long *plVar3;\n  ulong uVar4;\n  size_t sVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  lVar2 = param_1[1];\n  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002b5650("basic_string::_M_replace");\n  }\n  plVar3 = (long *)*param_1;\n  uVar1 = lVar2 + (param_5 - param_3);\n  if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }\n  if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }\n  __dest = (undefined1 *)((long)plVar3 + param_2);\n  sVar5 = lVar2 - (param_2 + param_3);\n  bVar6 = sVar5 == 0;\n  bVar7 = param_3 == param_5;\n  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_0027e718:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" (sized_type_specifier "long" long) (pointer_declarator "* FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)" * (function_declarator "FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)" identifier (parameter_list "(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "long *param_4" (sized_type_specifier "long" long) (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "ulong param_5" type_identifier identifier) )))) (compound_statement "{\n  ulong uVar1;\n  undefined1 *__dest;\n  undefined1 *__src;\n  long lVar2;\n  size_t __n;\n  long *plVar3;\n  ulong uVar4;\n  size_t sVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  lVar2 = param_1[1];\n  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002b5650("basic_string::_M_replace");\n  }\n  plVar3 = (long *)*param_1;\n  uVar1 = lVar2 + (param_5 - param_3);\n  if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }\n  if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }\n  __dest = (undefined1 *)((long)plVar3 + param_2);\n  sVar5 = lVar2 - (param_2 + param_3);\n  bVar6 = sVar5 == 0;\n  bVar7 = param_3 == param_5;\n  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_0027e718:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "undefined1 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined1 *__src;" type_identifier (pointer_declarator "*__src" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "long *plVar3;" (sized_type_specifier "long" long) (pointer_declarator "*plVar3" * identifier) ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "lVar2 = param_1[1];" (assignment_expression "lVar2 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002b5650("basic_string::_M_replace");\n  }" if (parenthesized_expression "((param_3 + 0x7fffffffffffffff) - lVar2 < param_5)" ( (binary_expression "(param_3 + 0x7fffffffffffffff) - lVar2 < param_5" (binary_expression "(param_3 + 0x7fffffffffffffff) - lVar2" (parenthesized_expression "(param_3 + 0x7fffffffffffffff)" ( (binary_expression "param_3 + 0x7fffffffffffffff" identifier + number_literal) )) - identifier) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_002b5650("basic_string::_M_replace");\n  }" { comment (expression_statement "FUN_002b5650("basic_string::_M_replace");" (call_expression "FUN_002b5650("basic_string::_M_replace")" identifier (argument_list "("basic_string::_M_replace")" ( (string_literal ""basic_string::_M_replace"" " string_content ") ))) ;) })) (expression_statement "plVar3 = (long *)*param_1;" (assignment_expression "plVar3 = (long *)*param_1" identifier = (cast_expression "(long *)*param_1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "uVar1 = lVar2 + (param_5 - param_3);" (assignment_expression "uVar1 = lVar2 + (param_5 - param_3)" identifier = (binary_expression "lVar2 + (param_5 - param_3)" identifier + (parenthesized_expression "(param_5 - param_3)" ( (binary_expression "param_5 - param_3" identifier - identifier) )))) ;) (if_statement "if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }" if (parenthesized_expression "(plVar3 == param_1 + 2)" ( (binary_expression "plVar3 == param_1 + 2" identifier == (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n    uVar4 = 0xf;\n  }" { (expression_statement "uVar4 = 0xf;" (assignment_expression "uVar4 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar4 = param_1[2];\n  }" else (compound_statement "{\n    uVar4 = param_1[2];\n  }" { (expression_statement "uVar4 = param_1[2];" (assignment_expression "uVar4 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }" if (parenthesized_expression "(uVar4 < uVar1)" ( (binary_expression "uVar4 < uVar1" identifier < identifier) )) (compound_statement "{\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }" { (expression_statement "FUN_0027da10(param_1,param_2,param_3);" (call_expression "FUN_0027da10(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) (expression_statement "__dest = (undefined1 *)((long)plVar3 + param_2);" (assignment_expression "__dest = (undefined1 *)((long)plVar3 + param_2)" identifier = (cast_expression "(undefined1 *)((long)plVar3 + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)plVar3 + param_2)" ( (binary_expression "(long)plVar3 + param_2" (cast_expression "(long)plVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) ;) (expression_statement "sVar5 = lVar2 - (param_2 + param_3);" (assignment_expression "sVar5 = lVar2 - (param_2 + param_3)" identifier = (binary_expression "lVar2 - (param_2 + param_3)" identifier - (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )))) ;) (expression_statement "bVar6 = sVar5 == 0;" (assignment_expression "bVar6 = sVar5 == 0" identifier = (binary_expression "sVar5 == 0" identifier == number_literal)) ;) (expression_statement "bVar7 = param_3 == param_5;" (assignment_expression "bVar7 = param_3 == param_5" identifier = (binary_expression "param_3 == param_5" identifier == identifier)) ;) (if_statement "if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" if (parenthesized_expression "((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4))" ( (binary_expression "(param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)" (parenthesized_expression "(param_4 < plVar3)" ( (binary_expression "param_4 < plVar3" identifier < identifier) )) || (parenthesized_expression "((long *)(lVar2 + (long)plVar3) < param_4)" ( (binary_expression "(long *)(lVar2 + (long)plVar3) < param_4" (cast_expression "(long *)(lVar2 + (long)plVar3)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + (long)plVar3)" ( (binary_expression "lVar2 + (long)plVar3" identifier + (cast_expression "(long)plVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) < identifier) ))) )) (compound_statement "{\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" { (if_statement "if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" if (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) (compound_statement "{\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" { (if_statement "if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n        __dest[param_5] = __dest[param_3];\n      }" { (expression_statement "__dest[param_5] = __dest[param_3];" (assignment_expression "__dest[param_5] = __dest[param_3]" (subscript_expression "__dest[param_5]" identifier [ identifier ]) = (subscript_expression "__dest[param_3]" identifier [ identifier ])) ;) }) (else_clause "else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" else (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" { (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar5);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar5)" identifier (argument_list "(__dest + param_5,__dest + param_3,sVar5)" ( (binary_expression "__dest + param_5" identifier + identifier) , (binary_expression "__dest + param_3" identifier + identifier) , identifier ))) ;) }))) })) (if_statement "if (param_5 == 0) goto LAB_0027e718;" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;)) (if_statement "if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" if (parenthesized_expression "(param_5 != 1)" ( (binary_expression "param_5 != 1" identifier != number_literal) )) (compound_statement "{\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" { (expression_statement "memcpy(__dest,param_4,param_5);" (call_expression "memcpy(__dest,param_4,param_5)" identifier (argument_list "(__dest,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) }) (else_clause "else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" else (compound_statement "{\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" { (if_statement "if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" if (parenthesized_expression "((param_5 == 0) || (param_3 < param_5))" ( (binary_expression "(param_5 == 0) || (param_3 < param_5)" (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_3 < param_5)" ( (binary_expression "param_3 < param_5" identifier < identifier) ))) )) (compound_statement "{\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }" { (labeled_statement "LAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;" statement_identifier : (if_statement "if (!bVar6 && !bVar7) goto LAB_0027e798;" if (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) (goto_statement "goto LAB_0027e798;" goto statement_identifier ;))) }) (else_clause "else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" else (compound_statement "{\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" { (if_statement "if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }" { (expression_statement "*__dest = (char)*param_4;" (assignment_expression "*__dest = (char)*param_4" (pointer_expression "*__dest" * identifier) = (cast_expression "(char)*param_4" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_4" * identifier))) ;) (goto_statement "goto LAB_0027e856;" goto statement_identifier ;) })) (expression_statement "memmove(__dest,param_4,param_5);" (call_expression "memmove(__dest,param_4,param_5)" identifier (argument_list "(__dest,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (if_statement "if (bVar6 || bVar7) goto LAB_0027e718;" if (parenthesized_expression "(bVar6 || bVar7)" ( (binary_expression "bVar6 || bVar7" identifier || identifier) )) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;)) (labeled_statement "LAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" statement_identifier : (if_statement "if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n        __dest[param_5] = __dest[param_3];\n      }" { (expression_statement "__dest[param_5] = __dest[param_3];" (assignment_expression "__dest[param_5] = __dest[param_3]" (subscript_expression "__dest[param_5]" identifier [ identifier ]) = (subscript_expression "__dest[param_3]" identifier [ identifier ])) ;) }) (else_clause "else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" else (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" { (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar5);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar5)" identifier (argument_list "(__dest + param_5,__dest + param_3,sVar5)" ( (binary_expression "__dest + param_5" identifier + identifier) , (binary_expression "__dest + param_3" identifier + identifier) , identifier ))) ;) })))) }))) (if_statement "if (param_5 <= param_3) goto LAB_0027e718;" if (parenthesized_expression "(param_5 <= param_3)" ( (binary_expression "param_5 <= param_3" identifier <= identifier) )) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;)) (expression_statement "plVar3 = (long *)(__dest + param_3);" (assignment_expression "plVar3 = (long *)(__dest + param_3)" identifier = (cast_expression "(long *)(__dest + param_3)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__dest + param_3)" ( (binary_expression "__dest + param_3" identifier + identifier) )))) ;) (if_statement "if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }" if (parenthesized_expression "(plVar3 < (long *)((long)param_4 + param_5))" ( (binary_expression "plVar3 < (long *)((long)param_4 + param_5)" identifier < (cast_expression "(long *)((long)param_4 + param_5)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_4 + param_5)" ( (binary_expression "(long)param_4 + param_5" (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) )) (compound_statement "{\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }" { (if_statement "if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" if (parenthesized_expression "(param_4 < plVar3)" ( (binary_expression "param_4 < plVar3" identifier < identifier) )) (compound_statement "{\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }" { (expression_statement "sVar5 = (long)plVar3 - (long)param_4;" (assignment_expression "sVar5 = (long)plVar3 - (long)param_4" identifier = (binary_expression "(long)plVar3 - (long)param_4" (cast_expression "(long)plVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (if_statement "if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n          *__dest = (char)*param_4;\n        }" { (expression_statement "*__dest = (char)*param_4;" (assignment_expression "*__dest = (char)*param_4" (pointer_expression "*__dest" * identifier) = (cast_expression "(char)*param_4" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_4" * identifier))) ;) }) (else_clause "else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }" else (if_statement "if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }" if (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) (compound_statement "{\n          memmove(__dest,param_4,sVar5);\n        }" { (expression_statement "memmove(__dest,param_4,sVar5);" (call_expression "memmove(__dest,param_4,sVar5)" identifier (argument_list "(__dest,param_4,sVar5)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "__n = param_5 - sVar5;" (assignment_expression "__n = param_5 - sVar5" identifier = (binary_expression "param_5 - sVar5" identifier - identifier)) ;) (if_statement "if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n          __dest[sVar5] = __dest[param_5];\n        }" { (expression_statement "__dest[sVar5] = __dest[param_5];" (assignment_expression "__dest[sVar5] = __dest[param_5]" (subscript_expression "__dest[sVar5]" identifier [ identifier ]) = (subscript_expression "__dest[param_5]" identifier [ identifier ])) ;) }) (else_clause "else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" else (if_statement "if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" { (expression_statement "memcpy(__dest + sVar5,__dest + param_5,__n);" (call_expression "memcpy(__dest + sVar5,__dest + param_5,__n)" identifier (argument_list "(__dest + sVar5,__dest + param_5,__n)" ( (binary_expression "__dest + sVar5" identifier + identifier) , (binary_expression "__dest + param_5" identifier + identifier) , identifier ))) ;) })))) }) (else_clause "else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" else (compound_statement "{\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" { (expression_statement "__src = (undefined1 *)((long)param_4 + (param_5 - param_3));" (assignment_expression "__src = (undefined1 *)((long)param_4 + (param_5 - param_3))" identifier = (cast_expression "(undefined1 *)((long)param_4 + (param_5 - param_3))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_4 + (param_5 - param_3))" ( (binary_expression "(long)param_4 + (param_5 - param_3)" (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (parenthesized_expression "(param_5 - param_3)" ( (binary_expression "param_5 - param_3" identifier - identifier) ))) )))) ;) (if_statement "if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n          *__dest = *__src;\n        }" { (expression_statement "*__dest = *__src;" (assignment_expression "*__dest = *__src" (pointer_expression "*__dest" * identifier) = (pointer_expression "*__src" * identifier)) ;) }) (else_clause "else {\n          memcpy(__dest,__src,param_5);\n        }" else (compound_statement "{\n          memcpy(__dest,__src,param_5);\n        }" { (expression_statement "memcpy(__dest,__src,param_5);" (call_expression "memcpy(__dest,__src,param_5)" identifier (argument_list "(__dest,__src,param_5)" ( identifier , identifier , identifier ))) ;) }))) }))) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) (if_statement "if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" if (parenthesized_expression "(param_5 != 1)" ( (binary_expression "param_5 != 1" identifier != number_literal) )) (compound_statement "{\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" { (expression_statement "memmove(__dest,param_4,param_5);" (call_expression "memmove(__dest,param_4,param_5)" identifier (argument_list "(__dest,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) }))) (expression_statement "*__dest = (char)*param_4;" (assignment_expression "*__dest = (char)*param_4" (pointer_expression "*__dest" * identifier) = (cast_expression "(char)*param_4" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_4" * identifier))) ;) (labeled_statement "LAB_0027e718:\n  param_1[1] = uVar1;" statement_identifier : (expression_statement "param_1[1] = uVar1;" (assignment_expression "param_1[1] = uVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;)) (expression_statement "*(undefined1 *)(*param_1 + uVar1) = 0;" (assignment_expression "*(undefined1 *)(*param_1 + uVar1) = 0" (pointer_expression "*(undefined1 *)(*param_1 + uVar1)" * (cast_expression "(undefined1 *)(*param_1 + uVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + uVar1)" ( (binary_expression "*param_1 + uVar1" (pointer_expression "*param_1" * identifier) + identifier) )))) = number_literal) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* std::string::_M_replace(unsigned long, unsigned long, char const*, unsigned long) */\n\nstring * __thiscall\nstd::string::_M_replace(string *this,ulong param_1,ulong param_2,char *param_3,ulong param_4)\n\n{\n  ulong uVar1;\n  string *__dest;\n  long lVar2;\n  size_t __n;\n  string *psVar3;\n  ulong uVar4;\n  size_t sVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  lVar2 = *(long *)(this + 8);\n  if ((param_2 + 0x7fffffffffffffff) - lVar2 < param_4) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_replace");\n  }\n  psVar3 = *(string **)this;\n  uVar1 = lVar2 + (param_4 - param_2);\n  if (psVar3 == this + 0x10) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = *(ulong *)(this + 0x10);\n  }\n  if (uVar4 < uVar1) {\n    _M_mutate(this,param_1,param_2,param_3,param_4);\n    goto LAB_0027e718;\n  }\n  __dest = psVar3 + param_1;\n  sVar5 = lVar2 - (param_1 + param_2);\n  bVar6 = sVar5 == 0;\n  bVar7 = param_2 == param_4;\n  if ((param_3 < psVar3) || (psVar3 + lVar2 < param_3)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }\n    if (param_4 == 0) goto LAB_0027e718;\n    if (param_4 != 1) {\n      memcpy(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_3,param_4);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }\n    if (param_4 <= param_2) goto LAB_0027e718;\n    psVar3 = __dest + param_2;\n    if (psVar3 < (string *)(param_3 + param_4)) {\n      if (param_3 < psVar3) {\n        sVar5 = (long)psVar3 - (long)param_3;\n        if (sVar5 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }\n        __n = param_4 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }\n      }\n      else if (param_4 == 1) {\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }\n      else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }\n      goto LAB_0027e718;\n    }\n    if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }\n  }\n  *__dest = (string)*param_3;\nLAB_0027e718:\n  *(ulong *)(this + 8) = uVar1;\n  *(undefined1 *)(*(long *)this + uVar1) = 0;\n  return this;\n}\n\n" comment (ERROR "string * __thiscall\nstd::string::_M_replace(string *this," (binary_expression "string * __thiscall\nstd::string::_M_replace(string *this" (binary_expression "string * __thiscall" identifier * identifier) (ERROR "std::string::_M_replace(string" identifier : : identifier : : identifier ( identifier) * identifier) ,) (declaration "ulong param_1,ulong param_2,char *param_3,ulong param_4)\n\n{\n  ulong uVar1;" type_identifier identifier , (ERROR "ulong" identifier) identifier , (ERROR "char" identifier) (pointer_declarator "*param_3" * identifier) , (ERROR "ulong param_4)\n\n{\n  ulong" identifier identifier ) { identifier) identifier ;) (declaration "string *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "string *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "lVar2 = *(long *)(this + 8);" (assignment_expression "lVar2 = *(long *)(this + 8)" identifier = (pointer_expression "*(long *)(this + 8)" * (cast_expression "(long *)(this + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) (if_statement "if ((param_2 + 0x7fffffffffffffff) - lVar2 < param_4) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_replace");\n  }" if (parenthesized_expression "((param_2 + 0x7fffffffffffffff) - lVar2 < param_4)" ( (binary_expression "(param_2 + 0x7fffffffffffffff) - lVar2 < param_4" (binary_expression "(param_2 + 0x7fffffffffffffff) - lVar2" (parenthesized_expression "(param_2 + 0x7fffffffffffffff)" ( (binary_expression "param_2 + 0x7fffffffffffffff" identifier + number_literal) )) - identifier) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_replace");\n  }" { comment (expression_statement "__throw_length_error("basic_string::_M_replace");" (call_expression "__throw_length_error("basic_string::_M_replace")" identifier (argument_list "("basic_string::_M_replace")" ( (string_literal ""basic_string::_M_replace"" " string_content ") ))) ;) })) (expression_statement "psVar3 = *(string **)this;" (assignment_expression "psVar3 = *(string **)this" identifier = (pointer_expression "*(string **)this" * (cast_expression "(string **)this" ( (type_descriptor "string **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar1 = lVar2 + (param_4 - param_2);" (assignment_expression "uVar1 = lVar2 + (param_4 - param_2)" identifier = (binary_expression "lVar2 + (param_4 - param_2)" identifier + (parenthesized_expression "(param_4 - param_2)" ( (binary_expression "param_4 - param_2" identifier - identifier) )))) ;) (if_statement "if (psVar3 == this + 0x10) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = *(ulong *)(this + 0x10);\n  }" if (parenthesized_expression "(psVar3 == this + 0x10)" ( (binary_expression "psVar3 == this + 0x10" identifier == (binary_expression "this + 0x10" identifier + number_literal)) )) (compound_statement "{\n    uVar4 = 0xf;\n  }" { (expression_statement "uVar4 = 0xf;" (assignment_expression "uVar4 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar4 = *(ulong *)(this + 0x10);\n  }" else (compound_statement "{\n    uVar4 = *(ulong *)(this + 0x10);\n  }" { (expression_statement "uVar4 = *(ulong *)(this + 0x10);" (assignment_expression "uVar4 = *(ulong *)(this + 0x10)" identifier = (pointer_expression "*(ulong *)(this + 0x10)" * (cast_expression "(ulong *)(this + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) ))))) ;) }))) (if_statement "if (uVar4 < uVar1) {\n    _M_mutate(this,param_1,param_2,param_3,param_4);\n    goto LAB_0027e718;\n  }" if (parenthesized_expression "(uVar4 < uVar1)" ( (binary_expression "uVar4 < uVar1" identifier < identifier) )) (compound_statement "{\n    _M_mutate(this,param_1,param_2,param_3,param_4);\n    goto LAB_0027e718;\n  }" { (expression_statement "_M_mutate(this,param_1,param_2,param_3,param_4);" (call_expression "_M_mutate(this,param_1,param_2,param_3,param_4)" identifier (argument_list "(this,param_1,param_2,param_3,param_4)" ( identifier , identifier , identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) (expression_statement "__dest = psVar3 + param_1;" (assignment_expression "__dest = psVar3 + param_1" identifier = (binary_expression "psVar3 + param_1" identifier + identifier)) ;) (expression_statement "sVar5 = lVar2 - (param_1 + param_2);" (assignment_expression "sVar5 = lVar2 - (param_1 + param_2)" identifier = (binary_expression "lVar2 - (param_1 + param_2)" identifier - (parenthesized_expression "(param_1 + param_2)" ( (binary_expression "param_1 + param_2" identifier + identifier) )))) ;) (expression_statement "bVar6 = sVar5 == 0;" (assignment_expression "bVar6 = sVar5 == 0" identifier = (binary_expression "sVar5 == 0" identifier == number_literal)) ;) (expression_statement "bVar7 = param_2 == param_4;" (assignment_expression "bVar7 = param_2 == param_4" identifier = (binary_expression "param_2 == param_4" identifier == identifier)) ;) (if_statement "if ((param_3 < psVar3) || (psVar3 + lVar2 < param_3)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }\n    if (param_4 == 0) goto LAB_0027e718;\n    if (param_4 != 1) {\n      memcpy(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_3,param_4);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }\n    if (param_4 <= param_2) goto LAB_0027e718;\n    psVar3 = __dest + param_2;\n    if (psVar3 < (string *)(param_3 + param_4)) {\n      if (param_3 < psVar3) {\n        sVar5 = (long)psVar3 - (long)param_3;\n        if (sVar5 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }\n        __n = param_4 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }\n      }\n      else if (param_4 == 1) {\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }\n      else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }\n      goto LAB_0027e718;\n    }\n    if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }\n  }" if (parenthesized_expression "((param_3 < psVar3) || (psVar3 + lVar2 < param_3))" ( (binary_expression "(param_3 < psVar3) || (psVar3 + lVar2 < param_3)" (parenthesized_expression "(param_3 < psVar3)" ( (binary_expression "param_3 < psVar3" identifier < identifier) )) || (parenthesized_expression "(psVar3 + lVar2 < param_3)" ( (binary_expression "psVar3 + lVar2 < param_3" (binary_expression "psVar3 + lVar2" identifier + identifier) < identifier) ))) )) (compound_statement "{\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }\n    if (param_4 == 0) goto LAB_0027e718;\n    if (param_4 != 1) {\n      memcpy(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }\n  }" { (if_statement "if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }" if (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) (compound_statement "{\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }" { (if_statement "if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n        __dest[param_4] = __dest[param_2];\n      }" { (expression_statement "__dest[param_4] = __dest[param_2];" (assignment_expression "__dest[param_4] = __dest[param_2]" (subscript_expression "__dest[param_4]" identifier [ identifier ]) = (subscript_expression "__dest[param_2]" identifier [ identifier ])) ;) }) (else_clause "else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }" else (compound_statement "{\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }" { (expression_statement "memmove(__dest + param_4,__dest + param_2,sVar5);" (call_expression "memmove(__dest + param_4,__dest + param_2,sVar5)" identifier (argument_list "(__dest + param_4,__dest + param_2,sVar5)" ( (binary_expression "__dest + param_4" identifier + identifier) , (binary_expression "__dest + param_2" identifier + identifier) , identifier ))) ;) }))) })) (if_statement "if (param_4 == 0) goto LAB_0027e718;" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;)) (if_statement "if (param_4 != 1) {\n      memcpy(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }" if (parenthesized_expression "(param_4 != 1)" ( (binary_expression "param_4 != 1" identifier != number_literal) )) (compound_statement "{\n      memcpy(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }" { (expression_statement "memcpy(__dest,param_3,param_4);" (call_expression "memcpy(__dest,param_3,param_4)" identifier (argument_list "(__dest,param_3,param_4)" ( identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) }) (else_clause "else {\n    if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_3,param_4);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }\n    if (param_4 <= param_2) goto LAB_0027e718;\n    psVar3 = __dest + param_2;\n    if (psVar3 < (string *)(param_3 + param_4)) {\n      if (param_3 < psVar3) {\n        sVar5 = (long)psVar3 - (long)param_3;\n        if (sVar5 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }\n        __n = param_4 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }\n      }\n      else if (param_4 == 1) {\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }\n      else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }\n      goto LAB_0027e718;\n    }\n    if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }\n  }" else (compound_statement "{\n    if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_3,param_4);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }\n    if (param_4 <= param_2) goto LAB_0027e718;\n    psVar3 = __dest + param_2;\n    if (psVar3 < (string *)(param_3 + param_4)) {\n      if (param_3 < psVar3) {\n        sVar5 = (long)psVar3 - (long)param_3;\n        if (sVar5 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }\n        __n = param_4 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }\n      }\n      else if (param_4 == 1) {\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }\n      else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }\n      goto LAB_0027e718;\n    }\n    if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }\n  }" { (if_statement "if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_3,param_4);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }" if (parenthesized_expression "((param_4 == 0) || (param_2 < param_4))" ( (binary_expression "(param_4 == 0) || (param_2 < param_4)" (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_2 < param_4)" ( (binary_expression "param_2 < param_4" identifier < identifier) ))) )) (compound_statement "{\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }" { (labeled_statement "LAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;" statement_identifier : (if_statement "if (!bVar6 && !bVar7) goto LAB_0027e798;" if (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) (goto_statement "goto LAB_0027e798;" goto statement_identifier ;))) }) (else_clause "else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_3,param_4);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }" else (compound_statement "{\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_3,param_4);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }\n    }" { (if_statement "if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_0027e856;\n      }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n        *__dest = (string)*param_3;\n        goto LAB_0027e856;\n      }" { (expression_statement "*__dest = (string)*param_3;" (assignment_expression "*__dest = (string)*param_3" (pointer_expression "*__dest" * identifier) = (binary_expression "(string)*param_3" (parenthesized_expression "(string)" ( identifier )) * identifier)) ;) (goto_statement "goto LAB_0027e856;" goto statement_identifier ;) })) (expression_statement "memmove(__dest,param_3,param_4);" (call_expression "memmove(__dest,param_3,param_4)" identifier (argument_list "(__dest,param_3,param_4)" ( identifier , identifier , identifier ))) ;) (if_statement "if (bVar6 || bVar7) goto LAB_0027e718;" if (parenthesized_expression "(bVar6 || bVar7)" ( (binary_expression "bVar6 || bVar7" identifier || identifier) )) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;)) (labeled_statement "LAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }" statement_identifier : (if_statement "if (sVar5 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n        __dest[param_4] = __dest[param_2];\n      }" { (expression_statement "__dest[param_4] = __dest[param_2];" (assignment_expression "__dest[param_4] = __dest[param_2]" (subscript_expression "__dest[param_4]" identifier [ identifier ]) = (subscript_expression "__dest[param_2]" identifier [ identifier ])) ;) }) (else_clause "else {\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }" else (compound_statement "{\n        memmove(__dest + param_4,__dest + param_2,sVar5);\n      }" { (expression_statement "memmove(__dest + param_4,__dest + param_2,sVar5);" (call_expression "memmove(__dest + param_4,__dest + param_2,sVar5)" identifier (argument_list "(__dest + param_4,__dest + param_2,sVar5)" ( (binary_expression "__dest + param_4" identifier + identifier) , (binary_expression "__dest + param_2" identifier + identifier) , identifier ))) ;) })))) }))) (if_statement "if (param_4 <= param_2) goto LAB_0027e718;" if (parenthesized_expression "(param_4 <= param_2)" ( (binary_expression "param_4 <= param_2" identifier <= identifier) )) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;)) (expression_statement "psVar3 = __dest + param_2;" (assignment_expression "psVar3 = __dest + param_2" identifier = (binary_expression "__dest + param_2" identifier + identifier)) ;) (if_statement "if (psVar3 < (string *)(param_3 + param_4)) {\n      if (param_3 < psVar3) {\n        sVar5 = (long)psVar3 - (long)param_3;\n        if (sVar5 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }\n        __n = param_4 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }\n      }\n      else if (param_4 == 1) {\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }\n      else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }\n      goto LAB_0027e718;\n    }" if (parenthesized_expression "(psVar3 < (string *)(param_3 + param_4))" ( (binary_expression "psVar3 < (string *)(param_3 + param_4)" identifier < (cast_expression "(string *)(param_3 + param_4)" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + param_4)" ( (binary_expression "param_3 + param_4" identifier + identifier) )))) )) (compound_statement "{\n      if (param_3 < psVar3) {\n        sVar5 = (long)psVar3 - (long)param_3;\n        if (sVar5 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }\n        __n = param_4 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }\n      }\n      else if (param_4 == 1) {\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }\n      else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }\n      goto LAB_0027e718;\n    }" { (if_statement "if (param_3 < psVar3) {\n        sVar5 = (long)psVar3 - (long)param_3;\n        if (sVar5 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }\n        __n = param_4 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }\n      }\n      else if (param_4 == 1) {\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }\n      else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }" if (parenthesized_expression "(param_3 < psVar3)" ( (binary_expression "param_3 < psVar3" identifier < identifier) )) (compound_statement "{\n        sVar5 = (long)psVar3 - (long)param_3;\n        if (sVar5 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }\n        __n = param_4 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }\n      }" { (expression_statement "sVar5 = (long)psVar3 - (long)param_3;" (assignment_expression "sVar5 = (long)psVar3 - (long)param_3" identifier = (binary_expression "(long)psVar3 - (long)param_3" (cast_expression "(long)psVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)param_3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (if_statement "if (sVar5 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n          *__dest = (string)*param_3;\n        }" { (expression_statement "*__dest = (string)*param_3;" (assignment_expression "*__dest = (string)*param_3" (pointer_expression "*__dest" * identifier) = (binary_expression "(string)*param_3" (parenthesized_expression "(string)" ( identifier )) * identifier)) ;) }) (else_clause "else if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }" else (if_statement "if (sVar5 != 0) {\n          memmove(__dest,param_3,sVar5);\n        }" if (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) (compound_statement "{\n          memmove(__dest,param_3,sVar5);\n        }" { (expression_statement "memmove(__dest,param_3,sVar5);" (call_expression "memmove(__dest,param_3,sVar5)" identifier (argument_list "(__dest,param_3,sVar5)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "__n = param_4 - sVar5;" (assignment_expression "__n = param_4 - sVar5" identifier = (binary_expression "param_4 - sVar5" identifier - identifier)) ;) (if_statement "if (__n == 1) {\n          __dest[sVar5] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n          __dest[sVar5] = __dest[param_4];\n        }" { (expression_statement "__dest[sVar5] = __dest[param_4];" (assignment_expression "__dest[sVar5] = __dest[param_4]" (subscript_expression "__dest[sVar5]" identifier [ identifier ]) = (subscript_expression "__dest[param_4]" identifier [ identifier ])) ;) }) (else_clause "else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }" else (if_statement "if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n          memcpy(__dest + sVar5,__dest + param_4,__n);\n        }" { (expression_statement "memcpy(__dest + sVar5,__dest + param_4,__n);" (call_expression "memcpy(__dest + sVar5,__dest + param_4,__n)" identifier (argument_list "(__dest + sVar5,__dest + param_4,__n)" ( (binary_expression "__dest + sVar5" identifier + identifier) , (binary_expression "__dest + param_4" identifier + identifier) , identifier ))) ;) })))) }) (else_clause "else if (param_4 == 1) {\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }\n      else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }" else (if_statement "if (param_4 == 1) {\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }\n      else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n        *__dest = *(string *)(param_3 + (param_4 - param_2));\n      }" { (expression_statement "*__dest = *(string *)(param_3 + (param_4 - param_2));" (assignment_expression "*__dest = *(string *)(param_3 + (param_4 - param_2))" (pointer_expression "*__dest" * identifier) = (pointer_expression "*(string *)(param_3 + (param_4 - param_2))" * (cast_expression "(string *)(param_3 + (param_4 - param_2))" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + (param_4 - param_2))" ( (binary_expression "param_3 + (param_4 - param_2)" identifier + (parenthesized_expression "(param_4 - param_2)" ( (binary_expression "param_4 - param_2" identifier - identifier) ))) ))))) ;) }) (else_clause "else {\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }" else (compound_statement "{\n        memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);\n      }" { (expression_statement "memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4);" (call_expression "memcpy(__dest,(string *)(param_3 + (param_4 - param_2)),param_4)" identifier (argument_list "(__dest,(string *)(param_3 + (param_4 - param_2)),param_4)" ( identifier , (cast_expression "(string *)(param_3 + (param_4 - param_2))" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + (param_4 - param_2))" ( (binary_expression "param_3 + (param_4 - param_2)" identifier + (parenthesized_expression "(param_4 - param_2)" ( (binary_expression "param_4 - param_2" identifier - identifier) ))) ))) , identifier ))) ;) }))))) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) (if_statement "if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }" if (parenthesized_expression "(param_4 != 1)" ( (binary_expression "param_4 != 1" identifier != number_literal) )) (compound_statement "{\n      memmove(__dest,param_3,param_4);\n      goto LAB_0027e718;\n    }" { (expression_statement "memmove(__dest,param_3,param_4);" (call_expression "memmove(__dest,param_3,param_4)" identifier (argument_list "(__dest,param_3,param_4)" ( identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) }))) (expression_statement "*__dest = (string)*param_3;" (assignment_expression "*__dest = (string)*param_3" (pointer_expression "*__dest" * identifier) = (binary_expression "(string)*param_3" (parenthesized_expression "(string)" ( identifier )) * identifier)) ;) (labeled_statement "LAB_0027e718:\n  *(ulong *)(this + 8) = uVar1;" statement_identifier : (expression_statement "*(ulong *)(this + 8) = uVar1;" (assignment_expression "*(ulong *)(this + 8) = uVar1" (pointer_expression "*(ulong *)(this + 8)" * (cast_expression "(ulong *)(this + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(undefined1 *)(*(long *)this + uVar1) = 0;" (assignment_expression "*(undefined1 *)(*(long *)this + uVar1) = 0" (pointer_expression "*(undefined1 *)(*(long *)this + uVar1)" * (cast_expression "(undefined1 *)(*(long *)this + uVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)this + uVar1)" ( (binary_expression "*(long *)this + uVar1" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + identifier) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) (ERROR "}" }))
(translation_unit "long * FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)\n\n{\n  ulong uVar1;\n  undefined1 *__dest;\n  undefined1 *__src;\n  long lVar2;\n  size_t __n;\n  long *plVar3;\n  ulong uVar4;\n  size_t sVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  lVar2 = param_1[1];\n  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    \n    FUN_002b5650("basic_string::_M_replace");\n  }\n  plVar3 = (long *)*param_1;\n  uVar1 = lVar2 + (param_5 - param_3);\n  if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }\n  if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }\n  __dest = (undefined1 *)((long)plVar3 + param_2);\n  sVar5 = lVar2 - (param_2 + param_3);\n  bVar6 = sVar5 == 0;\n  bVar7 = param_3 == param_5;\n  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_0027e718:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}\n\n" (function_definition "long * FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)\n\n{\n  ulong uVar1;\n  undefined1 *__dest;\n  undefined1 *__src;\n  long lVar2;\n  size_t __n;\n  long *plVar3;\n  ulong uVar4;\n  size_t sVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  lVar2 = param_1[1];\n  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    \n    FUN_002b5650("basic_string::_M_replace");\n  }\n  plVar3 = (long *)*param_1;\n  uVar1 = lVar2 + (param_5 - param_3);\n  if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }\n  if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }\n  __dest = (undefined1 *)((long)plVar3 + param_2);\n  sVar5 = lVar2 - (param_2 + param_3);\n  bVar6 = sVar5 == 0;\n  bVar7 = param_3 == param_5;\n  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_0027e718:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" (sized_type_specifier "long" long) (pointer_declarator "* FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)" * (function_declarator "FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)" identifier (parameter_list "(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "long *param_4" (sized_type_specifier "long" long) (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "ulong param_5" type_identifier identifier) )))) (compound_statement "{\n  ulong uVar1;\n  undefined1 *__dest;\n  undefined1 *__src;\n  long lVar2;\n  size_t __n;\n  long *plVar3;\n  ulong uVar4;\n  size_t sVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  lVar2 = param_1[1];\n  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    \n    FUN_002b5650("basic_string::_M_replace");\n  }\n  plVar3 = (long *)*param_1;\n  uVar1 = lVar2 + (param_5 - param_3);\n  if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }\n  if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }\n  __dest = (undefined1 *)((long)plVar3 + param_2);\n  sVar5 = lVar2 - (param_2 + param_3);\n  bVar6 = sVar5 == 0;\n  bVar7 = param_3 == param_5;\n  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_0027e718:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "undefined1 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined1 *__src;" type_identifier (pointer_declarator "*__src" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "long *plVar3;" (sized_type_specifier "long" long) (pointer_declarator "*plVar3" * identifier) ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "lVar2 = param_1[1];" (assignment_expression "lVar2 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    \n    FUN_002b5650("basic_string::_M_replace");\n  }" if (parenthesized_expression "((param_3 + 0x7fffffffffffffff) - lVar2 < param_5)" ( (binary_expression "(param_3 + 0x7fffffffffffffff) - lVar2 < param_5" (binary_expression "(param_3 + 0x7fffffffffffffff) - lVar2" (parenthesized_expression "(param_3 + 0x7fffffffffffffff)" ( (binary_expression "param_3 + 0x7fffffffffffffff" identifier + number_literal) )) - identifier) < identifier) )) (compound_statement "{\n                    \n    FUN_002b5650("basic_string::_M_replace");\n  }" { (expression_statement "FUN_002b5650("basic_string::_M_replace");" (call_expression "FUN_002b5650("basic_string::_M_replace")" identifier (argument_list "("basic_string::_M_replace")" ( (string_literal ""basic_string::_M_replace"" " string_content ") ))) ;) })) (expression_statement "plVar3 = (long *)*param_1;" (assignment_expression "plVar3 = (long *)*param_1" identifier = (cast_expression "(long *)*param_1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "uVar1 = lVar2 + (param_5 - param_3);" (assignment_expression "uVar1 = lVar2 + (param_5 - param_3)" identifier = (binary_expression "lVar2 + (param_5 - param_3)" identifier + (parenthesized_expression "(param_5 - param_3)" ( (binary_expression "param_5 - param_3" identifier - identifier) )))) ;) (if_statement "if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }" if (parenthesized_expression "(plVar3 == param_1 + 2)" ( (binary_expression "plVar3 == param_1 + 2" identifier == (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n    uVar4 = 0xf;\n  }" { (expression_statement "uVar4 = 0xf;" (assignment_expression "uVar4 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar4 = param_1[2];\n  }" else (compound_statement "{\n    uVar4 = param_1[2];\n  }" { (expression_statement "uVar4 = param_1[2];" (assignment_expression "uVar4 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }" if (parenthesized_expression "(uVar4 < uVar1)" ( (binary_expression "uVar4 < uVar1" identifier < identifier) )) (compound_statement "{\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }" { (expression_statement "FUN_0027da10(param_1,param_2,param_3);" (call_expression "FUN_0027da10(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) (expression_statement "__dest = (undefined1 *)((long)plVar3 + param_2);" (assignment_expression "__dest = (undefined1 *)((long)plVar3 + param_2)" identifier = (cast_expression "(undefined1 *)((long)plVar3 + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)plVar3 + param_2)" ( (binary_expression "(long)plVar3 + param_2" (cast_expression "(long)plVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) ;) (expression_statement "sVar5 = lVar2 - (param_2 + param_3);" (assignment_expression "sVar5 = lVar2 - (param_2 + param_3)" identifier = (binary_expression "lVar2 - (param_2 + param_3)" identifier - (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )))) ;) (expression_statement "bVar6 = sVar5 == 0;" (assignment_expression "bVar6 = sVar5 == 0" identifier = (binary_expression "sVar5 == 0" identifier == number_literal)) ;) (expression_statement "bVar7 = param_3 == param_5;" (assignment_expression "bVar7 = param_3 == param_5" identifier = (binary_expression "param_3 == param_5" identifier == identifier)) ;) (if_statement "if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" if (parenthesized_expression "((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4))" ( (binary_expression "(param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)" (parenthesized_expression "(param_4 < plVar3)" ( (binary_expression "param_4 < plVar3" identifier < identifier) )) || (parenthesized_expression "((long *)(lVar2 + (long)plVar3) < param_4)" ( (binary_expression "(long *)(lVar2 + (long)plVar3) < param_4" (cast_expression "(long *)(lVar2 + (long)plVar3)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + (long)plVar3)" ( (binary_expression "lVar2 + (long)plVar3" identifier + (cast_expression "(long)plVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) < identifier) ))) )) (compound_statement "{\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" { (if_statement "if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" if (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) (compound_statement "{\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" { (if_statement "if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n        __dest[param_5] = __dest[param_3];\n      }" { (expression_statement "__dest[param_5] = __dest[param_3];" (assignment_expression "__dest[param_5] = __dest[param_3]" (subscript_expression "__dest[param_5]" identifier [ identifier ]) = (subscript_expression "__dest[param_3]" identifier [ identifier ])) ;) }) (else_clause "else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" else (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" { (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar5);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar5)" identifier (argument_list "(__dest + param_5,__dest + param_3,sVar5)" ( (binary_expression "__dest + param_5" identifier + identifier) , (binary_expression "__dest + param_3" identifier + identifier) , identifier ))) ;) }))) })) (if_statement "if (param_5 == 0) goto LAB_0027e718;" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;)) (if_statement "if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" if (parenthesized_expression "(param_5 != 1)" ( (binary_expression "param_5 != 1" identifier != number_literal) )) (compound_statement "{\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" { (expression_statement "memcpy(__dest,param_4,param_5);" (call_expression "memcpy(__dest,param_4,param_5)" identifier (argument_list "(__dest,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) }) (else_clause "else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" else (compound_statement "{\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" { (if_statement "if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" if (parenthesized_expression "((param_5 == 0) || (param_3 < param_5))" ( (binary_expression "(param_5 == 0) || (param_3 < param_5)" (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_3 < param_5)" ( (binary_expression "param_3 < param_5" identifier < identifier) ))) )) (compound_statement "{\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }" { (labeled_statement "LAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;" statement_identifier : (if_statement "if (!bVar6 && !bVar7) goto LAB_0027e798;" if (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) (goto_statement "goto LAB_0027e798;" goto statement_identifier ;))) }) (else_clause "else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" else (compound_statement "{\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" { (if_statement "if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }" { (expression_statement "*__dest = (char)*param_4;" (assignment_expression "*__dest = (char)*param_4" (pointer_expression "*__dest" * identifier) = (cast_expression "(char)*param_4" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_4" * identifier))) ;) (goto_statement "goto LAB_0027e856;" goto statement_identifier ;) })) (expression_statement "memmove(__dest,param_4,param_5);" (call_expression "memmove(__dest,param_4,param_5)" identifier (argument_list "(__dest,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (if_statement "if (bVar6 || bVar7) goto LAB_0027e718;" if (parenthesized_expression "(bVar6 || bVar7)" ( (binary_expression "bVar6 || bVar7" identifier || identifier) )) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;)) (labeled_statement "LAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" statement_identifier : (if_statement "if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n        __dest[param_5] = __dest[param_3];\n      }" { (expression_statement "__dest[param_5] = __dest[param_3];" (assignment_expression "__dest[param_5] = __dest[param_3]" (subscript_expression "__dest[param_5]" identifier [ identifier ]) = (subscript_expression "__dest[param_3]" identifier [ identifier ])) ;) }) (else_clause "else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" else (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" { (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar5);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar5)" identifier (argument_list "(__dest + param_5,__dest + param_3,sVar5)" ( (binary_expression "__dest + param_5" identifier + identifier) , (binary_expression "__dest + param_3" identifier + identifier) , identifier ))) ;) })))) }))) (if_statement "if (param_5 <= param_3) goto LAB_0027e718;" if (parenthesized_expression "(param_5 <= param_3)" ( (binary_expression "param_5 <= param_3" identifier <= identifier) )) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;)) (expression_statement "plVar3 = (long *)(__dest + param_3);" (assignment_expression "plVar3 = (long *)(__dest + param_3)" identifier = (cast_expression "(long *)(__dest + param_3)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__dest + param_3)" ( (binary_expression "__dest + param_3" identifier + identifier) )))) ;) (if_statement "if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }" if (parenthesized_expression "(plVar3 < (long *)((long)param_4 + param_5))" ( (binary_expression "plVar3 < (long *)((long)param_4 + param_5)" identifier < (cast_expression "(long *)((long)param_4 + param_5)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_4 + param_5)" ( (binary_expression "(long)param_4 + param_5" (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) )) (compound_statement "{\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }" { (if_statement "if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" if (parenthesized_expression "(param_4 < plVar3)" ( (binary_expression "param_4 < plVar3" identifier < identifier) )) (compound_statement "{\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }" { (expression_statement "sVar5 = (long)plVar3 - (long)param_4;" (assignment_expression "sVar5 = (long)plVar3 - (long)param_4" identifier = (binary_expression "(long)plVar3 - (long)param_4" (cast_expression "(long)plVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (if_statement "if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }" if (parenthesized_expression "(sVar5 == 1)" ( (binary_expression "sVar5 == 1" identifier == number_literal) )) (compound_statement "{\n          *__dest = (char)*param_4;\n        }" { (expression_statement "*__dest = (char)*param_4;" (assignment_expression "*__dest = (char)*param_4" (pointer_expression "*__dest" * identifier) = (cast_expression "(char)*param_4" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_4" * identifier))) ;) }) (else_clause "else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }" else (if_statement "if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }" if (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) (compound_statement "{\n          memmove(__dest,param_4,sVar5);\n        }" { (expression_statement "memmove(__dest,param_4,sVar5);" (call_expression "memmove(__dest,param_4,sVar5)" identifier (argument_list "(__dest,param_4,sVar5)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "__n = param_5 - sVar5;" (assignment_expression "__n = param_5 - sVar5" identifier = (binary_expression "param_5 - sVar5" identifier - identifier)) ;) (if_statement "if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n          __dest[sVar5] = __dest[param_5];\n        }" { (expression_statement "__dest[sVar5] = __dest[param_5];" (assignment_expression "__dest[sVar5] = __dest[param_5]" (subscript_expression "__dest[sVar5]" identifier [ identifier ]) = (subscript_expression "__dest[param_5]" identifier [ identifier ])) ;) }) (else_clause "else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" else (if_statement "if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" { (expression_statement "memcpy(__dest + sVar5,__dest + param_5,__n);" (call_expression "memcpy(__dest + sVar5,__dest + param_5,__n)" identifier (argument_list "(__dest + sVar5,__dest + param_5,__n)" ( (binary_expression "__dest + sVar5" identifier + identifier) , (binary_expression "__dest + param_5" identifier + identifier) , identifier ))) ;) })))) }) (else_clause "else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" else (compound_statement "{\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" { (expression_statement "__src = (undefined1 *)((long)param_4 + (param_5 - param_3));" (assignment_expression "__src = (undefined1 *)((long)param_4 + (param_5 - param_3))" identifier = (cast_expression "(undefined1 *)((long)param_4 + (param_5 - param_3))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_4 + (param_5 - param_3))" ( (binary_expression "(long)param_4 + (param_5 - param_3)" (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (parenthesized_expression "(param_5 - param_3)" ( (binary_expression "param_5 - param_3" identifier - identifier) ))) )))) ;) (if_statement "if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n          *__dest = *__src;\n        }" { (expression_statement "*__dest = *__src;" (assignment_expression "*__dest = *__src" (pointer_expression "*__dest" * identifier) = (pointer_expression "*__src" * identifier)) ;) }) (else_clause "else {\n          memcpy(__dest,__src,param_5);\n        }" else (compound_statement "{\n          memcpy(__dest,__src,param_5);\n        }" { (expression_statement "memcpy(__dest,__src,param_5);" (call_expression "memcpy(__dest,__src,param_5)" identifier (argument_list "(__dest,__src,param_5)" ( identifier , identifier , identifier ))) ;) }))) }))) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) (if_statement "if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" if (parenthesized_expression "(param_5 != 1)" ( (binary_expression "param_5 != 1" identifier != number_literal) )) (compound_statement "{\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" { (expression_statement "memmove(__dest,param_4,param_5);" (call_expression "memmove(__dest,param_4,param_5)" identifier (argument_list "(__dest,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_0027e718;" goto statement_identifier ;) })) }))) (expression_statement "*__dest = (char)*param_4;" (assignment_expression "*__dest = (char)*param_4" (pointer_expression "*__dest" * identifier) = (cast_expression "(char)*param_4" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_4" * identifier))) ;) (labeled_statement "LAB_0027e718:\n  param_1[1] = uVar1;" statement_identifier : (expression_statement "param_1[1] = uVar1;" (assignment_expression "param_1[1] = uVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;)) (expression_statement "*(undefined1 *)(*param_1 + uVar1) = 0;" (assignment_expression "*(undefined1 *)(*param_1 + uVar1) = 0" (pointer_expression "*(undefined1 *)(*param_1 + uVar1)" * (cast_expression "(undefined1 *)(*param_1 + uVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + uVar1)" ( (binary_expression "*param_1 + uVar1" (pointer_expression "*param_1" * identifier) + identifier) )))) = number_literal) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition (sized_type_specifier long) (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) - IDENT) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) || (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ))) < IDENT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (subscript_expression IDENT [ IDENT ])) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , (binary_expression IDENT + IDENT) , IDENT ))) ;) }))) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) (goto_statement goto statement_identifier ;))) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT || IDENT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (subscript_expression IDENT [ IDENT ])) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , (binary_expression IDENT + IDENT) , IDENT ))) ;) })))) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) )))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (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 = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ 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 ( (binary_expression IDENT + IDENT) , (binary_expression IDENT + IDENT) , IDENT ))) ;) })))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) }))) }))) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (goto_statement goto statement_identifier ;) })) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + IDENT) )))) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "long * FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)\n\n{\n  ulong uVar1;\n  undefined1 *__dest;\n  undefined1 *__src;\n  long lVar2;\n  size_t __n;\n  long *plVar3;\n  ulong uVar4;\n  size_t sVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  lVar2 = param_1[1];\n  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    \n    FUN_002b5650("basic_string::_M_replace");\n  }\n  plVar3 = (long *)*param_1;\n  uVar1 = lVar2 + (param_5 - param_3);\n  if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }\n  if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }\n  __dest = (undefined1 *)((long)plVar3 + param_2);\n  sVar5 = lVar2 - (param_2 + param_3);\n  bVar6 = sVar5 == 0;\n  bVar7 = param_3 == param_5;\n  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_0027e718:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" (sized_type_specifier "long" (long "long")) (pointer_declarator "* FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)" (* "*") (function_declarator "FUN_0027e650(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)" (identifier "FUN_0027e650") (parameter_list "(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "ulong param_3" (type_identifier "ulong") (identifier "param_3")) (, ",") (parameter_declaration "long *param_4" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "ulong param_5" (type_identifier "ulong") (identifier "param_5")) () ")")))) (compound_statement "{\n  ulong uVar1;\n  undefined1 *__dest;\n  undefined1 *__src;\n  long lVar2;\n  size_t __n;\n  long *plVar3;\n  ulong uVar4;\n  size_t sVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  lVar2 = param_1[1];\n  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    \n    FUN_002b5650("basic_string::_M_replace");\n  }\n  plVar3 = (long *)*param_1;\n  uVar1 = lVar2 + (param_5 - param_3);\n  if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }\n  if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }\n  __dest = (undefined1 *)((long)plVar3 + param_2);\n  sVar5 = lVar2 - (param_2 + param_3);\n  bVar6 = sVar5 == 0;\n  bVar7 = param_3 == param_5;\n  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_0027e718:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "undefined1 *__dest;" (type_identifier "undefined1") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "undefined1 *__src;" (type_identifier "undefined1") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "long *plVar3;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar3" (* "*") (identifier "plVar3")) (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "size_t sVar5;" (primitive_type "size_t") (identifier "sVar5") (; ";")) (declaration "bool bVar6;" (primitive_type "bool") (identifier "bVar6") (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (expression_statement "lVar2 = param_1[1];" (assignment_expression "lVar2 = param_1[1]" (identifier "lVar2") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {\n                    \n    FUN_002b5650("basic_string::_M_replace");\n  }" (if "if") (parenthesized_expression "((param_3 + 0x7fffffffffffffff) - lVar2 < param_5)" (( "(") (binary_expression "(param_3 + 0x7fffffffffffffff) - lVar2 < param_5" (binary_expression "(param_3 + 0x7fffffffffffffff) - lVar2" (parenthesized_expression "(param_3 + 0x7fffffffffffffff)" (( "(") (binary_expression "param_3 + 0x7fffffffffffffff" (identifier "param_3") (+ "+") (number_literal "0x7fffffffffffffff")) () ")")) (- "-") (identifier "lVar2")) (< "<") (identifier "param_5")) () ")")) (compound_statement "{\n                    \n    FUN_002b5650("basic_string::_M_replace");\n  }" ({ "{") (expression_statement "FUN_002b5650("basic_string::_M_replace");" (call_expression "FUN_002b5650("basic_string::_M_replace")" (identifier "FUN_002b5650") (argument_list "("basic_string::_M_replace")" (( "(") (string_literal ""basic_string::_M_replace"" (" """) (string_content "basic_string::_M_replace") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "plVar3 = (long *)*param_1;" (assignment_expression "plVar3 = (long *)*param_1" (identifier "plVar3") (= "=") (cast_expression "(long *)*param_1" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "uVar1 = lVar2 + (param_5 - param_3);" (assignment_expression "uVar1 = lVar2 + (param_5 - param_3)" (identifier "uVar1") (= "=") (binary_expression "lVar2 + (param_5 - param_3)" (identifier "lVar2") (+ "+") (parenthesized_expression "(param_5 - param_3)" (( "(") (binary_expression "param_5 - param_3" (identifier "param_5") (- "-") (identifier "param_3")) () ")")))) (; ";")) (if_statement "if (plVar3 == param_1 + 2) {\n    uVar4 = 0xf;\n  }\n  else {\n    uVar4 = param_1[2];\n  }" (if "if") (parenthesized_expression "(plVar3 == param_1 + 2)" (( "(") (binary_expression "plVar3 == param_1 + 2" (identifier "plVar3") (== "==") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2"))) () ")")) (compound_statement "{\n    uVar4 = 0xf;\n  }" ({ "{") (expression_statement "uVar4 = 0xf;" (assignment_expression "uVar4 = 0xf" (identifier "uVar4") (= "=") (number_literal "0xf")) (; ";")) (} "}")) (else_clause "else {\n    uVar4 = param_1[2];\n  }" (else "else") (compound_statement "{\n    uVar4 = param_1[2];\n  }" ({ "{") (expression_statement "uVar4 = param_1[2];" (assignment_expression "uVar4 = param_1[2]" (identifier "uVar4") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (if_statement "if (uVar4 < uVar1) {\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }" (if "if") (parenthesized_expression "(uVar4 < uVar1)" (( "(") (binary_expression "uVar4 < uVar1" (identifier "uVar4") (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n    FUN_0027da10(param_1,param_2,param_3);\n    goto LAB_0027e718;\n  }" ({ "{") (expression_statement "FUN_0027da10(param_1,param_2,param_3);" (call_expression "FUN_0027da10(param_1,param_2,param_3)" (identifier "FUN_0027da10") (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (goto_statement "goto LAB_0027e718;" (goto "goto") (statement_identifier "LAB_0027e718") (; ";")) (} "}"))) (expression_statement "__dest = (undefined1 *)((long)plVar3 + param_2);" (assignment_expression "__dest = (undefined1 *)((long)plVar3 + param_2)" (identifier "__dest") (= "=") (cast_expression "(undefined1 *)((long)plVar3 + param_2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)plVar3 + param_2)" (( "(") (binary_expression "(long)plVar3 + param_2" (cast_expression "(long)plVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "plVar3")) (+ "+") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "sVar5 = lVar2 - (param_2 + param_3);" (assignment_expression "sVar5 = lVar2 - (param_2 + param_3)" (identifier "sVar5") (= "=") (binary_expression "lVar2 - (param_2 + param_3)" (identifier "lVar2") (- "-") (parenthesized_expression "(param_2 + param_3)" (( "(") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3")) () ")")))) (; ";")) (expression_statement "bVar6 = sVar5 == 0;" (assignment_expression "bVar6 = sVar5 == 0" (identifier "bVar6") (= "=") (binary_expression "sVar5 == 0" (identifier "sVar5") (== "==") (number_literal "0"))) (; ";")) (expression_statement "bVar7 = param_3 == param_5;" (assignment_expression "bVar7 = param_3 == param_5" (identifier "bVar7") (= "=") (binary_expression "param_3 == param_5" (identifier "param_3") (== "==") (identifier "param_5"))) (; ";")) (if_statement "if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" (if "if") (parenthesized_expression "((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4))" (( "(") (binary_expression "(param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)" (parenthesized_expression "(param_4 < plVar3)" (( "(") (binary_expression "param_4 < plVar3" (identifier "param_4") (< "<") (identifier "plVar3")) () ")")) (|| "||") (parenthesized_expression "((long *)(lVar2 + (long)plVar3) < param_4)" (( "(") (binary_expression "(long *)(lVar2 + (long)plVar3) < param_4" (cast_expression "(long *)(lVar2 + (long)plVar3)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + (long)plVar3)" (( "(") (binary_expression "lVar2 + (long)plVar3" (identifier "lVar2") (+ "+") (cast_expression "(long)plVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "plVar3"))) () ")"))) (< "<") (identifier "param_4")) () ")"))) () ")")) (compound_statement "{\n    if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 == 0) goto LAB_0027e718;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" ({ "{") (if_statement "if (!bVar6 && !bVar7) {\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" (if "if") (parenthesized_expression "(!bVar6 && !bVar7)" (( "(") (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" (! "!") (identifier "bVar6")) (&& "&&") (unary_expression "!bVar7" (! "!") (identifier "bVar7"))) () ")")) (compound_statement "{\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" ({ "{") (if_statement "if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" (if "if") (parenthesized_expression "(sVar5 == 1)" (( "(") (binary_expression "sVar5 == 1" (identifier "sVar5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        __dest[param_5] = __dest[param_3];\n      }" ({ "{") (expression_statement "__dest[param_5] = __dest[param_3];" (assignment_expression "__dest[param_5] = __dest[param_3]" (subscript_expression "__dest[param_5]" (identifier "__dest") ([ "[") (identifier "param_5") (] "]")) (= "=") (subscript_expression "__dest[param_3]" (identifier "__dest") ([ "[") (identifier "param_3") (] "]"))) (; ";")) (} "}")) (else_clause "else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" (else "else") (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" ({ "{") (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar5);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar5)" (identifier "memmove") (argument_list "(__dest + param_5,__dest + param_3,sVar5)" (( "(") (binary_expression "__dest + param_5" (identifier "__dest") (+ "+") (identifier "param_5")) (, ",") (binary_expression "__dest + param_3" (identifier "__dest") (+ "+") (identifier "param_3")) (, ",") (identifier "sVar5") () ")"))) (; ";")) (} "}")))) (} "}"))) (if_statement "if (param_5 == 0) goto LAB_0027e718;" (if "if") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0027e718;" (goto "goto") (statement_identifier "LAB_0027e718") (; ";"))) (if_statement "if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" (if "if") (parenthesized_expression "(param_5 != 1)" (( "(") (binary_expression "param_5 != 1" (identifier "param_5") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n      memcpy(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" ({ "{") (expression_statement "memcpy(__dest,param_4,param_5);" (call_expression "memcpy(__dest,param_4,param_5)" (identifier "memcpy") (argument_list "(__dest,param_4,param_5)" (( "(") (identifier "__dest") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (goto_statement "goto LAB_0027e718;" (goto "goto") (statement_identifier "LAB_0027e718") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" (else "else") (compound_statement "{\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_0027e718;\n    plVar3 = (long *)(__dest + param_3);\n    if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }\n  }" ({ "{") (if_statement "if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" (if "if") (parenthesized_expression "((param_5 == 0) || (param_3 < param_5))" (( "(") (binary_expression "(param_5 == 0) || (param_3 < param_5)" (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(param_3 < param_5)" (( "(") (binary_expression "param_3 < param_5" (identifier "param_3") (< "<") (identifier "param_5")) () ")"))) () ")")) (compound_statement "{\nLAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;\n    }" ({ "{") (labeled_statement "LAB_0027e856:\n      if (!bVar6 && !bVar7) goto LAB_0027e798;" (statement_identifier "LAB_0027e856") (: ":") (if_statement "if (!bVar6 && !bVar7) goto LAB_0027e798;" (if "if") (parenthesized_expression "(!bVar6 && !bVar7)" (( "(") (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" (! "!") (identifier "bVar6")) (&& "&&") (unary_expression "!bVar7" (! "!") (identifier "bVar7"))) () ")")) (goto_statement "goto LAB_0027e798;" (goto "goto") (statement_identifier "LAB_0027e798") (; ";")))) (} "}")) (else_clause "else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" (else "else") (compound_statement "{\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }\n      memmove(__dest,param_4,param_5);\n      if (bVar6 || bVar7) goto LAB_0027e718;\nLAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }\n    }" ({ "{") (if_statement "if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }" (if "if") (parenthesized_expression "(param_5 == 1)" (( "(") (binary_expression "param_5 == 1" (identifier "param_5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        *__dest = (char)*param_4;\n        goto LAB_0027e856;\n      }" ({ "{") (expression_statement "*__dest = (char)*param_4;" (assignment_expression "*__dest = (char)*param_4" (pointer_expression "*__dest" (* "*") (identifier "__dest")) (= "=") (cast_expression "(char)*param_4" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*param_4" (* "*") (identifier "param_4")))) (; ";")) (goto_statement "goto LAB_0027e856;" (goto "goto") (statement_identifier "LAB_0027e856") (; ";")) (} "}"))) (expression_statement "memmove(__dest,param_4,param_5);" (call_expression "memmove(__dest,param_4,param_5)" (identifier "memmove") (argument_list "(__dest,param_4,param_5)" (( "(") (identifier "__dest") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (if_statement "if (bVar6 || bVar7) goto LAB_0027e718;" (if "if") (parenthesized_expression "(bVar6 || bVar7)" (( "(") (binary_expression "bVar6 || bVar7" (identifier "bVar6") (|| "||") (identifier "bVar7")) () ")")) (goto_statement "goto LAB_0027e718;" (goto "goto") (statement_identifier "LAB_0027e718") (; ";"))) (labeled_statement "LAB_0027e798:\n      if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" (statement_identifier "LAB_0027e798") (: ":") (if_statement "if (sVar5 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" (if "if") (parenthesized_expression "(sVar5 == 1)" (( "(") (binary_expression "sVar5 == 1" (identifier "sVar5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        __dest[param_5] = __dest[param_3];\n      }" ({ "{") (expression_statement "__dest[param_5] = __dest[param_3];" (assignment_expression "__dest[param_5] = __dest[param_3]" (subscript_expression "__dest[param_5]" (identifier "__dest") ([ "[") (identifier "param_5") (] "]")) (= "=") (subscript_expression "__dest[param_3]" (identifier "__dest") ([ "[") (identifier "param_3") (] "]"))) (; ";")) (} "}")) (else_clause "else {\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" (else "else") (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar5);\n      }" ({ "{") (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar5);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar5)" (identifier "memmove") (argument_list "(__dest + param_5,__dest + param_3,sVar5)" (( "(") (binary_expression "__dest + param_5" (identifier "__dest") (+ "+") (identifier "param_5")) (, ",") (binary_expression "__dest + param_3" (identifier "__dest") (+ "+") (identifier "param_3")) (, ",") (identifier "sVar5") () ")"))) (; ";")) (} "}"))))) (} "}")))) (if_statement "if (param_5 <= param_3) goto LAB_0027e718;" (if "if") (parenthesized_expression "(param_5 <= param_3)" (( "(") (binary_expression "param_5 <= param_3" (identifier "param_5") (<= "<=") (identifier "param_3")) () ")")) (goto_statement "goto LAB_0027e718;" (goto "goto") (statement_identifier "LAB_0027e718") (; ";"))) (expression_statement "plVar3 = (long *)(__dest + param_3);" (assignment_expression "plVar3 = (long *)(__dest + param_3)" (identifier "plVar3") (= "=") (cast_expression "(long *)(__dest + param_3)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__dest + param_3)" (( "(") (binary_expression "__dest + param_3" (identifier "__dest") (+ "+") (identifier "param_3")) () ")")))) (; ";")) (if_statement "if (plVar3 < (long *)((long)param_4 + param_5)) {\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }" (if "if") (parenthesized_expression "(plVar3 < (long *)((long)param_4 + param_5))" (( "(") (binary_expression "plVar3 < (long *)((long)param_4 + param_5)" (identifier "plVar3") (< "<") (cast_expression "(long *)((long)param_4 + param_5)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_4 + param_5)" (( "(") (binary_expression "(long)param_4 + param_5" (cast_expression "(long)param_4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_4")) (+ "+") (identifier "param_5")) () ")")))) () ")")) (compound_statement "{\n      if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_0027e718;\n    }" ({ "{") (if_statement "if (param_4 < plVar3) {\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" (if "if") (parenthesized_expression "(param_4 < plVar3)" (( "(") (binary_expression "param_4 < plVar3" (identifier "param_4") (< "<") (identifier "plVar3")) () ")")) (compound_statement "{\n        sVar5 = (long)plVar3 - (long)param_4;\n        if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }\n        __n = param_5 - sVar5;\n        if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }\n      }" ({ "{") (expression_statement "sVar5 = (long)plVar3 - (long)param_4;" (assignment_expression "sVar5 = (long)plVar3 - (long)param_4" (identifier "sVar5") (= "=") (binary_expression "(long)plVar3 - (long)param_4" (cast_expression "(long)plVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "plVar3")) (- "-") (cast_expression "(long)param_4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_4")))) (; ";")) (if_statement "if (sVar5 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }" (if "if") (parenthesized_expression "(sVar5 == 1)" (( "(") (binary_expression "sVar5 == 1" (identifier "sVar5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n          *__dest = (char)*param_4;\n        }" ({ "{") (expression_statement "*__dest = (char)*param_4;" (assignment_expression "*__dest = (char)*param_4" (pointer_expression "*__dest" (* "*") (identifier "__dest")) (= "=") (cast_expression "(char)*param_4" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*param_4" (* "*") (identifier "param_4")))) (; ";")) (} "}")) (else_clause "else if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }" (else "else") (if_statement "if (sVar5 != 0) {\n          memmove(__dest,param_4,sVar5);\n        }" (if "if") (parenthesized_expression "(sVar5 != 0)" (( "(") (binary_expression "sVar5 != 0" (identifier "sVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          memmove(__dest,param_4,sVar5);\n        }" ({ "{") (expression_statement "memmove(__dest,param_4,sVar5);" (call_expression "memmove(__dest,param_4,sVar5)" (identifier "memmove") (argument_list "(__dest,param_4,sVar5)" (( "(") (identifier "__dest") (, ",") (identifier "param_4") (, ",") (identifier "sVar5") () ")"))) (; ";")) (} "}"))))) (expression_statement "__n = param_5 - sVar5;" (assignment_expression "__n = param_5 - sVar5" (identifier "__n") (= "=") (binary_expression "param_5 - sVar5" (identifier "param_5") (- "-") (identifier "sVar5"))) (; ";")) (if_statement "if (__n == 1) {\n          __dest[sVar5] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" (if "if") (parenthesized_expression "(__n == 1)" (( "(") (binary_expression "__n == 1" (identifier "__n") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n          __dest[sVar5] = __dest[param_5];\n        }" ({ "{") (expression_statement "__dest[sVar5] = __dest[param_5];" (assignment_expression "__dest[sVar5] = __dest[param_5]" (subscript_expression "__dest[sVar5]" (identifier "__dest") ([ "[") (identifier "sVar5") (] "]")) (= "=") (subscript_expression "__dest[param_5]" (identifier "__dest") ([ "[") (identifier "param_5") (] "]"))) (; ";")) (} "}")) (else_clause "else if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" (else "else") (if_statement "if (__n != 0) {\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          memcpy(__dest + sVar5,__dest + param_5,__n);\n        }" ({ "{") (expression_statement "memcpy(__dest + sVar5,__dest + param_5,__n);" (call_expression "memcpy(__dest + sVar5,__dest + param_5,__n)" (identifier "memcpy") (argument_list "(__dest + sVar5,__dest + param_5,__n)" (( "(") (binary_expression "__dest + sVar5" (identifier "__dest") (+ "+") (identifier "sVar5")) (, ",") (binary_expression "__dest + param_5" (identifier "__dest") (+ "+") (identifier "param_5")) (, ",") (identifier "__n") () ")"))) (; ";")) (} "}"))))) (} "}")) (else_clause "else {\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" (else "else") (compound_statement "{\n        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" ({ "{") (expression_statement "__src = (undefined1 *)((long)param_4 + (param_5 - param_3));" (assignment_expression "__src = (undefined1 *)((long)param_4 + (param_5 - param_3))" (identifier "__src") (= "=") (cast_expression "(undefined1 *)((long)param_4 + (param_5 - param_3))" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_4 + (param_5 - param_3))" (( "(") (binary_expression "(long)param_4 + (param_5 - param_3)" (cast_expression "(long)param_4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_4")) (+ "+") (parenthesized_expression "(param_5 - param_3)" (( "(") (binary_expression "param_5 - param_3" (identifier "param_5") (- "-") (identifier "param_3")) () ")"))) () ")")))) (; ";")) (if_statement "if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }" (if "if") (parenthesized_expression "(param_5 == 1)" (( "(") (binary_expression "param_5 == 1" (identifier "param_5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n          *__dest = *__src;\n        }" ({ "{") (expression_statement "*__dest = *__src;" (assignment_expression "*__dest = *__src" (pointer_expression "*__dest" (* "*") (identifier "__dest")) (= "=") (pointer_expression "*__src" (* "*") (identifier "__src"))) (; ";")) (} "}")) (else_clause "else {\n          memcpy(__dest,__src,param_5);\n        }" (else "else") (compound_statement "{\n          memcpy(__dest,__src,param_5);\n        }" ({ "{") (expression_statement "memcpy(__dest,__src,param_5);" (call_expression "memcpy(__dest,__src,param_5)" (identifier "memcpy") (argument_list "(__dest,__src,param_5)" (( "(") (identifier "__dest") (, ",") (identifier "__src") (, ",") (identifier "param_5") () ")"))) (; ";")) (} "}")))) (} "}")))) (goto_statement "goto LAB_0027e718;" (goto "goto") (statement_identifier "LAB_0027e718") (; ";")) (} "}"))) (if_statement "if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" (if "if") (parenthesized_expression "(param_5 != 1)" (( "(") (binary_expression "param_5 != 1" (identifier "param_5") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n      memmove(__dest,param_4,param_5);\n      goto LAB_0027e718;\n    }" ({ "{") (expression_statement "memmove(__dest,param_4,param_5);" (call_expression "memmove(__dest,param_4,param_5)" (identifier "memmove") (argument_list "(__dest,param_4,param_5)" (( "(") (identifier "__dest") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (goto_statement "goto LAB_0027e718;" (goto "goto") (statement_identifier "LAB_0027e718") (; ";")) (} "}"))) (} "}")))) (expression_statement "*__dest = (char)*param_4;" (assignment_expression "*__dest = (char)*param_4" (pointer_expression "*__dest" (* "*") (identifier "__dest")) (= "=") (cast_expression "(char)*param_4" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*param_4" (* "*") (identifier "param_4")))) (; ";")) (labeled_statement "LAB_0027e718:\n  param_1[1] = uVar1;" (statement_identifier "LAB_0027e718") (: ":") (expression_statement "param_1[1] = uVar1;" (assignment_expression "param_1[1] = uVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar1")) (; ";"))) (expression_statement "*(undefined1 *)(*param_1 + uVar1) = 0;" (assignment_expression "*(undefined1 *)(*param_1 + uVar1) = 0" (pointer_expression "*(undefined1 *)(*param_1 + uVar1)" (* "*") (cast_expression "(undefined1 *)(*param_1 + uVar1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + uVar1)" (( "(") (binary_expression "*param_1 + uVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (identifier "uVar1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* std::string::_M_replace(unsigned long, unsigned long, char const*, unsigned long) */

type_2 * __thiscall
std::type_2::_M_replace(type_2 *var_1,type_1 var_10,type_1 var_2,char *var_12,type_1 var_4)

{
  type_1 var_8;
  type_2 *var_14;
  long var_3;
  size_t var_18;
  type_2 *var_6;
  type_1 var_7;
  size_t var_11;
  bool var_16;
  bool var_17;
  
  var_3 = *(long *)(var_1 + 8);
  if ((var_2 + 0x7fffffffffffffff) - var_3 < var_4) {
                    /* WARNING: Subroutine does not return */
    var_5("basic_string::_M_replace");
  }
  var_6 = *(type_2 **)var_1;
  var_8 = var_3 + (var_4 - var_2);
  if (var_6 == var_1 + 0x10) {
    var_7 = 0xf;
  }
  else {
    var_7 = *(type_1 *)(var_1 + 0x10);
  }
  if (var_7 < var_8) {
    var_9(var_1,var_10,var_2,var_12,var_4);
    goto LAB_0027e718;
  }
  var_14 = var_6 + var_10;
  var_11 = var_3 - (var_10 + var_2);
  var_16 = var_11 == 0;
  var_17 = var_2 == var_4;
  if ((var_12 < var_6) || (var_6 + var_3 < var_12)) {
    if (!var_16 && !var_17) {
      if (var_11 == 1) {
        var_14[var_4] = var_14[var_2];
      }
      else {
        var_13(var_14 + var_4,var_14 + var_2,var_11);
      }
    }
    if (var_4 == 0) goto LAB_0027e718;
    if (var_4 != 1) {
      var_15(var_14,var_12,var_4);
      goto LAB_0027e718;
    }
  }
  else {
    if ((var_4 == 0) || (var_2 < var_4)) {
LAB_0027e856:
      if (!var_16 && !var_17) goto LAB_0027e798;
    }
    else {
      if (var_4 == 1) {
        *var_14 = (type_2)*var_12;
        goto LAB_0027e856;
      }
      var_13(var_14,var_12,var_4);
      if (var_16 || var_17) goto LAB_0027e718;
LAB_0027e798:
      if (var_11 == 1) {
        var_14[var_4] = var_14[var_2];
      }
      else {
        var_13(var_14 + var_4,var_14 + var_2,var_11);
      }
    }
    if (var_4 <= var_2) goto LAB_0027e718;
    var_6 = var_14 + var_2;
    if (var_6 < (type_2 *)(var_12 + var_4)) {
      if (var_12 < var_6) {
        var_11 = (long)var_6 - (long)var_12;
        if (var_11 == 1) {
          *var_14 = (type_2)*var_12;
        }
        else if (var_11 != 0) {
          var_13(var_14,var_12,var_11);
        }
        var_18 = var_4 - var_11;
        if (var_18 == 1) {
          var_14[var_11] = var_14[var_4];
        }
        else if (var_18 != 0) {
          var_15(var_14 + var_11,var_14 + var_4,var_18);
        }
      }
      else if (var_4 == 1) {
        *var_14 = *(type_2 *)(var_12 + (var_4 - var_2));
      }
      else {
        var_15(var_14,(type_2 *)(var_12 + (var_4 - var_2)),var_4);
      }
      goto LAB_0027e718;
    }
    if (var_4 != 1) {
      var_13(var_14,var_12,var_4);
      goto LAB_0027e718;
    }
  }
  *var_14 = (type_2)*var_12;
LAB_0027e718:
  *(type_1 *)(var_1 + 8) = var_8;
  *(type_3 *)(*(long *)var_1 + var_8) = 0;
  return var_1;
}


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

long * MASKED(long *param_1,long param_2,ulong param_3,long *param_4,ulong param_5)

{
  ulong uVar1;
  undefined1 *__dest;
  undefined1 *__src;
  long lVar2;
  size_t __n;
  long *plVar3;
  ulong uVar4;
  size_t sVar5;
  bool bVar6;
  bool bVar7;
  
  lVar2 = param_1[1];
  if ((param_3 + 0x7fffffffffffffff) - lVar2 < param_5) {
                    /* WARNING: Subroutine does not return */
    FUN_002b5650("basic_string::_M_replace");
  }
  plVar3 = (long *)*param_1;
  uVar1 = lVar2 + (param_5 - param_3);
  if (plVar3 == param_1 + 2) {
    uVar4 = 0xf;
  }
  else {
    uVar4 = param_1[2];
  }
  if (uVar4 < uVar1) {
    FUN_0027da10(param_1,param_2,param_3);
    goto LAB_0027e718;
  }
  __dest = (undefined1 *)((long)plVar3 + param_2);
  sVar5 = lVar2 - (param_2 + param_3);
  bVar6 = sVar5 == 0;
  bVar7 = param_3 == param_5;
  if ((param_4 < plVar3) || ((long *)(lVar2 + (long)plVar3) < param_4)) {
    if (!bVar6 && !bVar7) {
      if (sVar5 == 1) {
        __dest[param_5] = __dest[param_3];
      }
      else {
        memmove(__dest + param_5,__dest + param_3,sVar5);
      }
    }
    if (param_5 == 0) goto LAB_0027e718;
    if (param_5 != 1) {
      memcpy(__dest,param_4,param_5);
      goto LAB_0027e718;
    }
  }
  else {
    if ((param_5 == 0) || (param_3 < param_5)) {
LAB_0027e856:
      if (!bVar6 && !bVar7) goto LAB_0027e798;
    }
    else {
      if (param_5 == 1) {
        *__dest = (char)*param_4;
        goto LAB_0027e856;
      }
      memmove(__dest,param_4,param_5);
      if (bVar6 || bVar7) goto LAB_0027e718;
LAB_0027e798:
      if (sVar5 == 1) {
        __dest[param_5] = __dest[param_3];
      }
      else {
        memmove(__dest + param_5,__dest + param_3,sVar5);
      }
    }
    if (param_5 <= param_3) goto LAB_0027e718;
    plVar3 = (long *)(__dest + param_3);
    if (plVar3 < (long *)((long)param_4 + param_5)) {
      if (param_4 < plVar3) {
        sVar5 = (long)plVar3 - (long)param_4;
        if (sVar5 == 1) {
          *__dest = (char)*param_4;
        }
        else if (sVar5 != 0) {
          memmove(__dest,param_4,sVar5);
        }
        __n = param_5 - sVar5;
        if (__n == 1) {
          __dest[sVar5] = __dest[param_5];
        }
        else if (__n != 0) {
          memcpy(__dest + sVar5,__dest + param_5,__n);
        }
      }
      else {
        __src = (undefined1 *)((long)param_4 + (param_5 - param_3));
        if (param_5 == 1) {
          *__dest = *__src;
        }
        else {
          memcpy(__dest,__src,param_5);
        }
      }
      goto LAB_0027e718;
    }
    if (param_5 != 1) {
      memmove(__dest,param_4,param_5);
      goto LAB_0027e718;
    }
  }
  *__dest = (char)*param_4;
LAB_0027e718:
  param_1[1] = uVar1;
  *(undefined1 *)(*param_1 + uVar1) = 0;
  return param_1;
}

