
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": 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 __regparm3
ReadMipmaps(ImageInfo *image_info,Image *image,DDSInfo *dds_info,DDSPixelDecoder *decoder,
           ExceptionInfo *exception)

{
  int iVar1;
  MagickBooleanType MVar2;
  int *piVar3;
  char *string;
  uint columns;
  uint rows;
  int local_24;
  
  iVar1 = EOFBlob(image);
  if (iVar1 != 0) {
    piVar3 = __errno_location();
    string = GetExceptionMessage(*piVar3);
    ThrowMagickException
              (exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,
               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string);
    DestroyString(string);
    return MagickFalse;
  }
  MVar2 = MagickTrue;
  if (((dds_info->ddscaps1 & 0x400000) != 0) &&
     (((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0)))) {
    columns = dds_info->width >> 1;
    if (dds_info->width < 2) {
      columns = 1;
    }
    rows = dds_info->height >> 1;
    if (dds_info->height < 2) {
      rows = 1;
    }
    if ((int)dds_info->mipmapcount < 2) {
      MVar2 = MagickTrue;
    }
    else {
      local_24 = 1;
      do {
        AcquireNextImage(image_info,image,exception);
        if (image->next == (_Image *)0x0) {
          return MagickFalse;
        }
        image->next->alpha_trait = image->alpha_trait;
        image = SyncNextImageInList(image);
        MVar2 = SetImageExtent(image,columns,rows,exception);
        if (MVar2 == MagickFalse) {
          return MagickFalse;
        }
        MVar2 = (*decoder)(image,dds_info,exception);
        if (MVar2 == MagickFalse) {
          return MagickFalse;
        }
        if ((columns == 1) && (rows == 1)) {
          return MVar2;
        }
        if (columns != 1) {
          columns = columns >> 1;
        }
        if (rows != 1) {
          rows = rows >> 1;
        }
        local_24 = local_24 + 1;
      } while (local_24 < (int)dds_info->mipmapcount);
    }
  }
  return MVar2;
}



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

int __regparm3
FUN_001ea790(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)

{
  int iVar1;
  int *piVar2;
  undefined4 uVar3;
  uint uVar4;
  uint uVar5;
  int local_24;
  
  iVar1 = EOFBlob(param_2);
  if (iVar1 != 0) {
    piVar2 = __errno_location();
    uVar3 = GetExceptionMessage(*piVar2);
    ThrowMagickException
              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",
               param_2 + 0x318,uVar3);
    DestroyString(uVar3);
    return 0;
  }
  iVar1 = 1;
  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&
     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {
    uVar4 = *(uint *)(param_3 + 8) >> 1;
    if (*(uint *)(param_3 + 8) < 2) {
      uVar4 = 1;
    }
    uVar5 = *(uint *)(param_3 + 4) >> 1;
    if (*(uint *)(param_3 + 4) < 2) {
      uVar5 = 1;
    }
    if (*(int *)(param_3 + 0x14) < 2) {
      iVar1 = 1;
    }
    else {
      local_24 = 1;
      do {
        AcquireNextImage(param_1,param_2,param_5);
        if (*(int *)(param_2 + 0x3340) == 0) {
          return 0;
        }
        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);
        param_2 = SyncNextImageInList(param_2);
        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);
        if (iVar1 == 0) {
          return 0;
        }
        iVar1 = (*param_4)(param_2,param_3,param_5);
        if (iVar1 == 0) {
          return 0;
        }
        if ((uVar4 == 1) && (uVar5 == 1)) {
          return iVar1;
        }
        if (uVar4 != 1) {
          uVar4 = uVar4 >> 1;
        }
        if (uVar5 != 1) {
          uVar5 = uVar5 >> 1;
        }
        local_24 = local_24 + 1;
      } while (local_24 < *(int *)(param_3 + 0x14));
    }
  }
  return iVar1;
}


