
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */

MagickBooleanType SubstituteString(char **string,char *search,char *replace)

{
  char *pcVar1;
  int iVar2;
  size_t sVar3;
  char *pcVar4;
  ExceptionInfo *exception;
  int *piVar5;
  char *pcVar6;
  size_t __n;
  size_t __n_00;
  int local_24;
  MagickBooleanType local_20;
  
  local_24 = (int)*search;
  pcVar1 = strchr(*string,local_24);
  if (pcVar1 == (char *)0x0) {
    local_20 = MagickFalse;
  }
  else {
    __n = 0;
    __n_00 = 0;
    local_20 = MagickFalse;
    do {
      if (__n == 0) {
        __n = strlen(search);
      }
      iVar2 = strncmp(pcVar1,search,__n);
      pcVar6 = pcVar1;
      if (iVar2 == 0) {
        if (__n_00 == 0) {
          __n_00 = strlen(replace);
        }
        if (__n < __n_00) {
          pcVar6 = *string;
          sVar3 = strlen(pcVar6);
          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);
          *string = pcVar4;
          if (pcVar4 == (char *)0x0) {
            exception = AcquireExceptionInfo();
            piVar5 = __errno_location();
            pcVar1 = GetExceptionMessage(*piVar5);
            ThrowMagickException
                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,
                       "UnableToAcquireString","`%s\'",pcVar1);
            DestroyString(pcVar1);
            CatchException(exception);
            DestroyExceptionInfo(exception);
            MagickCoreTerminus();
                    /* WARNING: Subroutine does not return */
            _exit(1);
          }
          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);
LAB_0019f1e9:
          sVar3 = strlen(pcVar1 + __n);
          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);
        }
        else if (__n_00 != __n) goto LAB_0019f1e9;
        pcVar6 = pcVar1 + (__n_00 - 1);
        memcpy(pcVar1,replace,__n_00);
        local_20 = MagickTrue;
        local_24 = (int)*search;
      }
      pcVar1 = strchr(pcVar6 + 1,local_24);
    } while (pcVar1 != (char *)0x0);
  }
  return local_20;
}



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

undefined4 SubstituteString(int *param_1,char *param_2,char *param_3)

{
  char *__s1;
  int iVar1;
  size_t sVar2;
  undefined4 uVar3;
  int *piVar4;
  undefined4 uVar5;
  char *pcVar6;
  size_t __n;
  size_t __n_00;
  int local_24;
  undefined4 local_20;
  
  local_24 = (int)*param_2;
  __s1 = strchr((char *)*param_1,local_24);
  if (__s1 == (char *)0x0) {
    local_20 = 0;
  }
  else {
    __n = 0;
    __n_00 = 0;
    local_20 = 0;
    do {
      if (__n == 0) {
        __n = strlen(param_2);
      }
      iVar1 = strncmp(__s1,param_2,__n);
      pcVar6 = __s1;
      if (iVar1 == 0) {
        if (__n_00 == 0) {
          __n_00 = strlen(param_3);
        }
        if (__n < __n_00) {
          pcVar6 = (char *)*param_1;
          sVar2 = strlen(pcVar6);
          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);
          *param_1 = iVar1;
          if (iVar1 == 0) {
            uVar3 = AcquireExceptionInfo();
            piVar4 = __errno_location();
            uVar5 = GetExceptionMessage(*piVar4);
            ThrowMagickException
                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,
                       "UnableToAcquireString","`%s\'",uVar5);
            DestroyString(uVar5);
            CatchException(uVar3);
            DestroyExceptionInfo(uVar3);
            MagickCoreTerminus();
                    /* WARNING: Subroutine does not return */
            _exit(1);
          }
          __s1 = __s1 + (iVar1 - (int)pcVar6);
LAB_0019f1e9:
          sVar2 = strlen(__s1 + __n);
          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);
        }
        else if (__n_00 != __n) goto LAB_0019f1e9;
        pcVar6 = __s1 + (__n_00 - 1);
        memcpy(__s1,param_3,__n_00);
        local_20 = 1;
        local_24 = (int)*param_2;
      }
      __s1 = strchr(pcVar6 + 1,local_24);
    } while (__s1 != (char *)0x0);
  }
  return local_20;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00038830
