
/* WARNING: Enum "ExceptionType": Some values do not have unique names */
/* WARNING: Enum "LogEventType": Some values do not have unique names */

MagickBooleanType BlobToFile(char *filename,void *blob,size_t length,ExceptionInfo *exception)

{
  int iVar1;
  MagickBooleanType MVar2;
  long lVar3;
  int *piVar4;
  char *pcVar5;
  size_t __n;
  ulong uVar6;
  
  if (filename == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");
  }
  LogMagickEvent(TraceEvent,"MagickCore/blob.c","BlobToFile",0x168,"%s",filename);
  if (blob == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");
  }
  if (*filename == '\0') {
    iVar1 = AcquireUniqueFileResource(filename);
  }
  else {
    iVar1 = open(filename,0xc2,0x180);
  }
  if (iVar1 == -1) {
    piVar4 = __errno_location();
    pcVar5 = GetExceptionMessage(*piVar4);
    ThrowMagickException
              (exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",
               "\'%s\': %s",filename,pcVar5);
    DestroyString(pcVar5);
    MVar2 = MagickFalse;
  }
  else {
    uVar6 = 0;
    if (length == 0) {
      uVar6 = 0;
    }
    else {
      do {
        __n = length - uVar6;
        if (0x7fffffffffffffff < __n) {
          __n = 0x7fffffffffffffff;
        }
        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);
        if (lVar3 < 1) {
          piVar4 = __errno_location();
          if (*piVar4 != 4) break;
          lVar3 = 0;
        }
        uVar6 = uVar6 + lVar3;
      } while (uVar6 < length);
    }
    iVar1 = close(iVar1);
    if ((iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length)) {
      piVar4 = __errno_location();
      pcVar5 = GetExceptionMessage(*piVar4);
      ThrowMagickException
                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",
                 "\'%s\': %s",filename,pcVar5);
      DestroyString(pcVar5);
      MVar2 = MagickFalse;
    }
  }
  return MVar2;
}



undefined8 BlobToFile(char *param_1,long param_2,ulong param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 uVar2;
  long lVar3;
  int *piVar4;
  size_t __n;
  ulong uVar5;
  
  if (param_1 == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");
  }
  LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");
  }
  if (*param_1 == '\0') {
    iVar1 = AcquireUniqueFileResource(param_1);
  }
  else {
    iVar1 = open(param_1,0xc2,0x180);
  }
  if (iVar1 == -1) {
    piVar4 = __errno_location();
    uVar2 = GetExceptionMessage(*piVar4);
    ThrowMagickException
              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"
               ,param_1,uVar2);
    DestroyString(uVar2);
    uVar2 = 0;
  }
  else {
    uVar5 = 0;
    if (param_3 == 0) {
      uVar5 = 0;
    }
    else {
      do {
        __n = param_3 - uVar5;
        if (0x7fffffffffffffff < __n) {
          __n = 0x7fffffffffffffff;
        }
        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);
        if (lVar3 < 1) {
          piVar4 = __errno_location();
          if (*piVar4 != 4) break;
          lVar3 = 0;
        }
        uVar5 = uVar5 + lVar3;
      } while (uVar5 < param_3);
    }
    iVar1 = close(iVar1);
    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {
      piVar4 = __errno_location();
      uVar2 = GetExceptionMessage(*piVar4);
      ThrowMagickException
                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",
                 "\'%s\': %s",param_1,uVar2);
      DestroyString(uVar2);
      uVar2 = 0;
    }
  }
  return uVar2;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RCX