PUSH EBP
MOV EBP,EDX
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00038830
ADD EBX,0x1ee865
SUB ESP,0x28
MOV dword ptr [ESP + 0x18],EAX
MOV dword ptr [ESP + 0x10],ECX
PUSH EDX
CALL 0x00030ee0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x001ea8c0
MOV EDI,dword ptr [ESP + 0x4]
MOV EAX,0x1
MOV ECX,dword ptr [EDI + 0x18]
TEST ECX,0x400000
JZ 0x001ea8b0
AND CH,0x10
JZ 0x001ea920
MOV EDX,dword ptr [ESP + 0x4]
MOV EAX,0x1
MOV ECX,dword ptr [EDX + 0x8]
MOV ESI,ECX
SHR ESI,0x1
CMP ECX,0x1
MOV ECX,dword ptr [EDX + 0x4]
CMOVBE ESI,EAX
MOV EDI,ECX
SHR EDI,0x1
CMP ECX,0x1
CMOVBE EDI,EAX
CMP dword ptr [EDX + 0x14],0x1
JLE 0x001ea92c
MOV dword ptr [ESP + 0x8],0x1
JMP 0x001ea88c
MOV ECX,dword ptr [EBP + 0x294]
SUB ESP,0xc
MOV dword ptr [EAX + 0x294],ECX
PUSH EBP
CALL 0x00031b80
ADD ESP,0x10
PUSH dword ptr [ESP + 0x34]
PUSH EDI
MOV EBP,EAX
PUSH ESI
PUSH EAX
CALL 0x00031910
ADD ESP,0x10
TEST EAX,EAX
JZ 0x001ea8ae
SUB ESP,0x4
PUSH dword ptr [ESP + 0x38]
PUSH dword ptr [ESP + 0xc]
PUSH EBP
CALL dword ptr [ESP + 0x40]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x001ea8ae
CMP ESI,0x1
JNZ 0x001ea866
CMP EDI,0x1
JZ 0x001ea8b0
MOV ECX,ESI
SHR ECX,0x1
CMP ESI,0x1
CMOVNZ ESI,ECX
MOV ECX,EDI
SHR ECX,0x1
CMP EDI,0x1
CMOVNZ EDI,ECX
MOV ECX,dword ptr [ESP + 0x4]
ADD dword ptr [ESP + 0x8],0x1
MOV EDX,dword ptr [ESP + 0x8]
CMP dword ptr [ECX + 0x14],EDX
JLE 0x001ea8b0
SUB ESP,0x4
PUSH dword ptr [ESP + 0x38]
PUSH EBP
PUSH dword ptr [ESP + 0x18]
CALL 0x00032cc0
MOV EAX,dword ptr [EBP + 0x3340]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x001ea818
XOR EAX,EAX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x000305f0
SUB ESP,0xc
PUSH dword ptr [EAX]
CALL 0x00031c10
LEA EDX,[EBP + 0x318]
MOV dword ptr [ESP],EAX
MOV ESI,EAX
LEA EAX,[EBX + 0xffec5bcb]
PUSH EDX
PUSH EAX
LEA EAX,[EBX + 0xffef2dde]
PUSH EAX
LEA EAX,[EBX + 0xffeff5d0]
PUSH 0x145
PUSH 0x41e
PUSH EAX
LEA EAX,[EBX + 0xffeff48d]
PUSH EAX
PUSH dword ptr [ESP + 0x60]
CALL 0x00032e80
ADD ESP,0x24
PUSH ESI
CALL 0x00032950
ADD ESP,0x10
XOR EAX,EAX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST byte ptr [EDI + 0x1d],0x2
JNZ 0x001ea7de
JMP 0x001ea8b0
MOV EAX,0x1
JMP 0x001ea8b0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3\nFUN_001ea790(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  uint uVar5;\n  int local_24;\n  \n  iVar1 = EOFBlob(param_2);\n  if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }\n  iVar1 = 1;\n  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int __regparm3\nFUN_001ea790(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  uint uVar5;\n  int local_24;\n  \n  iVar1 = EOFBlob(param_2);\n  if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }\n  iVar1 = 1;\n  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_001ea790(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)" identifier (parameter_list "(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "code *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  uint uVar5;\n  int local_24;\n  \n  iVar1 = EOFBlob(param_2);\n  if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }\n  iVar1 = 1;\n  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (expression_statement "iVar1 = EOFBlob(param_2);" (assignment_expression "iVar1 = EOFBlob(param_2)" identifier = (call_expression "EOFBlob(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = GetExceptionMessage(*piVar2);" (assignment_expression "uVar3 = GetExceptionMessage(*piVar2)" identifier = (call_expression "GetExceptionMessage(*piVar2)" identifier (argument_list "(*piVar2)" ( (pointer_expression "*piVar2" * identifier) )))) ;) (expression_statement "ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);" (call_expression "ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3)" identifier (argument_list "(param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3)" ( identifier , (string_literal ""coders/dds.c"" " string_content ") , (string_literal ""ReadMipmaps"" " string_content ") , number_literal , number_literal , (string_literal ""UnexpectedEndOfFile"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , (binary_expression "param_2 + 0x318" identifier + number_literal) , identifier ))) ;) (expression_statement "DestroyString(uVar3);" (call_expression "DestroyString(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }" if (parenthesized_expression "(((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0))))" ( (binary_expression "((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))" (parenthesized_expression "((*(uint *)(param_3 + 0x18) & 0x400000) != 0)" ( (binary_expression "(*(uint *)(param_3 + 0x18) & 0x400000) != 0" (parenthesized_expression "(*(uint *)(param_3 + 0x18) & 0x400000)" ( (binary_expression "*(uint *)(param_3 + 0x18) & 0x400000" (pointer_expression "*(uint *)(param_3 + 0x18)" * (cast_expression "(uint *)(param_3 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x18)" ( (binary_expression "param_3 + 0x18" identifier + number_literal) )))) & number_literal) )) != number_literal) )) && (parenthesized_expression "(((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))" ( (parenthesized_expression "((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0))" ( (binary_expression "(*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)" (binary_expression "(*(uint *)(param_3 + 0x18) & 0x1000) != 0" (parenthesized_expression "(*(uint *)(param_3 + 0x18) & 0x1000)" ( (binary_expression "*(uint *)(param_3 + 0x18) & 0x1000" (pointer_expression "*(uint *)(param_3 + 0x18)" * (cast_expression "(uint *)(param_3 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x18)" ( (binary_expression "param_3 + 0x18" identifier + number_literal) )))) & number_literal) )) != number_literal) || (parenthesized_expression "((*(byte *)(param_3 + 0x1d) & 2) != 0)" ( (binary_expression "(*(byte *)(param_3 + 0x1d) & 2) != 0" (parenthesized_expression "(*(byte *)(param_3 + 0x1d) & 2)" ( (binary_expression "*(byte *)(param_3 + 0x1d) & 2" (pointer_expression "*(byte *)(param_3 + 0x1d)" * (cast_expression "(byte *)(param_3 + 0x1d)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x1d)" ( (binary_expression "param_3 + 0x1d" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) ))) )) (compound_statement "{\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }" { (expression_statement "uVar4 = *(uint *)(param_3 + 8) >> 1;" (assignment_expression "uVar4 = *(uint *)(param_3 + 8) >> 1" identifier = (binary_expression "*(uint *)(param_3 + 8) >> 1" (pointer_expression "*(uint *)(param_3 + 8)" * (cast_expression "(uint *)(param_3 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))) >> number_literal)) ;) (if_statement "if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }" if (parenthesized_expression "(*(uint *)(param_3 + 8) < 2)" ( (binary_expression "*(uint *)(param_3 + 8) < 2" (pointer_expression "*(uint *)(param_3 + 8)" * (cast_expression "(uint *)(param_3 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      uVar4 = 1;\n    }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) })) (expression_statement "uVar5 = *(uint *)(param_3 + 4) >> 1;" (assignment_expression "uVar5 = *(uint *)(param_3 + 4) >> 1" identifier = (binary_expression "*(uint *)(param_3 + 4) >> 1" (pointer_expression "*(uint *)(param_3 + 4)" * (cast_expression "(uint *)(param_3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) >> number_literal)) ;) (if_statement "if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }" if (parenthesized_expression "(*(uint *)(param_3 + 4) < 2)" ( (binary_expression "*(uint *)(param_3 + 4) < 2" (pointer_expression "*(uint *)(param_3 + 4)" * (cast_expression "(uint *)(param_3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      uVar5 = 1;\n    }" { (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) })) (if_statement "if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }" if (parenthesized_expression "(*(int *)(param_3 + 0x14) < 2)" ( (binary_expression "*(int *)(param_3 + 0x14) < 2" (pointer_expression "*(int *)(param_3 + 0x14)" * (cast_expression "(int *)(param_3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x14)" ( (binary_expression "param_3 + 0x14" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      iVar1 = 1;\n    }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }" else (compound_statement "{\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }" { (expression_statement "local_24 = 1;" (assignment_expression "local_24 = 1" identifier = number_literal) ;) (do_statement "do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));" do (compound_statement "{\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      }" { (expression_statement "AcquireNextImage(param_1,param_2,param_5);" (call_expression "AcquireNextImage(param_1,param_2,param_5)" identifier (argument_list "(param_1,param_2,param_5)" ( identifier , identifier , identifier ))) ;) (if_statement "if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }" if (parenthesized_expression "(*(int *)(param_2 + 0x3340) == 0)" ( (binary_expression "*(int *)(param_2 + 0x3340) == 0" (pointer_expression "*(int *)(param_2 + 0x3340)" * (cast_expression "(int *)(param_2 + 0x3340)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x3340)" ( (binary_expression "param_2 + 0x3340" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "*(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);" (assignment_expression "*(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294)" (pointer_expression "*(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294)" * (cast_expression "(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x3340) + 0x294)" ( (binary_expression "*(int *)(param_2 + 0x3340) + 0x294" (pointer_expression "*(int *)(param_2 + 0x3340)" * (cast_expression "(int *)(param_2 + 0x3340)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x3340)" ( (binary_expression "param_2 + 0x3340" identifier + number_literal) )))) + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_2 + 0x294)" * (cast_expression "(undefined4 *)(param_2 + 0x294)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x294)" ( (binary_expression "param_2 + 0x294" identifier + number_literal) ))))) ;) (expression_statement "param_2 = SyncNextImageInList(param_2);" (assignment_expression "param_2 = SyncNextImageInList(param_2)" identifier = (call_expression "SyncNextImageInList(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);" (assignment_expression "iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5)" identifier = (call_expression "SetImageExtent(param_2,uVar4,uVar5,param_5)" identifier (argument_list "(param_2,uVar4,uVar5,param_5)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n          return 0;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = (*param_4)(param_2,param_3,param_5);" (assignment_expression "iVar1 = (*param_4)(param_2,param_3,param_5)" identifier = (call_expression "(*param_4)(param_2,param_3,param_5)" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "(param_2,param_3,param_5)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n          return 0;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }" if (parenthesized_expression "((uVar4 == 1) && (uVar5 == 1))" ( (binary_expression "(uVar4 == 1) && (uVar5 == 1)" (parenthesized_expression "(uVar4 == 1)" ( (binary_expression "uVar4 == 1" identifier == number_literal) )) && (parenthesized_expression "(uVar5 == 1)" ( (binary_expression "uVar5 == 1" identifier == number_literal) ))) )) (compound_statement "{\n          return iVar1;\n        }" { (return_statement "return iVar1;" return identifier ;) })) (if_statement "if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }" if (parenthesized_expression "(uVar4 != 1)" ( (binary_expression "uVar4 != 1" identifier != number_literal) )) (compound_statement "{\n          uVar4 = uVar4 >> 1;\n        }" { (expression_statement "uVar4 = uVar4 >> 1;" (assignment_expression "uVar4 = uVar4 >> 1" identifier = (binary_expression "uVar4 >> 1" identifier >> number_literal)) ;) })) (if_statement "if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }" if (parenthesized_expression "(uVar5 != 1)" ( (binary_expression "uVar5 != 1" identifier != number_literal) )) (compound_statement "{\n          uVar5 = uVar5 >> 1;\n        }" { (expression_statement "uVar5 = uVar5 >> 1;" (assignment_expression "uVar5 = uVar5 >> 1" identifier = (binary_expression "uVar5 >> 1" identifier >> number_literal)) ;) })) (expression_statement "local_24 = local_24 + 1;" (assignment_expression "local_24 = local_24 + 1" identifier = (binary_expression "local_24 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_24 < *(int *)(param_3 + 0x14))" ( (binary_expression "local_24 < *(int *)(param_3 + 0x14)" identifier < (pointer_expression "*(int *)(param_3 + 0x14)" * (cast_expression "(int *)(param_3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x14)" ( (binary_expression "param_3 + 0x14" identifier + number_literal) ))))) )) ;) }))) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "ChannelType": Some values do not have unique names */\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 "PixelChannel": Some values do not have unique names */\n/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n\nMagickBooleanType __regparm3\nReadMipmaps(ImageInfo *image_info,Image *image,DDSInfo *dds_info,DDSPixelDecoder *decoder,\n           ExceptionInfo *exception)\n\n{\n  int iVar1;\n  MagickBooleanType MVar2;\n  int *piVar3;\n  char *string;\n  uint columns;\n  uint rows;\n  int local_24;\n  \n  iVar1 = EOFBlob(image);\n  if (iVar1 != 0) {\n    piVar3 = __errno_location();\n    string = GetExceptionMessage(*piVar3);\n    ThrowMagickException\n              (exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,\n               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string);\n    DestroyString(string);\n    return MagickFalse;\n  }\n  MVar2 = MagickTrue;\n  if (((dds_info->ddscaps1 & 0x400000) != 0) &&\n     (((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0)))) {\n    columns = dds_info->width >> 1;\n    if (dds_info->width < 2) {\n      columns = 1;\n    }\n    rows = dds_info->height >> 1;\n    if (dds_info->height < 2) {\n      rows = 1;\n    }\n    if ((int)dds_info->mipmapcount < 2) {\n      MVar2 = MagickTrue;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < (int)dds_info->mipmapcount);\n    }\n  }\n  return MVar2;\n}\n\n" comment comment comment comment comment comment (function_definition "MagickBooleanType __regparm3\nReadMipmaps(ImageInfo *image_info,Image *image,DDSInfo *dds_info,DDSPixelDecoder *decoder,\n           ExceptionInfo *exception)\n\n{\n  int iVar1;\n  MagickBooleanType MVar2;\n  int *piVar3;\n  char *string;\n  uint columns;\n  uint rows;\n  int local_24;\n  \n  iVar1 = EOFBlob(image);\n  if (iVar1 != 0) {\n    piVar3 = __errno_location();\n    string = GetExceptionMessage(*piVar3);\n    ThrowMagickException\n              (exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,\n               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string);\n    DestroyString(string);\n    return MagickFalse;\n  }\n  MVar2 = MagickTrue;\n  if (((dds_info->ddscaps1 & 0x400000) != 0) &&\n     (((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0)))) {\n    columns = dds_info->width >> 1;\n    if (dds_info->width < 2) {\n      columns = 1;\n    }\n    rows = dds_info->height >> 1;\n    if (dds_info->height < 2) {\n      rows = 1;\n    }\n    if ((int)dds_info->mipmapcount < 2) {\n      MVar2 = MagickTrue;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < (int)dds_info->mipmapcount);\n    }\n  }\n  return MVar2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "ReadMipmaps(ImageInfo *image_info,Image *image,DDSInfo *dds_info,DDSPixelDecoder *decoder,\n           ExceptionInfo *exception)" identifier (parameter_list "(ImageInfo *image_info,Image *image,DDSInfo *dds_info,DDSPixelDecoder *decoder,\n           ExceptionInfo *exception)" ( (parameter_declaration "ImageInfo *image_info" type_identifier (pointer_declarator "*image_info" * identifier)) , (parameter_declaration "Image *image" type_identifier (pointer_declarator "*image" * identifier)) , (parameter_declaration "DDSInfo *dds_info" type_identifier (pointer_declarator "*dds_info" * identifier)) , (parameter_declaration "DDSPixelDecoder *decoder" type_identifier (pointer_declarator "*decoder" * identifier)) , (parameter_declaration "ExceptionInfo *exception" type_identifier (pointer_declarator "*exception" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  MagickBooleanType MVar2;\n  int *piVar3;\n  char *string;\n  uint columns;\n  uint rows;\n  int local_24;\n  \n  iVar1 = EOFBlob(image);\n  if (iVar1 != 0) {\n    piVar3 = __errno_location();\n    string = GetExceptionMessage(*piVar3);\n    ThrowMagickException\n              (exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,\n               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string);\n    DestroyString(string);\n    return MagickFalse;\n  }\n  MVar2 = MagickTrue;\n  if (((dds_info->ddscaps1 & 0x400000) != 0) &&\n     (((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0)))) {\n    columns = dds_info->width >> 1;\n    if (dds_info->width < 2) {\n      columns = 1;\n    }\n    rows = dds_info->height >> 1;\n    if (dds_info->height < 2) {\n      rows = 1;\n    }\n    if ((int)dds_info->mipmapcount < 2) {\n      MVar2 = MagickTrue;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < (int)dds_info->mipmapcount);\n    }\n  }\n  return MVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "MagickBooleanType MVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *string;" primitive_type (pointer_declarator "*string" * identifier) ;) (declaration "uint columns;" type_identifier identifier ;) (declaration "uint rows;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (expression_statement "iVar1 = EOFBlob(image);" (assignment_expression "iVar1 = EOFBlob(image)" identifier = (call_expression "EOFBlob(image)" identifier (argument_list "(image)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    piVar3 = __errno_location();\n    string = GetExceptionMessage(*piVar3);\n    ThrowMagickException\n              (exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,\n               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string);\n    DestroyString(string);\n    return MagickFalse;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar3 = __errno_location();\n    string = GetExceptionMessage(*piVar3);\n    ThrowMagickException\n              (exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,\n               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string);\n    DestroyString(string);\n    return MagickFalse;\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "string = GetExceptionMessage(*piVar3);" (assignment_expression "string = GetExceptionMessage(*piVar3)" identifier = (call_expression "GetExceptionMessage(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "ThrowMagickException\n              (exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,\n               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string);" (call_expression "ThrowMagickException\n              (exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,\n               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string)" identifier (argument_list "(exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,\n               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string)" ( identifier , (string_literal ""coders/dds.c"" " string_content ") , (string_literal ""ReadMipmaps"" " string_content ") , number_literal , identifier , (string_literal ""UnexpectedEndOfFile"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , (field_expression "image->filename" identifier -> field_identifier) , identifier ))) ;) (expression_statement "DestroyString(string);" (call_expression "DestroyString(string)" identifier (argument_list "(string)" ( identifier ))) ;) (return_statement "return MagickFalse;" return identifier ;) })) (expression_statement "MVar2 = MagickTrue;" (assignment_expression "MVar2 = MagickTrue" identifier = identifier) ;) (if_statement "if (((dds_info->ddscaps1 & 0x400000) != 0) &&\n     (((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0)))) {\n    columns = dds_info->width >> 1;\n    if (dds_info->width < 2) {\n      columns = 1;\n    }\n    rows = dds_info->height >> 1;\n    if (dds_info->height < 2) {\n      rows = 1;\n    }\n    if ((int)dds_info->mipmapcount < 2) {\n      MVar2 = MagickTrue;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < (int)dds_info->mipmapcount);\n    }\n  }" if (parenthesized_expression "(((dds_info->ddscaps1 & 0x400000) != 0) &&\n     (((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0))))" ( (binary_expression "((dds_info->ddscaps1 & 0x400000) != 0) &&\n     (((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0)))" (parenthesized_expression "((dds_info->ddscaps1 & 0x400000) != 0)" ( (binary_expression "(dds_info->ddscaps1 & 0x400000) != 0" (parenthesized_expression "(dds_info->ddscaps1 & 0x400000)" ( (binary_expression "dds_info->ddscaps1 & 0x400000" (field_expression "dds_info->ddscaps1" identifier -> field_identifier) & number_literal) )) != number_literal) )) && (parenthesized_expression "(((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0)))" ( (parenthesized_expression "((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0))" ( (binary_expression "(dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0)" (binary_expression "(dds_info->ddscaps1 & 0x1000) != 0" (parenthesized_expression "(dds_info->ddscaps1 & 0x1000)" ( (binary_expression "dds_info->ddscaps1 & 0x1000" (field_expression "dds_info->ddscaps1" identifier -> field_identifier) & number_literal) )) != number_literal) || (parenthesized_expression "((dds_info->ddscaps2 & 0x200) != 0)" ( (binary_expression "(dds_info->ddscaps2 & 0x200) != 0" (parenthesized_expression "(dds_info->ddscaps2 & 0x200)" ( (binary_expression "dds_info->ddscaps2 & 0x200" (field_expression "dds_info->ddscaps2" identifier -> field_identifier) & number_literal) )) != number_literal) ))) )) ))) )) (compound_statement "{\n    columns = dds_info->width >> 1;\n    if (dds_info->width < 2) {\n      columns = 1;\n    }\n    rows = dds_info->height >> 1;\n    if (dds_info->height < 2) {\n      rows = 1;\n    }\n    if ((int)dds_info->mipmapcount < 2) {\n      MVar2 = MagickTrue;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < (int)dds_info->mipmapcount);\n    }\n  }" { (expression_statement "columns = dds_info->width >> 1;" (assignment_expression "columns = dds_info->width >> 1" identifier = (binary_expression "dds_info->width >> 1" (field_expression "dds_info->width" identifier -> field_identifier) >> number_literal)) ;) (if_statement "if (dds_info->width < 2) {\n      columns = 1;\n    }" if (parenthesized_expression "(dds_info->width < 2)" ( (binary_expression "dds_info->width < 2" (field_expression "dds_info->width" identifier -> field_identifier) < number_literal) )) (compound_statement "{\n      columns = 1;\n    }" { (expression_statement "columns = 1;" (assignment_expression "columns = 1" identifier = number_literal) ;) })) (expression_statement "rows = dds_info->height >> 1;" (assignment_expression "rows = dds_info->height >> 1" identifier = (binary_expression "dds_info->height >> 1" (field_expression "dds_info->height" identifier -> field_identifier) >> number_literal)) ;) (if_statement "if (dds_info->height < 2) {\n      rows = 1;\n    }" if (parenthesized_expression "(dds_info->height < 2)" ( (binary_expression "dds_info->height < 2" (field_expression "dds_info->height" identifier -> field_identifier) < number_literal) )) (compound_statement "{\n      rows = 1;\n    }" { (expression_statement "rows = 1;" (assignment_expression "rows = 1" identifier = number_literal) ;) })) (if_statement "if ((int)dds_info->mipmapcount < 2) {\n      MVar2 = MagickTrue;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < (int)dds_info->mipmapcount);\n    }" if (parenthesized_expression "((int)dds_info->mipmapcount < 2)" ( (binary_expression "(int)dds_info->mipmapcount < 2" (cast_expression "(int)dds_info->mipmapcount" ( (type_descriptor "int" primitive_type) ) (field_expression "dds_info->mipmapcount" identifier -> field_identifier)) < number_literal) )) (compound_statement "{\n      MVar2 = MagickTrue;\n    }" { (expression_statement "MVar2 = MagickTrue;" (assignment_expression "MVar2 = MagickTrue" identifier = identifier) ;) }) (else_clause "else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < (int)dds_info->mipmapcount);\n    }" else (compound_statement "{\n      local_24 = 1;\n      do {\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < (int)dds_info->mipmapcount);\n    }" { (expression_statement "local_24 = 1;" (assignment_expression "local_24 = 1" identifier = number_literal) ;) (do_statement "do {\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < (int)dds_info->mipmapcount);" do (compound_statement "{\n        AcquireNextImage(image_info,image,exception);\n        if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }\n        image->next->alpha_trait = image->alpha_trait;\n        image = SyncNextImageInList(image);\n        MVar2 = SetImageExtent(image,columns,rows,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        MVar2 = (*decoder)(image,dds_info,exception);\n        if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }\n        if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }\n        if (columns != 1) {\n          columns = columns >> 1;\n        }\n        if (rows != 1) {\n          rows = rows >> 1;\n        }\n        local_24 = local_24 + 1;\n      }" { (expression_statement "AcquireNextImage(image_info,image,exception);" (call_expression "AcquireNextImage(image_info,image,exception)" identifier (argument_list "(image_info,image,exception)" ( identifier , identifier , identifier ))) ;) (if_statement "if (image->next == (_Image *)0x0) {\n          return MagickFalse;\n        }" if (parenthesized_expression "(image->next == (_Image *)0x0)" ( (binary_expression "image->next == (_Image *)0x0" (field_expression "image->next" identifier -> field_identifier) == (cast_expression "(_Image *)0x0" ( (type_descriptor "_Image *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          return MagickFalse;\n        }" { (return_statement "return MagickFalse;" return identifier ;) })) (expression_statement "image->next->alpha_trait = image->alpha_trait;" (assignment_expression "image->next->alpha_trait = image->alpha_trait" (field_expression "image->next->alpha_trait" (field_expression "image->next" identifier -> field_identifier) -> field_identifier) = (field_expression "image->alpha_trait" identifier -> field_identifier)) ;) (expression_statement "image = SyncNextImageInList(image);" (assignment_expression "image = SyncNextImageInList(image)" identifier = (call_expression "SyncNextImageInList(image)" identifier (argument_list "(image)" ( identifier )))) ;) (expression_statement "MVar2 = SetImageExtent(image,columns,rows,exception);" (assignment_expression "MVar2 = SetImageExtent(image,columns,rows,exception)" identifier = (call_expression "SetImageExtent(image,columns,rows,exception)" identifier (argument_list "(image,columns,rows,exception)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }" if (parenthesized_expression "(MVar2 == MagickFalse)" ( (binary_expression "MVar2 == MagickFalse" identifier == identifier) )) (compound_statement "{\n          return MagickFalse;\n        }" { (return_statement "return MagickFalse;" return identifier ;) })) (expression_statement "MVar2 = (*decoder)(image,dds_info,exception);" (assignment_expression "MVar2 = (*decoder)(image,dds_info,exception)" identifier = (call_expression "(*decoder)(image,dds_info,exception)" (parenthesized_expression "(*decoder)" ( (pointer_expression "*decoder" * identifier) )) (argument_list "(image,dds_info,exception)" ( identifier , identifier , identifier )))) ;) (if_statement "if (MVar2 == MagickFalse) {\n          return MagickFalse;\n        }" if (parenthesized_expression "(MVar2 == MagickFalse)" ( (binary_expression "MVar2 == MagickFalse" identifier == identifier) )) (compound_statement "{\n          return MagickFalse;\n        }" { (return_statement "return MagickFalse;" return identifier ;) })) (if_statement "if ((columns == 1) && (rows == 1)) {\n          return MVar2;\n        }" if (parenthesized_expression "((columns == 1) && (rows == 1))" ( (binary_expression "(columns == 1) && (rows == 1)" (parenthesized_expression "(columns == 1)" ( (binary_expression "columns == 1" identifier == number_literal) )) && (parenthesized_expression "(rows == 1)" ( (binary_expression "rows == 1" identifier == number_literal) ))) )) (compound_statement "{\n          return MVar2;\n        }" { (return_statement "return MVar2;" return identifier ;) })) (if_statement "if (columns != 1) {\n          columns = columns >> 1;\n        }" if (parenthesized_expression "(columns != 1)" ( (binary_expression "columns != 1" identifier != number_literal) )) (compound_statement "{\n          columns = columns >> 1;\n        }" { (expression_statement "columns = columns >> 1;" (assignment_expression "columns = columns >> 1" identifier = (binary_expression "columns >> 1" identifier >> number_literal)) ;) })) (if_statement "if (rows != 1) {\n          rows = rows >> 1;\n        }" if (parenthesized_expression "(rows != 1)" ( (binary_expression "rows != 1" identifier != number_literal) )) (compound_statement "{\n          rows = rows >> 1;\n        }" { (expression_statement "rows = rows >> 1;" (assignment_expression "rows = rows >> 1" identifier = (binary_expression "rows >> 1" identifier >> number_literal)) ;) })) (expression_statement "local_24 = local_24 + 1;" (assignment_expression "local_24 = local_24 + 1" identifier = (binary_expression "local_24 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_24 < (int)dds_info->mipmapcount)" ( (binary_expression "local_24 < (int)dds_info->mipmapcount" identifier < (cast_expression "(int)dds_info->mipmapcount" ( (type_descriptor "int" primitive_type) ) (field_expression "dds_info->mipmapcount" identifier -> field_identifier))) )) ;) }))) })) (return_statement "return MVar2;" return identifier ;) })))
(translation_unit "int __regparm3\nFUN_001ea790(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  uint uVar5;\n  int local_24;\n  \n  iVar1 = EOFBlob(param_2);\n  if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }\n  iVar1 = 1;\n  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int __regparm3\nFUN_001ea790(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  uint uVar5;\n  int local_24;\n  \n  iVar1 = EOFBlob(param_2);\n  if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }\n  iVar1 = 1;\n  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_001ea790(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)" identifier (parameter_list "(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "code *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  uint uVar5;\n  int local_24;\n  \n  iVar1 = EOFBlob(param_2);\n  if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }\n  iVar1 = 1;\n  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (expression_statement "iVar1 = EOFBlob(param_2);" (assignment_expression "iVar1 = EOFBlob(param_2)" identifier = (call_expression "EOFBlob(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = GetExceptionMessage(*piVar2);" (assignment_expression "uVar3 = GetExceptionMessage(*piVar2)" identifier = (call_expression "GetExceptionMessage(*piVar2)" identifier (argument_list "(*piVar2)" ( (pointer_expression "*piVar2" * identifier) )))) ;) (expression_statement "ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);" (call_expression "ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3)" identifier (argument_list "(param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3)" ( identifier , (string_literal ""coders/dds.c"" " string_content ") , (string_literal ""ReadMipmaps"" " string_content ") , number_literal , number_literal , (string_literal ""UnexpectedEndOfFile"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , (binary_expression "param_2 + 0x318" identifier + number_literal) , identifier ))) ;) (expression_statement "DestroyString(uVar3);" (call_expression "DestroyString(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }" if (parenthesized_expression "(((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0))))" ( (binary_expression "((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))" (parenthesized_expression "((*(uint *)(param_3 + 0x18) & 0x400000) != 0)" ( (binary_expression "(*(uint *)(param_3 + 0x18) & 0x400000) != 0" (parenthesized_expression "(*(uint *)(param_3 + 0x18) & 0x400000)" ( (binary_expression "*(uint *)(param_3 + 0x18) & 0x400000" (pointer_expression "*(uint *)(param_3 + 0x18)" * (cast_expression "(uint *)(param_3 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x18)" ( (binary_expression "param_3 + 0x18" identifier + number_literal) )))) & number_literal) )) != number_literal) )) && (parenthesized_expression "(((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))" ( (parenthesized_expression "((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0))" ( (binary_expression "(*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)" (binary_expression "(*(uint *)(param_3 + 0x18) & 0x1000) != 0" (parenthesized_expression "(*(uint *)(param_3 + 0x18) & 0x1000)" ( (binary_expression "*(uint *)(param_3 + 0x18) & 0x1000" (pointer_expression "*(uint *)(param_3 + 0x18)" * (cast_expression "(uint *)(param_3 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x18)" ( (binary_expression "param_3 + 0x18" identifier + number_literal) )))) & number_literal) )) != number_literal) || (parenthesized_expression "((*(byte *)(param_3 + 0x1d) & 2) != 0)" ( (binary_expression "(*(byte *)(param_3 + 0x1d) & 2) != 0" (parenthesized_expression "(*(byte *)(param_3 + 0x1d) & 2)" ( (binary_expression "*(byte *)(param_3 + 0x1d) & 2" (pointer_expression "*(byte *)(param_3 + 0x1d)" * (cast_expression "(byte *)(param_3 + 0x1d)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x1d)" ( (binary_expression "param_3 + 0x1d" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) ))) )) (compound_statement "{\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }" { (expression_statement "uVar4 = *(uint *)(param_3 + 8) >> 1;" (assignment_expression "uVar4 = *(uint *)(param_3 + 8) >> 1" identifier = (binary_expression "*(uint *)(param_3 + 8) >> 1" (pointer_expression "*(uint *)(param_3 + 8)" * (cast_expression "(uint *)(param_3 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))) >> number_literal)) ;) (if_statement "if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }" if (parenthesized_expression "(*(uint *)(param_3 + 8) < 2)" ( (binary_expression "*(uint *)(param_3 + 8) < 2" (pointer_expression "*(uint *)(param_3 + 8)" * (cast_expression "(uint *)(param_3 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      uVar4 = 1;\n    }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) })) (expression_statement "uVar5 = *(uint *)(param_3 + 4) >> 1;" (assignment_expression "uVar5 = *(uint *)(param_3 + 4) >> 1" identifier = (binary_expression "*(uint *)(param_3 + 4) >> 1" (pointer_expression "*(uint *)(param_3 + 4)" * (cast_expression "(uint *)(param_3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) >> number_literal)) ;) (if_statement "if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }" if (parenthesized_expression "(*(uint *)(param_3 + 4) < 2)" ( (binary_expression "*(uint *)(param_3 + 4) < 2" (pointer_expression "*(uint *)(param_3 + 4)" * (cast_expression "(uint *)(param_3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      uVar5 = 1;\n    }" { (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) })) (if_statement "if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }" if (parenthesized_expression "(*(int *)(param_3 + 0x14) < 2)" ( (binary_expression "*(int *)(param_3 + 0x14) < 2" (pointer_expression "*(int *)(param_3 + 0x14)" * (cast_expression "(int *)(param_3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x14)" ( (binary_expression "param_3 + 0x14" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      iVar1 = 1;\n    }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }" else (compound_statement "{\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }" { (expression_statement "local_24 = 1;" (assignment_expression "local_24 = 1" identifier = number_literal) ;) (do_statement "do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));" do (compound_statement "{\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      }" { (expression_statement "AcquireNextImage(param_1,param_2,param_5);" (call_expression "AcquireNextImage(param_1,param_2,param_5)" identifier (argument_list "(param_1,param_2,param_5)" ( identifier , identifier , identifier ))) ;) (if_statement "if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }" if (parenthesized_expression "(*(int *)(param_2 + 0x3340) == 0)" ( (binary_expression "*(int *)(param_2 + 0x3340) == 0" (pointer_expression "*(int *)(param_2 + 0x3340)" * (cast_expression "(int *)(param_2 + 0x3340)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x3340)" ( (binary_expression "param_2 + 0x3340" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "*(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);" (assignment_expression "*(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294)" (pointer_expression "*(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294)" * (cast_expression "(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x3340) + 0x294)" ( (binary_expression "*(int *)(param_2 + 0x3340) + 0x294" (pointer_expression "*(int *)(param_2 + 0x3340)" * (cast_expression "(int *)(param_2 + 0x3340)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x3340)" ( (binary_expression "param_2 + 0x3340" identifier + number_literal) )))) + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_2 + 0x294)" * (cast_expression "(undefined4 *)(param_2 + 0x294)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x294)" ( (binary_expression "param_2 + 0x294" identifier + number_literal) ))))) ;) (expression_statement "param_2 = SyncNextImageInList(param_2);" (assignment_expression "param_2 = SyncNextImageInList(param_2)" identifier = (call_expression "SyncNextImageInList(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);" (assignment_expression "iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5)" identifier = (call_expression "SetImageExtent(param_2,uVar4,uVar5,param_5)" identifier (argument_list "(param_2,uVar4,uVar5,param_5)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n          return 0;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = (*param_4)(param_2,param_3,param_5);" (assignment_expression "iVar1 = (*param_4)(param_2,param_3,param_5)" identifier = (call_expression "(*param_4)(param_2,param_3,param_5)" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "(param_2,param_3,param_5)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n          return 0;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }" if (parenthesized_expression "((uVar4 == 1) && (uVar5 == 1))" ( (binary_expression "(uVar4 == 1) && (uVar5 == 1)" (parenthesized_expression "(uVar4 == 1)" ( (binary_expression "uVar4 == 1" identifier == number_literal) )) && (parenthesized_expression "(uVar5 == 1)" ( (binary_expression "uVar5 == 1" identifier == number_literal) ))) )) (compound_statement "{\n          return iVar1;\n        }" { (return_statement "return iVar1;" return identifier ;) })) (if_statement "if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }" if (parenthesized_expression "(uVar4 != 1)" ( (binary_expression "uVar4 != 1" identifier != number_literal) )) (compound_statement "{\n          uVar4 = uVar4 >> 1;\n        }" { (expression_statement "uVar4 = uVar4 >> 1;" (assignment_expression "uVar4 = uVar4 >> 1" identifier = (binary_expression "uVar4 >> 1" identifier >> number_literal)) ;) })) (if_statement "if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }" if (parenthesized_expression "(uVar5 != 1)" ( (binary_expression "uVar5 != 1" identifier != number_literal) )) (compound_statement "{\n          uVar5 = uVar5 >> 1;\n        }" { (expression_statement "uVar5 = uVar5 >> 1;" (assignment_expression "uVar5 = uVar5 >> 1" identifier = (binary_expression "uVar5 >> 1" identifier >> number_literal)) ;) })) (expression_statement "local_24 = local_24 + 1;" (assignment_expression "local_24 = local_24 + 1" identifier = (binary_expression "local_24 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_24 < *(int *)(param_3 + 0x14))" ( (binary_expression "local_24 < *(int *)(param_3 + 0x14)" identifier < (pointer_expression "*(int *)(param_3 + 0x14)" * (cast_expression "(int *)(param_3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0x14)" ( (binary_expression "param_3 + 0x14" identifier + number_literal) ))))) )) ;) }))) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , LIT , (string_literal " string_content ") , (string_literal " escape_sequence string_content escape_sequence string_content ") , (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) >> LIT)) ;) (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 (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) >> LIT)) ;) (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 (assignment_expression IDENT = LIT) ;) })) (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 (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (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 { (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) = (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 ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) ;) }))) })) (return_statement return IDENT ;) })))
(function_definition "int __regparm3\nFUN_001ea790(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  uint uVar5;\n  int local_24;\n  \n  iVar1 = EOFBlob(param_2);\n  if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }\n  iVar1 = 1;\n  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }\n  return iVar1;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_001ea790(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)" (identifier "FUN_001ea790") (parameter_list "(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "code *param_4" (type_identifier "code") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  uint uVar4;\n  uint uVar5;\n  int local_24;\n  \n  iVar1 = EOFBlob(param_2);\n  if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }\n  iVar1 = 1;\n  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (expression_statement "iVar1 = EOFBlob(param_2);" (assignment_expression "iVar1 = EOFBlob(param_2)" (identifier "iVar1") (= "=") (call_expression "EOFBlob(param_2)" (identifier "EOFBlob") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    piVar2 = __errno_location();\n    uVar3 = GetExceptionMessage(*piVar2);\n    ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);\n    DestroyString(uVar3);\n    return 0;\n  }" ({ "{") (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" (identifier "piVar2") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar3 = GetExceptionMessage(*piVar2);" (assignment_expression "uVar3 = GetExceptionMessage(*piVar2)" (identifier "uVar3") (= "=") (call_expression "GetExceptionMessage(*piVar2)" (identifier "GetExceptionMessage") (argument_list "(*piVar2)" (( "(") (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) () ")")))) (; ";")) (expression_statement "ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3);" (call_expression "ThrowMagickException\n              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3)" (identifier "ThrowMagickException") (argument_list "(param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",\n               param_2 + 0x318,uVar3)" (( "(") (identifier "param_5") (, ",") (string_literal ""coders/dds.c"" (" """) (string_content "coders/dds.c") (" """)) (, ",") (string_literal ""ReadMipmaps"" (" """) (string_content "ReadMipmaps") (" """)) (, ",") (number_literal "0x41e") (, ",") (number_literal "0x145") (, ",") (string_literal ""UnexpectedEndOfFile"" (" """) (string_content "UnexpectedEndOfFile") (" """)) (, ",") (string_literal ""\'%s\': %s"" (" """) (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (string_content ": %s") (" """)) (, ",") (binary_expression "param_2 + 0x318" (identifier "param_2") (+ "+") (number_literal "0x318")) (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "DestroyString(uVar3);" (call_expression "DestroyString(uVar3)" (identifier "DestroyString") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" (identifier "iVar1") (= "=") (number_literal "1")) (; ";")) (if_statement "if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }" (if "if") (parenthesized_expression "(((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0))))" (( "(") (binary_expression "((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&\n     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))" (parenthesized_expression "((*(uint *)(param_3 + 0x18) & 0x400000) != 0)" (( "(") (binary_expression "(*(uint *)(param_3 + 0x18) & 0x400000) != 0" (parenthesized_expression "(*(uint *)(param_3 + 0x18) & 0x400000)" (( "(") (binary_expression "*(uint *)(param_3 + 0x18) & 0x400000" (pointer_expression "*(uint *)(param_3 + 0x18)" (* "*") (cast_expression "(uint *)(param_3 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x18)" (( "(") (binary_expression "param_3 + 0x18" (identifier "param_3") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "0x400000")) () ")")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))" (( "(") (parenthesized_expression "((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0))" (( "(") (binary_expression "(*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)" (binary_expression "(*(uint *)(param_3 + 0x18) & 0x1000) != 0" (parenthesized_expression "(*(uint *)(param_3 + 0x18) & 0x1000)" (( "(") (binary_expression "*(uint *)(param_3 + 0x18) & 0x1000" (pointer_expression "*(uint *)(param_3 + 0x18)" (* "*") (cast_expression "(uint *)(param_3 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x18)" (( "(") (binary_expression "param_3 + 0x18" (identifier "param_3") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "0x1000")) () ")")) (!= "!=") (number_literal "0")) (|| "||") (parenthesized_expression "((*(byte *)(param_3 + 0x1d) & 2) != 0)" (( "(") (binary_expression "(*(byte *)(param_3 + 0x1d) & 2) != 0" (parenthesized_expression "(*(byte *)(param_3 + 0x1d) & 2)" (( "(") (binary_expression "*(byte *)(param_3 + 0x1d) & 2" (pointer_expression "*(byte *)(param_3 + 0x1d)" (* "*") (cast_expression "(byte *)(param_3 + 0x1d)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x1d)" (( "(") (binary_expression "param_3 + 0x1d" (identifier "param_3") (+ "+") (number_literal "0x1d")) () ")")))) (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n    uVar4 = *(uint *)(param_3 + 8) >> 1;\n    if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }\n    uVar5 = *(uint *)(param_3 + 4) >> 1;\n    if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }\n    if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }\n  }" ({ "{") (expression_statement "uVar4 = *(uint *)(param_3 + 8) >> 1;" (assignment_expression "uVar4 = *(uint *)(param_3 + 8) >> 1" (identifier "uVar4") (= "=") (binary_expression "*(uint *)(param_3 + 8) >> 1" (pointer_expression "*(uint *)(param_3 + 8)" (* "*") (cast_expression "(uint *)(param_3 + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 8)" (( "(") (binary_expression "param_3 + 8" (identifier "param_3") (+ "+") (number_literal "8")) () ")")))) (>> ">>") (number_literal "1"))) (; ";")) (if_statement "if (*(uint *)(param_3 + 8) < 2) {\n      uVar4 = 1;\n    }" (if "if") (parenthesized_expression "(*(uint *)(param_3 + 8) < 2)" (( "(") (binary_expression "*(uint *)(param_3 + 8) < 2" (pointer_expression "*(uint *)(param_3 + 8)" (* "*") (cast_expression "(uint *)(param_3 + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 8)" (( "(") (binary_expression "param_3 + 8" (identifier "param_3") (+ "+") (number_literal "8")) () ")")))) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      uVar4 = 1;\n    }" ({ "{") (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "uVar5 = *(uint *)(param_3 + 4) >> 1;" (assignment_expression "uVar5 = *(uint *)(param_3 + 4) >> 1" (identifier "uVar5") (= "=") (binary_expression "*(uint *)(param_3 + 4) >> 1" (pointer_expression "*(uint *)(param_3 + 4)" (* "*") (cast_expression "(uint *)(param_3 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")")))) (>> ">>") (number_literal "1"))) (; ";")) (if_statement "if (*(uint *)(param_3 + 4) < 2) {\n      uVar5 = 1;\n    }" (if "if") (parenthesized_expression "(*(uint *)(param_3 + 4) < 2)" (( "(") (binary_expression "*(uint *)(param_3 + 4) < 2" (pointer_expression "*(uint *)(param_3 + 4)" (* "*") (cast_expression "(uint *)(param_3 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")")))) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      uVar5 = 1;\n    }" ({ "{") (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" (identifier "uVar5") (= "=") (number_literal "1")) (; ";")) (} "}"))) (if_statement "if (*(int *)(param_3 + 0x14) < 2) {\n      iVar1 = 1;\n    }\n    else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }" (if "if") (parenthesized_expression "(*(int *)(param_3 + 0x14) < 2)" (( "(") (binary_expression "*(int *)(param_3 + 0x14) < 2" (pointer_expression "*(int *)(param_3 + 0x14)" (* "*") (cast_expression "(int *)(param_3 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x14)" (( "(") (binary_expression "param_3 + 0x14" (identifier "param_3") (+ "+") (number_literal "0x14")) () ")")))) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      iVar1 = 1;\n    }" ({ "{") (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" (identifier "iVar1") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }" (else "else") (compound_statement "{\n      local_24 = 1;\n      do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));\n    }" ({ "{") (expression_statement "local_24 = 1;" (assignment_expression "local_24 = 1" (identifier "local_24") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      } while (local_24 < *(int *)(param_3 + 0x14));" (do "do") (compound_statement "{\n        AcquireNextImage(param_1,param_2,param_5);\n        if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }\n        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);\n        param_2 = SyncNextImageInList(param_2);\n        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        iVar1 = (*param_4)(param_2,param_3,param_5);\n        if (iVar1 == 0) {\n          return 0;\n        }\n        if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }\n        if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }\n        if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }\n        local_24 = local_24 + 1;\n      }" ({ "{") (expression_statement "AcquireNextImage(param_1,param_2,param_5);" (call_expression "AcquireNextImage(param_1,param_2,param_5)" (identifier "AcquireNextImage") (argument_list "(param_1,param_2,param_5)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_5") () ")"))) (; ";")) (if_statement "if (*(int *)(param_2 + 0x3340) == 0) {\n          return 0;\n        }" (if "if") (parenthesized_expression "(*(int *)(param_2 + 0x3340) == 0)" (( "(") (binary_expression "*(int *)(param_2 + 0x3340) == 0" (pointer_expression "*(int *)(param_2 + 0x3340)" (* "*") (cast_expression "(int *)(param_2 + 0x3340)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x3340)" (( "(") (binary_expression "param_2 + 0x3340" (identifier "param_2") (+ "+") (number_literal "0x3340")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);" (assignment_expression "*(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294)" (pointer_expression "*(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_2 + 0x3340) + 0x294)" (( "(") (binary_expression "*(int *)(param_2 + 0x3340) + 0x294" (pointer_expression "*(int *)(param_2 + 0x3340)" (* "*") (cast_expression "(int *)(param_2 + 0x3340)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x3340)" (( "(") (binary_expression "param_2 + 0x3340" (identifier "param_2") (+ "+") (number_literal "0x3340")) () ")")))) (+ "+") (number_literal "0x294")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(param_2 + 0x294)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x294)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x294)" (( "(") (binary_expression "param_2 + 0x294" (identifier "param_2") (+ "+") (number_literal "0x294")) () ")"))))) (; ";")) (expression_statement "param_2 = SyncNextImageInList(param_2);" (assignment_expression "param_2 = SyncNextImageInList(param_2)" (identifier "param_2") (= "=") (call_expression "SyncNextImageInList(param_2)" (identifier "SyncNextImageInList") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);" (assignment_expression "iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5)" (identifier "iVar1") (= "=") (call_expression "SetImageExtent(param_2,uVar4,uVar5,param_5)" (identifier "SetImageExtent") (argument_list "(param_2,uVar4,uVar5,param_5)" (( "(") (identifier "param_2") (, ",") (identifier "uVar4") (, ",") (identifier "uVar5") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n          return 0;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = (*param_4)(param_2,param_3,param_5);" (assignment_expression "iVar1 = (*param_4)(param_2,param_3,param_5)" (identifier "iVar1") (= "=") (call_expression "(*param_4)(param_2,param_3,param_5)" (parenthesized_expression "(*param_4)" (( "(") (pointer_expression "*param_4" (* "*") (identifier "param_4")) () ")")) (argument_list "(param_2,param_3,param_5)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n          return 0;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if ((uVar4 == 1) && (uVar5 == 1)) {\n          return iVar1;\n        }" (if "if") (parenthesized_expression "((uVar4 == 1) && (uVar5 == 1))" (( "(") (binary_expression "(uVar4 == 1) && (uVar5 == 1)" (parenthesized_expression "(uVar4 == 1)" (( "(") (binary_expression "uVar4 == 1" (identifier "uVar4") (== "==") (number_literal "1")) () ")")) (&& "&&") (parenthesized_expression "(uVar5 == 1)" (( "(") (binary_expression "uVar5 == 1" (identifier "uVar5") (== "==") (number_literal "1")) () ")"))) () ")")) (compound_statement "{\n          return iVar1;\n        }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (if_statement "if (uVar4 != 1) {\n          uVar4 = uVar4 >> 1;\n        }" (if "if") (parenthesized_expression "(uVar4 != 1)" (( "(") (binary_expression "uVar4 != 1" (identifier "uVar4") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n          uVar4 = uVar4 >> 1;\n        }" ({ "{") (expression_statement "uVar4 = uVar4 >> 1;" (assignment_expression "uVar4 = uVar4 >> 1" (identifier "uVar4") (= "=") (binary_expression "uVar4 >> 1" (identifier "uVar4") (>> ">>") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if (uVar5 != 1) {\n          uVar5 = uVar5 >> 1;\n        }" (if "if") (parenthesized_expression "(uVar5 != 1)" (( "(") (binary_expression "uVar5 != 1" (identifier "uVar5") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n          uVar5 = uVar5 >> 1;\n        }" ({ "{") (expression_statement "uVar5 = uVar5 >> 1;" (assignment_expression "uVar5 = uVar5 >> 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 >> 1" (identifier "uVar5") (>> ">>") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "local_24 = local_24 + 1;" (assignment_expression "local_24 = local_24 + 1" (identifier "local_24") (= "=") (binary_expression "local_24 + 1" (identifier "local_24") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(local_24 < *(int *)(param_3 + 0x14))" (( "(") (binary_expression "local_24 < *(int *)(param_3 + 0x14)" (identifier "local_24") (< "<") (pointer_expression "*(int *)(param_3 + 0x14)" (* "*") (cast_expression "(int *)(param_3 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0x14)" (( "(") (binary_expression "param_3 + 0x14" (identifier "param_3") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (; ";")) (} "}")))) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": 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 __regparm3
function_1(type_2 *image_info,type_3 *image,type_4 *dds_info,type_5 *decoder,
           type_6 *exception)

{
  int var_2;
  type_1 var_10;
  int *piVar3;
  char *string;
  type_7 var_12;
  type_7 var_13;
  int var_14;
  
  var_2 = var_1(image);
  if (var_2 != 0) {
    piVar3 = var_3();
    string = var_4(*piVar3);
    var_5
              (exception,"coders/dds.c","ReadMipmaps",0x41e,CorruptImageWarning,
               "UnexpectedEndOfFile","\'%s\': %s",image->filename,string);
    var_6(string);
    return var_11;
  }
  var_10 = MagickTrue;
  if (((dds_info->ddscaps1 & 0x400000) != 0) &&
     (((dds_info->ddscaps1 & 0x1000) != 0 || ((dds_info->ddscaps2 & 0x200) != 0)))) {
    var_12 = dds_info->width >> 1;
    if (dds_info->width < 2) {
      var_12 = 1;
    }
    var_13 = dds_info->height >> 1;
    if (dds_info->height < 2) {
      var_13 = 1;
    }
    if ((int)dds_info->mipmapcount < 2) {
      var_10 = MagickTrue;
    }
    else {
      var_14 = 1;
      do {
        var_7(image_info,image,exception);
        if (image->next == (type_8 *)0x0) {
          return var_11;
        }
        image->next->alpha_trait = image->alpha_trait;
        image = var_8(image);
        var_10 = var_9(image,var_12,var_13,exception);
        if (var_10 == var_11) {
          return var_11;
        }
        var_10 = (*decoder)(image,dds_info,exception);
        if (var_10 == var_11) {
          return var_11;
        }
        if ((var_12 == 1) && (var_13 == 1)) {
          return var_10;
        }
        if (var_12 != 1) {
          var_12 = var_12 >> 1;
        }
        if (var_13 != 1) {
          var_13 = var_13 >> 1;
        }
        var_14 = var_14 + 1;
      } while (var_14 < (int)dds_info->mipmapcount);
    }
  }
  return var_10;
}


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

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

int __regparm3
MASKED(undefined4 param_1,int param_2,int param_3,code *param_4,undefined4 param_5)

{
  int iVar1;
  int *piVar2;
  undefined4 uVar3;
  uint uVar4;
  uint uVar5;
  int local_24;
  
  iVar1 = EOFBlob(param_2);
  if (iVar1 != 0) {
    piVar2 = __errno_location();
    uVar3 = GetExceptionMessage(*piVar2);
    ThrowMagickException
              (param_5,"coders/dds.c","ReadMipmaps",0x41e,0x145,"UnexpectedEndOfFile","\'%s\': %s",
               param_2 + 0x318,uVar3);
    DestroyString(uVar3);
    return 0;
  }
  iVar1 = 1;
  if (((*(uint *)(param_3 + 0x18) & 0x400000) != 0) &&
     (((*(uint *)(param_3 + 0x18) & 0x1000) != 0 || ((*(byte *)(param_3 + 0x1d) & 2) != 0)))) {
    uVar4 = *(uint *)(param_3 + 8) >> 1;
    if (*(uint *)(param_3 + 8) < 2) {
      uVar4 = 1;
    }
    uVar5 = *(uint *)(param_3 + 4) >> 1;
    if (*(uint *)(param_3 + 4) < 2) {
      uVar5 = 1;
    }
    if (*(int *)(param_3 + 0x14) < 2) {
      iVar1 = 1;
    }
    else {
      local_24 = 1;
      do {
        AcquireNextImage(param_1,param_2,param_5);
        if (*(int *)(param_2 + 0x3340) == 0) {
          return 0;
        }
        *(undefined4 *)(*(int *)(param_2 + 0x3340) + 0x294) = *(undefined4 *)(param_2 + 0x294);
        param_2 = SyncNextImageInList(param_2);
        iVar1 = SetImageExtent(param_2,uVar4,uVar5,param_5);
        if (iVar1 == 0) {
          return 0;
        }
        iVar1 = (*param_4)(param_2,param_3,param_5);
        if (iVar1 == 0) {
          return 0;
        }
        if ((uVar4 == 1) && (uVar5 == 1)) {
          return iVar1;
        }
        if (uVar4 != 1) {
          uVar4 = uVar4 >> 1;
        }
        if (uVar5 != 1) {
          uVar5 = uVar5 >> 1;
        }
        local_24 = local_24 + 1;
      } while (local_24 < *(int *)(param_3 + 0x14));
    }
  }
  return iVar1;
}

