
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": Some values do not have unique names */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "PixelChannel": Some values do not have unique names */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */

MagickBooleanType MagickWriteImage(MagickWand *wand,char *filename)

{
  MagickBooleanType MVar1;
  long lVar2;
  long lVar3;
  
  if (wand == (MagickWand *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,
                  "MagickWriteImage");
  }
  if (wand->signature == 0xabacadab) {
    if (wand->debug != MagickFalse) {
      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name);
    }
    if (wand->images == (Image *)0x0) {
      ThrowMagickException
                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,
                 "ContainsNoImages",&DAT_0020ca76,wand->name);
      MVar1 = MagickFalse;
    }
    else {
      if (filename != (char *)0x0) {
        CopyMagickString(wand->images->filename,filename,0x1000);
      }
      lVar2 = CloneImage(wand->images,0,0,1,wand->exception);
      MVar1 = MagickFalse;
      if (lVar2 != 0) {
        lVar3 = CloneImageInfo(wand->image_info);
        *(undefined4 *)(lVar3 + 0xc) = 1;
        MVar1 = WriteImage(lVar3,lVar2,wand->exception);
        DestroyImage(lVar2);
        DestroyImageInfo(lVar3);
      }
    }
    return MVar1;
  }
                    /* WARNING: Subroutine does not return */
  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,
                "MagickWriteImage");
}



undefined4 MagickWriteImage(long param_1,long param_2)