ADD EBX,0x239f27
SUB ESP,0x24
MOV EAX,dword ptr [ESP + 0x3c]
MOVSX EAX,byte ptr [EAX]
MOV dword ptr [ESP + 0x10],EAX
PUSH EAX
MOV EAX,dword ptr [ESP + 0x3c]
PUSH dword ptr [EAX]
CALL 0x00030de0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0019f218
MOV EBP,EAX
XOR ESI,ESI
XOR EDI,EDI
MOV dword ptr [ESP + 0xc],0x0
JMP 0x0019f163
JNZ 0x0019f1e9
SUB ESP,0x4
PUSH EDI
PUSH dword ptr [ESP + 0x40]
PUSH EBP
LEA EBP,[EBP + EDI*0x1 + -0x1]
CALL 0x00031e30
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x34]
MOV dword ptr [ESP + 0xc],0x1
MOVSX EAX,byte ptr [EAX]
MOV dword ptr [ESP + 0x8],EAX
LEA EDX,[EBP + 0x1]
SUB ESP,0x8
PUSH dword ptr [ESP + 0x10]
PUSH EDX
CALL 0x00030de0
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0019f220
TEST ESI,ESI
JNZ 0x0019f178
SUB ESP,0xc
PUSH dword ptr [ESP + 0x40]
CALL 0x00031eb0
ADD ESP,0x10
MOV ESI,EAX
SUB ESP,0x4
PUSH ESI
PUSH dword ptr [ESP + 0x3c]
PUSH EBP
CALL 0x000332a0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0019f146
TEST EDI,EDI
JNZ 0x0019f1a2
SUB ESP,0xc
PUSH dword ptr [ESP + 0x44]
CALL 0x00031eb0
ADD ESP,0x10
MOV EDI,EAX
CMP EDI,ESI
JBE 0x0019f118
MOV EAX,dword ptr [ESP + 0x30]
SUB ESP,0xc
MOV ECX,dword ptr [EAX]
PUSH ECX
SUB EBP,ECX
MOV dword ptr [ESP + 0x18],ECX
CALL 0x00031eb0
MOV EDX,0x1001
ADD ESP,0xc
SUB EDX,ESI
PUSH 0x1
ADD EDX,EDI
ADD EAX,EDX
PUSH EAX
MOV ECX,dword ptr [ESP + 0x14]
PUSH ECX
CALL 0x00031b20
MOV ECX,dword ptr [ESP + 0x40]
ADD ESP,0x10
MOV dword ptr [ECX],EAX
TEST EAX,EAX
JZ 0x0019f22c
ADD EBP,EAX
LEA EDX,[EBP + ESI*0x1]
SUB ESP,0xc
PUSH EDX
MOV dword ptr [ESP + 0x18],EDX
CALL 0x00031eb0
ADD ESP,0xc
ADD EAX,0x1
PUSH EAX
MOV EDX,dword ptr [ESP + 0x10]
LEA EAX,[EBP + EDI*0x1]
PUSH EDX
PUSH EAX
CALL 0x00032dc0
ADD ESP,0x10
JMP 0x0019f11e
MOV dword ptr [ESP + 0xc],0x0
MOV EAX,dword ptr [ESP + 0xc]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x00032f50
MOV ESI,EAX
CALL 0x000305f0
SUB ESP,0xc
PUSH dword ptr [EAX]
CALL 0x00031c10
ADD ESP,0x10
PUSH EAX
MOV EDI,EAX
LEA EAX,[EBX + 0xffec8a40]
PUSH EAX
LEA EAX,[EBX + 0xffee6c70]
PUSH EAX
LEA EAX,[EBX + 0xffef01d0]
PUSH 0x2bc
PUSH 0xa0a
PUSH EAX
LEA EAX,[EBX + 0xffeefe0e]
PUSH EAX
PUSH ESI
CALL 0x00032e80
ADD ESP,0x14
PUSH EDI
CALL 0x00032950
MOV dword ptr [ESP],ESI
CALL 0x000320b0
MOV dword ptr [ESP],ESI
CALL 0x000335b0
ADD ESP,0x10
CALL 0x000308c0
SUB ESP,0xc
PUSH 0x1
CALL 0x00031270
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 SubstituteString(int *param_1,char *param_2,char *param_3)\n\n{\n  char *__s1;\n  int iVar1;\n  size_t sVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  undefined4 local_20;\n  \n  local_24 = (int)*param_2;\n  __s1 = strchr((char *)*param_1,local_24);\n  if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }\n  return local_20;\n}\n\n" comment (function_definition "undefined4 SubstituteString(int *param_1,char *param_2,char *param_3)\n\n{\n  char *__s1;\n  int iVar1;\n  size_t sVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  undefined4 local_20;\n  \n  local_24 = (int)*param_2;\n  __s1 = strchr((char *)*param_1,local_24);\n  if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }\n  return local_20;\n}" type_identifier (function_declarator "SubstituteString(int *param_1,char *param_2,char *param_3)" identifier (parameter_list "(int *param_1,char *param_2,char *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char *__s1;\n  int iVar1;\n  size_t sVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  undefined4 local_20;\n  \n  local_24 = (int)*param_2;\n  __s1 = strchr((char *)*param_1,local_24);\n  if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }\n  return local_20;\n}" { (declaration "char *__s1;" primitive_type (pointer_declarator "*__s1" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t __n_00;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 local_20;" type_identifier identifier ;) (expression_statement "local_24 = (int)*param_2;" (assignment_expression "local_24 = (int)*param_2" identifier = (cast_expression "(int)*param_2" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "__s1 = strchr((char *)*param_1,local_24);" (assignment_expression "__s1 = strchr((char *)*param_1,local_24)" identifier = (call_expression "strchr((char *)*param_1,local_24)" identifier (argument_list "((char *)*param_1,local_24)" ( (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) , identifier )))) ;) (if_statement "if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }" if (parenthesized_expression "(__s1 == (char *)0x0)" ( (binary_expression "__s1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_20 = 0;\n  }" { (expression_statement "local_20 = 0;" (assignment_expression "local_20 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }" else (compound_statement "{\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }" { (expression_statement "__n = 0;" (assignment_expression "__n = 0" identifier = number_literal) ;) (expression_statement "__n_00 = 0;" (assignment_expression "__n_00 = 0" identifier = number_literal) ;) (expression_statement "local_20 = 0;" (assignment_expression "local_20 = 0" identifier = number_literal) ;) (do_statement "do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);" do (compound_statement "{\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    }" { (if_statement "if (__n == 0) {\n        __n = strlen(param_2);\n      }" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (compound_statement "{\n        __n = strlen(param_2);\n      }" { (expression_statement "__n = strlen(param_2);" (assignment_expression "__n = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) })) (expression_statement "iVar1 = strncmp(__s1,param_2,__n);" (assignment_expression "iVar1 = strncmp(__s1,param_2,__n)" identifier = (call_expression "strncmp(__s1,param_2,__n)" identifier (argument_list "(__s1,param_2,__n)" ( identifier , identifier , identifier )))) ;) (expression_statement "pcVar6 = __s1;" (assignment_expression "pcVar6 = __s1" identifier = identifier) ;) (if_statement "if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }" { (if_statement "if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }" if (parenthesized_expression "(__n_00 == 0)" ( (binary_expression "__n_00 == 0" identifier == number_literal) )) (compound_statement "{\n          __n_00 = strlen(param_3);\n        }" { (expression_statement "__n_00 = strlen(param_3);" (assignment_expression "__n_00 = strlen(param_3)" identifier = (call_expression "strlen(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) })) (if_statement "if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;" if (parenthesized_expression "(__n < __n_00)" ( (binary_expression "__n < __n_00" identifier < identifier) )) (compound_statement "{\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }" { (expression_statement "pcVar6 = (char *)*param_1;" (assignment_expression "pcVar6 = (char *)*param_1" identifier = (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "sVar2 = strlen(pcVar6);" (assignment_expression "sVar2 = strlen(pcVar6)" identifier = (call_expression "strlen(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier )))) ;) (expression_statement "iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);" (assignment_expression "iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1)" identifier = (call_expression "ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1)" identifier (argument_list "(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1)" ( identifier , (binary_expression "sVar2 + (0x1001 - __n) + __n_00" (binary_expression "sVar2 + (0x1001 - __n)" identifier + (parenthesized_expression "(0x1001 - __n)" ( (binary_expression "0x1001 - __n" number_literal - identifier) ))) + identifier) , number_literal )))) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }" { (expression_statement "uVar3 = AcquireExceptionInfo();" (assignment_expression "uVar3 = AcquireExceptionInfo()" identifier = (call_expression "AcquireExceptionInfo()" identifier (argument_list "()" ( )))) ;) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar5 = GetExceptionMessage(*piVar4);" (assignment_expression "uVar5 = GetExceptionMessage(*piVar4)" identifier = (call_expression "GetExceptionMessage(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);" (call_expression "ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5)" identifier (argument_list "(uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5)" ( identifier , (string_literal ""MagickCore/string.c"" " string_content ") , (string_literal ""SubstituteString"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToAcquireString"" " string_content ") , (string_literal ""`%s\'"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "DestroyString(uVar5);" (call_expression "DestroyString(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (expression_statement "CatchException(uVar3);" (call_expression "CatchException(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) (expression_statement "DestroyExceptionInfo(uVar3);" (call_expression "DestroyExceptionInfo(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) (expression_statement "MagickCoreTerminus();" (call_expression "MagickCoreTerminus()" identifier (argument_list "()" ( ))) ;) comment (expression_statement "_exit(1);" (call_expression "_exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "__s1 = __s1 + (iVar1 - (int)pcVar6);" (assignment_expression "__s1 = __s1 + (iVar1 - (int)pcVar6)" identifier = (binary_expression "__s1 + (iVar1 - (int)pcVar6)" identifier + (parenthesized_expression "(iVar1 - (int)pcVar6)" ( (binary_expression "iVar1 - (int)pcVar6" identifier - (cast_expression "(int)pcVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (labeled_statement "LAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);" statement_identifier : (expression_statement "sVar2 = strlen(__s1 + __n);" (assignment_expression "sVar2 = strlen(__s1 + __n)" identifier = (call_expression "strlen(__s1 + __n)" identifier (argument_list "(__s1 + __n)" ( (binary_expression "__s1 + __n" identifier + identifier) )))) ;)) (expression_statement "memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);" (call_expression "memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1)" identifier (argument_list "(__s1 + __n_00,__s1 + __n,sVar2 + 1)" ( (binary_expression "__s1 + __n_00" identifier + identifier) , (binary_expression "__s1 + __n" identifier + identifier) , (binary_expression "sVar2 + 1" identifier + number_literal) ))) ;) }) (else_clause "else if (__n_00 != __n) goto LAB_0019f1e9;" else (if_statement "if (__n_00 != __n) goto LAB_0019f1e9;" if (parenthesized_expression "(__n_00 != __n)" ( (binary_expression "__n_00 != __n" identifier != identifier) )) (goto_statement "goto LAB_0019f1e9;" goto statement_identifier ;)))) (expression_statement "pcVar6 = __s1 + (__n_00 - 1);" (assignment_expression "pcVar6 = __s1 + (__n_00 - 1)" identifier = (binary_expression "__s1 + (__n_00 - 1)" identifier + (parenthesized_expression "(__n_00 - 1)" ( (binary_expression "__n_00 - 1" identifier - number_literal) )))) ;) (expression_statement "memcpy(__s1,param_3,__n_00);" (call_expression "memcpy(__s1,param_3,__n_00)" identifier (argument_list "(__s1,param_3,__n_00)" ( identifier , identifier , identifier ))) ;) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) (expression_statement "local_24 = (int)*param_2;" (assignment_expression "local_24 = (int)*param_2" identifier = (cast_expression "(int)*param_2" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_2" * identifier))) ;) })) (expression_statement "__s1 = strchr(pcVar6 + 1,local_24);" (assignment_expression "__s1 = strchr(pcVar6 + 1,local_24)" identifier = (call_expression "strchr(pcVar6 + 1,local_24)" identifier (argument_list "(pcVar6 + 1,local_24)" ( (binary_expression "pcVar6 + 1" identifier + number_literal) , identifier )))) ;) }) while (parenthesized_expression "(__s1 != (char *)0x0)" ( (binary_expression "__s1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) }))) (return_statement "return local_20;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n\nMagickBooleanType SubstituteString(char **string,char *search,char *replace)\n\n{\n  char *pcVar1;\n  int iVar2;\n  size_t sVar3;\n  char *pcVar4;\n  ExceptionInfo *exception;\n  int *piVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  MagickBooleanType local_20;\n  \n  local_24 = (int)*search;\n  pcVar1 = strchr(*string,local_24);\n  if (pcVar1 == (char *)0x0) {\n    local_20 = MagickFalse;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = MagickFalse;\n    do {\n      if (__n == 0) {\n        __n = strlen(search);\n      }\n      iVar2 = strncmp(pcVar1,search,__n);\n      pcVar6 = pcVar1;\n      if (iVar2 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }\n      pcVar1 = strchr(pcVar6 + 1,local_24);\n    } while (pcVar1 != (char *)0x0);\n  }\n  return local_20;\n}\n\n" comment comment comment (function_definition "MagickBooleanType SubstituteString(char **string,char *search,char *replace)\n\n{\n  char *pcVar1;\n  int iVar2;\n  size_t sVar3;\n  char *pcVar4;\n  ExceptionInfo *exception;\n  int *piVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  MagickBooleanType local_20;\n  \n  local_24 = (int)*search;\n  pcVar1 = strchr(*string,local_24);\n  if (pcVar1 == (char *)0x0) {\n    local_20 = MagickFalse;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = MagickFalse;\n    do {\n      if (__n == 0) {\n        __n = strlen(search);\n      }\n      iVar2 = strncmp(pcVar1,search,__n);\n      pcVar6 = pcVar1;\n      if (iVar2 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }\n      pcVar1 = strchr(pcVar6 + 1,local_24);\n    } while (pcVar1 != (char *)0x0);\n  }\n  return local_20;\n}" type_identifier (function_declarator "SubstituteString(char **string,char *search,char *replace)" identifier (parameter_list "(char **string,char *search,char *replace)" ( (parameter_declaration "char **string" primitive_type (pointer_declarator "**string" * (pointer_declarator "*string" * identifier))) , (parameter_declaration "char *search" primitive_type (pointer_declarator "*search" * identifier)) , (parameter_declaration "char *replace" primitive_type (pointer_declarator "*replace" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  size_t sVar3;\n  char *pcVar4;\n  ExceptionInfo *exception;\n  int *piVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  MagickBooleanType local_20;\n  \n  local_24 = (int)*search;\n  pcVar1 = strchr(*string,local_24);\n  if (pcVar1 == (char *)0x0) {\n    local_20 = MagickFalse;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = MagickFalse;\n    do {\n      if (__n == 0) {\n        __n = strlen(search);\n      }\n      iVar2 = strncmp(pcVar1,search,__n);\n      pcVar6 = pcVar1;\n      if (iVar2 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }\n      pcVar1 = strchr(pcVar6 + 1,local_24);\n    } while (pcVar1 != (char *)0x0);\n  }\n  return local_20;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "ExceptionInfo *exception;" type_identifier (pointer_declarator "*exception" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t __n_00;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "MagickBooleanType local_20;" type_identifier identifier ;) (expression_statement "local_24 = (int)*search;" (assignment_expression "local_24 = (int)*search" identifier = (cast_expression "(int)*search" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*search" * identifier))) ;) (expression_statement "pcVar1 = strchr(*string,local_24);" (assignment_expression "pcVar1 = strchr(*string,local_24)" identifier = (call_expression "strchr(*string,local_24)" identifier (argument_list "(*string,local_24)" ( (pointer_expression "*string" * identifier) , identifier )))) ;) (if_statement "if (pcVar1 == (char *)0x0) {\n    local_20 = MagickFalse;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = MagickFalse;\n    do {\n      if (__n == 0) {\n        __n = strlen(search);\n      }\n      iVar2 = strncmp(pcVar1,search,__n);\n      pcVar6 = pcVar1;\n      if (iVar2 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }\n      pcVar1 = strchr(pcVar6 + 1,local_24);\n    } while (pcVar1 != (char *)0x0);\n  }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_20 = MagickFalse;\n  }" { (expression_statement "local_20 = MagickFalse;" (assignment_expression "local_20 = MagickFalse" identifier = identifier) ;) }) (else_clause "else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = MagickFalse;\n    do {\n      if (__n == 0) {\n        __n = strlen(search);\n      }\n      iVar2 = strncmp(pcVar1,search,__n);\n      pcVar6 = pcVar1;\n      if (iVar2 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }\n      pcVar1 = strchr(pcVar6 + 1,local_24);\n    } while (pcVar1 != (char *)0x0);\n  }" else (compound_statement "{\n    __n = 0;\n    __n_00 = 0;\n    local_20 = MagickFalse;\n    do {\n      if (__n == 0) {\n        __n = strlen(search);\n      }\n      iVar2 = strncmp(pcVar1,search,__n);\n      pcVar6 = pcVar1;\n      if (iVar2 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }\n      pcVar1 = strchr(pcVar6 + 1,local_24);\n    } while (pcVar1 != (char *)0x0);\n  }" { (expression_statement "__n = 0;" (assignment_expression "__n = 0" identifier = number_literal) ;) (expression_statement "__n_00 = 0;" (assignment_expression "__n_00 = 0" identifier = number_literal) ;) (expression_statement "local_20 = MagickFalse;" (assignment_expression "local_20 = MagickFalse" identifier = identifier) ;) (do_statement "do {\n      if (__n == 0) {\n        __n = strlen(search);\n      }\n      iVar2 = strncmp(pcVar1,search,__n);\n      pcVar6 = pcVar1;\n      if (iVar2 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }\n      pcVar1 = strchr(pcVar6 + 1,local_24);\n    } while (pcVar1 != (char *)0x0);" do (compound_statement "{\n      if (__n == 0) {\n        __n = strlen(search);\n      }\n      iVar2 = strncmp(pcVar1,search,__n);\n      pcVar6 = pcVar1;\n      if (iVar2 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }\n      pcVar1 = strchr(pcVar6 + 1,local_24);\n    }" { (if_statement "if (__n == 0) {\n        __n = strlen(search);\n      }" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (compound_statement "{\n        __n = strlen(search);\n      }" { (expression_statement "__n = strlen(search);" (assignment_expression "__n = strlen(search)" identifier = (call_expression "strlen(search)" identifier (argument_list "(search)" ( identifier )))) ;) })) (expression_statement "iVar2 = strncmp(pcVar1,search,__n);" (assignment_expression "iVar2 = strncmp(pcVar1,search,__n)" identifier = (call_expression "strncmp(pcVar1,search,__n)" identifier (argument_list "(pcVar1,search,__n)" ( identifier , identifier , identifier )))) ;) (expression_statement "pcVar6 = pcVar1;" (assignment_expression "pcVar6 = pcVar1" identifier = identifier) ;) (if_statement "if (iVar2 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }\n        if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = pcVar1 + (__n_00 - 1);\n        memcpy(pcVar1,replace,__n_00);\n        local_20 = MagickTrue;\n        local_24 = (int)*search;\n      }" { (if_statement "if (__n_00 == 0) {\n          __n_00 = strlen(replace);\n        }" if (parenthesized_expression "(__n_00 == 0)" ( (binary_expression "__n_00 == 0" identifier == number_literal) )) (compound_statement "{\n          __n_00 = strlen(replace);\n        }" { (expression_statement "__n_00 = strlen(replace);" (assignment_expression "__n_00 = strlen(replace)" identifier = (call_expression "strlen(replace)" identifier (argument_list "(replace)" ( identifier )))) ;) })) (if_statement "if (__n < __n_00) {\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;" if (parenthesized_expression "(__n < __n_00)" ( (binary_expression "__n < __n_00" identifier < identifier) )) (compound_statement "{\n          pcVar6 = *string;\n          sVar3 = strlen(pcVar6);\n          pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);\n          *string = pcVar4;\n          if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }\n          pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);\n          memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);\n        }" { (expression_statement "pcVar6 = *string;" (assignment_expression "pcVar6 = *string" identifier = (pointer_expression "*string" * identifier)) ;) (expression_statement "sVar3 = strlen(pcVar6);" (assignment_expression "sVar3 = strlen(pcVar6)" identifier = (call_expression "strlen(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1);" (assignment_expression "pcVar4 = (char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1)" identifier = (cast_expression "(char *)ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "ResizeQuantumMemory(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1)" identifier (argument_list "(pcVar6,sVar3 + (0x1001 - __n) + __n_00,1)" ( identifier , (binary_expression "sVar3 + (0x1001 - __n) + __n_00" (binary_expression "sVar3 + (0x1001 - __n)" identifier + (parenthesized_expression "(0x1001 - __n)" ( (binary_expression "0x1001 - __n" number_literal - identifier) ))) + identifier) , number_literal ))))) ;) (expression_statement "*string = pcVar4;" (assignment_expression "*string = pcVar4" (pointer_expression "*string" * identifier) = identifier) ;) (if_statement "if (pcVar4 == (char *)0x0) {\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }" if (parenthesized_expression "(pcVar4 == (char *)0x0)" ( (binary_expression "pcVar4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            exception = AcquireExceptionInfo();\n            piVar5 = __errno_location();\n            pcVar1 = GetExceptionMessage(*piVar5);\n            ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);\n            DestroyString(pcVar1);\n            CatchException(exception);\n            DestroyExceptionInfo(exception);\n            MagickCoreTerminus();\n                    /* WARNING: Subroutine does not return */\n            _exit(1);\n          }" { (expression_statement "exception = AcquireExceptionInfo();" (assignment_expression "exception = AcquireExceptionInfo()" identifier = (call_expression "AcquireExceptionInfo()" identifier (argument_list "()" ( )))) ;) (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar1 = GetExceptionMessage(*piVar5);" (assignment_expression "pcVar1 = GetExceptionMessage(*piVar5)" identifier = (call_expression "GetExceptionMessage(*piVar5)" identifier (argument_list "(*piVar5)" ( (pointer_expression "*piVar5" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1);" (call_expression "ThrowMagickException\n                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1)" identifier (argument_list "(exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,\n                       "UnableToAcquireString","`%s\'",pcVar1)" ( identifier , (string_literal ""MagickCore/string.c"" " string_content ") , (string_literal ""SubstituteString"" " string_content ") , number_literal , identifier , (string_literal ""UnableToAcquireString"" " string_content ") , (string_literal ""`%s\'"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "DestroyString(pcVar1);" (call_expression "DestroyString(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "CatchException(exception);" (call_expression "CatchException(exception)" identifier (argument_list "(exception)" ( identifier ))) ;) (expression_statement "DestroyExceptionInfo(exception);" (call_expression "DestroyExceptionInfo(exception)" identifier (argument_list "(exception)" ( identifier ))) ;) (expression_statement "MagickCoreTerminus();" (call_expression "MagickCoreTerminus()" identifier (argument_list "()" ( ))) ;) comment (expression_statement "_exit(1);" (call_expression "_exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6);" (assignment_expression "pcVar1 = pcVar4 + ((int)pcVar1 - (int)pcVar6)" identifier = (binary_expression "pcVar4 + ((int)pcVar1 - (int)pcVar6)" identifier + (parenthesized_expression "((int)pcVar1 - (int)pcVar6)" ( (binary_expression "(int)pcVar1 - (int)pcVar6" (cast_expression "(int)pcVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (labeled_statement "LAB_0019f1e9:\n          sVar3 = strlen(pcVar1 + __n);" statement_identifier : (expression_statement "sVar3 = strlen(pcVar1 + __n);" (assignment_expression "sVar3 = strlen(pcVar1 + __n)" identifier = (call_expression "strlen(pcVar1 + __n)" identifier (argument_list "(pcVar1 + __n)" ( (binary_expression "pcVar1 + __n" identifier + identifier) )))) ;)) (expression_statement "memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1);" (call_expression "memmove(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1)" identifier (argument_list "(pcVar1 + __n_00,pcVar1 + __n,sVar3 + 1)" ( (binary_expression "pcVar1 + __n_00" identifier + identifier) , (binary_expression "pcVar1 + __n" identifier + identifier) , (binary_expression "sVar3 + 1" identifier + number_literal) ))) ;) }) (else_clause "else if (__n_00 != __n) goto LAB_0019f1e9;" else (if_statement "if (__n_00 != __n) goto LAB_0019f1e9;" if (parenthesized_expression "(__n_00 != __n)" ( (binary_expression "__n_00 != __n" identifier != identifier) )) (goto_statement "goto LAB_0019f1e9;" goto statement_identifier ;)))) (expression_statement "pcVar6 = pcVar1 + (__n_00 - 1);" (assignment_expression "pcVar6 = pcVar1 + (__n_00 - 1)" identifier = (binary_expression "pcVar1 + (__n_00 - 1)" identifier + (parenthesized_expression "(__n_00 - 1)" ( (binary_expression "__n_00 - 1" identifier - number_literal) )))) ;) (expression_statement "memcpy(pcVar1,replace,__n_00);" (call_expression "memcpy(pcVar1,replace,__n_00)" identifier (argument_list "(pcVar1,replace,__n_00)" ( identifier , identifier , identifier ))) ;) (expression_statement "local_20 = MagickTrue;" (assignment_expression "local_20 = MagickTrue" identifier = identifier) ;) (expression_statement "local_24 = (int)*search;" (assignment_expression "local_24 = (int)*search" identifier = (cast_expression "(int)*search" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*search" * identifier))) ;) })) (expression_statement "pcVar1 = strchr(pcVar6 + 1,local_24);" (assignment_expression "pcVar1 = strchr(pcVar6 + 1,local_24)" identifier = (call_expression "strchr(pcVar6 + 1,local_24)" identifier (argument_list "(pcVar6 + 1,local_24)" ( (binary_expression "pcVar6 + 1" identifier + number_literal) , identifier )))) ;) }) while (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) }))) (return_statement "return local_20;" return identifier ;) })))
(translation_unit "undefined4 SubstituteString(int *param_1,char *param_2,char *param_3)\n\n{\n  char *__s1;\n  int iVar1;\n  size_t sVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  undefined4 local_20;\n  \n  local_24 = (int)*param_2;\n  __s1 = strchr((char *)*param_1,local_24);\n  if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }\n  return local_20;\n}\n\n" (function_definition "undefined4 SubstituteString(int *param_1,char *param_2,char *param_3)\n\n{\n  char *__s1;\n  int iVar1;\n  size_t sVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  undefined4 local_20;\n  \n  local_24 = (int)*param_2;\n  __s1 = strchr((char *)*param_1,local_24);\n  if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }\n  return local_20;\n}" type_identifier (function_declarator "SubstituteString(int *param_1,char *param_2,char *param_3)" identifier (parameter_list "(int *param_1,char *param_2,char *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char *__s1;\n  int iVar1;\n  size_t sVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  undefined4 local_20;\n  \n  local_24 = (int)*param_2;\n  __s1 = strchr((char *)*param_1,local_24);\n  if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }\n  return local_20;\n}" { (declaration "char *__s1;" primitive_type (pointer_declarator "*__s1" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t __n_00;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 local_20;" type_identifier identifier ;) (expression_statement "local_24 = (int)*param_2;" (assignment_expression "local_24 = (int)*param_2" identifier = (cast_expression "(int)*param_2" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "__s1 = strchr((char *)*param_1,local_24);" (assignment_expression "__s1 = strchr((char *)*param_1,local_24)" identifier = (call_expression "strchr((char *)*param_1,local_24)" identifier (argument_list "((char *)*param_1,local_24)" ( (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) , identifier )))) ;) (if_statement "if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }" if (parenthesized_expression "(__s1 == (char *)0x0)" ( (binary_expression "__s1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_20 = 0;\n  }" { (expression_statement "local_20 = 0;" (assignment_expression "local_20 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }" else (compound_statement "{\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }" { (expression_statement "__n = 0;" (assignment_expression "__n = 0" identifier = number_literal) ;) (expression_statement "__n_00 = 0;" (assignment_expression "__n_00 = 0" identifier = number_literal) ;) (expression_statement "local_20 = 0;" (assignment_expression "local_20 = 0" identifier = number_literal) ;) (do_statement "do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);" do (compound_statement "{\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    }" { (if_statement "if (__n == 0) {\n        __n = strlen(param_2);\n      }" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (compound_statement "{\n        __n = strlen(param_2);\n      }" { (expression_statement "__n = strlen(param_2);" (assignment_expression "__n = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) })) (expression_statement "iVar1 = strncmp(__s1,param_2,__n);" (assignment_expression "iVar1 = strncmp(__s1,param_2,__n)" identifier = (call_expression "strncmp(__s1,param_2,__n)" identifier (argument_list "(__s1,param_2,__n)" ( identifier , identifier , identifier )))) ;) (expression_statement "pcVar6 = __s1;" (assignment_expression "pcVar6 = __s1" identifier = identifier) ;) (if_statement "if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }" { (if_statement "if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }" if (parenthesized_expression "(__n_00 == 0)" ( (binary_expression "__n_00 == 0" identifier == number_literal) )) (compound_statement "{\n          __n_00 = strlen(param_3);\n        }" { (expression_statement "__n_00 = strlen(param_3);" (assignment_expression "__n_00 = strlen(param_3)" identifier = (call_expression "strlen(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) })) (if_statement "if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;" if (parenthesized_expression "(__n < __n_00)" ( (binary_expression "__n < __n_00" identifier < identifier) )) (compound_statement "{\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }" { (expression_statement "pcVar6 = (char *)*param_1;" (assignment_expression "pcVar6 = (char *)*param_1" identifier = (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "sVar2 = strlen(pcVar6);" (assignment_expression "sVar2 = strlen(pcVar6)" identifier = (call_expression "strlen(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier )))) ;) (expression_statement "iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);" (assignment_expression "iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1)" identifier = (call_expression "ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1)" identifier (argument_list "(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1)" ( identifier , (binary_expression "sVar2 + (0x1001 - __n) + __n_00" (binary_expression "sVar2 + (0x1001 - __n)" identifier + (parenthesized_expression "(0x1001 - __n)" ( (binary_expression "0x1001 - __n" number_literal - identifier) ))) + identifier) , number_literal )))) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }" { (expression_statement "uVar3 = AcquireExceptionInfo();" (assignment_expression "uVar3 = AcquireExceptionInfo()" identifier = (call_expression "AcquireExceptionInfo()" identifier (argument_list "()" ( )))) ;) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar5 = GetExceptionMessage(*piVar4);" (assignment_expression "uVar5 = GetExceptionMessage(*piVar4)" identifier = (call_expression "GetExceptionMessage(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);" (call_expression "ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5)" identifier (argument_list "(uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5)" ( identifier , (string_literal ""MagickCore/string.c"" " string_content ") , (string_literal ""SubstituteString"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToAcquireString"" " string_content ") , (string_literal ""`%s\'"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "DestroyString(uVar5);" (call_expression "DestroyString(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (expression_statement "CatchException(uVar3);" (call_expression "CatchException(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) (expression_statement "DestroyExceptionInfo(uVar3);" (call_expression "DestroyExceptionInfo(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) (expression_statement "MagickCoreTerminus();" (call_expression "MagickCoreTerminus()" identifier (argument_list "()" ( ))) ;) (expression_statement "_exit(1);" (call_expression "_exit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "__s1 = __s1 + (iVar1 - (int)pcVar6);" (assignment_expression "__s1 = __s1 + (iVar1 - (int)pcVar6)" identifier = (binary_expression "__s1 + (iVar1 - (int)pcVar6)" identifier + (parenthesized_expression "(iVar1 - (int)pcVar6)" ( (binary_expression "iVar1 - (int)pcVar6" identifier - (cast_expression "(int)pcVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (labeled_statement "LAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);" statement_identifier : (expression_statement "sVar2 = strlen(__s1 + __n);" (assignment_expression "sVar2 = strlen(__s1 + __n)" identifier = (call_expression "strlen(__s1 + __n)" identifier (argument_list "(__s1 + __n)" ( (binary_expression "__s1 + __n" identifier + identifier) )))) ;)) (expression_statement "memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);" (call_expression "memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1)" identifier (argument_list "(__s1 + __n_00,__s1 + __n,sVar2 + 1)" ( (binary_expression "__s1 + __n_00" identifier + identifier) , (binary_expression "__s1 + __n" identifier + identifier) , (binary_expression "sVar2 + 1" identifier + number_literal) ))) ;) }) (else_clause "else if (__n_00 != __n) goto LAB_0019f1e9;" else (if_statement "if (__n_00 != __n) goto LAB_0019f1e9;" if (parenthesized_expression "(__n_00 != __n)" ( (binary_expression "__n_00 != __n" identifier != identifier) )) (goto_statement "goto LAB_0019f1e9;" goto statement_identifier ;)))) (expression_statement "pcVar6 = __s1 + (__n_00 - 1);" (assignment_expression "pcVar6 = __s1 + (__n_00 - 1)" identifier = (binary_expression "__s1 + (__n_00 - 1)" identifier + (parenthesized_expression "(__n_00 - 1)" ( (binary_expression "__n_00 - 1" identifier - number_literal) )))) ;) (expression_statement "memcpy(__s1,param_3,__n_00);" (call_expression "memcpy(__s1,param_3,__n_00)" identifier (argument_list "(__s1,param_3,__n_00)" ( identifier , identifier , identifier ))) ;) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) (expression_statement "local_24 = (int)*param_2;" (assignment_expression "local_24 = (int)*param_2" identifier = (cast_expression "(int)*param_2" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_2" * identifier))) ;) })) (expression_statement "__s1 = strchr(pcVar6 + 1,local_24);" (assignment_expression "__s1 = strchr(pcVar6 + 1,local_24)" identifier = (call_expression "strchr(pcVar6 + 1,local_24)" identifier (argument_list "(pcVar6 + 1,local_24)" ( (binary_expression "pcVar6 + 1" identifier + number_literal) , identifier )))) ;) }) while (parenthesized_expression "(__s1 != (char *)0x0)" ( (binary_expression "__s1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) }))) (return_statement "return local_20;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression LIT - IDENT) ))) + IDENT) , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , LIT , (string_literal " string_content ") , (string_literal " string_content escape_sequence ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) )))) ;)) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , (binary_expression IDENT + IDENT) , (binary_expression IDENT + LIT) ))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (goto_statement goto statement_identifier ;)))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - LIT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT )))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 SubstituteString(int *param_1,char *param_2,char *param_3)\n\n{\n  char *__s1;\n  int iVar1;\n  size_t sVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  undefined4 local_20;\n  \n  local_24 = (int)*param_2;\n  __s1 = strchr((char *)*param_1,local_24);\n  if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }\n  return local_20;\n}" (type_identifier "undefined4") (function_declarator "SubstituteString(int *param_1,char *param_2,char *param_3)" (identifier "SubstituteString") (parameter_list "(int *param_1,char *param_2,char *param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "char *param_3" (primitive_type "char") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  char *__s1;\n  int iVar1;\n  size_t sVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t __n;\n  size_t __n_00;\n  int local_24;\n  undefined4 local_20;\n  \n  local_24 = (int)*param_2;\n  __s1 = strchr((char *)*param_1,local_24);\n  if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }\n  return local_20;\n}" ({ "{") (declaration "char *__s1;" (primitive_type "char") (pointer_declarator "*__s1" (* "*") (identifier "__s1")) (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "size_t __n_00;" (primitive_type "size_t") (identifier "__n_00") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "undefined4 local_20;" (type_identifier "undefined4") (identifier "local_20") (; ";")) (expression_statement "local_24 = (int)*param_2;" (assignment_expression "local_24 = (int)*param_2" (identifier "local_24") (= "=") (cast_expression "(int)*param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "__s1 = strchr((char *)*param_1,local_24);" (assignment_expression "__s1 = strchr((char *)*param_1,local_24)" (identifier "__s1") (= "=") (call_expression "strchr((char *)*param_1,local_24)" (identifier "strchr") (argument_list "((char *)*param_1,local_24)" (( "(") (cast_expression "(char *)*param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (, ",") (identifier "local_24") () ")")))) (; ";")) (if_statement "if (__s1 == (char *)0x0) {\n    local_20 = 0;\n  }\n  else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }" (if "if") (parenthesized_expression "(__s1 == (char *)0x0)" (( "(") (binary_expression "__s1 == (char *)0x0" (identifier "__s1") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    local_20 = 0;\n  }" ({ "{") (expression_statement "local_20 = 0;" (assignment_expression "local_20 = 0" (identifier "local_20") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }" (else "else") (compound_statement "{\n    __n = 0;\n    __n_00 = 0;\n    local_20 = 0;\n    do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);\n  }" ({ "{") (expression_statement "__n = 0;" (assignment_expression "__n = 0" (identifier "__n") (= "=") (number_literal "0")) (; ";")) (expression_statement "__n_00 = 0;" (assignment_expression "__n_00 = 0" (identifier "__n_00") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_20 = 0;" (assignment_expression "local_20 = 0" (identifier "local_20") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    } while (__s1 != (char *)0x0);" (do "do") (compound_statement "{\n      if (__n == 0) {\n        __n = strlen(param_2);\n      }\n      iVar1 = strncmp(__s1,param_2,__n);\n      pcVar6 = __s1;\n      if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }\n      __s1 = strchr(pcVar6 + 1,local_24);\n    }" ({ "{") (if_statement "if (__n == 0) {\n        __n = strlen(param_2);\n      }" (if "if") (parenthesized_expression "(__n == 0)" (( "(") (binary_expression "__n == 0" (identifier "__n") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        __n = strlen(param_2);\n      }" ({ "{") (expression_statement "__n = strlen(param_2);" (assignment_expression "__n = strlen(param_2)" (identifier "__n") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (} "}"))) (expression_statement "iVar1 = strncmp(__s1,param_2,__n);" (assignment_expression "iVar1 = strncmp(__s1,param_2,__n)" (identifier "iVar1") (= "=") (call_expression "strncmp(__s1,param_2,__n)" (identifier "strncmp") (argument_list "(__s1,param_2,__n)" (( "(") (identifier "__s1") (, ",") (identifier "param_2") (, ",") (identifier "__n") () ")")))) (; ";")) (expression_statement "pcVar6 = __s1;" (assignment_expression "pcVar6 = __s1" (identifier "pcVar6") (= "=") (identifier "__s1")) (; ";")) (if_statement "if (iVar1 == 0) {\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }\n        if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;\n        pcVar6 = __s1 + (__n_00 - 1);\n        memcpy(__s1,param_3,__n_00);\n        local_20 = 1;\n        local_24 = (int)*param_2;\n      }" ({ "{") (if_statement "if (__n_00 == 0) {\n          __n_00 = strlen(param_3);\n        }" (if "if") (parenthesized_expression "(__n_00 == 0)" (( "(") (binary_expression "__n_00 == 0" (identifier "__n_00") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          __n_00 = strlen(param_3);\n        }" ({ "{") (expression_statement "__n_00 = strlen(param_3);" (assignment_expression "__n_00 = strlen(param_3)" (identifier "__n_00") (= "=") (call_expression "strlen(param_3)" (identifier "strlen") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (} "}"))) (if_statement "if (__n < __n_00) {\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }\n        else if (__n_00 != __n) goto LAB_0019f1e9;" (if "if") (parenthesized_expression "(__n < __n_00)" (( "(") (binary_expression "__n < __n_00" (identifier "__n") (< "<") (identifier "__n_00")) () ")")) (compound_statement "{\n          pcVar6 = (char *)*param_1;\n          sVar2 = strlen(pcVar6);\n          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);\n          *param_1 = iVar1;\n          if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }\n          __s1 = __s1 + (iVar1 - (int)pcVar6);\nLAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);\n          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);\n        }" ({ "{") (expression_statement "pcVar6 = (char *)*param_1;" (assignment_expression "pcVar6 = (char *)*param_1" (identifier "pcVar6") (= "=") (cast_expression "(char *)*param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "sVar2 = strlen(pcVar6);" (assignment_expression "sVar2 = strlen(pcVar6)" (identifier "sVar2") (= "=") (call_expression "strlen(pcVar6)" (identifier "strlen") (argument_list "(pcVar6)" (( "(") (identifier "pcVar6") () ")")))) (; ";")) (expression_statement "iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);" (assignment_expression "iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1)" (identifier "iVar1") (= "=") (call_expression "ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1)" (identifier "ResizeQuantumMemory") (argument_list "(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1)" (( "(") (identifier "pcVar6") (, ",") (binary_expression "sVar2 + (0x1001 - __n) + __n_00" (binary_expression "sVar2 + (0x1001 - __n)" (identifier "sVar2") (+ "+") (parenthesized_expression "(0x1001 - __n)" (( "(") (binary_expression "0x1001 - __n" (number_literal "0x1001") (- "-") (identifier "__n")) () ")"))) (+ "+") (identifier "__n_00")) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 == 0) {\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            uVar3 = AcquireExceptionInfo();\n            piVar4 = __errno_location();\n            uVar5 = GetExceptionMessage(*piVar4);\n            ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);\n            DestroyString(uVar5);\n            CatchException(uVar3);\n            DestroyExceptionInfo(uVar3);\n            MagickCoreTerminus();\n                    \n            _exit(1);\n          }" ({ "{") (expression_statement "uVar3 = AcquireExceptionInfo();" (assignment_expression "uVar3 = AcquireExceptionInfo()" (identifier "uVar3") (= "=") (call_expression "AcquireExceptionInfo()" (identifier "AcquireExceptionInfo") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar5 = GetExceptionMessage(*piVar4);" (assignment_expression "uVar5 = GetExceptionMessage(*piVar4)" (identifier "uVar5") (= "=") (call_expression "GetExceptionMessage(*piVar4)" (identifier "GetExceptionMessage") (argument_list "(*piVar4)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) () ")")))) (; ";")) (expression_statement "ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5);" (call_expression "ThrowMagickException\n                      (uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5)" (identifier "ThrowMagickException") (argument_list "(uVar3,"MagickCore/string.c","SubstituteString",0xa0a,700,\n                       "UnableToAcquireString","`%s\'",uVar5)" (( "(") (identifier "uVar3") (, ",") (string_literal ""MagickCore/string.c"" (" """) (string_content "MagickCore/string.c") (" """)) (, ",") (string_literal ""SubstituteString"" (" """) (string_content "SubstituteString") (" """)) (, ",") (number_literal "0xa0a") (, ",") (number_literal "700") (, ",") (string_literal ""UnableToAcquireString"" (" """) (string_content "UnableToAcquireString") (" """)) (, ",") (string_literal ""`%s\'"" (" """) (string_content "`%s") (escape_sequence "\'") (" """)) (, ",") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "DestroyString(uVar5);" (call_expression "DestroyString(uVar5)" (identifier "DestroyString") (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "CatchException(uVar3);" (call_expression "CatchException(uVar3)" (identifier "CatchException") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "DestroyExceptionInfo(uVar3);" (call_expression "DestroyExceptionInfo(uVar3)" (identifier "DestroyExceptionInfo") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "MagickCoreTerminus();" (call_expression "MagickCoreTerminus()" (identifier "MagickCoreTerminus") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "_exit(1);" (call_expression "_exit(1)" (identifier "_exit") (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";")) (} "}"))) (expression_statement "__s1 = __s1 + (iVar1 - (int)pcVar6);" (assignment_expression "__s1 = __s1 + (iVar1 - (int)pcVar6)" (identifier "__s1") (= "=") (binary_expression "__s1 + (iVar1 - (int)pcVar6)" (identifier "__s1") (+ "+") (parenthesized_expression "(iVar1 - (int)pcVar6)" (( "(") (binary_expression "iVar1 - (int)pcVar6" (identifier "iVar1") (- "-") (cast_expression "(int)pcVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar6"))) () ")")))) (; ";")) (labeled_statement "LAB_0019f1e9:\n          sVar2 = strlen(__s1 + __n);" (statement_identifier "LAB_0019f1e9") (: ":") (expression_statement "sVar2 = strlen(__s1 + __n);" (assignment_expression "sVar2 = strlen(__s1 + __n)" (identifier "sVar2") (= "=") (call_expression "strlen(__s1 + __n)" (identifier "strlen") (argument_list "(__s1 + __n)" (( "(") (binary_expression "__s1 + __n" (identifier "__s1") (+ "+") (identifier "__n")) () ")")))) (; ";"))) (expression_statement "memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);" (call_expression "memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1)" (identifier "memmove") (argument_list "(__s1 + __n_00,__s1 + __n,sVar2 + 1)" (( "(") (binary_expression "__s1 + __n_00" (identifier "__s1") (+ "+") (identifier "__n_00")) (, ",") (binary_expression "__s1 + __n" (identifier "__s1") (+ "+") (identifier "__n")) (, ",") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) () ")"))) (; ";")) (} "}")) (else_clause "else if (__n_00 != __n) goto LAB_0019f1e9;" (else "else") (if_statement "if (__n_00 != __n) goto LAB_0019f1e9;" (if "if") (parenthesized_expression "(__n_00 != __n)" (( "(") (binary_expression "__n_00 != __n" (identifier "__n_00") (!= "!=") (identifier "__n")) () ")")) (goto_statement "goto LAB_0019f1e9;" (goto "goto") (statement_identifier "LAB_0019f1e9") (; ";"))))) (expression_statement "pcVar6 = __s1 + (__n_00 - 1);" (assignment_expression "pcVar6 = __s1 + (__n_00 - 1)" (identifier "pcVar6") (= "=") (binary_expression "__s1 + (__n_00 - 1)" (identifier "__s1") (+ "+") (parenthesized_expression "(__n_00 - 1)" (( "(") (binary_expression "__n_00 - 1" (identifier "__n_00") (- "-") (number_literal "1")) () ")")))) (; ";")) (expression_statement "memcpy(__s1,param_3,__n_00);" (call_expression "memcpy(__s1,param_3,__n_00)" (identifier "memcpy") (argument_list "(__s1,param_3,__n_00)" (( "(") (identifier "__s1") (, ",") (identifier "param_3") (, ",") (identifier "__n_00") () ")"))) (; ";")) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" (identifier "local_20") (= "=") (number_literal "1")) (; ";")) (expression_statement "local_24 = (int)*param_2;" (assignment_expression "local_24 = (int)*param_2" (identifier "local_24") (= "=") (cast_expression "(int)*param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (} "}"))) (expression_statement "__s1 = strchr(pcVar6 + 1,local_24);" (assignment_expression "__s1 = strchr(pcVar6 + 1,local_24)" (identifier "__s1") (= "=") (call_expression "strchr(pcVar6 + 1,local_24)" (identifier "strchr") (argument_list "(pcVar6 + 1,local_24)" (( "(") (binary_expression "pcVar6 + 1" (identifier "pcVar6") (+ "+") (number_literal "1")) (, ",") (identifier "local_24") () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(__s1 != (char *)0x0)" (( "(") (binary_expression "__s1 != (char *)0x0" (identifier "__s1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}")))) (return_statement "return local_20;" (return "return") (identifier "local_20") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */

type_1 function_1(char **string,char *search,char *replace)

{
  char *var_2;
  int var_6;
  size_t var_9;
  char *var_10;
  type_2 *exception;
  int *piVar5;
  char *var_22;
  size_t var_3;
  size_t var_7;
  int local_24;
  type_1 local_20;
  
  local_24 = (int)*search;
  var_2 = var_1(*string,local_24);
  if (var_2 == (char *)0x0) {
    local_20 = MagickFalse;
  }
  else {
    var_3 = 0;
    var_7 = 0;
    local_20 = MagickFalse;
    do {
      if (var_3 == 0) {
        var_3 = var_4(search);
      }
      var_6 = var_5(var_2,search,var_3);
      var_22 = var_2;
      if (var_6 == 0) {
        if (var_7 == 0) {
          var_7 = var_4(replace);
        }
        if (var_3 < var_7) {
          var_22 = *string;
          var_9 = var_4(var_22);
          var_10 = (char *)var_8(var_22,var_9 + (0x1001 - var_3) + var_7,1);
          *string = var_10;
          if (var_10 == (char *)0x0) {
            exception = var_11();
            piVar5 = var_12();
            var_2 = var_13(*piVar5);
            var_14
                      (exception,"MagickCore/string.c","SubstituteString",0xa0a,FatalErrorException,
                       "UnableToAcquireString","`%s\'",var_2);
            var_15(var_2);
            var_16(exception);
            var_17(exception);
            var_18();
                    /* WARNING: Subroutine does not return */
            var_19(1);
          }
          var_2 = var_10 + ((int)var_2 - (int)var_22);
LAB_0019f1e9:
          var_9 = var_4(var_2 + var_3);
          var_20(var_2 + var_7,var_2 + var_3,var_9 + 1);
        }
        else if (var_7 != var_3) goto LAB_0019f1e9;
        var_22 = var_2 + (var_7 - 1);
        var_21(var_2,replace,var_7);
        local_20 = MagickTrue;
        local_24 = (int)*search;
      }
      var_2 = var_1(var_22 + 1,local_24);
    } while (var_2 != (char *)0x0);
  }
  return local_20;
}


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

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

undefined4 MASKED(int *param_1,char *param_2,char *param_3)

{
  char *__s1;
  int iVar1;
  size_t sVar2;
  undefined4 uVar3;
  int *piVar4;
  undefined4 uVar5;
  char *pcVar6;
  size_t __n;
  size_t __n_00;
  int local_24;
  undefined4 local_20;
  
  local_24 = (int)*param_2;
  __s1 = strchr((char *)*param_1,local_24);
  if (__s1 == (char *)0x0) {
    local_20 = 0;
  }
  else {
    __n = 0;
    __n_00 = 0;
    local_20 = 0;
    do {
      if (__n == 0) {
        __n = strlen(param_2);
      }
      iVar1 = strncmp(__s1,param_2,__n);
      pcVar6 = __s1;
      if (iVar1 == 0) {
        if (__n_00 == 0) {
          __n_00 = strlen(param_3);
        }
        if (__n < __n_00) {
          pcVar6 = (char *)*param_1;
          sVar2 = strlen(pcVar6);
          iVar1 = ResizeQuantumMemory(pcVar6,sVar2 + (0x1001 - __n) + __n_00,1);
          *param_1 = iVar1;
          if (iVar1 == 0) {
            uVar3 = AcquireExceptionInfo();
            piVar4 = __errno_location();
            uVar5 = GetExceptionMessage(*piVar4);
            ThrowMagickException
                      (uVar3,"MagickCore/string.c","MASKED",0xa0a,700,
                       "UnableToAcquireString","`%s\'",uVar5);
            DestroyString(uVar5);
            CatchException(uVar3);
            DestroyExceptionInfo(uVar3);
            MagickCoreTerminus();
                    /* WARNING: Subroutine does not return */
            _exit(1);
          }
          __s1 = __s1 + (iVar1 - (int)pcVar6);
LAB_0019f1e9:
          sVar2 = strlen(__s1 + __n);
          memmove(__s1 + __n_00,__s1 + __n,sVar2 + 1);
        }
        else if (__n_00 != __n) goto LAB_0019f1e9;
        pcVar6 = __s1 + (__n_00 - 1);
        memcpy(__s1,param_3,__n_00);
        local_20 = 1;
        local_24 = (int)*param_2;
      }
      __s1 = strchr(pcVar6 + 1,local_24);
    } while (__s1 != (char *)0x0);
  }
  return local_20;
}

