
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* std::string::_M_replace(unsigned int, unsigned int, char const*, unsigned int) */

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

{
  uint uVar1;
  string *__dest;
  int iVar2;
  string *psVar3;
  size_t __n;
  size_t sVar4;
  uint uVar5;
  bool bVar6;
  bool bVar7;
  
  iVar2 = *(int *)(this + 4);
  if ((param_2 + 0x7fffffff) - iVar2 < param_4) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error("basic_string::_M_replace");
  }
  uVar1 = iVar2 + (param_4 - param_2);
  psVar3 = *(string **)this;
  if (psVar3 == this + 8) {
    uVar5 = 0xf;
  }
  else {
    uVar5 = *(uint *)(this + 8);
  }
  if (uVar5 < uVar1) {
    _M_mutate(this,param_1,param_2,param_3,param_4);
    goto LAB_001efac7;
  }
  __dest = psVar3 + param_1;
  sVar4 = iVar2 - (param_1 + param_2);
  bVar6 = sVar4 != 0;
  bVar7 = param_2 != param_4;
  if ((param_3 < psVar3) || (psVar3 + iVar2 < param_3)) {
    if (bVar7 && bVar6) {
      if (sVar4 == 1) {
        __dest[param_4] = __dest[param_2];
      }
      else {
        memmove(__dest + param_4,__dest + param_2,sVar4);
      }
    }
    if (param_4 == 0) goto LAB_001efac7;
    if (param_4 != 1) {
      memcpy(__dest,param_3,param_4);
      goto LAB_001efac7;
    }
  }
  else {
    if ((param_4 == 0) || (param_2 < param_4)) {
LAB_001efc25:
      if (bVar7 && bVar6) goto LAB_001efb30;
    }
    else {
      if (param_4 == 1) {
        *__dest = (string)*param_3;
        goto LAB_001efc25;
      }
      memmove(__dest,param_3,param_4);
      if (!bVar7 || !bVar6) goto LAB_001efac7;
LAB_001efb30:
      if (sVar4 == 1) {
        __dest[param_4] = __dest[param_2];
      }
      else {
        memmove(__dest + param_4,__dest + param_2,sVar4);
      }
    }
    if (param_4 <= param_2) goto LAB_001efac7;
    psVar3 = __dest + param_2;
    if (psVar3 < (string *)(param_3 + param_4)) {
      if (param_3 < psVar3) {
        sVar4 = (int)psVar3 - (int)param_3;
        if (sVar4 == 1) {
          *__dest = (string)*param_3;
        }
        else if (sVar4 != 0) {
          memmove(__dest,param_3,sVar4);
        }
        __n = param_4 - sVar4;
        if (__n == 1) {
          __dest[sVar4] = __dest[param_4];
        }
        else if (__n != 0) {
          memcpy(__dest + sVar4,__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_001efac7;
    }
    if (param_4 != 1) {
      memmove(__dest,param_3,param_4);
      goto LAB_001efac7;
    }
  }
  *__dest = (string)*param_3;
LAB_001efac7:
  *(uint *)(this + 4) = uVar1;
  *(undefined1 *)(*(int *)this + uVar1) = 0;
  return this;
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int * FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)

{
  uint uVar1;
  undefined1 *__dest;
  int iVar2;
  int *piVar3;
  undefined1 *__src;
  size_t __n;
  size_t sVar4;
  uint uVar5;
  bool bVar6;
  bool bVar7;
  
  iVar2 = param_1[1];
  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {
                    /* WARNING: Subroutine does not return */
    FUN_0022c7a0("basic_string::_M_replace");
  }
  uVar1 = iVar2 + (param_5 - param_3);
  piVar3 = (int *)*param_1;
  if (piVar3 == param_1 + 2) {
    uVar5 = 0xf;
  }
  else {
    uVar5 = param_1[2];
  }
  if (uVar5 < uVar1) {
    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);
    goto LAB_001efac7;
  }
  __dest = (undefined1 *)((int)piVar3 + param_2);
  sVar4 = iVar2 - (param_2 + param_3);
  bVar6 = sVar4 != 0;
  bVar7 = param_3 != param_5;
  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {
    if (bVar7 && bVar6) {
      if (sVar4 == 1) {
        __dest[param_5] = __dest[param_3];
      }
      else {
        memmove(__dest + param_5,__dest + param_3,sVar4);
      }
    }
    if (param_5 == 0) goto LAB_001efac7;
    if (param_5 != 1) {
      memcpy(__dest,param_4,param_5);
      goto LAB_001efac7;
    }
  }
  else {
    if ((param_5 == 0) || (param_3 < param_5)) {
LAB_001efc25:
      if (bVar7 && bVar6) goto LAB_001efb30;
    }
    else {
      if (param_5 == 1) {
        *__dest = (char)*param_4;
        goto LAB_001efc25;
      }
      memmove(__dest,param_4,param_5);
      if (!bVar7 || !bVar6) goto LAB_001efac7;
LAB_001efb30:
      if (sVar4 == 1) {
        __dest[param_5] = __dest[param_3];
      }
      else {
        memmove(__dest + param_5,__dest + param_3,sVar4);
      }
    }
    if (param_5 <= param_3) goto LAB_001efac7;
    piVar3 = (int *)(__dest + param_3);
    if (piVar3 < (int *)((int)param_4 + param_5)) {
      if (param_4 < piVar3) {
        sVar4 = (int)piVar3 - (int)param_4;
        if (sVar4 == 1) {
          *__dest = (char)*param_4;
        }
        else if (sVar4 != 0) {
          memmove(__dest,param_4,sVar4);
        }
        __n = param_5 - sVar4;
        if (__n == 1) {
          __dest[sVar4] = __dest[param_5];
        }
        else if (__n != 0) {
          memcpy(__dest + sVar4,__dest + param_5,__n);
        }
      }
      else {
        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);
        if (param_5 == 1) {
          *__dest = *__src;
        }
        else {
          memcpy(__dest,__src,param_5);
        }
      }
      goto LAB_001efac7;
    }
    if (param_5 != 1) {
      memmove(__dest,param_4,param_5);
      goto LAB_001efac7;
    }
  }
  *__dest = (char)*param_4;
LAB_001efac7:
  param_1[1] = uVar1;
  *(undefined1 *)(*param_1 + uVar1) = 0;
  return param_1;
}