{
  undefined4 uVar1;
  long lVar2;
  long lVar3;
  
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,
                  "MagickWriteImage");
  }
  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {
    if (*(int *)(param_1 + 0x1028) != 0) {
      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)
      ;
    }
    if (*(long *)(param_1 + 0x1008) == 0) {
      ThrowMagickException
                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",
                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);
      uVar1 = 0;
    }
    else {
      if (param_2 != 0) {
        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);
      }
      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));
      uVar1 = 0;
      if (lVar2 != 0) {
        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));
        *(undefined4 *)(lVar3 + 0xc) = 1;
        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));
        DestroyImage(lVar2);
        DestroyImageInfo(lVar3);
      }
    }
    return uVar1;
  }
                    /* WARNING: Subroutine does not return */
  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,
                "MagickWriteImage");
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
TEST RDI,RDI
JZ 0x001a53e7
MOV RBX,RDI
MOV RBP,RSI
MOV EAX,0xabacadab
CMP qword ptr [RDI + 0x1030],RAX
JNZ 0x001a5406
CMP dword ptr [RDI + 0x1028],0x0
JNZ 0x001a5425
MOV RDI,qword ptr [RBX + 0x1008]
TEST RDI,RDI
JZ 0x001a5457
TEST RBP,RBP
JZ 0x001a536e
ADD RDI,0x3f8
MOV EDX,0x1000
MOV RSI,RBP
CALL 0x001116e0
MOV RDI,qword ptr [RBX + 0x1008]
MOV R8,qword ptr [RBX + 0x1018]
MOV ECX,0x1
MOV EDX,0x0
MOV ESI,0x0
CALL 0x00111700
MOV RBP,RAX
MOV R12D,0x0
TEST RAX,RAX
JZ 0x001a53d9
MOV RDI,qword ptr [RBX + 0x1010]
CALL 0x00112720
MOV R13,RAX
MOV dword ptr [RAX + 0xc],0x1
MOV RDX,qword ptr [RBX + 0x1018]
MOV RSI,RBP
MOV RDI,RAX
CALL 0x00112cc0
MOV R12D,EAX
MOV RDI,RBP
CALL 0x00112d10
MOV RDI,R13
CALL 0x00111c60
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
LEA RCX,[0x21d200]
MOV EDX,0x339c
LEA RSI,[0x21ce25]
LEA RDI,[0x21ce3f]
CALL 0x00111850
LEA RCX,[0x21d200]
MOV EDX,0x339d
LEA RSI,[0x21ce25]
LEA RDI,[0x215f68]
CALL 0x00111850
LEA R9,[RDI + 0x8]
LEA R8,[0x2228e2]
MOV ECX,0x339f
LEA RDX,[0x21d1e0]
LEA RSI,[0x21ce25]
MOV EDI,0x40000
MOV EAX,0x0
CALL 0x00112620
JMP 0x001a5345
MOV RDI,qword ptr [RBX + 0x1018]
ADD RBX,0x8
PUSH RBX
LEA RAX,[0x20ca76]
PUSH RAX
LEA R9,[0x215f56]
MOV R8D,0x1d6
MOV ECX,0x33a1
LEA RDX,[0x21d1e0]
LEA RSI,[0x21ce25]
MOV EAX,0x0
CALL 0x00112db0
ADD RSP,0x10
MOV R12D,0x0
JMP 0x001a53d9
(translation_unit "undefined4 MagickWriteImage(long param_1,long param_2)\n\n{\n  undefined4 uVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}\n\n" (function_definition "undefined4 MagickWriteImage(long param_1,long param_2)\n\n{\n  undefined4 uVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}" type_identifier (function_declarator "MagickWriteImage(long param_1,long param_2)" identifier (parameter_list "(long param_1,long param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }" { comment (expression_statement "__assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");" (call_expression "__assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage")" identifier (argument_list "("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage")" ( (string_literal ""wand != (MagickWand *) NULL"" " string_content ") , (string_literal ""MagickWand/magick-image.c"" " string_content ") , number_literal , (string_literal ""MagickWriteImage"" " string_content ") ))) ;) })) (if_statement "if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0x1030) == 0xabacadab)" ( (binary_expression "*(long *)(param_1 + 0x1030) == 0xabacadab" (pointer_expression "*(long *)(param_1 + 0x1030)" * (cast_expression "(long *)(param_1 + 0x1030)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1030)" ( (binary_expression "param_1 + 0x1030" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }" { (if_statement "if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x1028) != 0)" ( (binary_expression "*(int *)(param_1 + 0x1028) != 0" (pointer_expression "*(int *)(param_1 + 0x1028)" * (cast_expression "(int *)(param_1 + 0x1028)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1028)" ( (binary_expression "param_1 + 0x1028" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }" { (expression_statement "LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;" (call_expression "LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)" identifier (argument_list "(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)" ( number_literal , (string_literal ""MagickWand/magick-image.c"" " string_content ") , (string_literal ""MagickWriteImage"" " string_content ") , number_literal , (string_literal ""%s"" " string_content ") , (binary_expression "param_1 + 8" identifier + number_literal) ))) ;) })) (if_statement "if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" if (parenthesized_expression "(*(long *)(param_1 + 0x1008) == 0)" ( (binary_expression "*(long *)(param_1 + 0x1008) == 0" (pointer_expression "*(long *)(param_1 + 0x1008)" * (cast_expression "(long *)(param_1 + 0x1008)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1008)" ( (binary_expression "param_1 + 0x1008" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }" { (expression_statement "ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);" (call_expression "ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8)" identifier (argument_list "(*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8)" ( (pointer_expression "*(undefined8 *)(param_1 + 0x1018)" * (cast_expression "(undefined8 *)(param_1 + 0x1018)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1018)" ( (binary_expression "param_1 + 0x1018" identifier + number_literal) )))) , (string_literal ""MagickWand/magick-image.c"" " string_content ") , (string_literal ""MagickWriteImage"" " string_content ") , number_literal , number_literal , (string_literal ""ContainsNoImages"" " string_content ") , (pointer_expression "&DAT_0020ca76" & identifier) , (binary_expression "param_1 + 8" identifier + number_literal) ))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" else (compound_statement "{\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" { (if_statement "if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }" { (expression_statement "CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);" (call_expression "CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000)" identifier (argument_list "(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000)" ( (binary_expression "*(long *)(param_1 + 0x1008) + 0x3f8" (pointer_expression "*(long *)(param_1 + 0x1008)" * (cast_expression "(long *)(param_1 + 0x1008)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1008)" ( (binary_expression "param_1 + 0x1008" identifier + number_literal) )))) + number_literal) , identifier , number_literal ))) ;) })) (expression_statement "lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));" (assignment_expression "lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018))" identifier = (call_expression "CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x1008)" * (cast_expression "(undefined8 *)(param_1 + 0x1008)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1008)" ( (binary_expression "param_1 + 0x1008" identifier + number_literal) )))) , number_literal , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_1 + 0x1018)" * (cast_expression "(undefined8 *)(param_1 + 0x1018)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1018)" ( (binary_expression "param_1 + 0x1018" identifier + number_literal) )))) )))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }" if (parenthesized_expression "(lVar2 != 0)" ( (binary_expression "lVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }" { (expression_statement "lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));" (assignment_expression "lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010))" identifier = (call_expression "CloneImageInfo(*(undefined8 *)(param_1 + 0x1010))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x1010))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x1010)" * (cast_expression "(undefined8 *)(param_1 + 0x1010)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1010)" ( (binary_expression "param_1 + 0x1010" identifier + number_literal) )))) )))) ;) (expression_statement "*(undefined4 *)(lVar3 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(lVar3 + 0xc) = 1" (pointer_expression "*(undefined4 *)(lVar3 + 0xc)" * (cast_expression "(undefined4 *)(lVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0xc)" ( (binary_expression "lVar3 + 0xc" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));" (assignment_expression "uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018))" identifier = (call_expression "WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018))" identifier (argument_list "(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018))" ( identifier , identifier , (pointer_expression "*(undefined8 *)(param_1 + 0x1018)" * (cast_expression "(undefined8 *)(param_1 + 0x1018)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1018)" ( (binary_expression "param_1 + 0x1018" identifier + number_literal) )))) )))) ;) (expression_statement "DestroyImage(lVar2);" (call_expression "DestroyImage(lVar2)" identifier (argument_list "(lVar2)" ( identifier ))) ;) (expression_statement "DestroyImageInfo(lVar3);" (call_expression "DestroyImageInfo(lVar3)" identifier (argument_list "(lVar3)" ( identifier ))) ;) })) }))) (return_statement "return uVar1;" return identifier ;) })) comment (expression_statement "__assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");" (call_expression "__assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage")" identifier (argument_list "("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage")" ( (string_literal ""wand->signature == MagickWandSignature"" " string_content ") , (string_literal ""MagickWand/magick-image.c"" " string_content ") , number_literal , (string_literal ""MagickWriteImage"" " string_content ") ))) ;) })))
(translation_unit "/* WARNING: Enum "GravityType": Some values do not have unique names */\n/* WARNING: Enum "DisposeType": Some values do not have unique names */\n/* WARNING: Enum "ChannelType": Some values do not have unique names */\n/* WARNING: Enum "PixelChannel": Some values do not have unique names */\n/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n\nMagickBooleanType MagickWriteImage(MagickWand *wand,char *filename)\n\n{\n  MagickBooleanType MVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (wand == (MagickWand *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (wand->signature == 0xabacadab) {\n    if (wand->debug != MagickFalse) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name);\n    }\n    if (wand->images == (Image *)0x0) {\n      ThrowMagickException\n                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name);\n      MVar1 = MagickFalse;\n    }\n    else {\n      if (filename != (char *)0x0) {\n        CopyMagickString(wand->images->filename,filename,0x1000);\n      }\n      lVar2 = CloneImage(wand->images,0,0,1,wand->exception);\n      MVar1 = MagickFalse;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return MVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}\n\n" comment comment comment comment comment (function_definition "MagickBooleanType MagickWriteImage(MagickWand *wand,char *filename)\n\n{\n  MagickBooleanType MVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (wand == (MagickWand *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (wand->signature == 0xabacadab) {\n    if (wand->debug != MagickFalse) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name);\n    }\n    if (wand->images == (Image *)0x0) {\n      ThrowMagickException\n                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name);\n      MVar1 = MagickFalse;\n    }\n    else {\n      if (filename != (char *)0x0) {\n        CopyMagickString(wand->images->filename,filename,0x1000);\n      }\n      lVar2 = CloneImage(wand->images,0,0,1,wand->exception);\n      MVar1 = MagickFalse;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return MVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}" type_identifier (function_declarator "MagickWriteImage(MagickWand *wand,char *filename)" identifier (parameter_list "(MagickWand *wand,char *filename)" ( (parameter_declaration "MagickWand *wand" type_identifier (pointer_declarator "*wand" * identifier)) , (parameter_declaration "char *filename" primitive_type (pointer_declarator "*filename" * identifier)) ))) (compound_statement "{\n  MagickBooleanType MVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (wand == (MagickWand *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (wand->signature == 0xabacadab) {\n    if (wand->debug != MagickFalse) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name);\n    }\n    if (wand->images == (Image *)0x0) {\n      ThrowMagickException\n                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name);\n      MVar1 = MagickFalse;\n    }\n    else {\n      if (filename != (char *)0x0) {\n        CopyMagickString(wand->images->filename,filename,0x1000);\n      }\n      lVar2 = CloneImage(wand->images,0,0,1,wand->exception);\n      MVar1 = MagickFalse;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return MVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}" { (declaration "MagickBooleanType MVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (wand == (MagickWand *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }" if (parenthesized_expression "(wand == (MagickWand *)0x0)" ( (binary_expression "wand == (MagickWand *)0x0" identifier == (cast_expression "(MagickWand *)0x0" ( (type_descriptor "MagickWand *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }" { comment (expression_statement "__assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");" (call_expression "__assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage")" identifier (argument_list "("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage")" ( (string_literal ""wand != (MagickWand *) NULL"" " string_content ") , (string_literal ""MagickWand/magick-image.c"" " string_content ") , number_literal , (string_literal ""MagickWriteImage"" " string_content ") ))) ;) })) (if_statement "if (wand->signature == 0xabacadab) {\n    if (wand->debug != MagickFalse) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name);\n    }\n    if (wand->images == (Image *)0x0) {\n      ThrowMagickException\n                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name);\n      MVar1 = MagickFalse;\n    }\n    else {\n      if (filename != (char *)0x0) {\n        CopyMagickString(wand->images->filename,filename,0x1000);\n      }\n      lVar2 = CloneImage(wand->images,0,0,1,wand->exception);\n      MVar1 = MagickFalse;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return MVar1;\n  }" if (parenthesized_expression "(wand->signature == 0xabacadab)" ( (binary_expression "wand->signature == 0xabacadab" (field_expression "wand->signature" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    if (wand->debug != MagickFalse) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name);\n    }\n    if (wand->images == (Image *)0x0) {\n      ThrowMagickException\n                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name);\n      MVar1 = MagickFalse;\n    }\n    else {\n      if (filename != (char *)0x0) {\n        CopyMagickString(wand->images->filename,filename,0x1000);\n      }\n      lVar2 = CloneImage(wand->images,0,0,1,wand->exception);\n      MVar1 = MagickFalse;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return MVar1;\n  }" { (if_statement "if (wand->debug != MagickFalse) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name);\n    }" if (parenthesized_expression "(wand->debug != MagickFalse)" ( (binary_expression "wand->debug != MagickFalse" (field_expression "wand->debug" identifier -> field_identifier) != identifier) )) (compound_statement "{\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name);\n    }" { (expression_statement "LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name);" (call_expression "LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name)" identifier (argument_list "(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",wand->name)" ( number_literal , (string_literal ""MagickWand/magick-image.c"" " string_content ") , (string_literal ""MagickWriteImage"" " string_content ") , number_literal , (string_literal ""%s"" " string_content ") , (field_expression "wand->name" identifier -> field_identifier) ))) ;) })) (if_statement "if (wand->images == (Image *)0x0) {\n      ThrowMagickException\n                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name);\n      MVar1 = MagickFalse;\n    }\n    else {\n      if (filename != (char *)0x0) {\n        CopyMagickString(wand->images->filename,filename,0x1000);\n      }\n      lVar2 = CloneImage(wand->images,0,0,1,wand->exception);\n      MVar1 = MagickFalse;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" if (parenthesized_expression "(wand->images == (Image *)0x0)" ( (binary_expression "wand->images == (Image *)0x0" (field_expression "wand->images" identifier -> field_identifier) == (cast_expression "(Image *)0x0" ( (type_descriptor "Image *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      ThrowMagickException\n                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name);\n      MVar1 = MagickFalse;\n    }" { (expression_statement "ThrowMagickException\n                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name);" (call_expression "ThrowMagickException\n                (wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name)" identifier (argument_list "(wand->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,\n                 "ContainsNoImages",&DAT_0020ca76,wand->name)" ( (field_expression "wand->exception" identifier -> field_identifier) , (string_literal ""MagickWand/magick-image.c"" " string_content ") , (string_literal ""MagickWriteImage"" " string_content ") , number_literal , number_literal , (string_literal ""ContainsNoImages"" " string_content ") , (pointer_expression "&DAT_0020ca76" & identifier) , (field_expression "wand->name" identifier -> field_identifier) ))) ;) (expression_statement "MVar1 = MagickFalse;" (assignment_expression "MVar1 = MagickFalse" identifier = identifier) ;) }) (else_clause "else {\n      if (filename != (char *)0x0) {\n        CopyMagickString(wand->images->filename,filename,0x1000);\n      }\n      lVar2 = CloneImage(wand->images,0,0,1,wand->exception);\n      MVar1 = MagickFalse;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" else (compound_statement "{\n      if (filename != (char *)0x0) {\n        CopyMagickString(wand->images->filename,filename,0x1000);\n      }\n      lVar2 = CloneImage(wand->images,0,0,1,wand->exception);\n      MVar1 = MagickFalse;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" { (if_statement "if (filename != (char *)0x0) {\n        CopyMagickString(wand->images->filename,filename,0x1000);\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        CopyMagickString(wand->images->filename,filename,0x1000);\n      }" { (expression_statement "CopyMagickString(wand->images->filename,filename,0x1000);" (call_expression "CopyMagickString(wand->images->filename,filename,0x1000)" identifier (argument_list "(wand->images->filename,filename,0x1000)" ( (field_expression "wand->images->filename" (field_expression "wand->images" identifier -> field_identifier) -> field_identifier) , identifier , number_literal ))) ;) })) (expression_statement "lVar2 = CloneImage(wand->images,0,0,1,wand->exception);" (assignment_expression "lVar2 = CloneImage(wand->images,0,0,1,wand->exception)" identifier = (call_expression "CloneImage(wand->images,0,0,1,wand->exception)" identifier (argument_list "(wand->images,0,0,1,wand->exception)" ( (field_expression "wand->images" identifier -> field_identifier) , number_literal , number_literal , number_literal , (field_expression "wand->exception" identifier -> field_identifier) )))) ;) (expression_statement "MVar1 = MagickFalse;" (assignment_expression "MVar1 = MagickFalse" identifier = identifier) ;) (if_statement "if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }" if (parenthesized_expression "(lVar2 != 0)" ( (binary_expression "lVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        lVar3 = CloneImageInfo(wand->image_info);\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        MVar1 = WriteImage(lVar3,lVar2,wand->exception);\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }" { (expression_statement "lVar3 = CloneImageInfo(wand->image_info);" (assignment_expression "lVar3 = CloneImageInfo(wand->image_info)" identifier = (call_expression "CloneImageInfo(wand->image_info)" identifier (argument_list "(wand->image_info)" ( (field_expression "wand->image_info" identifier -> field_identifier) )))) ;) (expression_statement "*(undefined4 *)(lVar3 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(lVar3 + 0xc) = 1" (pointer_expression "*(undefined4 *)(lVar3 + 0xc)" * (cast_expression "(undefined4 *)(lVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0xc)" ( (binary_expression "lVar3 + 0xc" identifier + number_literal) )))) = number_literal) ;) (expression_statement "MVar1 = WriteImage(lVar3,lVar2,wand->exception);" (assignment_expression "MVar1 = WriteImage(lVar3,lVar2,wand->exception)" identifier = (call_expression "WriteImage(lVar3,lVar2,wand->exception)" identifier (argument_list "(lVar3,lVar2,wand->exception)" ( identifier , identifier , (field_expression "wand->exception" identifier -> field_identifier) )))) ;) (expression_statement "DestroyImage(lVar2);" (call_expression "DestroyImage(lVar2)" identifier (argument_list "(lVar2)" ( identifier ))) ;) (expression_statement "DestroyImageInfo(lVar3);" (call_expression "DestroyImageInfo(lVar3)" identifier (argument_list "(lVar3)" ( identifier ))) ;) })) }))) (return_statement "return MVar1;" return identifier ;) })) comment (expression_statement "__assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");" (call_expression "__assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage")" identifier (argument_list "("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage")" ( (string_literal ""wand->signature == MagickWandSignature"" " string_content ") , (string_literal ""MagickWand/magick-image.c"" " string_content ") , number_literal , (string_literal ""MagickWriteImage"" " string_content ") ))) ;) })))
(translation_unit "undefined4 MagickWriteImage(long param_1,long param_2)\n\n{\n  undefined4 uVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }\n                    \n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}\n\n" (function_definition "undefined4 MagickWriteImage(long param_1,long param_2)\n\n{\n  undefined4 uVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }\n                    \n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}" type_identifier (function_declarator "MagickWriteImage(long param_1,long param_2)" identifier (parameter_list "(long param_1,long param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }\n                    \n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (param_1 == 0) {\n                    \n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }" { (expression_statement "__assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");" (call_expression "__assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage")" identifier (argument_list "("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage")" ( (string_literal ""wand != (MagickWand *) NULL"" " string_content ") , (string_literal ""MagickWand/magick-image.c"" " string_content ") , number_literal , (string_literal ""MagickWriteImage"" " string_content ") ))) ;) })) (if_statement "if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0x1030) == 0xabacadab)" ( (binary_expression "*(long *)(param_1 + 0x1030) == 0xabacadab" (pointer_expression "*(long *)(param_1 + 0x1030)" * (cast_expression "(long *)(param_1 + 0x1030)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1030)" ( (binary_expression "param_1 + 0x1030" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }" { (if_statement "if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x1028) != 0)" ( (binary_expression "*(int *)(param_1 + 0x1028) != 0" (pointer_expression "*(int *)(param_1 + 0x1028)" * (cast_expression "(int *)(param_1 + 0x1028)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1028)" ( (binary_expression "param_1 + 0x1028" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }" { (expression_statement "LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;" (call_expression "LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)" identifier (argument_list "(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)" ( number_literal , (string_literal ""MagickWand/magick-image.c"" " string_content ") , (string_literal ""MagickWriteImage"" " string_content ") , number_literal , (string_literal ""%s"" " string_content ") , (binary_expression "param_1 + 8" identifier + number_literal) ))) ;) })) (if_statement "if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" if (parenthesized_expression "(*(long *)(param_1 + 0x1008) == 0)" ( (binary_expression "*(long *)(param_1 + 0x1008) == 0" (pointer_expression "*(long *)(param_1 + 0x1008)" * (cast_expression "(long *)(param_1 + 0x1008)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1008)" ( (binary_expression "param_1 + 0x1008" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }" { (expression_statement "ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);" (call_expression "ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8)" identifier (argument_list "(*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8)" ( (pointer_expression "*(undefined8 *)(param_1 + 0x1018)" * (cast_expression "(undefined8 *)(param_1 + 0x1018)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1018)" ( (binary_expression "param_1 + 0x1018" identifier + number_literal) )))) , (string_literal ""MagickWand/magick-image.c"" " string_content ") , (string_literal ""MagickWriteImage"" " string_content ") , number_literal , number_literal , (string_literal ""ContainsNoImages"" " string_content ") , (pointer_expression "&DAT_0020ca76" & identifier) , (binary_expression "param_1 + 8" identifier + number_literal) ))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" else (compound_statement "{\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" { (if_statement "if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }" { (expression_statement "CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);" (call_expression "CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000)" identifier (argument_list "(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000)" ( (binary_expression "*(long *)(param_1 + 0x1008) + 0x3f8" (pointer_expression "*(long *)(param_1 + 0x1008)" * (cast_expression "(long *)(param_1 + 0x1008)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1008)" ( (binary_expression "param_1 + 0x1008" identifier + number_literal) )))) + number_literal) , identifier , number_literal ))) ;) })) (expression_statement "lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));" (assignment_expression "lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018))" identifier = (call_expression "CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x1008)" * (cast_expression "(undefined8 *)(param_1 + 0x1008)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1008)" ( (binary_expression "param_1 + 0x1008" identifier + number_literal) )))) , number_literal , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_1 + 0x1018)" * (cast_expression "(undefined8 *)(param_1 + 0x1018)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1018)" ( (binary_expression "param_1 + 0x1018" identifier + number_literal) )))) )))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }" if (parenthesized_expression "(lVar2 != 0)" ( (binary_expression "lVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }" { (expression_statement "lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));" (assignment_expression "lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010))" identifier = (call_expression "CloneImageInfo(*(undefined8 *)(param_1 + 0x1010))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x1010))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x1010)" * (cast_expression "(undefined8 *)(param_1 + 0x1010)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1010)" ( (binary_expression "param_1 + 0x1010" identifier + number_literal) )))) )))) ;) (expression_statement "*(undefined4 *)(lVar3 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(lVar3 + 0xc) = 1" (pointer_expression "*(undefined4 *)(lVar3 + 0xc)" * (cast_expression "(undefined4 *)(lVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0xc)" ( (binary_expression "lVar3 + 0xc" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));" (assignment_expression "uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018))" identifier = (call_expression "WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018))" identifier (argument_list "(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018))" ( identifier , identifier , (pointer_expression "*(undefined8 *)(param_1 + 0x1018)" * (cast_expression "(undefined8 *)(param_1 + 0x1018)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1018)" ( (binary_expression "param_1 + 0x1018" identifier + number_literal) )))) )))) ;) (expression_statement "DestroyImage(lVar2);" (call_expression "DestroyImage(lVar2)" identifier (argument_list "(lVar2)" ( identifier ))) ;) (expression_statement "DestroyImageInfo(lVar3);" (call_expression "DestroyImageInfo(lVar3)" identifier (argument_list "(lVar3)" ( identifier ))) ;) })) }))) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "__assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");" (call_expression "__assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage")" identifier (argument_list "("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage")" ( (string_literal ""wand->signature == MagickWandSignature"" " string_content ") , (string_literal ""MagickWand/magick-image.c"" " string_content ") , number_literal , (string_literal ""MagickWriteImage"" " string_content ") ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) 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 * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") , (binary_expression IDENT + LIT) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content ") , (string_literal " string_content ") , LIT , LIT , (string_literal " string_content ") , (pointer_expression & IDENT) , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) , IDENT , LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) }))) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })))
(function_definition "undefined4 MagickWriteImage(long param_1,long param_2)\n\n{\n  undefined4 uVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }\n                    \n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}" (type_identifier "undefined4") (function_declarator "MagickWriteImage(long param_1,long param_2)" (identifier "MagickWriteImage") (parameter_list "(long param_1,long param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  long lVar2;\n  long lVar3;\n  \n  if (param_1 == 0) {\n                    \n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }\n  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }\n                    \n  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (if_statement "if (param_1 == 0) {\n                    \n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");\n  }" ({ "{") (expression_statement "__assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage");" (call_expression "__assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage")" (identifier "__assert_fail") (argument_list "("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,\n                  "MagickWriteImage")" (( "(") (string_literal ""wand != (MagickWand *) NULL"" (" """) (string_content "wand != (MagickWand *) NULL") (" """)) (, ",") (string_literal ""MagickWand/magick-image.c"" (" """) (string_content "MagickWand/magick-image.c") (" """)) (, ",") (number_literal "0x339c") (, ",") (string_literal ""MagickWriteImage"" (" """) (string_content "MagickWriteImage") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (*(long *)(param_1 + 0x1030) == 0xabacadab) {\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }" (if "if") (parenthesized_expression "(*(long *)(param_1 + 0x1030) == 0xabacadab)" (( "(") (binary_expression "*(long *)(param_1 + 0x1030) == 0xabacadab" (pointer_expression "*(long *)(param_1 + 0x1030)" (* "*") (cast_expression "(long *)(param_1 + 0x1030)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1030)" (( "(") (binary_expression "param_1 + 0x1030" (identifier "param_1") (+ "+") (number_literal "0x1030")) () ")")))) (== "==") (number_literal "0xabacadab")) () ")")) (compound_statement "{\n    if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }\n    if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }\n    return uVar1;\n  }" ({ "{") (if_statement "if (*(int *)(param_1 + 0x1028) != 0) {\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x1028) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x1028) != 0" (pointer_expression "*(int *)(param_1 + 0x1028)" (* "*") (cast_expression "(int *)(param_1 + 0x1028)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1028)" (( "(") (binary_expression "param_1 + 0x1028" (identifier "param_1") (+ "+") (number_literal "0x1028")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;\n    }" ({ "{") (expression_statement "LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)\n      ;" (call_expression "LogMagickEvent(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)" (identifier "LogMagickEvent") (argument_list "(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",param_1 + 8)" (( "(") (number_literal "0x40000") (, ",") (string_literal ""MagickWand/magick-image.c"" (" """) (string_content "MagickWand/magick-image.c") (" """)) (, ",") (string_literal ""MagickWriteImage"" (" """) (string_content "MagickWriteImage") (" """)) (, ",") (number_literal "0x339f") (, ",") (string_literal ""%s"" (" """) (string_content "%s") (" """)) (, ",") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))) (; ";")) (} "}"))) (if_statement "if (*(long *)(param_1 + 0x1008) == 0) {\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }\n    else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" (if "if") (parenthesized_expression "(*(long *)(param_1 + 0x1008) == 0)" (( "(") (binary_expression "*(long *)(param_1 + 0x1008) == 0" (pointer_expression "*(long *)(param_1 + 0x1008)" (* "*") (cast_expression "(long *)(param_1 + 0x1008)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1008)" (( "(") (binary_expression "param_1 + 0x1008" (identifier "param_1") (+ "+") (number_literal "0x1008")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);\n      uVar1 = 0;\n    }" ({ "{") (expression_statement "ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);" (call_expression "ThrowMagickException\n                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8)" (identifier "ThrowMagickException") (argument_list "(*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MagickWriteImage",\n                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8)" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x1018)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x1018)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1018)" (( "(") (binary_expression "param_1 + 0x1018" (identifier "param_1") (+ "+") (number_literal "0x1018")) () ")")))) (, ",") (string_literal ""MagickWand/magick-image.c"" (" """) (string_content "MagickWand/magick-image.c") (" """)) (, ",") (string_literal ""MagickWriteImage"" (" """) (string_content "MagickWriteImage") (" """)) (, ",") (number_literal "0x33a1") (, ",") (number_literal "0x1d6") (, ",") (string_literal ""ContainsNoImages"" (" """) (string_content "ContainsNoImages") (" """)) (, ",") (pointer_expression "&DAT_0020ca76" (& "&") (identifier "DAT_0020ca76")) (, ",") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))) (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" (else "else") (compound_statement "{\n      if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }\n      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));\n      uVar1 = 0;\n      if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }\n    }" ({ "{") (if_statement "if (param_2 != 0) {\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);\n      }" ({ "{") (expression_statement "CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);" (call_expression "CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000)" (identifier "CopyMagickString") (argument_list "(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000)" (( "(") (binary_expression "*(long *)(param_1 + 0x1008) + 0x3f8" (pointer_expression "*(long *)(param_1 + 0x1008)" (* "*") (cast_expression "(long *)(param_1 + 0x1008)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1008)" (( "(") (binary_expression "param_1 + 0x1008" (identifier "param_1") (+ "+") (number_literal "0x1008")) () ")")))) (+ "+") (number_literal "0x3f8")) (, ",") (identifier "param_2") (, ",") (number_literal "0x1000") () ")"))) (; ";")) (} "}"))) (expression_statement "lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));" (assignment_expression "lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018))" (identifier "lVar2") (= "=") (call_expression "CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018))" (identifier "CloneImage") (argument_list "(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x1008)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x1008)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1008)" (( "(") (binary_expression "param_1 + 0x1008" (identifier "param_1") (+ "+") (number_literal "0x1008")) () ")")))) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_1 + 0x1018)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x1018)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1018)" (( "(") (binary_expression "param_1 + 0x1018" (identifier "param_1") (+ "+") (number_literal "0x1018")) () ")")))) () ")")))) (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if (lVar2 != 0) {\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }" (if "if") (parenthesized_expression "(lVar2 != 0)" (( "(") (binary_expression "lVar2 != 0" (identifier "lVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));\n        *(undefined4 *)(lVar3 + 0xc) = 1;\n        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));\n        DestroyImage(lVar2);\n        DestroyImageInfo(lVar3);\n      }" ({ "{") (expression_statement "lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));" (assignment_expression "lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010))" (identifier "lVar3") (= "=") (call_expression "CloneImageInfo(*(undefined8 *)(param_1 + 0x1010))" (identifier "CloneImageInfo") (argument_list "(*(undefined8 *)(param_1 + 0x1010))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x1010)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x1010)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1010)" (( "(") (binary_expression "param_1 + 0x1010" (identifier "param_1") (+ "+") (number_literal "0x1010")) () ")")))) () ")")))) (; ";")) (expression_statement "*(undefined4 *)(lVar3 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(lVar3 + 0xc) = 1" (pointer_expression "*(undefined4 *)(lVar3 + 0xc)" (* "*") (cast_expression "(undefined4 *)(lVar3 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0xc)" (( "(") (binary_expression "lVar3 + 0xc" (identifier "lVar3") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));" (assignment_expression "uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018))" (identifier "uVar1") (= "=") (call_expression "WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018))" (identifier "WriteImage") (argument_list "(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018))" (( "(") (identifier "lVar3") (, ",") (identifier "lVar2") (, ",") (pointer_expression "*(undefined8 *)(param_1 + 0x1018)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x1018)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1018)" (( "(") (binary_expression "param_1 + 0x1018" (identifier "param_1") (+ "+") (number_literal "0x1018")) () ")")))) () ")")))) (; ";")) (expression_statement "DestroyImage(lVar2);" (call_expression "DestroyImage(lVar2)" (identifier "DestroyImage") (argument_list "(lVar2)" (( "(") (identifier "lVar2") () ")"))) (; ";")) (expression_statement "DestroyImageInfo(lVar3);" (call_expression "DestroyImageInfo(lVar3)" (identifier "DestroyImageInfo") (argument_list "(lVar3)" (( "(") (identifier "lVar3") () ")"))) (; ";")) (} "}"))) (} "}")))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (expression_statement "__assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage");" (call_expression "__assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage")" (identifier "__assert_fail") (argument_list "("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,\n                "MagickWriteImage")" (( "(") (string_literal ""wand->signature == MagickWandSignature"" (" """) (string_content "wand->signature == MagickWandSignature") (" """)) (, ",") (string_literal ""MagickWand/magick-image.c"" (" """) (string_content "MagickWand/magick-image.c") (" """)) (, ",") (number_literal "0x339d") (, ",") (string_literal ""MagickWriteImage"" (" """) (string_content "MagickWriteImage") (" """)) () ")"))) (; ";")) (} "}")))