TEST RDI,RDI
JZ 0x0015eff1
MOV R15,RDI
MOV R14,RSI
MOV RBP,RDX
MOV R9,RDI
LEA R8,[0x41fe36]
MOV ECX,0x168
LEA RDX,[0x3fb2f8]
LEA RSI,[0x3fa404]
MOV EDI,0x8000
MOV EAX,0x0
CALL 0x0014be20
TEST R14,R14
JZ 0x0015f010
CMP byte ptr [R15],0x0
JNZ 0x0015f02f
MOV RDI,R15
CALL 0x0014cff0
MOV R13D,EAX
CMP R13D,-0x1
JZ 0x0015f04e
MOV EBX,0x0
MOV R12,0x7fffffffffffffff
TEST RBP,RBP
JNZ 0x0015f0bd
MOV RBX,RBP
MOV EDI,R13D
CALL 0x00149f40
CMP EAX,-0x1
JZ 0x0015f0f0
MOV EAX,0x1
CMP RBP,RBX
JA 0x0015f0f0
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LEA RCX,[0x3fb308]
MOV EDX,0x167
LEA RSI,[0x3fa404]
LEA RDI,[0x3fa6b0]
CALL 0x0014a360
LEA RCX,[0x3fb308]
MOV EDX,0x169
LEA RSI,[0x3fa404]
LEA RDI,[0x3fa416]
CALL 0x0014a360
MOV EDX,0x180
MOV ESI,0xc2
MOV RDI,R15
MOV EAX,0x0
CALL 0x0014d770
MOV R13D,EAX
JMP 0x0015ef9e
CALL 0x0014c2f0
MOV EDI,dword ptr [RAX]
CALL 0x0014b460
MOV RBX,RAX
SUB RSP,0x8
PUSH RAX
PUSH R15
LEA RAX,[0x3f86ec]
PUSH RAX
LEA R9,[0x3fa432]
MOV R8D,0x1b3
MOV ECX,0x170
LEA RDX,[0x3fb2f8]
LEA RSI,[0x3fa404]
MOV RDI,qword ptr [RSP + 0x28]
MOV EAX,0x0
CALL 0x0014cb70
ADD RSP,0x20
MOV RDI,RBX
CALL 0x0014c570
MOV EAX,0x0
JMP 0x0015efe2
ADD RBX,RAX
CMP RBP,RBX
JBE 0x0015efc3
MOV RDX,RBP
SUB RDX,RBX
CMP RDX,R12
CMOVA RDX,R12
LEA RSI,[R14 + RBX*0x1]
MOV EDI,R13D
CALL 0x0014d530
TEST RAX,RAX
JG 0x0015f0b1
CALL 0x0014c2f0
CMP dword ptr [RAX],0x4
JNZ 0x0015efc3
MOV EAX,0x0
JMP 0x0015f0b1
CALL 0x0014c2f0
MOV EDI,dword ptr [RAX]
CALL 0x0014b460
MOV RBX,RAX
SUB RSP,0x8
PUSH RAX
PUSH R15
LEA RAX,[0x3f86ec]
PUSH RAX
LEA R9,[0x3fa432]
MOV R8D,0x1b3
MOV ECX,0x181
LEA RDX,[0x3fb2f8]
LEA RSI,[0x3fa404]
MOV RDI,qword ptr [RSP + 0x28]
MOV EAX,0x0
CALL 0x0014cb70
ADD RSP,0x20
MOV RDI,RBX
CALL 0x0014c570
MOV EAX,0x0
JMP 0x0015efe2
(translation_unit "undefined8 BlobToFile(char *param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  long lVar3;\n  int *piVar4;\n  size_t __n;\n  ulong uVar5;\n  \n  if (param_1 == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined8 BlobToFile(char *param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  long lVar3;\n  int *piVar4;\n  size_t __n;\n  ulong uVar5;\n  \n  if (param_1 == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "BlobToFile(char *param_1,long param_2,ulong param_3,undefined8 param_4)" identifier (parameter_list "(char *param_1,long param_2,ulong param_3,undefined8 param_4)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  long lVar3;\n  int *piVar4;\n  size_t __n;\n  ulong uVar5;\n  \n  if (param_1 == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (if_statement "if (param_1 == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }" if (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }" { comment (expression_statement "__assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");" (call_expression "__assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile")" identifier (argument_list "("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile")" ( (string_literal ""filename != (const char *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""BlobToFile"" " string_content ") ))) ;) })) (expression_statement "LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);" (call_expression "LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1)" identifier (argument_list "(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1)" ( number_literal , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""BlobToFile"" " string_content ") , number_literal , (pointer_expression "&DAT_0041fe36" & identifier) , identifier ))) ;) (if_statement "if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }" { comment (expression_statement "__assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");" (call_expression "__assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile")" identifier (argument_list "("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile")" ( (string_literal ""blob != (const void *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""BlobToFile"" " string_content ") ))) ;) })) (if_statement "if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }" { (expression_statement "iVar1 = AcquireUniqueFileResource(param_1);" (assignment_expression "iVar1 = AcquireUniqueFileResource(param_1)" identifier = (call_expression "AcquireUniqueFileResource(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) }) (else_clause "else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }" else (compound_statement "{\n    iVar1 = open(param_1,0xc2,0x180);\n  }" { (expression_statement "iVar1 = open(param_1,0xc2,0x180);" (assignment_expression "iVar1 = open(param_1,0xc2,0x180)" identifier = (call_expression "open(param_1,0xc2,0x180)" identifier (argument_list "(param_1,0xc2,0x180)" ( identifier , number_literal , number_literal )))) ;) }))) (if_statement "if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }" if (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) (compound_statement "{\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = GetExceptionMessage(*piVar4);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar4)" identifier = (call_expression "GetExceptionMessage(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) )))) ;) (expression_statement "ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);" (call_expression "ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2)" identifier (argument_list "(param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""BlobToFile"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , identifier , identifier ))) ;) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }" else (compound_statement "{\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (if_statement "if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar5 = 0;\n    }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }" else (compound_statement "{\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }" { (do_statement "do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);" do (compound_statement "{\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      }" { (expression_statement "__n = param_3 - uVar5;" (assignment_expression "__n = param_3 - uVar5" identifier = (binary_expression "param_3 - uVar5" identifier - identifier)) ;) (if_statement "if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }" if (parenthesized_expression "(0x7fffffffffffffff < __n)" ( (binary_expression "0x7fffffffffffffff < __n" number_literal < identifier) )) (compound_statement "{\n          __n = 0x7fffffffffffffff;\n        }" { (expression_statement "__n = 0x7fffffffffffffff;" (assignment_expression "__n = 0x7fffffffffffffff" identifier = number_literal) ;) })) (expression_statement "lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);" (assignment_expression "lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n)" identifier = (call_expression "write(iVar1,(void *)(param_2 + uVar5),__n)" identifier (argument_list "(iVar1,(void *)(param_2 + uVar5),__n)" ( identifier , (cast_expression "(void *)(param_2 + uVar5)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + uVar5)" ( (binary_expression "param_2 + uVar5" identifier + identifier) ))) , identifier )))) ;) (if_statement "if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }" if (parenthesized_expression "(lVar3 < 1)" ( (binary_expression "lVar3 < 1" identifier < number_literal) )) (compound_statement "{\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar4 != 4) break;" if (parenthesized_expression "(*piVar4 != 4)" ( (binary_expression "*piVar4 != 4" (pointer_expression "*piVar4" * identifier) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" identifier = number_literal) ;) })) (expression_statement "uVar5 = uVar5 + lVar3;" (assignment_expression "uVar5 = uVar5 + lVar3" identifier = (binary_expression "uVar5 + lVar3" identifier + identifier)) ;) }) while (parenthesized_expression "(uVar5 < param_3)" ( (binary_expression "uVar5 < param_3" identifier < identifier) )) ;) }))) (expression_statement "iVar1 = close(iVar1);" (assignment_expression "iVar1 = close(iVar1)" identifier = (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (if_statement "if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }" if (parenthesized_expression "((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3))" ( (binary_expression "(iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)" (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) || (parenthesized_expression "(uVar2 = 1, uVar5 < param_3)" ( (comma_expression "uVar2 = 1, uVar5 < param_3" (assignment_expression "uVar2 = 1" identifier = number_literal) , (binary_expression "uVar5 < param_3" identifier < identifier)) ))) )) (compound_statement "{\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = GetExceptionMessage(*piVar4);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar4)" identifier = (call_expression "GetExceptionMessage(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);" (call_expression "ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2)" identifier (argument_list "(param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""BlobToFile"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , identifier , identifier ))) ;) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) })) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n/* WARNING: Enum "LogEventType": Some values do not have unique names */\n\nMagickBooleanType BlobToFile(char *filename,void *blob,size_t length,ExceptionInfo *exception)\n\n{\n  int iVar1;\n  MagickBooleanType MVar2;\n  long lVar3;\n  int *piVar4;\n  char *pcVar5;\n  size_t __n;\n  ulong uVar6;\n  \n  if (filename == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(TraceEvent,"MagickCore/blob.c","BlobToFile",0x168,"%s",filename);\n  if (blob == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*filename == '\0') {\n    iVar1 = AcquireUniqueFileResource(filename);\n  }\n  else {\n    iVar1 = open(filename,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    pcVar5 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",\n               "\'%s\': %s",filename,pcVar5);\n    DestroyString(pcVar5);\n    MVar2 = MagickFalse;\n  }\n  else {\n    uVar6 = 0;\n    if (length == 0) {\n      uVar6 = 0;\n    }\n    else {\n      do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length)) {\n      piVar4 = __errno_location();\n      pcVar5 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5);\n      DestroyString(pcVar5);\n      MVar2 = MagickFalse;\n    }\n  }\n  return MVar2;\n}\n\n" comment comment (function_definition "MagickBooleanType BlobToFile(char *filename,void *blob,size_t length,ExceptionInfo *exception)\n\n{\n  int iVar1;\n  MagickBooleanType MVar2;\n  long lVar3;\n  int *piVar4;\n  char *pcVar5;\n  size_t __n;\n  ulong uVar6;\n  \n  if (filename == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(TraceEvent,"MagickCore/blob.c","BlobToFile",0x168,"%s",filename);\n  if (blob == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*filename == '\0') {\n    iVar1 = AcquireUniqueFileResource(filename);\n  }\n  else {\n    iVar1 = open(filename,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    pcVar5 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",\n               "\'%s\': %s",filename,pcVar5);\n    DestroyString(pcVar5);\n    MVar2 = MagickFalse;\n  }\n  else {\n    uVar6 = 0;\n    if (length == 0) {\n      uVar6 = 0;\n    }\n    else {\n      do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length)) {\n      piVar4 = __errno_location();\n      pcVar5 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5);\n      DestroyString(pcVar5);\n      MVar2 = MagickFalse;\n    }\n  }\n  return MVar2;\n}" type_identifier (function_declarator "BlobToFile(char *filename,void *blob,size_t length,ExceptionInfo *exception)" identifier (parameter_list "(char *filename,void *blob,size_t length,ExceptionInfo *exception)" ( (parameter_declaration "char *filename" primitive_type (pointer_declarator "*filename" * identifier)) , (parameter_declaration "void *blob" primitive_type (pointer_declarator "*blob" * identifier)) , (parameter_declaration "size_t length" primitive_type identifier) , (parameter_declaration "ExceptionInfo *exception" type_identifier (pointer_declarator "*exception" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  MagickBooleanType MVar2;\n  long lVar3;\n  int *piVar4;\n  char *pcVar5;\n  size_t __n;\n  ulong uVar6;\n  \n  if (filename == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(TraceEvent,"MagickCore/blob.c","BlobToFile",0x168,"%s",filename);\n  if (blob == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*filename == '\0') {\n    iVar1 = AcquireUniqueFileResource(filename);\n  }\n  else {\n    iVar1 = open(filename,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    pcVar5 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",\n               "\'%s\': %s",filename,pcVar5);\n    DestroyString(pcVar5);\n    MVar2 = MagickFalse;\n  }\n  else {\n    uVar6 = 0;\n    if (length == 0) {\n      uVar6 = 0;\n    }\n    else {\n      do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length)) {\n      piVar4 = __errno_location();\n      pcVar5 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5);\n      DestroyString(pcVar5);\n      MVar2 = MagickFalse;\n    }\n  }\n  return MVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "MagickBooleanType MVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (if_statement "if (filename == (char *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }" if (parenthesized_expression "(filename == (char *)0x0)" ( (binary_expression "filename == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }" { comment (expression_statement "__assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");" (call_expression "__assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile")" identifier (argument_list "("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile")" ( (string_literal ""filename != (const char *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""BlobToFile"" " string_content ") ))) ;) })) (expression_statement "LogMagickEvent(TraceEvent,"MagickCore/blob.c","BlobToFile",0x168,"%s",filename);" (call_expression "LogMagickEvent(TraceEvent,"MagickCore/blob.c","BlobToFile",0x168,"%s",filename)" identifier (argument_list "(TraceEvent,"MagickCore/blob.c","BlobToFile",0x168,"%s",filename)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""BlobToFile"" " string_content ") , number_literal , (string_literal ""%s"" " string_content ") , identifier ))) ;) (if_statement "if (blob == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }" if (parenthesized_expression "(blob == (void *)0x0)" ( (binary_expression "blob == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }" { comment (expression_statement "__assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");" (call_expression "__assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile")" identifier (argument_list "("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile")" ( (string_literal ""blob != (const void *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""BlobToFile"" " string_content ") ))) ;) })) (if_statement "if (*filename == '\0') {\n    iVar1 = AcquireUniqueFileResource(filename);\n  }\n  else {\n    iVar1 = open(filename,0xc2,0x180);\n  }" if (parenthesized_expression "(*filename == '\0')" ( (binary_expression "*filename == '\0'" (pointer_expression "*filename" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar1 = AcquireUniqueFileResource(filename);\n  }" { (expression_statement "iVar1 = AcquireUniqueFileResource(filename);" (assignment_expression "iVar1 = AcquireUniqueFileResource(filename)" identifier = (call_expression "AcquireUniqueFileResource(filename)" identifier (argument_list "(filename)" ( identifier )))) ;) }) (else_clause "else {\n    iVar1 = open(filename,0xc2,0x180);\n  }" else (compound_statement "{\n    iVar1 = open(filename,0xc2,0x180);\n  }" { (expression_statement "iVar1 = open(filename,0xc2,0x180);" (assignment_expression "iVar1 = open(filename,0xc2,0x180)" identifier = (call_expression "open(filename,0xc2,0x180)" identifier (argument_list "(filename,0xc2,0x180)" ( identifier , number_literal , number_literal )))) ;) }))) (if_statement "if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    pcVar5 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",\n               "\'%s\': %s",filename,pcVar5);\n    DestroyString(pcVar5);\n    MVar2 = MagickFalse;\n  }\n  else {\n    uVar6 = 0;\n    if (length == 0) {\n      uVar6 = 0;\n    }\n    else {\n      do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length)) {\n      piVar4 = __errno_location();\n      pcVar5 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5);\n      DestroyString(pcVar5);\n      MVar2 = MagickFalse;\n    }\n  }" if (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) (compound_statement "{\n    piVar4 = __errno_location();\n    pcVar5 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",\n               "\'%s\': %s",filename,pcVar5);\n    DestroyString(pcVar5);\n    MVar2 = MagickFalse;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar5 = GetExceptionMessage(*piVar4);" (assignment_expression "pcVar5 = GetExceptionMessage(*piVar4)" identifier = (call_expression "GetExceptionMessage(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) )))) ;) (expression_statement "ThrowMagickException\n              (exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",\n               "\'%s\': %s",filename,pcVar5);" (call_expression "ThrowMagickException\n              (exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",\n               "\'%s\': %s",filename,pcVar5)" identifier (argument_list "(exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",\n               "\'%s\': %s",filename,pcVar5)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""BlobToFile"" " string_content ") , number_literal , identifier , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , identifier , identifier ))) ;) (expression_statement "DestroyString(pcVar5);" (call_expression "DestroyString(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier ))) ;) (expression_statement "MVar2 = MagickFalse;" (assignment_expression "MVar2 = MagickFalse" identifier = identifier) ;) }) (else_clause "else {\n    uVar6 = 0;\n    if (length == 0) {\n      uVar6 = 0;\n    }\n    else {\n      do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length)) {\n      piVar4 = __errno_location();\n      pcVar5 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5);\n      DestroyString(pcVar5);\n      MVar2 = MagickFalse;\n    }\n  }" else (compound_statement "{\n    uVar6 = 0;\n    if (length == 0) {\n      uVar6 = 0;\n    }\n    else {\n      do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length)) {\n      piVar4 = __errno_location();\n      pcVar5 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5);\n      DestroyString(pcVar5);\n      MVar2 = MagickFalse;\n    }\n  }" { (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (if_statement "if (length == 0) {\n      uVar6 = 0;\n    }\n    else {\n      do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);\n    }" if (parenthesized_expression "(length == 0)" ( (binary_expression "length == 0" identifier == number_literal) )) (compound_statement "{\n      uVar6 = 0;\n    }" { (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);\n    }" else (compound_statement "{\n      do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);\n    }" { (do_statement "do {\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      } while (uVar6 < length);" do (compound_statement "{\n        __n = length - uVar6;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar6 = uVar6 + lVar3;\n      }" { (expression_statement "__n = length - uVar6;" (assignment_expression "__n = length - uVar6" identifier = (binary_expression "length - uVar6" identifier - identifier)) ;) (if_statement "if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }" if (parenthesized_expression "(0x7fffffffffffffff < __n)" ( (binary_expression "0x7fffffffffffffff < __n" number_literal < identifier) )) (compound_statement "{\n          __n = 0x7fffffffffffffff;\n        }" { (expression_statement "__n = 0x7fffffffffffffff;" (assignment_expression "__n = 0x7fffffffffffffff" identifier = number_literal) ;) })) (expression_statement "lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n);" (assignment_expression "lVar3 = write(iVar1,(void *)((long)blob + uVar6),__n)" identifier = (call_expression "write(iVar1,(void *)((long)blob + uVar6),__n)" identifier (argument_list "(iVar1,(void *)((long)blob + uVar6),__n)" ( identifier , (cast_expression "(void *)((long)blob + uVar6)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)blob + uVar6)" ( (binary_expression "(long)blob + uVar6" (cast_expression "(long)blob" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) ))) , identifier )))) ;) (if_statement "if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }" if (parenthesized_expression "(lVar3 < 1)" ( (binary_expression "lVar3 < 1" identifier < number_literal) )) (compound_statement "{\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar4 != 4) break;" if (parenthesized_expression "(*piVar4 != 4)" ( (binary_expression "*piVar4 != 4" (pointer_expression "*piVar4" * identifier) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" identifier = number_literal) ;) })) (expression_statement "uVar6 = uVar6 + lVar3;" (assignment_expression "uVar6 = uVar6 + lVar3" identifier = (binary_expression "uVar6 + lVar3" identifier + identifier)) ;) }) while (parenthesized_expression "(uVar6 < length)" ( (binary_expression "uVar6 < length" identifier < identifier) )) ;) }))) (expression_statement "iVar1 = close(iVar1);" (assignment_expression "iVar1 = close(iVar1)" identifier = (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (if_statement "if ((iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length)) {\n      piVar4 = __errno_location();\n      pcVar5 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5);\n      DestroyString(pcVar5);\n      MVar2 = MagickFalse;\n    }" if (parenthesized_expression "((iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length))" ( (binary_expression "(iVar1 == -1) || (MVar2 = MagickTrue, uVar6 < length)" (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) || (parenthesized_expression "(MVar2 = MagickTrue, uVar6 < length)" ( (comma_expression "MVar2 = MagickTrue, uVar6 < length" (assignment_expression "MVar2 = MagickTrue" identifier = identifier) , (binary_expression "uVar6 < length" identifier < identifier)) ))) )) (compound_statement "{\n      piVar4 = __errno_location();\n      pcVar5 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5);\n      DestroyString(pcVar5);\n      MVar2 = MagickFalse;\n    }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar5 = GetExceptionMessage(*piVar4);" (assignment_expression "pcVar5 = GetExceptionMessage(*piVar4)" identifier = (call_expression "GetExceptionMessage(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5);" (call_expression "ThrowMagickException\n                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5)" identifier (argument_list "(exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",\n                 "\'%s\': %s",filename,pcVar5)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""BlobToFile"" " string_content ") , number_literal , identifier , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , identifier , identifier ))) ;) (expression_statement "DestroyString(pcVar5);" (call_expression "DestroyString(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier ))) ;) (expression_statement "MVar2 = MagickFalse;" (assignment_expression "MVar2 = MagickFalse" identifier = identifier) ;) })) }))) (return_statement "return MVar2;" return identifier ;) })))
(translation_unit "undefined8 BlobToFile(char *param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  long lVar3;\n  int *piVar4;\n  size_t __n;\n  ulong uVar5;\n  \n  if (param_1 == (char *)0x0) {\n                    \n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);\n  if (param_2 == 0) {\n                    \n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined8 BlobToFile(char *param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  long lVar3;\n  int *piVar4;\n  size_t __n;\n  ulong uVar5;\n  \n  if (param_1 == (char *)0x0) {\n                    \n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);\n  if (param_2 == 0) {\n                    \n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "BlobToFile(char *param_1,long param_2,ulong param_3,undefined8 param_4)" identifier (parameter_list "(char *param_1,long param_2,ulong param_3,undefined8 param_4)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  long lVar3;\n  int *piVar4;\n  size_t __n;\n  ulong uVar5;\n  \n  if (param_1 == (char *)0x0) {\n                    \n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);\n  if (param_2 == 0) {\n                    \n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (if_statement "if (param_1 == (char *)0x0) {\n                    \n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }" if (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }" { (expression_statement "__assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");" (call_expression "__assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile")" identifier (argument_list "("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile")" ( (string_literal ""filename != (const char *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""BlobToFile"" " string_content ") ))) ;) })) (expression_statement "LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);" (call_expression "LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1)" identifier (argument_list "(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1)" ( number_literal , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""BlobToFile"" " string_content ") , number_literal , (pointer_expression "&DAT_0041fe36" & identifier) , identifier ))) ;) (if_statement "if (param_2 == 0) {\n                    \n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }" { (expression_statement "__assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");" (call_expression "__assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile")" identifier (argument_list "("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile")" ( (string_literal ""blob != (const void *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""BlobToFile"" " string_content ") ))) ;) })) (if_statement "if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }" { (expression_statement "iVar1 = AcquireUniqueFileResource(param_1);" (assignment_expression "iVar1 = AcquireUniqueFileResource(param_1)" identifier = (call_expression "AcquireUniqueFileResource(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) }) (else_clause "else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }" else (compound_statement "{\n    iVar1 = open(param_1,0xc2,0x180);\n  }" { (expression_statement "iVar1 = open(param_1,0xc2,0x180);" (assignment_expression "iVar1 = open(param_1,0xc2,0x180)" identifier = (call_expression "open(param_1,0xc2,0x180)" identifier (argument_list "(param_1,0xc2,0x180)" ( identifier , number_literal , number_literal )))) ;) }))) (if_statement "if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }" if (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) (compound_statement "{\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = GetExceptionMessage(*piVar4);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar4)" identifier = (call_expression "GetExceptionMessage(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) )))) ;) (expression_statement "ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);" (call_expression "ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2)" identifier (argument_list "(param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""BlobToFile"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , identifier , identifier ))) ;) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }" else (compound_statement "{\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (if_statement "if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar5 = 0;\n    }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }" else (compound_statement "{\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }" { (do_statement "do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);" do (compound_statement "{\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      }" { (expression_statement "__n = param_3 - uVar5;" (assignment_expression "__n = param_3 - uVar5" identifier = (binary_expression "param_3 - uVar5" identifier - identifier)) ;) (if_statement "if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }" if (parenthesized_expression "(0x7fffffffffffffff < __n)" ( (binary_expression "0x7fffffffffffffff < __n" number_literal < identifier) )) (compound_statement "{\n          __n = 0x7fffffffffffffff;\n        }" { (expression_statement "__n = 0x7fffffffffffffff;" (assignment_expression "__n = 0x7fffffffffffffff" identifier = number_literal) ;) })) (expression_statement "lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);" (assignment_expression "lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n)" identifier = (call_expression "write(iVar1,(void *)(param_2 + uVar5),__n)" identifier (argument_list "(iVar1,(void *)(param_2 + uVar5),__n)" ( identifier , (cast_expression "(void *)(param_2 + uVar5)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + uVar5)" ( (binary_expression "param_2 + uVar5" identifier + identifier) ))) , identifier )))) ;) (if_statement "if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }" if (parenthesized_expression "(lVar3 < 1)" ( (binary_expression "lVar3 < 1" identifier < number_literal) )) (compound_statement "{\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar4 != 4) break;" if (parenthesized_expression "(*piVar4 != 4)" ( (binary_expression "*piVar4 != 4" (pointer_expression "*piVar4" * identifier) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" identifier = number_literal) ;) })) (expression_statement "uVar5 = uVar5 + lVar3;" (assignment_expression "uVar5 = uVar5 + lVar3" identifier = (binary_expression "uVar5 + lVar3" identifier + identifier)) ;) }) while (parenthesized_expression "(uVar5 < param_3)" ( (binary_expression "uVar5 < param_3" identifier < identifier) )) ;) }))) (expression_statement "iVar1 = close(iVar1);" (assignment_expression "iVar1 = close(iVar1)" identifier = (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (if_statement "if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }" if (parenthesized_expression "((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3))" ( (binary_expression "(iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)" (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) || (parenthesized_expression "(uVar2 = 1, uVar5 < param_3)" ( (comma_expression "uVar2 = 1, uVar5 < param_3" (assignment_expression "uVar2 = 1" identifier = number_literal) , (binary_expression "uVar5 < param_3" identifier < identifier)) ))) )) (compound_statement "{\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = GetExceptionMessage(*piVar4);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar4)" identifier = (call_expression "GetExceptionMessage(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);" (call_expression "ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2)" identifier (argument_list "(param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""BlobToFile"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , identifier , identifier ))) ;) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) })) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , (pointer_expression & IDENT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT )))) ;) }))) (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 ( (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 " escape_sequence string_content escape_sequence string_content ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression IDENT < IDENT)) ))) )) (compound_statement { (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 " escape_sequence string_content escape_sequence string_content ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) (return_statement return IDENT ;) })))
(function_definition "undefined8 BlobToFile(char *param_1,long param_2,ulong param_3,undefined8 param_4)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  long lVar3;\n  int *piVar4;\n  size_t __n;\n  ulong uVar5;\n  \n  if (param_1 == (char *)0x0) {\n                    \n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);\n  if (param_2 == 0) {\n                    \n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }\n  return uVar2;\n}" (type_identifier "undefined8") (function_declarator "BlobToFile(char *param_1,long param_2,ulong param_3,undefined8 param_4)" (identifier "BlobToFile") (parameter_list "(char *param_1,long param_2,ulong param_3,undefined8 param_4)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "ulong param_3" (type_identifier "ulong") (identifier "param_3")) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  long lVar3;\n  int *piVar4;\n  size_t __n;\n  ulong uVar5;\n  \n  if (param_1 == (char *)0x0) {\n                    \n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }\n  LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);\n  if (param_2 == 0) {\n                    \n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }\n  if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }\n  if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "ulong uVar5;" (type_identifier "ulong") (identifier "uVar5") (; ";")) (if_statement "if (param_1 == (char *)0x0) {\n                    \n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }" (if "if") (parenthesized_expression "(param_1 == (char *)0x0)" (( "(") (binary_expression "param_1 == (char *)0x0" (identifier "param_1") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");\n  }" ({ "{") (expression_statement "__assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");" (call_expression "__assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile")" (identifier "__assert_fail") (argument_list "("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile")" (( "(") (string_literal ""filename != (const char *) NULL"" (" """) (string_content "filename != (const char *) NULL") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0x167") (, ",") (string_literal ""BlobToFile"" (" """) (string_content "BlobToFile") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1);" (call_expression "LogMagickEvent(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1)" (identifier "LogMagickEvent") (argument_list "(0x8000,"MagickCore/blob.c","BlobToFile",0x168,&DAT_0041fe36,param_1)" (( "(") (number_literal "0x8000") (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (string_literal ""BlobToFile"" (" """) (string_content "BlobToFile") (" """)) (, ",") (number_literal "0x168") (, ",") (pointer_expression "&DAT_0041fe36" (& "&") (identifier "DAT_0041fe36")) (, ",") (identifier "param_1") () ")"))) (; ";")) (if_statement "if (param_2 == 0) {\n                    \n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");\n  }" ({ "{") (expression_statement "__assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");" (call_expression "__assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile")" (identifier "__assert_fail") (argument_list "("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile")" (( "(") (string_literal ""blob != (const void *) NULL"" (" """) (string_content "blob != (const void *) NULL") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0x169") (, ",") (string_literal ""BlobToFile"" (" """) (string_content "BlobToFile") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (*param_1 == '\0') {\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }\n  else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }" (if "if") (parenthesized_expression "(*param_1 == '\0')" (( "(") (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    iVar1 = AcquireUniqueFileResource(param_1);\n  }" ({ "{") (expression_statement "iVar1 = AcquireUniqueFileResource(param_1);" (assignment_expression "iVar1 = AcquireUniqueFileResource(param_1)" (identifier "iVar1") (= "=") (call_expression "AcquireUniqueFileResource(param_1)" (identifier "AcquireUniqueFileResource") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = open(param_1,0xc2,0x180);\n  }" (else "else") (compound_statement "{\n    iVar1 = open(param_1,0xc2,0x180);\n  }" ({ "{") (expression_statement "iVar1 = open(param_1,0xc2,0x180);" (assignment_expression "iVar1 = open(param_1,0xc2,0x180)" (identifier "iVar1") (= "=") (call_expression "open(param_1,0xc2,0x180)" (identifier "open") (argument_list "(param_1,0xc2,0x180)" (( "(") (identifier "param_1") (, ",") (number_literal "0xc2") (, ",") (number_literal "0x180") () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar1 == -1) {\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }\n  else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 == -1)" (( "(") (binary_expression "iVar1 == -1" (identifier "iVar1") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    piVar4 = __errno_location();\n    uVar2 = GetExceptionMessage(*piVar4);\n    ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);\n    DestroyString(uVar2);\n    uVar2 = 0;\n  }" ({ "{") (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = GetExceptionMessage(*piVar4);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar4)" (identifier "uVar2") (= "=") (call_expression "GetExceptionMessage(*piVar4)" (identifier "GetExceptionMessage") (argument_list "(*piVar4)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) () ")")))) (; ";")) (expression_statement "ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2);" (call_expression "ThrowMagickException\n              (param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2)" (identifier "ThrowMagickException") (argument_list "(param_4,"MagickCore/blob.c","BlobToFile",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"\n               ,param_1,uVar2)" (( "(") (identifier "param_4") (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (string_literal ""BlobToFile"" (" """) (string_content "BlobToFile") (" """)) (, ",") (number_literal "0x170") (, ",") (number_literal "0x1b3") (, ",") (string_literal ""UnableToWriteBlob"" (" """) (string_content "UnableToWriteBlob") (" """)) (, ",") (string_literal ""\'%s\': %s"" (" """) (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (string_content ": %s") (" """)) (, ",") (identifier "param_1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" (identifier "DestroyString") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }" (else "else") (compound_statement "{\n    uVar5 = 0;\n    if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }\n    iVar1 = close(iVar1);\n    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }\n  }" ({ "{") (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_3 == 0) {\n      uVar5 = 0;\n    }\n    else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar5 = 0;\n    }" ({ "{") (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }" (else "else") (compound_statement "{\n      do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);\n    }" ({ "{") (do_statement "do {\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      } while (uVar5 < param_3);" (do "do") (compound_statement "{\n        __n = param_3 - uVar5;\n        if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }\n        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);\n        if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }\n        uVar5 = uVar5 + lVar3;\n      }" ({ "{") (expression_statement "__n = param_3 - uVar5;" (assignment_expression "__n = param_3 - uVar5" (identifier "__n") (= "=") (binary_expression "param_3 - uVar5" (identifier "param_3") (- "-") (identifier "uVar5"))) (; ";")) (if_statement "if (0x7fffffffffffffff < __n) {\n          __n = 0x7fffffffffffffff;\n        }" (if "if") (parenthesized_expression "(0x7fffffffffffffff < __n)" (( "(") (binary_expression "0x7fffffffffffffff < __n" (number_literal "0x7fffffffffffffff") (< "<") (identifier "__n")) () ")")) (compound_statement "{\n          __n = 0x7fffffffffffffff;\n        }" ({ "{") (expression_statement "__n = 0x7fffffffffffffff;" (assignment_expression "__n = 0x7fffffffffffffff" (identifier "__n") (= "=") (number_literal "0x7fffffffffffffff")) (; ";")) (} "}"))) (expression_statement "lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);" (assignment_expression "lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n)" (identifier "lVar3") (= "=") (call_expression "write(iVar1,(void *)(param_2 + uVar5),__n)" (identifier "write") (argument_list "(iVar1,(void *)(param_2 + uVar5),__n)" (( "(") (identifier "iVar1") (, ",") (cast_expression "(void *)(param_2 + uVar5)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + uVar5)" (( "(") (binary_expression "param_2 + uVar5" (identifier "param_2") (+ "+") (identifier "uVar5")) () ")"))) (, ",") (identifier "__n") () ")")))) (; ";")) (if_statement "if (lVar3 < 1) {\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }" (if "if") (parenthesized_expression "(lVar3 < 1)" (( "(") (binary_expression "lVar3 < 1" (identifier "lVar3") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n          piVar4 = __errno_location();\n          if (*piVar4 != 4) break;\n          lVar3 = 0;\n        }" ({ "{") (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*piVar4 != 4) break;" (if "if") (parenthesized_expression "(*piVar4 != 4)" (( "(") (binary_expression "*piVar4 != 4" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (!= "!=") (number_literal "4")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar3 = 0;" (assignment_expression "lVar3 = 0" (identifier "lVar3") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "uVar5 = uVar5 + lVar3;" (assignment_expression "uVar5 = uVar5 + lVar3" (identifier "uVar5") (= "=") (binary_expression "uVar5 + lVar3" (identifier "uVar5") (+ "+") (identifier "lVar3"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar5 < param_3)" (( "(") (binary_expression "uVar5 < param_3" (identifier "uVar5") (< "<") (identifier "param_3")) () ")")) (; ";")) (} "}")))) (expression_statement "iVar1 = close(iVar1);" (assignment_expression "iVar1 = close(iVar1)" (identifier "iVar1") (= "=") (call_expression "close(iVar1)" (identifier "close") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (; ";")) (if_statement "if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }" (if "if") (parenthesized_expression "((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3))" (( "(") (binary_expression "(iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)" (parenthesized_expression "(iVar1 == -1)" (( "(") (binary_expression "iVar1 == -1" (identifier "iVar1") (== "==") (number_literal "-1")) () ")")) (|| "||") (parenthesized_expression "(uVar2 = 1, uVar5 < param_3)" (( "(") (comma_expression "uVar2 = 1, uVar5 < param_3" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (, ",") (binary_expression "uVar5 < param_3" (identifier "uVar5") (< "<") (identifier "param_3"))) () ")"))) () ")")) (compound_statement "{\n      piVar4 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar4);\n      ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);\n      DestroyString(uVar2);\n      uVar2 = 0;\n    }" ({ "{") (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = GetExceptionMessage(*piVar4);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar4)" (identifier "uVar2") (= "=") (call_expression "GetExceptionMessage(*piVar4)" (identifier "GetExceptionMessage") (argument_list "(*piVar4)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) () ")")))) (; ";")) (expression_statement "ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2);" (call_expression "ThrowMagickException\n                (param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2)" (identifier "ThrowMagickException") (argument_list "(param_4,"MagickCore/blob.c","BlobToFile",0x181,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1,uVar2)" (( "(") (identifier "param_4") (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (string_literal ""BlobToFile"" (" """) (string_content "BlobToFile") (" """)) (, ",") (number_literal "0x181") (, ",") (number_literal "0x1b3") (, ",") (string_literal ""UnableToWriteBlob"" (" """) (string_content "UnableToWriteBlob") (" """)) (, ",") (string_literal ""\'%s\': %s"" (" """) (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (string_content ": %s") (" """)) (, ",") (identifier "param_1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" (identifier "DestroyString") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* WARNING: Enum "ExceptionType": Some values do not have unique names */
/* WARNING: Enum "LogEventType": Some values do not have unique names */

type_1 function_1(char *var_1,void *var_4,size_t var_12,type_2 *exception)

{
  int var_7;
  type_1 MVar2;
  long var_16;
  int *piVar4;
  char *pcVar5;
  size_t var_14;
  type_3 var_13;
  
  if (var_1 == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_2("filename != (const char *) NULL","MagickCore/blob.c",0x167,"BlobToFile");
  }
  var_3(TraceEvent,"MagickCore/blob.c","BlobToFile",0x168,"%s",var_1);
  if (var_4 == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_2("blob != (const void *) NULL","MagickCore/blob.c",0x169,"BlobToFile");
  }
  if (*var_1 == '\0') {
    var_7 = var_5(var_1);
  }
  else {
    var_7 = var_6(var_1,0xc2,0x180);
  }
  if (var_7 == -1) {
    piVar4 = var_8();
    pcVar5 = var_9(*piVar4);
    var_10
              (exception,"MagickCore/blob.c","BlobToFile",0x170,BlobError,"UnableToWriteBlob",
               "\'%s\': %s",var_1,pcVar5);
    var_11(pcVar5);
    MVar2 = MagickFalse;
  }
  else {
    var_13 = 0;
    if (var_12 == 0) {
      var_13 = 0;
    }
    else {
      do {
        var_14 = var_12 - var_13;
        if (0x7fffffffffffffff < var_14) {
          var_14 = 0x7fffffffffffffff;
        }
        var_16 = var_15(var_7,(void *)((long)var_4 + var_13),var_14);
        if (var_16 < 1) {
          piVar4 = var_8();
          if (*piVar4 != 4) break;
          var_16 = 0;
        }
        var_13 = var_13 + var_16;
      } while (var_13 < var_12);
    }
    var_7 = var_17(var_7);
    if ((var_7 == -1) || (MVar2 = MagickTrue, var_13 < var_12)) {
      piVar4 = var_8();
      pcVar5 = var_9(*piVar4);
      var_10
                (exception,"MagickCore/blob.c","BlobToFile",0x181,BlobError,"UnableToWriteBlob",
                 "\'%s\': %s",var_1,pcVar5);
      var_11(pcVar5);
      MVar2 = MagickFalse;
    }
  }
  return MVar2;
}


(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: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (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 (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content)) (string_literal (string_content)) (number_literal) (pointer_expression argument: (identifier)) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal)))))))) (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 (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 (escape_sequence) (string_content) (escape_sequence) (string_content)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (identifier)))))) 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 (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 (escape_sequence) (string_content) (escape_sequence) (string_content)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) (return_statement (identifier)))))