CALL 0x000559e6
ADD EAX,0x19f60b
PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x2c
MOV ESI,dword ptr [ESP + 0x40]
MOV ECX,dword ptr [ESP + 0x48]
MOV dword ptr [ESP + 0xc],EAX
MOV EDI,dword ptr [ESP + 0x50]
MOV EBX,dword ptr [ESP + 0x44]
MOV EAX,dword ptr [ESI + 0x4]
LEA EDX,[ECX + 0x7fffffff]
SUB EDX,EAX
CMP EDI,EDX
JA 0x001efcf6
MOV ECX,EDI
SUB ECX,dword ptr [ESP + 0x48]
LEA EDX,[ESI + 0x8]
MOV dword ptr [ESP + 0x18],ECX
LEA EBP,[EAX + ECX*0x1]
MOV ECX,dword ptr [ESI]
CMP ECX,EDX
JZ 0x001efc08
MOV EDX,dword ptr [ESI + 0x8]
CMP EDX,EBP
JC 0x001efbb8
LEA EDX,[ECX + EBX*0x1]
ADD EBX,dword ptr [ESP + 0x48]
MOV dword ptr [ESP + 0x10],EDX
MOV EDX,EAX
SUB EDX,EBX
SETNZ BL
CMP dword ptr [ESP + 0x48],EDI
MOV dword ptr [ESP + 0x14],EDX
SETNZ DL
AND EDX,EBX
CMP ECX,dword ptr [ESP + 0x4c]
JBE 0x001efae0
TEST DL,DL
JZ 0x001efaa2
MOV EAX,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [ESP + 0x48]
ADD EDX,EAX
ADD EAX,EDI
CMP dword ptr [ESP + 0x14],0x1
JZ 0x001efbf8
SUB ESP,0x4
PUSH dword ptr [ESP + 0x18]
PUSH EDX
PUSH EAX
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000298a0
ADD ESP,0x10
TEST EDI,EDI
JZ 0x001efac7
CMP EDI,0x1
JZ 0x001efbe0
SUB ESP,0x4
PUSH EDI
PUSH dword ptr [ESP + 0x54]
PUSH dword ptr [ESP + 0x1c]
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000295c0
ADD ESP,0x10
MOV EAX,dword ptr [ESI]
MOV dword ptr [ESI + 0x4],EBP
MOV byte ptr [EAX + EBP*0x1],0x0
ADD ESP,0x2c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD EAX,ECX
CMP dword ptr [ESP + 0x4c],EAX
JA 0x001efa72
TEST EDI,EDI
JZ 0x001efc25
CMP dword ptr [ESP + 0x48],EDI
JC 0x001efc25
CMP EDI,0x1
JZ 0x001efc18
MOV byte ptr [ESP + 0x1f],DL
SUB ESP,0x4
PUSH EDI
PUSH dword ptr [ESP + 0x54]
PUSH dword ptr [ESP + 0x1c]
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000298a0
ADD ESP,0x10
MOVZX EDX,byte ptr [ESP + 0x1f]
TEST DL,DL
JZ 0x001efac7
LEA ESI,[ESI]
NOP
MOV EBX,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [ESP + 0x48]
ADD EAX,EBX
CMP dword ptr [ESP + 0x14],0x1
LEA EDX,[EBX + EDI*0x1]
JZ 0x001efc60
SUB ESP,0x4
PUSH dword ptr [ESP + 0x18]
PUSH EAX
PUSH EDX
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000298a0
ADD ESP,0x10
CMP dword ptr [ESP + 0x48],EDI
JNC 0x001efac7
MOV EDX,dword ptr [ESP + 0x4c]
MOV EAX,dword ptr [ESP + 0x10]
ADD EAX,dword ptr [ESP + 0x48]
ADD EDX,EDI
CMP EAX,EDX
JNC 0x001efc38
CMP EAX,dword ptr [ESP + 0x4c]
JA 0x001efc70
MOV EAX,dword ptr [ESP + 0x18]
ADD EAX,dword ptr [ESP + 0x4c]
CMP EDI,0x1
JZ 0x001efce8
SUB ESP,0x4
PUSH EDI
PUSH EAX
PUSH dword ptr [ESP + 0x1c]
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000295c0
ADD ESP,0x10
JMP 0x001efac7
SUB ESP,0xc
PUSH EDI
PUSH dword ptr [ESP + 0x5c]
PUSH dword ptr [ESP + 0x5c]
PUSH EBX
PUSH ESI
MOV EBX,dword ptr [ESP + 0x2c]
CALL 0x001eeaa0
ADD ESP,0x20
JMP 0x001efac7
MOV EAX,dword ptr [ESP + 0x4c]
MOV EDI,dword ptr [ESP + 0x10]
MOVZX EAX,byte ptr [EAX]
MOV byte ptr [EDI],AL
JMP 0x001efac7
MOVZX EDX,byte ptr [EDX]
MOV byte ptr [EAX],DL
JMP 0x001efaa2
MOV EDX,0xf
JMP 0x001efa45
MOV EAX,dword ptr [ESP + 0x4c]
MOV EBX,dword ptr [ESP + 0x10]
MOVZX EAX,byte ptr [EAX]
MOV byte ptr [EBX],AL
TEST DL,DL
JZ 0x001efb5d
JMP 0x001efb30
CMP EDI,0x1
JZ 0x001efbe0
SUB ESP,0x4
PUSH EDI
PUSH dword ptr [ESP + 0x54]
PUSH dword ptr [ESP + 0x1c]
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000298a0
ADD ESP,0x10
JMP 0x001efac7
MOVZX EAX,byte ptr [EAX]
MOV byte ptr [EDX],AL
JMP 0x001efb5d
SUB EAX,dword ptr [ESP + 0x4c]
MOV EDX,EAX
CMP EAX,0x1
JZ 0x001efccf
TEST EAX,EAX
JZ 0x001efc9f
SUB ESP,0x4
PUSH EAX
MOV dword ptr [ESP + 0x1c],EAX
PUSH dword ptr [ESP + 0x54]
PUSH dword ptr [ESP + 0x1c]
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000298a0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x14]
MOV ECX,EDI
MOV EAX,dword ptr [ESP + 0x10]
SUB ECX,EDX
ADD EDI,EAX
ADD EAX,EDX
CMP ECX,0x1
JZ 0x001efcde
TEST ECX,ECX
JZ 0x001efac7
SUB ESP,0x4
PUSH ECX
PUSH EDI
PUSH EAX
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000295c0
ADD ESP,0x10
JMP 0x001efac7
MOV EAX,dword ptr [ESP + 0x4c]
MOV EBX,dword ptr [ESP + 0x10]
MOVZX EAX,byte ptr [EAX]
MOV byte ptr [EBX],AL
JMP 0x001efc9f
MOVZX EDX,byte ptr [EDI]
MOV byte ptr [EAX],DL
JMP 0x001efac7
MOVZX EAX,byte ptr [EAX]
MOV EDI,dword ptr [ESP + 0x10]
MOV byte ptr [EDI],AL
JMP 0x001efac7
SUB ESP,0xc
MOV EBX,dword ptr [ESP + 0x18]
LEA EAX,[EBX + 0xfff14d68]
PUSH EAX
CALL 0x0022c7a0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nint * FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)\n\n{\n  uint uVar1;\n  undefined1 *__dest;\n  int iVar2;\n  int *piVar3;\n  undefined1 *__src;\n  size_t __n;\n  size_t sVar4;\n  uint uVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  iVar2 = param_1[1];\n  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::_M_replace");\n  }\n  uVar1 = iVar2 + (param_5 - param_3);\n  piVar3 = (int *)*param_1;\n  if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }\n  if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }\n  __dest = (undefined1 *)((int)piVar3 + param_2);\n  sVar4 = iVar2 - (param_2 + param_3);\n  bVar6 = sVar4 != 0;\n  bVar7 = param_3 != param_5;\n  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_001efac7:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}\n\n" comment (function_definition "int * FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)\n\n{\n  uint uVar1;\n  undefined1 *__dest;\n  int iVar2;\n  int *piVar3;\n  undefined1 *__src;\n  size_t __n;\n  size_t sVar4;\n  uint uVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  iVar2 = param_1[1];\n  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::_M_replace");\n  }\n  uVar1 = iVar2 + (param_5 - param_3);\n  piVar3 = (int *)*param_1;\n  if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }\n  if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }\n  __dest = (undefined1 *)((int)piVar3 + param_2);\n  sVar4 = iVar2 - (param_2 + param_3);\n  bVar6 = sVar4 != 0;\n  bVar7 = param_3 != param_5;\n  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_001efac7:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)" * (function_declarator "FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)" identifier (parameter_list "(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "uint param_5" type_identifier identifier) )))) (compound_statement "{\n  uint uVar1;\n  undefined1 *__dest;\n  int iVar2;\n  int *piVar3;\n  undefined1 *__src;\n  size_t __n;\n  size_t sVar4;\n  uint uVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  iVar2 = param_1[1];\n  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::_M_replace");\n  }\n  uVar1 = iVar2 + (param_5 - param_3);\n  piVar3 = (int *)*param_1;\n  if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }\n  if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }\n  __dest = (undefined1 *)((int)piVar3 + param_2);\n  sVar4 = iVar2 - (param_2 + param_3);\n  bVar6 = sVar4 != 0;\n  bVar7 = param_3 != param_5;\n  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_001efac7:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined1 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined1 *__src;" type_identifier (pointer_declarator "*__src" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "iVar2 = param_1[1];" (assignment_expression "iVar2 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::_M_replace");\n  }" if (parenthesized_expression "((param_3 + 0x7fffffff) - iVar2 < param_5)" ( (binary_expression "(param_3 + 0x7fffffff) - iVar2 < param_5" (binary_expression "(param_3 + 0x7fffffff) - iVar2" (parenthesized_expression "(param_3 + 0x7fffffff)" ( (binary_expression "param_3 + 0x7fffffff" identifier + number_literal) )) - identifier) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::_M_replace");\n  }" { comment (expression_statement "FUN_0022c7a0("basic_string::_M_replace");" (call_expression "FUN_0022c7a0("basic_string::_M_replace")" identifier (argument_list "("basic_string::_M_replace")" ( (string_literal ""basic_string::_M_replace"" " string_content ") ))) ;) })) (expression_statement "uVar1 = iVar2 + (param_5 - param_3);" (assignment_expression "uVar1 = iVar2 + (param_5 - param_3)" identifier = (binary_expression "iVar2 + (param_5 - param_3)" identifier + (parenthesized_expression "(param_5 - param_3)" ( (binary_expression "param_5 - param_3" identifier - identifier) )))) ;) (expression_statement "piVar3 = (int *)*param_1;" (assignment_expression "piVar3 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }" if (parenthesized_expression "(piVar3 == param_1 + 2)" ( (binary_expression "piVar3 == param_1 + 2" identifier == (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n    uVar5 = 0xf;\n  }" { (expression_statement "uVar5 = 0xf;" (assignment_expression "uVar5 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar5 = param_1[2];\n  }" else (compound_statement "{\n    uVar5 = param_1[2];\n  }" { (expression_statement "uVar5 = param_1[2];" (assignment_expression "uVar5 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }" if (parenthesized_expression "(uVar5 < uVar1)" ( (binary_expression "uVar5 < uVar1" identifier < identifier) )) (compound_statement "{\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }" { (expression_statement "FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);" (call_expression "FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5)" identifier (argument_list "(param_1,param_2,param_3,param_4,param_5)" ( identifier , identifier , identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;) })) (expression_statement "__dest = (undefined1 *)((int)piVar3 + param_2);" (assignment_expression "__dest = (undefined1 *)((int)piVar3 + param_2)" identifier = (cast_expression "(undefined1 *)((int)piVar3 + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar3 + param_2)" ( (binary_expression "(int)piVar3 + param_2" (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "sVar4 = iVar2 - (param_2 + param_3);" (assignment_expression "sVar4 = iVar2 - (param_2 + param_3)" identifier = (binary_expression "iVar2 - (param_2 + param_3)" identifier - (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )))) ;) (expression_statement "bVar6 = sVar4 != 0;" (assignment_expression "bVar6 = sVar4 != 0" identifier = (binary_expression "sVar4 != 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 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" if (parenthesized_expression "((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4))" ( (binary_expression "(param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)" (parenthesized_expression "(param_4 < piVar3)" ( (binary_expression "param_4 < piVar3" identifier < identifier) )) || (parenthesized_expression "((int *)(iVar2 + (int)piVar3) < param_4)" ( (binary_expression "(int *)(iVar2 + (int)piVar3) < param_4" (cast_expression "(int *)(iVar2 + (int)piVar3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + (int)piVar3)" ( (binary_expression "iVar2 + (int)piVar3" identifier + (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < identifier) ))) )) (compound_statement "{\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" { (if_statement "if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" if (parenthesized_expression "(bVar7 && bVar6)" ( (binary_expression "bVar7 && bVar6" identifier && identifier) )) (compound_statement "{\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" { (if_statement "if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 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,sVar4);\n      }" else (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" { (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar4);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar4)" identifier (argument_list "(__dest + param_5,__dest + param_3,sVar4)" ( (binary_expression "__dest + param_5" identifier + identifier) , (binary_expression "__dest + param_3" identifier + identifier) , identifier ))) ;) }))) })) (if_statement "if (param_5 == 0) goto LAB_001efac7;" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;)) (if_statement "if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\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_001efac7;\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_001efac7;" goto statement_identifier ;) })) }) (else_clause "else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" else (compound_statement "{\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" { (if_statement "if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\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_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }" { (labeled_statement "LAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;" statement_identifier : (if_statement "if (bVar7 && bVar6) goto LAB_001efb30;" if (parenthesized_expression "(bVar7 && bVar6)" ( (binary_expression "bVar7 && bVar6" identifier && identifier) )) (goto_statement "goto LAB_001efb30;" goto statement_identifier ;))) }) (else_clause "else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" else (compound_statement "{\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" { (if_statement "if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\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_001efc25;\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_001efc25;" 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 (!bVar7 || !bVar6) goto LAB_001efac7;" if (parenthesized_expression "(!bVar7 || !bVar6)" ( (binary_expression "!bVar7 || !bVar6" (unary_expression "!bVar7" ! identifier) || (unary_expression "!bVar6" ! identifier)) )) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;)) (labeled_statement "LAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" statement_identifier : (if_statement "if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 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,sVar4);\n      }" else (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" { (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar4);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar4)" identifier (argument_list "(__dest + param_5,__dest + param_3,sVar4)" ( (binary_expression "__dest + param_5" identifier + identifier) , (binary_expression "__dest + param_3" identifier + identifier) , identifier ))) ;) })))) }))) (if_statement "if (param_5 <= param_3) goto LAB_001efac7;" if (parenthesized_expression "(param_5 <= param_3)" ( (binary_expression "param_5 <= param_3" identifier <= identifier) )) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;)) (expression_statement "piVar3 = (int *)(__dest + param_3);" (assignment_expression "piVar3 = (int *)(__dest + param_3)" identifier = (cast_expression "(int *)(__dest + param_3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__dest + param_3)" ( (binary_expression "__dest + param_3" identifier + identifier) )))) ;) (if_statement "if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }" if (parenthesized_expression "(piVar3 < (int *)((int)param_4 + param_5))" ( (binary_expression "piVar3 < (int *)((int)param_4 + param_5)" identifier < (cast_expression "(int *)((int)param_4 + param_5)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + param_5)" ( (binary_expression "(int)param_4 + param_5" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) )) (compound_statement "{\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }" { (if_statement "if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" if (parenthesized_expression "(param_4 < piVar3)" ( (binary_expression "param_4 < piVar3" identifier < identifier) )) (compound_statement "{\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }" { (expression_statement "sVar4 = (int)piVar3 - (int)param_4;" (assignment_expression "sVar4 = (int)piVar3 - (int)param_4" identifier = (binary_expression "(int)piVar3 - (int)param_4" (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 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 (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }" else (if_statement "if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }" if (parenthesized_expression "(sVar4 != 0)" ( (binary_expression "sVar4 != 0" identifier != number_literal) )) (compound_statement "{\n          memmove(__dest,param_4,sVar4);\n        }" { (expression_statement "memmove(__dest,param_4,sVar4);" (call_expression "memmove(__dest,param_4,sVar4)" identifier (argument_list "(__dest,param_4,sVar4)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "__n = param_5 - sVar4;" (assignment_expression "__n = param_5 - sVar4" identifier = (binary_expression "param_5 - sVar4" identifier - identifier)) ;) (if_statement "if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n          __dest[sVar4] = __dest[param_5];\n        }" { (expression_statement "__dest[sVar4] = __dest[param_5];" (assignment_expression "__dest[sVar4] = __dest[param_5]" (subscript_expression "__dest[sVar4]" identifier [ identifier ]) = (subscript_expression "__dest[param_5]" identifier [ identifier ])) ;) }) (else_clause "else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" else (if_statement "if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" { (expression_statement "memcpy(__dest + sVar4,__dest + param_5,__n);" (call_expression "memcpy(__dest + sVar4,__dest + param_5,__n)" identifier (argument_list "(__dest + sVar4,__dest + param_5,__n)" ( (binary_expression "__dest + sVar4" identifier + identifier) , (binary_expression "__dest + param_5" identifier + identifier) , identifier ))) ;) })))) }) (else_clause "else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\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 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" { (expression_statement "__src = (undefined1 *)((param_5 - param_3) + (int)param_4);" (assignment_expression "__src = (undefined1 *)((param_5 - param_3) + (int)param_4)" identifier = (cast_expression "(undefined1 *)((param_5 - param_3) + (int)param_4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((param_5 - param_3) + (int)param_4)" ( (binary_expression "(param_5 - param_3) + (int)param_4" (parenthesized_expression "(param_5 - param_3)" ( (binary_expression "param_5 - param_3" identifier - identifier) )) + (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) 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_001efac7;" goto statement_identifier ;) })) (if_statement "if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\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_001efac7;\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_001efac7;" 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_001efac7:\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 "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* std::string::_M_replace(unsigned int, unsigned int, char const*, unsigned int) */\n\nstring * __thiscall\nstd::string::_M_replace(string *this,uint param_1,uint param_2,char *param_3,uint param_4)\n\n{\n  uint uVar1;\n  string *__dest;\n  int iVar2;\n  string *psVar3;\n  size_t __n;\n  size_t sVar4;\n  uint uVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  iVar2 = *(int *)(this + 4);\n  if ((param_2 + 0x7fffffff) - iVar2 < param_4) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_replace");\n  }\n  uVar1 = iVar2 + (param_4 - param_2);\n  psVar3 = *(string **)this;\n  if (psVar3 == this + 8) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = *(uint *)(this + 8);\n  }\n  if (uVar5 < uVar1) {\n    _M_mutate(this,param_1,param_2,param_3,param_4);\n    goto LAB_001efac7;\n  }\n  __dest = psVar3 + param_1;\n  sVar4 = iVar2 - (param_1 + param_2);\n  bVar6 = sVar4 != 0;\n  bVar7 = param_2 != param_4;\n  if ((param_3 < psVar3) || (psVar3 + iVar2 < param_3)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }\n    if (param_4 == 0) goto LAB_001efac7;\n    if (param_4 != 1) {\n      memcpy(__dest,param_3,param_4);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_3,param_4);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }\n    if (param_4 <= param_2) goto LAB_001efac7;\n    psVar3 = __dest + param_2;\n    if (psVar3 < (string *)(param_3 + param_4)) {\n      if (param_3 < psVar3) {\n        sVar4 = (int)psVar3 - (int)param_3;\n        if (sVar4 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }\n        __n = param_4 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__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_001efac7;\n    }\n    if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_001efac7;\n    }\n  }\n  *__dest = (string)*param_3;\nLAB_001efac7:\n  *(uint *)(this + 4) = uVar1;\n  *(undefined1 *)(*(int *)this + uVar1) = 0;\n  return this;\n}\n\n" comment 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 "uint param_1,uint param_2,char *param_3,uint param_4)\n\n{\n  uint uVar1;" type_identifier identifier , (ERROR "uint" identifier) identifier , (ERROR "char" identifier) (pointer_declarator "*param_3" * identifier) , (ERROR "uint param_4)\n\n{\n  uint" identifier identifier ) { identifier) identifier ;) (declaration "string *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "string *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "iVar2 = *(int *)(this + 4);" (assignment_expression "iVar2 = *(int *)(this + 4)" identifier = (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) ))))) ;) (if_statement "if ((param_2 + 0x7fffffff) - iVar2 < param_4) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_M_replace");\n  }" if (parenthesized_expression "((param_2 + 0x7fffffff) - iVar2 < param_4)" ( (binary_expression "(param_2 + 0x7fffffff) - iVar2 < param_4" (binary_expression "(param_2 + 0x7fffffff) - iVar2" (parenthesized_expression "(param_2 + 0x7fffffff)" ( (binary_expression "param_2 + 0x7fffffff" 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 "uVar1 = iVar2 + (param_4 - param_2);" (assignment_expression "uVar1 = iVar2 + (param_4 - param_2)" identifier = (binary_expression "iVar2 + (param_4 - param_2)" identifier + (parenthesized_expression "(param_4 - param_2)" ( (binary_expression "param_4 - param_2" identifier - identifier) )))) ;) (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))) ;) (if_statement "if (psVar3 == this + 8) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = *(uint *)(this + 8);\n  }" if (parenthesized_expression "(psVar3 == this + 8)" ( (binary_expression "psVar3 == this + 8" identifier == (binary_expression "this + 8" identifier + number_literal)) )) (compound_statement "{\n    uVar5 = 0xf;\n  }" { (expression_statement "uVar5 = 0xf;" (assignment_expression "uVar5 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar5 = *(uint *)(this + 8);\n  }" else (compound_statement "{\n    uVar5 = *(uint *)(this + 8);\n  }" { (expression_statement "uVar5 = *(uint *)(this + 8);" (assignment_expression "uVar5 = *(uint *)(this + 8)" identifier = (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) }))) (if_statement "if (uVar5 < uVar1) {\n    _M_mutate(this,param_1,param_2,param_3,param_4);\n    goto LAB_001efac7;\n  }" if (parenthesized_expression "(uVar5 < uVar1)" ( (binary_expression "uVar5 < uVar1" identifier < identifier) )) (compound_statement "{\n    _M_mutate(this,param_1,param_2,param_3,param_4);\n    goto LAB_001efac7;\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_001efac7;" 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 "sVar4 = iVar2 - (param_1 + param_2);" (assignment_expression "sVar4 = iVar2 - (param_1 + param_2)" identifier = (binary_expression "iVar2 - (param_1 + param_2)" identifier - (parenthesized_expression "(param_1 + param_2)" ( (binary_expression "param_1 + param_2" identifier + identifier) )))) ;) (expression_statement "bVar6 = sVar4 != 0;" (assignment_expression "bVar6 = sVar4 != 0" identifier = (binary_expression "sVar4 != 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 + iVar2 < param_3)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }\n    if (param_4 == 0) goto LAB_001efac7;\n    if (param_4 != 1) {\n      memcpy(__dest,param_3,param_4);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_3,param_4);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }\n    if (param_4 <= param_2) goto LAB_001efac7;\n    psVar3 = __dest + param_2;\n    if (psVar3 < (string *)(param_3 + param_4)) {\n      if (param_3 < psVar3) {\n        sVar4 = (int)psVar3 - (int)param_3;\n        if (sVar4 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }\n        __n = param_4 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__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_001efac7;\n    }\n    if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_001efac7;\n    }\n  }" if (parenthesized_expression "((param_3 < psVar3) || (psVar3 + iVar2 < param_3))" ( (binary_expression "(param_3 < psVar3) || (psVar3 + iVar2 < param_3)" (parenthesized_expression "(param_3 < psVar3)" ( (binary_expression "param_3 < psVar3" identifier < identifier) )) || (parenthesized_expression "(psVar3 + iVar2 < param_3)" ( (binary_expression "psVar3 + iVar2 < param_3" (binary_expression "psVar3 + iVar2" identifier + identifier) < identifier) ))) )) (compound_statement "{\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }\n    if (param_4 == 0) goto LAB_001efac7;\n    if (param_4 != 1) {\n      memcpy(__dest,param_3,param_4);\n      goto LAB_001efac7;\n    }\n  }" { (if_statement "if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }" if (parenthesized_expression "(bVar7 && bVar6)" ( (binary_expression "bVar7 && bVar6" identifier && identifier) )) (compound_statement "{\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }" { (if_statement "if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 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,sVar4);\n      }" else (compound_statement "{\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }" { (expression_statement "memmove(__dest + param_4,__dest + param_2,sVar4);" (call_expression "memmove(__dest + param_4,__dest + param_2,sVar4)" identifier (argument_list "(__dest + param_4,__dest + param_2,sVar4)" ( (binary_expression "__dest + param_4" identifier + identifier) , (binary_expression "__dest + param_2" identifier + identifier) , identifier ))) ;) }))) })) (if_statement "if (param_4 == 0) goto LAB_001efac7;" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;)) (if_statement "if (param_4 != 1) {\n      memcpy(__dest,param_3,param_4);\n      goto LAB_001efac7;\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_001efac7;\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_001efac7;" goto statement_identifier ;) })) }) (else_clause "else {\n    if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_3,param_4);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }\n    if (param_4 <= param_2) goto LAB_001efac7;\n    psVar3 = __dest + param_2;\n    if (psVar3 < (string *)(param_3 + param_4)) {\n      if (param_3 < psVar3) {\n        sVar4 = (int)psVar3 - (int)param_3;\n        if (sVar4 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }\n        __n = param_4 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__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_001efac7;\n    }\n    if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_001efac7;\n    }\n  }" else (compound_statement "{\n    if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_3,param_4);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }\n    if (param_4 <= param_2) goto LAB_001efac7;\n    psVar3 = __dest + param_2;\n    if (psVar3 < (string *)(param_3 + param_4)) {\n      if (param_3 < psVar3) {\n        sVar4 = (int)psVar3 - (int)param_3;\n        if (sVar4 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }\n        __n = param_4 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__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_001efac7;\n    }\n    if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_001efac7;\n    }\n  }" { (if_statement "if ((param_4 == 0) || (param_2 < param_4)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_3,param_4);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\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_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }" { (labeled_statement "LAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;" statement_identifier : (if_statement "if (bVar7 && bVar6) goto LAB_001efb30;" if (parenthesized_expression "(bVar7 && bVar6)" ( (binary_expression "bVar7 && bVar6" identifier && identifier) )) (goto_statement "goto LAB_001efb30;" goto statement_identifier ;))) }) (else_clause "else {\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_3,param_4);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }" else (compound_statement "{\n      if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_3,param_4);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }\n    }" { (if_statement "if (param_4 == 1) {\n        *__dest = (string)*param_3;\n        goto LAB_001efc25;\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_001efc25;\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_001efc25;" 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 (!bVar7 || !bVar6) goto LAB_001efac7;" if (parenthesized_expression "(!bVar7 || !bVar6)" ( (binary_expression "!bVar7 || !bVar6" (unary_expression "!bVar7" ! identifier) || (unary_expression "!bVar6" ! identifier)) )) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;)) (labeled_statement "LAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }" statement_identifier : (if_statement "if (sVar4 == 1) {\n        __dest[param_4] = __dest[param_2];\n      }\n      else {\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 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,sVar4);\n      }" else (compound_statement "{\n        memmove(__dest + param_4,__dest + param_2,sVar4);\n      }" { (expression_statement "memmove(__dest + param_4,__dest + param_2,sVar4);" (call_expression "memmove(__dest + param_4,__dest + param_2,sVar4)" identifier (argument_list "(__dest + param_4,__dest + param_2,sVar4)" ( (binary_expression "__dest + param_4" identifier + identifier) , (binary_expression "__dest + param_2" identifier + identifier) , identifier ))) ;) })))) }))) (if_statement "if (param_4 <= param_2) goto LAB_001efac7;" if (parenthesized_expression "(param_4 <= param_2)" ( (binary_expression "param_4 <= param_2" identifier <= identifier) )) (goto_statement "goto LAB_001efac7;" 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        sVar4 = (int)psVar3 - (int)param_3;\n        if (sVar4 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }\n        __n = param_4 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__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_001efac7;\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        sVar4 = (int)psVar3 - (int)param_3;\n        if (sVar4 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }\n        __n = param_4 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__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_001efac7;\n    }" { (if_statement "if (param_3 < psVar3) {\n        sVar4 = (int)psVar3 - (int)param_3;\n        if (sVar4 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }\n        __n = param_4 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__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        sVar4 = (int)psVar3 - (int)param_3;\n        if (sVar4 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }\n        __n = param_4 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_4,__n);\n        }\n      }" { (expression_statement "sVar4 = (int)psVar3 - (int)param_3;" (assignment_expression "sVar4 = (int)psVar3 - (int)param_3" identifier = (binary_expression "(int)psVar3 - (int)param_3" (cast_expression "(int)psVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (sVar4 == 1) {\n          *__dest = (string)*param_3;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 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 (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }" else (if_statement "if (sVar4 != 0) {\n          memmove(__dest,param_3,sVar4);\n        }" if (parenthesized_expression "(sVar4 != 0)" ( (binary_expression "sVar4 != 0" identifier != number_literal) )) (compound_statement "{\n          memmove(__dest,param_3,sVar4);\n        }" { (expression_statement "memmove(__dest,param_3,sVar4);" (call_expression "memmove(__dest,param_3,sVar4)" identifier (argument_list "(__dest,param_3,sVar4)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "__n = param_4 - sVar4;" (assignment_expression "__n = param_4 - sVar4" identifier = (binary_expression "param_4 - sVar4" identifier - identifier)) ;) (if_statement "if (__n == 1) {\n          __dest[sVar4] = __dest[param_4];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_4,__n);\n        }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n          __dest[sVar4] = __dest[param_4];\n        }" { (expression_statement "__dest[sVar4] = __dest[param_4];" (assignment_expression "__dest[sVar4] = __dest[param_4]" (subscript_expression "__dest[sVar4]" identifier [ identifier ]) = (subscript_expression "__dest[param_4]" identifier [ identifier ])) ;) }) (else_clause "else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_4,__n);\n        }" else (if_statement "if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_4,__n);\n        }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n          memcpy(__dest + sVar4,__dest + param_4,__n);\n        }" { (expression_statement "memcpy(__dest + sVar4,__dest + param_4,__n);" (call_expression "memcpy(__dest + sVar4,__dest + param_4,__n)" identifier (argument_list "(__dest + sVar4,__dest + param_4,__n)" ( (binary_expression "__dest + sVar4" 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_001efac7;" goto statement_identifier ;) })) (if_statement "if (param_4 != 1) {\n      memmove(__dest,param_3,param_4);\n      goto LAB_001efac7;\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_001efac7;\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_001efac7;" 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_001efac7:\n  *(uint *)(this + 4) = uVar1;" statement_identifier : (expression_statement "*(uint *)(this + 4) = uVar1;" (assignment_expression "*(uint *)(this + 4) = uVar1" (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(undefined1 *)(*(int *)this + uVar1) = 0;" (assignment_expression "*(undefined1 *)(*(int *)this + uVar1) = 0" (pointer_expression "*(undefined1 *)(*(int *)this + uVar1)" * (cast_expression "(undefined1 *)(*(int *)this + uVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + uVar1)" ( (binary_expression "*(int *)this + uVar1" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + identifier) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) (ERROR "}" }))
(translation_unit "int * FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)\n\n{\n  uint uVar1;\n  undefined1 *__dest;\n  int iVar2;\n  int *piVar3;\n  undefined1 *__src;\n  size_t __n;\n  size_t sVar4;\n  uint uVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  iVar2 = param_1[1];\n  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    \n    FUN_0022c7a0("basic_string::_M_replace");\n  }\n  uVar1 = iVar2 + (param_5 - param_3);\n  piVar3 = (int *)*param_1;\n  if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }\n  if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }\n  __dest = (undefined1 *)((int)piVar3 + param_2);\n  sVar4 = iVar2 - (param_2 + param_3);\n  bVar6 = sVar4 != 0;\n  bVar7 = param_3 != param_5;\n  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_001efac7:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}\n\n" (function_definition "int * FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)\n\n{\n  uint uVar1;\n  undefined1 *__dest;\n  int iVar2;\n  int *piVar3;\n  undefined1 *__src;\n  size_t __n;\n  size_t sVar4;\n  uint uVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  iVar2 = param_1[1];\n  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    \n    FUN_0022c7a0("basic_string::_M_replace");\n  }\n  uVar1 = iVar2 + (param_5 - param_3);\n  piVar3 = (int *)*param_1;\n  if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }\n  if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }\n  __dest = (undefined1 *)((int)piVar3 + param_2);\n  sVar4 = iVar2 - (param_2 + param_3);\n  bVar6 = sVar4 != 0;\n  bVar7 = param_3 != param_5;\n  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_001efac7:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)" * (function_declarator "FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)" identifier (parameter_list "(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "uint param_5" type_identifier identifier) )))) (compound_statement "{\n  uint uVar1;\n  undefined1 *__dest;\n  int iVar2;\n  int *piVar3;\n  undefined1 *__src;\n  size_t __n;\n  size_t sVar4;\n  uint uVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  iVar2 = param_1[1];\n  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    \n    FUN_0022c7a0("basic_string::_M_replace");\n  }\n  uVar1 = iVar2 + (param_5 - param_3);\n  piVar3 = (int *)*param_1;\n  if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }\n  if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }\n  __dest = (undefined1 *)((int)piVar3 + param_2);\n  sVar4 = iVar2 - (param_2 + param_3);\n  bVar6 = sVar4 != 0;\n  bVar7 = param_3 != param_5;\n  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_001efac7:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined1 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined1 *__src;" type_identifier (pointer_declarator "*__src" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (expression_statement "iVar2 = param_1[1];" (assignment_expression "iVar2 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    \n    FUN_0022c7a0("basic_string::_M_replace");\n  }" if (parenthesized_expression "((param_3 + 0x7fffffff) - iVar2 < param_5)" ( (binary_expression "(param_3 + 0x7fffffff) - iVar2 < param_5" (binary_expression "(param_3 + 0x7fffffff) - iVar2" (parenthesized_expression "(param_3 + 0x7fffffff)" ( (binary_expression "param_3 + 0x7fffffff" identifier + number_literal) )) - identifier) < identifier) )) (compound_statement "{\n                    \n    FUN_0022c7a0("basic_string::_M_replace");\n  }" { (expression_statement "FUN_0022c7a0("basic_string::_M_replace");" (call_expression "FUN_0022c7a0("basic_string::_M_replace")" identifier (argument_list "("basic_string::_M_replace")" ( (string_literal ""basic_string::_M_replace"" " string_content ") ))) ;) })) (expression_statement "uVar1 = iVar2 + (param_5 - param_3);" (assignment_expression "uVar1 = iVar2 + (param_5 - param_3)" identifier = (binary_expression "iVar2 + (param_5 - param_3)" identifier + (parenthesized_expression "(param_5 - param_3)" ( (binary_expression "param_5 - param_3" identifier - identifier) )))) ;) (expression_statement "piVar3 = (int *)*param_1;" (assignment_expression "piVar3 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }" if (parenthesized_expression "(piVar3 == param_1 + 2)" ( (binary_expression "piVar3 == param_1 + 2" identifier == (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n    uVar5 = 0xf;\n  }" { (expression_statement "uVar5 = 0xf;" (assignment_expression "uVar5 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar5 = param_1[2];\n  }" else (compound_statement "{\n    uVar5 = param_1[2];\n  }" { (expression_statement "uVar5 = param_1[2];" (assignment_expression "uVar5 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }" if (parenthesized_expression "(uVar5 < uVar1)" ( (binary_expression "uVar5 < uVar1" identifier < identifier) )) (compound_statement "{\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }" { (expression_statement "FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);" (call_expression "FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5)" identifier (argument_list "(param_1,param_2,param_3,param_4,param_5)" ( identifier , identifier , identifier , identifier , identifier ))) ;) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;) })) (expression_statement "__dest = (undefined1 *)((int)piVar3 + param_2);" (assignment_expression "__dest = (undefined1 *)((int)piVar3 + param_2)" identifier = (cast_expression "(undefined1 *)((int)piVar3 + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar3 + param_2)" ( (binary_expression "(int)piVar3 + param_2" (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "sVar4 = iVar2 - (param_2 + param_3);" (assignment_expression "sVar4 = iVar2 - (param_2 + param_3)" identifier = (binary_expression "iVar2 - (param_2 + param_3)" identifier - (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )))) ;) (expression_statement "bVar6 = sVar4 != 0;" (assignment_expression "bVar6 = sVar4 != 0" identifier = (binary_expression "sVar4 != 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 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" if (parenthesized_expression "((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4))" ( (binary_expression "(param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)" (parenthesized_expression "(param_4 < piVar3)" ( (binary_expression "param_4 < piVar3" identifier < identifier) )) || (parenthesized_expression "((int *)(iVar2 + (int)piVar3) < param_4)" ( (binary_expression "(int *)(iVar2 + (int)piVar3) < param_4" (cast_expression "(int *)(iVar2 + (int)piVar3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + (int)piVar3)" ( (binary_expression "iVar2 + (int)piVar3" identifier + (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < identifier) ))) )) (compound_statement "{\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" { (if_statement "if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" if (parenthesized_expression "(bVar7 && bVar6)" ( (binary_expression "bVar7 && bVar6" identifier && identifier) )) (compound_statement "{\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" { (if_statement "if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 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,sVar4);\n      }" else (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" { (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar4);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar4)" identifier (argument_list "(__dest + param_5,__dest + param_3,sVar4)" ( (binary_expression "__dest + param_5" identifier + identifier) , (binary_expression "__dest + param_3" identifier + identifier) , identifier ))) ;) }))) })) (if_statement "if (param_5 == 0) goto LAB_001efac7;" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;)) (if_statement "if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\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_001efac7;\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_001efac7;" goto statement_identifier ;) })) }) (else_clause "else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" else (compound_statement "{\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" { (if_statement "if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\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_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }" { (labeled_statement "LAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;" statement_identifier : (if_statement "if (bVar7 && bVar6) goto LAB_001efb30;" if (parenthesized_expression "(bVar7 && bVar6)" ( (binary_expression "bVar7 && bVar6" identifier && identifier) )) (goto_statement "goto LAB_001efb30;" goto statement_identifier ;))) }) (else_clause "else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" else (compound_statement "{\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" { (if_statement "if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\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_001efc25;\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_001efc25;" 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 (!bVar7 || !bVar6) goto LAB_001efac7;" if (parenthesized_expression "(!bVar7 || !bVar6)" ( (binary_expression "!bVar7 || !bVar6" (unary_expression "!bVar7" ! identifier) || (unary_expression "!bVar6" ! identifier)) )) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;)) (labeled_statement "LAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" statement_identifier : (if_statement "if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 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,sVar4);\n      }" else (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" { (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar4);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar4)" identifier (argument_list "(__dest + param_5,__dest + param_3,sVar4)" ( (binary_expression "__dest + param_5" identifier + identifier) , (binary_expression "__dest + param_3" identifier + identifier) , identifier ))) ;) })))) }))) (if_statement "if (param_5 <= param_3) goto LAB_001efac7;" if (parenthesized_expression "(param_5 <= param_3)" ( (binary_expression "param_5 <= param_3" identifier <= identifier) )) (goto_statement "goto LAB_001efac7;" goto statement_identifier ;)) (expression_statement "piVar3 = (int *)(__dest + param_3);" (assignment_expression "piVar3 = (int *)(__dest + param_3)" identifier = (cast_expression "(int *)(__dest + param_3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__dest + param_3)" ( (binary_expression "__dest + param_3" identifier + identifier) )))) ;) (if_statement "if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }" if (parenthesized_expression "(piVar3 < (int *)((int)param_4 + param_5))" ( (binary_expression "piVar3 < (int *)((int)param_4 + param_5)" identifier < (cast_expression "(int *)((int)param_4 + param_5)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + param_5)" ( (binary_expression "(int)param_4 + param_5" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) )) (compound_statement "{\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }" { (if_statement "if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" if (parenthesized_expression "(param_4 < piVar3)" ( (binary_expression "param_4 < piVar3" identifier < identifier) )) (compound_statement "{\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }" { (expression_statement "sVar4 = (int)piVar3 - (int)param_4;" (assignment_expression "sVar4 = (int)piVar3 - (int)param_4" identifier = (binary_expression "(int)piVar3 - (int)param_4" (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }" if (parenthesized_expression "(sVar4 == 1)" ( (binary_expression "sVar4 == 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 (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }" else (if_statement "if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }" if (parenthesized_expression "(sVar4 != 0)" ( (binary_expression "sVar4 != 0" identifier != number_literal) )) (compound_statement "{\n          memmove(__dest,param_4,sVar4);\n        }" { (expression_statement "memmove(__dest,param_4,sVar4);" (call_expression "memmove(__dest,param_4,sVar4)" identifier (argument_list "(__dest,param_4,sVar4)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "__n = param_5 - sVar4;" (assignment_expression "__n = param_5 - sVar4" identifier = (binary_expression "param_5 - sVar4" identifier - identifier)) ;) (if_statement "if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n          __dest[sVar4] = __dest[param_5];\n        }" { (expression_statement "__dest[sVar4] = __dest[param_5];" (assignment_expression "__dest[sVar4] = __dest[param_5]" (subscript_expression "__dest[sVar4]" identifier [ identifier ]) = (subscript_expression "__dest[param_5]" identifier [ identifier ])) ;) }) (else_clause "else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" else (if_statement "if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" { (expression_statement "memcpy(__dest + sVar4,__dest + param_5,__n);" (call_expression "memcpy(__dest + sVar4,__dest + param_5,__n)" identifier (argument_list "(__dest + sVar4,__dest + param_5,__n)" ( (binary_expression "__dest + sVar4" identifier + identifier) , (binary_expression "__dest + param_5" identifier + identifier) , identifier ))) ;) })))) }) (else_clause "else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\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 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" { (expression_statement "__src = (undefined1 *)((param_5 - param_3) + (int)param_4);" (assignment_expression "__src = (undefined1 *)((param_5 - param_3) + (int)param_4)" identifier = (cast_expression "(undefined1 *)((param_5 - param_3) + (int)param_4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((param_5 - param_3) + (int)param_4)" ( (binary_expression "(param_5 - param_3) + (int)param_4" (parenthesized_expression "(param_5 - param_3)" ( (binary_expression "param_5 - param_3" identifier - identifier) )) + (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) 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_001efac7;" goto statement_identifier ;) })) (if_statement "if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\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_001efac7;\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_001efac7;" 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_001efac7:\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 TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE 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 = (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * 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 , 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 TYPE) ) 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 TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) < IDENT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT && 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 IDENT && 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 (unary_expression ! IDENT) || (unary_expression ! 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 TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) 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 TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) 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 (parenthesized_expression ( (binary_expression IDENT - IDENT) )) + (cast_expression ( (type_descriptor TYPE) ) 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 "int * FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)\n\n{\n  uint uVar1;\n  undefined1 *__dest;\n  int iVar2;\n  int *piVar3;\n  undefined1 *__src;\n  size_t __n;\n  size_t sVar4;\n  uint uVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  iVar2 = param_1[1];\n  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    \n    FUN_0022c7a0("basic_string::_M_replace");\n  }\n  uVar1 = iVar2 + (param_5 - param_3);\n  piVar3 = (int *)*param_1;\n  if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }\n  if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }\n  __dest = (undefined1 *)((int)piVar3 + param_2);\n  sVar4 = iVar2 - (param_2 + param_3);\n  bVar6 = sVar4 != 0;\n  bVar7 = param_3 != param_5;\n  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_001efac7:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" (primitive_type "int") (pointer_declarator "* FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)" (* "*") (function_declarator "FUN_001ef9f0(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)" (identifier "FUN_001ef9f0") (parameter_list "(int *param_1,int param_2,uint param_3,int *param_4,uint param_5)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int *param_4" (primitive_type "int") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "uint param_5" (type_identifier "uint") (identifier "param_5")) () ")")))) (compound_statement "{\n  uint uVar1;\n  undefined1 *__dest;\n  int iVar2;\n  int *piVar3;\n  undefined1 *__src;\n  size_t __n;\n  size_t sVar4;\n  uint uVar5;\n  bool bVar6;\n  bool bVar7;\n  \n  iVar2 = param_1[1];\n  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    \n    FUN_0022c7a0("basic_string::_M_replace");\n  }\n  uVar1 = iVar2 + (param_5 - param_3);\n  piVar3 = (int *)*param_1;\n  if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }\n  if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }\n  __dest = (undefined1 *)((int)piVar3 + param_2);\n  sVar4 = iVar2 - (param_2 + param_3);\n  bVar6 = sVar4 != 0;\n  bVar7 = param_3 != param_5;\n  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  *__dest = (char)*param_4;\nLAB_001efac7:\n  param_1[1] = uVar1;\n  *(undefined1 *)(*param_1 + uVar1) = 0;\n  return param_1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined1 *__dest;" (type_identifier "undefined1") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "undefined1 *__src;" (type_identifier "undefined1") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "size_t sVar4;" (primitive_type "size_t") (identifier "sVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "bool bVar6;" (primitive_type "bool") (identifier "bVar6") (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (expression_statement "iVar2 = param_1[1];" (assignment_expression "iVar2 = param_1[1]" (identifier "iVar2") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if ((param_3 + 0x7fffffff) - iVar2 < param_5) {\n                    \n    FUN_0022c7a0("basic_string::_M_replace");\n  }" (if "if") (parenthesized_expression "((param_3 + 0x7fffffff) - iVar2 < param_5)" (( "(") (binary_expression "(param_3 + 0x7fffffff) - iVar2 < param_5" (binary_expression "(param_3 + 0x7fffffff) - iVar2" (parenthesized_expression "(param_3 + 0x7fffffff)" (( "(") (binary_expression "param_3 + 0x7fffffff" (identifier "param_3") (+ "+") (number_literal "0x7fffffff")) () ")")) (- "-") (identifier "iVar2")) (< "<") (identifier "param_5")) () ")")) (compound_statement "{\n                    \n    FUN_0022c7a0("basic_string::_M_replace");\n  }" ({ "{") (expression_statement "FUN_0022c7a0("basic_string::_M_replace");" (call_expression "FUN_0022c7a0("basic_string::_M_replace")" (identifier "FUN_0022c7a0") (argument_list "("basic_string::_M_replace")" (( "(") (string_literal ""basic_string::_M_replace"" (" """) (string_content "basic_string::_M_replace") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar1 = iVar2 + (param_5 - param_3);" (assignment_expression "uVar1 = iVar2 + (param_5 - param_3)" (identifier "uVar1") (= "=") (binary_expression "iVar2 + (param_5 - param_3)" (identifier "iVar2") (+ "+") (parenthesized_expression "(param_5 - param_3)" (( "(") (binary_expression "param_5 - param_3" (identifier "param_5") (- "-") (identifier "param_3")) () ")")))) (; ";")) (expression_statement "piVar3 = (int *)*param_1;" (assignment_expression "piVar3 = (int *)*param_1" (identifier "piVar3") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (piVar3 == param_1 + 2) {\n    uVar5 = 0xf;\n  }\n  else {\n    uVar5 = param_1[2];\n  }" (if "if") (parenthesized_expression "(piVar3 == param_1 + 2)" (( "(") (binary_expression "piVar3 == param_1 + 2" (identifier "piVar3") (== "==") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2"))) () ")")) (compound_statement "{\n    uVar5 = 0xf;\n  }" ({ "{") (expression_statement "uVar5 = 0xf;" (assignment_expression "uVar5 = 0xf" (identifier "uVar5") (= "=") (number_literal "0xf")) (; ";")) (} "}")) (else_clause "else {\n    uVar5 = param_1[2];\n  }" (else "else") (compound_statement "{\n    uVar5 = param_1[2];\n  }" ({ "{") (expression_statement "uVar5 = param_1[2];" (assignment_expression "uVar5 = param_1[2]" (identifier "uVar5") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (if_statement "if (uVar5 < uVar1) {\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }" (if "if") (parenthesized_expression "(uVar5 < uVar1)" (( "(") (binary_expression "uVar5 < uVar1" (identifier "uVar5") (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);\n    goto LAB_001efac7;\n  }" ({ "{") (expression_statement "FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);" (call_expression "FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5)" (identifier "FUN_001eeaa0") (argument_list "(param_1,param_2,param_3,param_4,param_5)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (goto_statement "goto LAB_001efac7;" (goto "goto") (statement_identifier "LAB_001efac7") (; ";")) (} "}"))) (expression_statement "__dest = (undefined1 *)((int)piVar3 + param_2);" (assignment_expression "__dest = (undefined1 *)((int)piVar3 + param_2)" (identifier "__dest") (= "=") (cast_expression "(undefined1 *)((int)piVar3 + param_2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar3 + param_2)" (( "(") (binary_expression "(int)piVar3 + param_2" (cast_expression "(int)piVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar3")) (+ "+") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "sVar4 = iVar2 - (param_2 + param_3);" (assignment_expression "sVar4 = iVar2 - (param_2 + param_3)" (identifier "sVar4") (= "=") (binary_expression "iVar2 - (param_2 + param_3)" (identifier "iVar2") (- "-") (parenthesized_expression "(param_2 + param_3)" (( "(") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3")) () ")")))) (; ";")) (expression_statement "bVar6 = sVar4 != 0;" (assignment_expression "bVar6 = sVar4 != 0" (identifier "bVar6") (= "=") (binary_expression "sVar4 != 0" (identifier "sVar4") (!= "!=") (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 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }\n  else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" (if "if") (parenthesized_expression "((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4))" (( "(") (binary_expression "(param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)" (parenthesized_expression "(param_4 < piVar3)" (( "(") (binary_expression "param_4 < piVar3" (identifier "param_4") (< "<") (identifier "piVar3")) () ")")) (|| "||") (parenthesized_expression "((int *)(iVar2 + (int)piVar3) < param_4)" (( "(") (binary_expression "(int *)(iVar2 + (int)piVar3) < param_4" (cast_expression "(int *)(iVar2 + (int)piVar3)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + (int)piVar3)" (( "(") (binary_expression "iVar2 + (int)piVar3" (identifier "iVar2") (+ "+") (cast_expression "(int)piVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar3"))) () ")"))) (< "<") (identifier "param_4")) () ")"))) () ")")) (compound_statement "{\n    if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 == 0) goto LAB_001efac7;\n    if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" ({ "{") (if_statement "if (bVar7 && bVar6) {\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" (if "if") (parenthesized_expression "(bVar7 && bVar6)" (( "(") (binary_expression "bVar7 && bVar6" (identifier "bVar7") (&& "&&") (identifier "bVar6")) () ")")) (compound_statement "{\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" ({ "{") (if_statement "if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" (if "if") (parenthesized_expression "(sVar4 == 1)" (( "(") (binary_expression "sVar4 == 1" (identifier "sVar4") (== "==") (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,sVar4);\n      }" (else "else") (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" ({ "{") (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar4);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar4)" (identifier "memmove") (argument_list "(__dest + param_5,__dest + param_3,sVar4)" (( "(") (binary_expression "__dest + param_5" (identifier "__dest") (+ "+") (identifier "param_5")) (, ",") (binary_expression "__dest + param_3" (identifier "__dest") (+ "+") (identifier "param_3")) (, ",") (identifier "sVar4") () ")"))) (; ";")) (} "}")))) (} "}"))) (if_statement "if (param_5 == 0) goto LAB_001efac7;" (if "if") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_001efac7;" (goto "goto") (statement_identifier "LAB_001efac7") (; ";"))) (if_statement "if (param_5 != 1) {\n      memcpy(__dest,param_4,param_5);\n      goto LAB_001efac7;\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_001efac7;\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_001efac7;" (goto "goto") (statement_identifier "LAB_001efac7") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" (else "else") (compound_statement "{\n    if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }\n    if (param_5 <= param_3) goto LAB_001efac7;\n    piVar3 = (int *)(__dest + param_3);\n    if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }\n    if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\n    }\n  }" ({ "{") (if_statement "if ((param_5 == 0) || (param_3 < param_5)) {\nLAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }\n    else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\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_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;\n    }" ({ "{") (labeled_statement "LAB_001efc25:\n      if (bVar7 && bVar6) goto LAB_001efb30;" (statement_identifier "LAB_001efc25") (: ":") (if_statement "if (bVar7 && bVar6) goto LAB_001efb30;" (if "if") (parenthesized_expression "(bVar7 && bVar6)" (( "(") (binary_expression "bVar7 && bVar6" (identifier "bVar7") (&& "&&") (identifier "bVar6")) () ")")) (goto_statement "goto LAB_001efb30;" (goto "goto") (statement_identifier "LAB_001efb30") (; ";")))) (} "}")) (else_clause "else {\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" (else "else") (compound_statement "{\n      if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\n      }\n      memmove(__dest,param_4,param_5);\n      if (!bVar7 || !bVar6) goto LAB_001efac7;\nLAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }\n    }" ({ "{") (if_statement "if (param_5 == 1) {\n        *__dest = (char)*param_4;\n        goto LAB_001efc25;\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_001efc25;\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_001efc25;" (goto "goto") (statement_identifier "LAB_001efc25") (; ";")) (} "}"))) (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 (!bVar7 || !bVar6) goto LAB_001efac7;" (if "if") (parenthesized_expression "(!bVar7 || !bVar6)" (( "(") (binary_expression "!bVar7 || !bVar6" (unary_expression "!bVar7" (! "!") (identifier "bVar7")) (|| "||") (unary_expression "!bVar6" (! "!") (identifier "bVar6"))) () ")")) (goto_statement "goto LAB_001efac7;" (goto "goto") (statement_identifier "LAB_001efac7") (; ";"))) (labeled_statement "LAB_001efb30:\n      if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" (statement_identifier "LAB_001efb30") (: ":") (if_statement "if (sVar4 == 1) {\n        __dest[param_5] = __dest[param_3];\n      }\n      else {\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" (if "if") (parenthesized_expression "(sVar4 == 1)" (( "(") (binary_expression "sVar4 == 1" (identifier "sVar4") (== "==") (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,sVar4);\n      }" (else "else") (compound_statement "{\n        memmove(__dest + param_5,__dest + param_3,sVar4);\n      }" ({ "{") (expression_statement "memmove(__dest + param_5,__dest + param_3,sVar4);" (call_expression "memmove(__dest + param_5,__dest + param_3,sVar4)" (identifier "memmove") (argument_list "(__dest + param_5,__dest + param_3,sVar4)" (( "(") (binary_expression "__dest + param_5" (identifier "__dest") (+ "+") (identifier "param_5")) (, ",") (binary_expression "__dest + param_3" (identifier "__dest") (+ "+") (identifier "param_3")) (, ",") (identifier "sVar4") () ")"))) (; ";")) (} "}"))))) (} "}")))) (if_statement "if (param_5 <= param_3) goto LAB_001efac7;" (if "if") (parenthesized_expression "(param_5 <= param_3)" (( "(") (binary_expression "param_5 <= param_3" (identifier "param_5") (<= "<=") (identifier "param_3")) () ")")) (goto_statement "goto LAB_001efac7;" (goto "goto") (statement_identifier "LAB_001efac7") (; ";"))) (expression_statement "piVar3 = (int *)(__dest + param_3);" (assignment_expression "piVar3 = (int *)(__dest + param_3)" (identifier "piVar3") (= "=") (cast_expression "(int *)(__dest + param_3)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__dest + param_3)" (( "(") (binary_expression "__dest + param_3" (identifier "__dest") (+ "+") (identifier "param_3")) () ")")))) (; ";")) (if_statement "if (piVar3 < (int *)((int)param_4 + param_5)) {\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }" (if "if") (parenthesized_expression "(piVar3 < (int *)((int)param_4 + param_5))" (( "(") (binary_expression "piVar3 < (int *)((int)param_4 + param_5)" (identifier "piVar3") (< "<") (cast_expression "(int *)((int)param_4 + param_5)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_4 + param_5)" (( "(") (binary_expression "(int)param_4 + param_5" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (+ "+") (identifier "param_5")) () ")")))) () ")")) (compound_statement "{\n      if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }\n      goto LAB_001efac7;\n    }" ({ "{") (if_statement "if (param_4 < piVar3) {\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }\n      else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\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 < piVar3)" (( "(") (binary_expression "param_4 < piVar3" (identifier "param_4") (< "<") (identifier "piVar3")) () ")")) (compound_statement "{\n        sVar4 = (int)piVar3 - (int)param_4;\n        if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }\n        __n = param_5 - sVar4;\n        if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }\n      }" ({ "{") (expression_statement "sVar4 = (int)piVar3 - (int)param_4;" (assignment_expression "sVar4 = (int)piVar3 - (int)param_4" (identifier "sVar4") (= "=") (binary_expression "(int)piVar3 - (int)param_4" (cast_expression "(int)piVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar3")) (- "-") (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")))) (; ";")) (if_statement "if (sVar4 == 1) {\n          *__dest = (char)*param_4;\n        }\n        else if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }" (if "if") (parenthesized_expression "(sVar4 == 1)" (( "(") (binary_expression "sVar4 == 1" (identifier "sVar4") (== "==") (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 (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }" (else "else") (if_statement "if (sVar4 != 0) {\n          memmove(__dest,param_4,sVar4);\n        }" (if "if") (parenthesized_expression "(sVar4 != 0)" (( "(") (binary_expression "sVar4 != 0" (identifier "sVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          memmove(__dest,param_4,sVar4);\n        }" ({ "{") (expression_statement "memmove(__dest,param_4,sVar4);" (call_expression "memmove(__dest,param_4,sVar4)" (identifier "memmove") (argument_list "(__dest,param_4,sVar4)" (( "(") (identifier "__dest") (, ",") (identifier "param_4") (, ",") (identifier "sVar4") () ")"))) (; ";")) (} "}"))))) (expression_statement "__n = param_5 - sVar4;" (assignment_expression "__n = param_5 - sVar4" (identifier "__n") (= "=") (binary_expression "param_5 - sVar4" (identifier "param_5") (- "-") (identifier "sVar4"))) (; ";")) (if_statement "if (__n == 1) {\n          __dest[sVar4] = __dest[param_5];\n        }\n        else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" (if "if") (parenthesized_expression "(__n == 1)" (( "(") (binary_expression "__n == 1" (identifier "__n") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n          __dest[sVar4] = __dest[param_5];\n        }" ({ "{") (expression_statement "__dest[sVar4] = __dest[param_5];" (assignment_expression "__dest[sVar4] = __dest[param_5]" (subscript_expression "__dest[sVar4]" (identifier "__dest") ([ "[") (identifier "sVar4") (] "]")) (= "=") (subscript_expression "__dest[param_5]" (identifier "__dest") ([ "[") (identifier "param_5") (] "]"))) (; ";")) (} "}")) (else_clause "else if (__n != 0) {\n          memcpy(__dest + sVar4,__dest + param_5,__n);\n        }" (else "else") (if_statement "if (__n != 0) {\n          memcpy(__dest + sVar4,__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 + sVar4,__dest + param_5,__n);\n        }" ({ "{") (expression_statement "memcpy(__dest + sVar4,__dest + param_5,__n);" (call_expression "memcpy(__dest + sVar4,__dest + param_5,__n)" (identifier "memcpy") (argument_list "(__dest + sVar4,__dest + param_5,__n)" (( "(") (binary_expression "__dest + sVar4" (identifier "__dest") (+ "+") (identifier "sVar4")) (, ",") (binary_expression "__dest + param_5" (identifier "__dest") (+ "+") (identifier "param_5")) (, ",") (identifier "__n") () ")"))) (; ";")) (} "}"))))) (} "}")) (else_clause "else {\n        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);\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 *)((param_5 - param_3) + (int)param_4);\n        if (param_5 == 1) {\n          *__dest = *__src;\n        }\n        else {\n          memcpy(__dest,__src,param_5);\n        }\n      }" ({ "{") (expression_statement "__src = (undefined1 *)((param_5 - param_3) + (int)param_4);" (assignment_expression "__src = (undefined1 *)((param_5 - param_3) + (int)param_4)" (identifier "__src") (= "=") (cast_expression "(undefined1 *)((param_5 - param_3) + (int)param_4)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((param_5 - param_3) + (int)param_4)" (( "(") (binary_expression "(param_5 - param_3) + (int)param_4" (parenthesized_expression "(param_5 - param_3)" (( "(") (binary_expression "param_5 - param_3" (identifier "param_5") (- "-") (identifier "param_3")) () ")")) (+ "+") (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4"))) () ")")))) (; ";")) (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_001efac7;" (goto "goto") (statement_identifier "LAB_001efac7") (; ";")) (} "}"))) (if_statement "if (param_5 != 1) {\n      memmove(__dest,param_4,param_5);\n      goto LAB_001efac7;\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_001efac7;\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_001efac7;" (goto "goto") (statement_identifier "LAB_001efac7") (; ";")) (} "}"))) (} "}")))) (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_001efac7:\n  param_1[1] = uVar1;" (statement_identifier "LAB_001efac7") (: ":") (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") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* std::string::_M_replace(unsigned int, unsigned int, char const*, unsigned int) */

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_16;
  int var_3;
  type_2 *var_6;
  size_t var_18;
  size_t var_11;
  type_1 var_7;
  bool var_14;
  bool var_13;
  
  var_3 = *(int *)(var_1 + 4);
  if ((var_2 + 0x7fffffff) - var_3 < var_4) {
                    /* WARNING: Subroutine does not return */
    var_5("basic_string::_M_replace");
  }
  var_8 = var_3 + (var_4 - var_2);
  var_6 = *(type_2 **)var_1;
  if (var_6 == var_1 + 8) {
    var_7 = 0xf;
  }
  else {
    var_7 = *(type_1 *)(var_1 + 8);
  }
  if (var_7 < var_8) {
    var_9(var_1,var_10,var_2,var_12,var_4);
    goto LAB_001efac7;
  }
  var_16 = var_6 + var_10;
  var_11 = var_3 - (var_10 + var_2);
  var_14 = var_11 != 0;
  var_13 = var_2 != var_4;
  if ((var_12 < var_6) || (var_6 + var_3 < var_12)) {
    if (var_13 && var_14) {
      if (var_11 == 1) {
        var_16[var_4] = var_16[var_2];
      }
      else {
        var_15(var_16 + var_4,var_16 + var_2,var_11);
      }
    }
    if (var_4 == 0) goto LAB_001efac7;
    if (var_4 != 1) {
      var_17(var_16,var_12,var_4);
      goto LAB_001efac7;
    }
  }
  else {
    if ((var_4 == 0) || (var_2 < var_4)) {
LAB_001efc25:
      if (var_13 && var_14) goto LAB_001efb30;
    }
    else {
      if (var_4 == 1) {
        *var_16 = (type_2)*var_12;
        goto LAB_001efc25;
      }
      var_15(var_16,var_12,var_4);
      if (!var_13 || !var_14) goto LAB_001efac7;
LAB_001efb30:
      if (var_11 == 1) {
        var_16[var_4] = var_16[var_2];
      }
      else {
        var_15(var_16 + var_4,var_16 + var_2,var_11);
      }
    }
    if (var_4 <= var_2) goto LAB_001efac7;
    var_6 = var_16 + var_2;
    if (var_6 < (type_2 *)(var_12 + var_4)) {
      if (var_12 < var_6) {
        var_11 = (int)var_6 - (int)var_12;
        if (var_11 == 1) {
          *var_16 = (type_2)*var_12;
        }
        else if (var_11 != 0) {
          var_15(var_16,var_12,var_11);
        }
        var_18 = var_4 - var_11;
        if (var_18 == 1) {
          var_16[var_11] = var_16[var_4];
        }
        else if (var_18 != 0) {
          var_17(var_16 + var_11,var_16 + var_4,var_18);
        }
      }
      else if (var_4 == 1) {
        *var_16 = *(type_2 *)(var_12 + (var_4 - var_2));
      }
      else {
        var_17(var_16,(type_2 *)(var_12 + (var_4 - var_2)),var_4);
      }
      goto LAB_001efac7;
    }
    if (var_4 != 1) {
      var_15(var_16,var_12,var_4);
      goto LAB_001efac7;
    }
  }
  *var_16 = (type_2)*var_12;
LAB_001efac7:
  *(type_1 *)(var_1 + 4) = var_8;
  *(type_3 *)(*(int *)var_1 + var_8) = 0;
  return var_1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) 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: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (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) (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: (primitive_type)) 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: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) right: (identifier))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (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: (identifier) right: (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: (unary_expression argument: (identifier)) right: (unary_expression argument: (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: (primitive_type) 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: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) 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: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (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: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (cast_expression type: (type_descriptor type: (primitive_type)) 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: (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)))))

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

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

{
  uint uVar1;
  undefined1 *__dest;
  int iVar2;
  int *piVar3;
  undefined1 *__src;
  size_t __n;
  size_t sVar4;
  uint uVar5;
  bool bVar6;
  bool bVar7;
  
  iVar2 = param_1[1];
  if ((param_3 + 0x7fffffff) - iVar2 < param_5) {
                    /* WARNING: Subroutine does not return */
    FUN_0022c7a0("basic_string::_M_replace");
  }
  uVar1 = iVar2 + (param_5 - param_3);
  piVar3 = (int *)*param_1;
  if (piVar3 == param_1 + 2) {
    uVar5 = 0xf;
  }
  else {
    uVar5 = param_1[2];
  }
  if (uVar5 < uVar1) {
    FUN_001eeaa0(param_1,param_2,param_3,param_4,param_5);
    goto LAB_001efac7;
  }
  __dest = (undefined1 *)((int)piVar3 + param_2);
  sVar4 = iVar2 - (param_2 + param_3);
  bVar6 = sVar4 != 0;
  bVar7 = param_3 != param_5;
  if ((param_4 < piVar3) || ((int *)(iVar2 + (int)piVar3) < param_4)) {
    if (bVar7 && bVar6) {
      if (sVar4 == 1) {
        __dest[param_5] = __dest[param_3];
      }
      else {
        memmove(__dest + param_5,__dest + param_3,sVar4);
      }
    }
    if (param_5 == 0) goto LAB_001efac7;
    if (param_5 != 1) {
      memcpy(__dest,param_4,param_5);
      goto LAB_001efac7;
    }
  }
  else {
    if ((param_5 == 0) || (param_3 < param_5)) {
LAB_001efc25:
      if (bVar7 && bVar6) goto LAB_001efb30;
    }
    else {
      if (param_5 == 1) {
        *__dest = (char)*param_4;
        goto LAB_001efc25;
      }
      memmove(__dest,param_4,param_5);
      if (!bVar7 || !bVar6) goto LAB_001efac7;
LAB_001efb30:
      if (sVar4 == 1) {
        __dest[param_5] = __dest[param_3];
      }
      else {
        memmove(__dest + param_5,__dest + param_3,sVar4);
      }
    }
    if (param_5 <= param_3) goto LAB_001efac7;
    piVar3 = (int *)(__dest + param_3);
    if (piVar3 < (int *)((int)param_4 + param_5)) {
      if (param_4 < piVar3) {
        sVar4 = (int)piVar3 - (int)param_4;
        if (sVar4 == 1) {
          *__dest = (char)*param_4;
        }
        else if (sVar4 != 0) {
          memmove(__dest,param_4,sVar4);
        }
        __n = param_5 - sVar4;
        if (__n == 1) {
          __dest[sVar4] = __dest[param_5];
        }
        else if (__n != 0) {
          memcpy(__dest + sVar4,__dest + param_5,__n);
        }
      }
      else {
        __src = (undefined1 *)((param_5 - param_3) + (int)param_4);
        if (param_5 == 1) {
          *__dest = *__src;
        }
        else {
          memcpy(__dest,__src,param_5);
        }
      }
      goto LAB_001efac7;
    }
    if (param_5 != 1) {
      memmove(__dest,param_4,param_5);
      goto LAB_001efac7;
    }
  }
  *__dest = (char)*param_4;
LAB_001efac7:
  param_1[1] = uVar1;
  *(undefined1 *)(*param_1 + uVar1) = 0;
  return param_1;
}