/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": Some values do not have unique names */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "PixelChannel": Some values do not have unique names */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */

type_1 function_1(type_2 *var_1,char *var_6)

{
  type_1 MVar1;
  long var_9;
  long var_11;
  
  if (var_1 == (type_2 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_2("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,
                  "MagickWriteImage");
  }
  if (var_1->signature == 0xabacadab) {
    if (var_1->debug != var_3) {
      var_4(0x40000,"MagickWand/magick-image.c","MagickWriteImage",0x339f,"%s",var_1->name);
    }
    if (var_1->images == (type_3 *)0x0) {
      var_5
                (var_1->exception,"MagickWand/magick-image.c","MagickWriteImage",0x33a1,0x1d6,
                 "ContainsNoImages",&DAT_0020ca76,var_1->name);
      MVar1 = var_3;
    }
    else {
      if (var_6 != (char *)0x0) {
        var_7(var_1->images->var_6,var_6,0x1000);
      }
      var_9 = var_8(var_1->images,0,0,1,var_1->exception);
      MVar1 = var_3;
      if (var_9 != 0) {
        var_11 = var_10(var_1->image_info);
        *(type_4 *)(var_11 + 0xc) = 1;
        MVar1 = var_12(var_11,var_9,var_1->exception);
        var_13(var_9);
        var_14(var_11);
      }
    }
    return MVar1;
  }
                    /* WARNING: Subroutine does not return */
  var_2("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,
                "MagickWriteImage");
}


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

undefined4 MASKED(long param_1,long param_2)

{
  undefined4 uVar1;
  long lVar2;
  long lVar3;
  
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("wand != (MagickWand *) NULL","MagickWand/magick-image.c",0x339c,
                  "MASKED");
  }
  if (*(long *)(param_1 + 0x1030) == 0xabacadab) {
    if (*(int *)(param_1 + 0x1028) != 0) {
      LogMagickEvent(0x40000,"MagickWand/magick-image.c","MASKED",0x339f,"%s",param_1 + 8)
      ;
    }
    if (*(long *)(param_1 + 0x1008) == 0) {
      ThrowMagickException
                (*(undefined8 *)(param_1 + 0x1018),"MagickWand/magick-image.c","MASKED",
                 0x33a1,0x1d6,"ContainsNoImages",&DAT_0020ca76,param_1 + 8);
      uVar1 = 0;
    }
    else {
      if (param_2 != 0) {
        CopyMagickString(*(long *)(param_1 + 0x1008) + 0x3f8,param_2,0x1000);
      }
      lVar2 = CloneImage(*(undefined8 *)(param_1 + 0x1008),0,0,1,*(undefined8 *)(param_1 + 0x1018));
      uVar1 = 0;
      if (lVar2 != 0) {
        lVar3 = CloneImageInfo(*(undefined8 *)(param_1 + 0x1010));
        *(undefined4 *)(lVar3 + 0xc) = 1;
        uVar1 = WriteImage(lVar3,lVar2,*(undefined8 *)(param_1 + 0x1018));
        DestroyImage(lVar2);
        DestroyImageInfo(lVar3);
      }
    }
    return uVar1;
  }
                    /* WARNING: Subroutine does not return */
  __assert_fail("wand->signature == MagickWandSignature","MagickWand/magick-image.c",0x339d,
                "MASKED");
}