undefined8 MASKED(char *param_1,long param_2,ulong param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 uVar2;
  long lVar3;
  int *piVar4;
  size_t __n;
  ulong uVar5;
  
  if (param_1 == (char *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("filename != (const char *) NULL","MagickCore/blob.c",0x167,"MASKED");
  }
  LogMagickEvent(0x8000,"MagickCore/blob.c","MASKED",0x168,&DAT_0041fe36,param_1);
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("blob != (const void *) NULL","MagickCore/blob.c",0x169,"MASKED");
  }
  if (*param_1 == '\0') {
    iVar1 = AcquireUniqueFileResource(param_1);
  }
  else {
    iVar1 = open(param_1,0xc2,0x180);
  }
  if (iVar1 == -1) {
    piVar4 = __errno_location();
    uVar2 = GetExceptionMessage(*piVar4);
    ThrowMagickException
              (param_4,"MagickCore/blob.c","MASKED",0x170,0x1b3,"UnableToWriteBlob","\'%s\': %s"
               ,param_1,uVar2);
    DestroyString(uVar2);
    uVar2 = 0;
  }
  else {
    uVar5 = 0;
    if (param_3 == 0) {
      uVar5 = 0;
    }
    else {
      do {
        __n = param_3 - uVar5;
        if (0x7fffffffffffffff < __n) {
          __n = 0x7fffffffffffffff;
        }
        lVar3 = write(iVar1,(void *)(param_2 + uVar5),__n);
        if (lVar3 < 1) {
          piVar4 = __errno_location();
          if (*piVar4 != 4) break;
          lVar3 = 0;
        }
        uVar5 = uVar5 + lVar3;
      } while (uVar5 < param_3);
    }
    iVar1 = close(iVar1);
    if ((iVar1 == -1) || (uVar2 = 1, uVar5 < param_3)) {
      piVar4 = __errno_location();
      uVar2 = GetExceptionMessage(*piVar4);
      ThrowMagickException
                (param_4,"MagickCore/blob.c","MASKED",0x181,0x1b3,"UnableToWriteBlob",
                 "\'%s\': %s",param_1,uVar2);
      DestroyString(uVar2);
      uVar2 = 0;
    }
  }
  return uVar2;
}

