
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* 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 */
/* WARNING: Enum "ComplianceType": Some values do not have unique names */

int MVGAutoWrapPrintf(DrawingWand *wand,char *format,...)

{
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  char cStack_1021;
  char buffer [4096];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = __vsnprintf_chk(buffer,0xfff,1,0x1000,format,&stack0x0000000c);
  buffer[0xfff] = '\0';
  if (iVar2 < 0) {
    ThrowMagickException
              (wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,
               "UnableToPrint",&DAT_000e91ee,format);
  }
  else {
    if ((0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n')) {
      MVGPrintf(wand,"\n");
    }
    MVGPrintf(wand,"%s",buffer);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_000571b0(int param_1,undefined4 param_2)

{
  int iVar1;
  int in_GS_OFFSET;
  char acStack_1021 [4096];
  undefined1 local_21;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x571b9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);
  local_21 = 0;
  if (iVar1 < 0) {
    ThrowMagickException
              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",
               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);
  }
  else {
    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {
      FUN_00056e90(param_1,"\n");
    }
    FUN_00056e90(param_1,"%s",acStack_1021 + 1);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000e7d60();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001e920
ADD EBX,0x112e47
SUB ESP,0x102c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x101c],EAX
XOR EAX,EAX
MOV EDX,dword ptr [ESP + 0x1044]
LEA EAX,[ESP + 0x1048]
SUB ESP,0x8
MOV EDI,dword ptr [ESP + 0x1048]
PUSH EAX
PUSH EDX
MOV dword ptr [ESP + 0x1c],EDX
PUSH 0x1000
PUSH 0x1
PUSH 0xfff
LEA EBP,[ESP + 0x38]
PUSH EBP
CALL 0x0001cd70
MOV byte ptr [ESP + 0x103b],0x0
ADD ESP,0x20
MOV EDX,dword ptr [ESP + 0xc]
TEST EAX,EAX
MOV ESI,EAX
JS 0x00057280
MOV EAX,dword ptr [EDI + 0x1018]
ADD EAX,ESI
CMP EAX,0x4e
JA 0x00057260
LEA EAX,[EBX + 0xfff91a64]
SUB ESP,0x4
PUSH EBP
PUSH EAX
PUSH EDI
CALL 0x00056e90
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x101c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,ESI
JNZ 0x000572b7
ADD ESP,0x102c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP byte ptr [ESP + ESI*0x1 + 0x1b],0xa
JZ 0x0005722a
LEA EAX,[EBX + 0xfff88bf2]
SUB ESP,0x8
PUSH EAX
PUSH EDI
CALL 0x00056e90
ADD ESP,0x10
JMP 0x0005722a
LEA EAX,[EBX + 0xfff7f1ee]
PUSH EDX
PUSH EAX
LEA EAX,[EBX + 0xfff8892f]
PUSH EAX
LEA EAX,[EBX + 0xfff8abd0]
PUSH 0x1cc
PUSH 0x10d
PUSH EAX
LEA EAX,[EBX + 0xfff888f8]
PUSH EAX
PUSH dword ptr [EDI + 0x1008]
CALL 0x0001de10
ADD ESP,0x20
JMP 0x0005723e
CALL 0x000e7d60
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_000571b0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  char acStack_1021 [4096];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x571b9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);\n  local_21 = 0;\n  if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000e7d60();\n}\n\n" comment (function_definition "int FUN_000571b0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  char acStack_1021 [4096];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x571b9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);\n  local_21 = 0;\n  if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000e7d60();\n}" primitive_type (function_declarator "FUN_000571b0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  char acStack_1021 [4096];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x571b9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);\n  local_21 = 0;\n  if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000e7d60();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char acStack_1021 [4096];" primitive_type (array_declarator "acStack_1021 [4096]" identifier [ number_literal ]) ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x571b9;" (assignment_expression "uStack_14 = 0x571b9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);" (assignment_expression "iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c)" identifier = (call_expression "__vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c)" identifier (argument_list "(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c)" ( (binary_expression "acStack_1021 + 1" identifier + number_literal) , number_literal , number_literal , number_literal , identifier , (pointer_expression "&stack0x0000000c" & identifier) )))) ;) (expression_statement "local_21 = 0;" (assignment_expression "local_21 = 0" identifier = number_literal) ;) (if_statement "if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }" { (expression_statement "ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);" (call_expression "ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x1008)" * (cast_expression "(undefined4 *)(param_1 + 0x1008)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1008)" ( (binary_expression "param_1 + 0x1008" identifier + number_literal) )))) , (string_literal ""MagickWand/drawing-wand.c"" " string_content ") , (string_literal ""MVGAutoWrapPrintf"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToPrint"" " string_content ") , (pointer_expression "&DAT_000e91ee" & identifier) , identifier ))) ;) }) (else_clause "else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }" else (compound_statement "{\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }" { (if_statement "if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }" if (parenthesized_expression "((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n'))" ( (binary_expression "(0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')" (parenthesized_expression "(0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1))" ( (binary_expression "0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)" number_literal < (call_expression "(uint)(*(int *)(param_1 + 0x1018) + iVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)(param_1 + 0x1018) + iVar1)" ( (binary_expression "*(int *)(param_1 + 0x1018) + iVar1" (pointer_expression "*(int *)(param_1 + 0x1018)" * (cast_expression "(int *)(param_1 + 0x1018)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1018)" ( (binary_expression "param_1 + 0x1018" identifier + number_literal) )))) + identifier) )))) )) && (parenthesized_expression "(acStack_1021[iVar1] != '\n')" ( (binary_expression "acStack_1021[iVar1] != '\n'" (subscript_expression "acStack_1021[iVar1]" identifier [ identifier ]) != (char_literal "'\n'" ' escape_sequence ')) ))) )) (compound_statement "{\n      FUN_00056e90(param_1,"\n");\n    }" { (expression_statement "FUN_00056e90(param_1,"\n");" (call_expression "FUN_00056e90(param_1,"\n")" identifier (argument_list "(param_1,"\n")" ( identifier , (string_literal ""\n"" " escape_sequence ") ))) ;) })) (expression_statement "FUN_00056e90(param_1,"%s",acStack_1021 + 1);" (call_expression "FUN_00056e90(param_1,"%s",acStack_1021 + 1)" identifier (argument_list "(param_1,"%s",acStack_1021 + 1)" ( identifier , (string_literal ""%s"" " string_content ") , (binary_expression "acStack_1021 + 1" identifier + number_literal) ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "FUN_000e7d60();" (call_expression "FUN_000e7d60()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* 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/* WARNING: Enum "ComplianceType": Some values do not have unique names */\n\nint MVGAutoWrapPrintf(DrawingWand *wand,char *format,...)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char cStack_1021;\n  char buffer [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = __vsnprintf_chk(buffer,0xfff,1,0x1000,format,&stack0x0000000c);\n  buffer[0xfff] = '\0';\n  if (iVar2 < 0) {\n    ThrowMagickException\n              (wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,\n               "UnableToPrint",&DAT_000e91ee,format);\n  }\n  else {\n    if ((0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n')) {\n      MVGPrintf(wand,"\n");\n    }\n    MVGPrintf(wand,"%s",buffer);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment comment comment comment comment comment (function_definition "int MVGAutoWrapPrintf(DrawingWand *wand,char *format,...)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char cStack_1021;\n  char buffer [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = __vsnprintf_chk(buffer,0xfff,1,0x1000,format,&stack0x0000000c);\n  buffer[0xfff] = '\0';\n  if (iVar2 < 0) {\n    ThrowMagickException\n              (wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,\n               "UnableToPrint",&DAT_000e91ee,format);\n  }\n  else {\n    if ((0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n')) {\n      MVGPrintf(wand,"\n");\n    }\n    MVGPrintf(wand,"%s",buffer);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "MVGAutoWrapPrintf(DrawingWand *wand,char *format,...)" identifier (parameter_list "(DrawingWand *wand,char *format,...)" ( (parameter_declaration "DrawingWand *wand" type_identifier (pointer_declarator "*wand" * identifier)) , (parameter_declaration "char *format" primitive_type (pointer_declarator "*format" * identifier)) , (variadic_parameter "..." ...) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char cStack_1021;\n  char buffer [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = __vsnprintf_chk(buffer,0xfff,1,0x1000,format,&stack0x0000000c);\n  buffer[0xfff] = '\0';\n  if (iVar2 < 0) {\n    ThrowMagickException\n              (wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,\n               "UnableToPrint",&DAT_000e91ee,format);\n  }\n  else {\n    if ((0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n')) {\n      MVGPrintf(wand,"\n");\n    }\n    MVGPrintf(wand,"%s",buffer);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char cStack_1021;" primitive_type identifier ;) (declaration "char buffer [4096];" primitive_type (array_declarator "buffer [4096]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = __vsnprintf_chk(buffer,0xfff,1,0x1000,format,&stack0x0000000c);" (assignment_expression "iVar2 = __vsnprintf_chk(buffer,0xfff,1,0x1000,format,&stack0x0000000c)" identifier = (call_expression "__vsnprintf_chk(buffer,0xfff,1,0x1000,format,&stack0x0000000c)" identifier (argument_list "(buffer,0xfff,1,0x1000,format,&stack0x0000000c)" ( identifier , number_literal , number_literal , number_literal , identifier , (pointer_expression "&stack0x0000000c" & identifier) )))) ;) (expression_statement "buffer[0xfff] = '\0';" (assignment_expression "buffer[0xfff] = '\0'" (subscript_expression "buffer[0xfff]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (iVar2 < 0) {\n    ThrowMagickException\n              (wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,\n               "UnableToPrint",&DAT_000e91ee,format);\n  }\n  else {\n    if ((0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n')) {\n      MVGPrintf(wand,"\n");\n    }\n    MVGPrintf(wand,"%s",buffer);\n  }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n    ThrowMagickException\n              (wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,\n               "UnableToPrint",&DAT_000e91ee,format);\n  }" { (expression_statement "ThrowMagickException\n              (wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,\n               "UnableToPrint",&DAT_000e91ee,format);" (call_expression "ThrowMagickException\n              (wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,\n               "UnableToPrint",&DAT_000e91ee,format)" identifier (argument_list "(wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,\n               "UnableToPrint",&DAT_000e91ee,format)" ( (field_expression "wand->exception" identifier -> field_identifier) , (string_literal ""MagickWand/drawing-wand.c"" " string_content ") , (string_literal ""MVGAutoWrapPrintf"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToPrint"" " string_content ") , (pointer_expression "&DAT_000e91ee" & identifier) , identifier ))) ;) }) (else_clause "else {\n    if ((0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n')) {\n      MVGPrintf(wand,"\n");\n    }\n    MVGPrintf(wand,"%s",buffer);\n  }" else (compound_statement "{\n    if ((0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n')) {\n      MVGPrintf(wand,"\n");\n    }\n    MVGPrintf(wand,"%s",buffer);\n  }" { (if_statement "if ((0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n')) {\n      MVGPrintf(wand,"\n");\n    }" if (parenthesized_expression "((0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n'))" ( (binary_expression "(0x4e < wand->mvg_width + iVar2) && (buffer[iVar2 + -1] != '\n')" (parenthesized_expression "(0x4e < wand->mvg_width + iVar2)" ( (binary_expression "0x4e < wand->mvg_width + iVar2" number_literal < (binary_expression "wand->mvg_width + iVar2" (field_expression "wand->mvg_width" identifier -> field_identifier) + identifier)) )) && (parenthesized_expression "(buffer[iVar2 + -1] != '\n')" ( (binary_expression "buffer[iVar2 + -1] != '\n'" (subscript_expression "buffer[iVar2 + -1]" identifier [ (binary_expression "iVar2 + -1" identifier + number_literal) ]) != (char_literal "'\n'" ' escape_sequence ')) ))) )) (compound_statement "{\n      MVGPrintf(wand,"\n");\n    }" { (expression_statement "MVGPrintf(wand,"\n");" (call_expression "MVGPrintf(wand,"\n")" identifier (argument_list "(wand,"\n")" ( identifier , (string_literal ""\n"" " escape_sequence ") ))) ;) })) (expression_statement "MVGPrintf(wand,"%s",buffer);" (call_expression "MVGPrintf(wand,"%s",buffer)" identifier (argument_list "(wand,"%s",buffer)" ( identifier , (string_literal ""%s"" " string_content ") , identifier ))) ;) }))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_000571b0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  char acStack_1021 [4096];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x571b9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);\n  local_21 = 0;\n  if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000e7d60();\n}\n\n" (function_definition "int FUN_000571b0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  char acStack_1021 [4096];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x571b9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);\n  local_21 = 0;\n  if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000e7d60();\n}" primitive_type (function_declarator "FUN_000571b0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  char acStack_1021 [4096];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x571b9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);\n  local_21 = 0;\n  if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000e7d60();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char acStack_1021 [4096];" primitive_type (array_declarator "acStack_1021 [4096]" identifier [ number_literal ]) ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x571b9;" (assignment_expression "uStack_14 = 0x571b9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);" (assignment_expression "iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c)" identifier = (call_expression "__vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c)" identifier (argument_list "(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c)" ( (binary_expression "acStack_1021 + 1" identifier + number_literal) , number_literal , number_literal , number_literal , identifier , (pointer_expression "&stack0x0000000c" & identifier) )))) ;) (expression_statement "local_21 = 0;" (assignment_expression "local_21 = 0" identifier = number_literal) ;) (if_statement "if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }" { (expression_statement "ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);" (call_expression "ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x1008)" * (cast_expression "(undefined4 *)(param_1 + 0x1008)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1008)" ( (binary_expression "param_1 + 0x1008" identifier + number_literal) )))) , (string_literal ""MagickWand/drawing-wand.c"" " string_content ") , (string_literal ""MVGAutoWrapPrintf"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToPrint"" " string_content ") , (pointer_expression "&DAT_000e91ee" & identifier) , identifier ))) ;) }) (else_clause "else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }" else (compound_statement "{\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }" { (if_statement "if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }" if (parenthesized_expression "((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n'))" ( (binary_expression "(0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')" (parenthesized_expression "(0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1))" ( (binary_expression "0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)" number_literal < (call_expression "(uint)(*(int *)(param_1 + 0x1018) + iVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)(param_1 + 0x1018) + iVar1)" ( (binary_expression "*(int *)(param_1 + 0x1018) + iVar1" (pointer_expression "*(int *)(param_1 + 0x1018)" * (cast_expression "(int *)(param_1 + 0x1018)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1018)" ( (binary_expression "param_1 + 0x1018" identifier + number_literal) )))) + identifier) )))) )) && (parenthesized_expression "(acStack_1021[iVar1] != '\n')" ( (binary_expression "acStack_1021[iVar1] != '\n'" (subscript_expression "acStack_1021[iVar1]" identifier [ identifier ]) != (char_literal "'\n'" ' escape_sequence ')) ))) )) (compound_statement "{\n      FUN_00056e90(param_1,"\n");\n    }" { (expression_statement "FUN_00056e90(param_1,"\n");" (call_expression "FUN_00056e90(param_1,"\n")" identifier (argument_list "(param_1,"\n")" ( identifier , (string_literal ""\n"" " escape_sequence ") ))) ;) })) (expression_statement "FUN_00056e90(param_1,"%s",acStack_1021 + 1);" (call_expression "FUN_00056e90(param_1,"%s",acStack_1021 + 1)" identifier (argument_list "(param_1,"%s",acStack_1021 + 1)" ( identifier , (string_literal ""%s"" " string_content ") , (binary_expression "acStack_1021 + 1" identifier + number_literal) ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "FUN_000e7d60();" (call_expression "FUN_000e7d60()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , LIT , LIT , LIT , IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < 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) , IDENT ))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT) )))) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) != (char_literal ' escape_sequence ')) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " escape_sequence ") ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , (binary_expression IDENT + LIT) ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_000571b0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  char acStack_1021 [4096];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x571b9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);\n  local_21 = 0;\n  if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000e7d60();\n}" (primitive_type "int") (function_declarator "FUN_000571b0(int param_1,undefined4 param_2)" (identifier "FUN_000571b0") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  char acStack_1021 [4096];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x571b9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);\n  local_21 = 0;\n  if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_000e7d60();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char acStack_1021 [4096];" (primitive_type "char") (array_declarator "acStack_1021 [4096]" (identifier "acStack_1021") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "undefined1 local_21;" (type_identifier "undefined1") (identifier "local_21") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x571b9;" (assignment_expression "uStack_14 = 0x571b9" (identifier "uStack_14") (= "=") (number_literal "0x571b9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);" (assignment_expression "iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c)" (identifier "iVar1") (= "=") (call_expression "__vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c)" (identifier "__vsnprintf_chk") (argument_list "(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c)" (( "(") (binary_expression "acStack_1021 + 1" (identifier "acStack_1021") (+ "+") (number_literal "1")) (, ",") (number_literal "0xfff") (, ",") (number_literal "1") (, ",") (number_literal "0x1000") (, ",") (identifier "param_2") (, ",") (pointer_expression "&stack0x0000000c" (& "&") (identifier "stack0x0000000c")) () ")")))) (; ";")) (expression_statement "local_21 = 0;" (assignment_expression "local_21 = 0" (identifier "local_21") (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar1 < 0) {\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }\n  else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);\n  }" ({ "{") (expression_statement "ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);" (call_expression "ThrowMagickException\n              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2)" (identifier "ThrowMagickException") (argument_list "(*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",\n               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x1008)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1008)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1008)" (( "(") (binary_expression "param_1 + 0x1008" (identifier "param_1") (+ "+") (number_literal "0x1008")) () ")")))) (, ",") (string_literal ""MagickWand/drawing-wand.c"" (" """) (string_content "MagickWand/drawing-wand.c") (" """)) (, ",") (string_literal ""MVGAutoWrapPrintf"" (" """) (string_content "MVGAutoWrapPrintf") (" """)) (, ",") (number_literal "0x10d") (, ",") (number_literal "0x1cc") (, ",") (string_literal ""UnableToPrint"" (" """) (string_content "UnableToPrint") (" """)) (, ",") (pointer_expression "&DAT_000e91ee" (& "&") (identifier "DAT_000e91ee")) (, ",") (identifier "param_2") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }" (else "else") (compound_statement "{\n    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }\n    FUN_00056e90(param_1,"%s",acStack_1021 + 1);\n  }" ({ "{") (if_statement "if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {\n      FUN_00056e90(param_1,"\n");\n    }" (if "if") (parenthesized_expression "((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n'))" (( "(") (binary_expression "(0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')" (parenthesized_expression "(0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1))" (( "(") (binary_expression "0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)" (number_literal "0x4e") (< "<") (call_expression "(uint)(*(int *)(param_1 + 0x1018) + iVar1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*(int *)(param_1 + 0x1018) + iVar1)" (( "(") (binary_expression "*(int *)(param_1 + 0x1018) + iVar1" (pointer_expression "*(int *)(param_1 + 0x1018)" (* "*") (cast_expression "(int *)(param_1 + 0x1018)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1018)" (( "(") (binary_expression "param_1 + 0x1018" (identifier "param_1") (+ "+") (number_literal "0x1018")) () ")")))) (+ "+") (identifier "iVar1")) () ")")))) () ")")) (&& "&&") (parenthesized_expression "(acStack_1021[iVar1] != '\n')" (( "(") (binary_expression "acStack_1021[iVar1] != '\n'" (subscript_expression "acStack_1021[iVar1]" (identifier "acStack_1021") ([ "[") (identifier "iVar1") (] "]")) (!= "!=") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      FUN_00056e90(param_1,"\n");\n    }" ({ "{") (expression_statement "FUN_00056e90(param_1,"\n");" (call_expression "FUN_00056e90(param_1,"\n")" (identifier "FUN_00056e90") (argument_list "(param_1,"\n")" (( "(") (identifier "param_1") (, ",") (string_literal ""\n"" (" """) (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_00056e90(param_1,"%s",acStack_1021 + 1);" (call_expression "FUN_00056e90(param_1,"%s",acStack_1021 + 1)" (identifier "FUN_00056e90") (argument_list "(param_1,"%s",acStack_1021 + 1)" (( "(") (identifier "param_1") (, ",") (string_literal ""%s"" (" """) (string_content "%s") (" """)) (, ",") (binary_expression "acStack_1021 + 1" (identifier "acStack_1021") (+ "+") (number_literal "1")) () ")"))) (; ";")) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar1;\n  }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "FUN_000e7d60();" (call_expression "FUN_000e7d60()" (identifier "FUN_000e7d60") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* 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 */
/* WARNING: Enum "ComplianceType": Some values do not have unique names */

int function_1(type_1 *wand,char *format,...)

{
  int var_6;
  int var_3;
  int var_1;
  char cStack_1021;
  char buffer [4096];
  
  var_6 = *(int *)(var_1 + 0x14);
  var_3 = var_2(buffer,0xfff,1,0x1000,format,&stack0x0000000c);
  buffer[0xfff] = '\0';
  if (var_3 < 0) {
    var_4
              (wand->exception,"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",0x10d,0x1cc,
               "UnableToPrint",&DAT_000e91ee,format);
  }
  else {
    if ((0x4e < wand->mvg_width + var_3) && (buffer[var_3 + -1] != '\n')) {
      var_5(wand,"\n");
    }
    var_5(wand,"%s",buffer);
  }
  if (var_6 == *(int *)(var_1 + 0x14)) {
    return var_3;
  }
                    /* WARNING: Subroutine does not return */
  var_7();
}


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

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

int MASKED(int param_1,undefined4 param_2)

{
  int iVar1;
  int in_GS_OFFSET;
  char acStack_1021 [4096];
  undefined1 local_21;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x571b9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = __vsnprintf_chk(acStack_1021 + 1,0xfff,1,0x1000,param_2,&stack0x0000000c);
  local_21 = 0;
  if (iVar1 < 0) {
    ThrowMagickException
              (*(undefined4 *)(param_1 + 0x1008),"MagickWand/drawing-wand.c","MVGAutoWrapPrintf",
               0x10d,0x1cc,"UnableToPrint",&DAT_000e91ee,param_2);
  }
  else {
    if ((0x4e < (uint)(*(int *)(param_1 + 0x1018) + iVar1)) && (acStack_1021[iVar1] != '\n')) {
      FUN_00056e90(param_1,"\n");
    }
    FUN_00056e90(param_1,"%s",acStack_1021 + 1);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000e7d60();
}

