// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::load_magick(char const*)
CImg<T>& load_magick(const char *const filename) {
      if (!filename)
        throw CImgArgumentException(_cimg_instance
                                    "load_magick(): Specified filename is (null).",
                                    cimg_instance);
#ifdef cimg_use_magick
      Magick::Image image(filename);
      const unsigned int W = image.size().width(), H = image.size().height();
      switch (image.type()) {
      case Magick::PaletteMatteType :
      case Magick::TrueColorMatteType :
      case Magick::ColorSeparationType : {
        assign(W,H,1,4);
        T *ptr_r = data(0,0,0,0), *ptr_g = data(0,0,0,1), *ptr_b = data(0,0,0,2), *ptr_a = data(0,0,0,3);
        Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
        for (unsigned long off = (unsigned long)W*H; off; --off) {
          *(ptr_r++) = (T)(pixels->red);
          *(ptr_g++) = (T)(pixels->green);
          *(ptr_b++) = (T)(pixels->blue);
          *(ptr_a++) = (T)(pixels->opacity);
          ++pixels;
        }
      } break;
      case Magick::PaletteType :
      case Magick::TrueColorType : {
        assign(W,H,1,3);
        T *ptr_r = data(0,0,0,0), *ptr_g = data(0,0,0,1), *ptr_b = data(0,0,0,2);
        Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
        for (unsigned long off = (unsigned long)W*H; off; --off) {
          *(ptr_r++) = (T)(pixels->red);
          *(ptr_g++) = (T)(pixels->green);
          *(ptr_b++) = (T)(pixels->blue);
          ++pixels;
        }
      } break;
      case Magick::GrayscaleMatteType : {
        assign(W,H,1,2);
        T *ptr_r = data(0,0,0,0), *ptr_a = data(0,0,0,1);
        Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
        for (unsigned long off = (unsigned long)W*H; off; --off) {
          *(ptr_r++) = (T)(pixels->red);
          *(ptr_a++) = (T)(pixels->opacity);
          ++pixels;
        }
      } break;
      default : {
        assign(W,H,1,1);
        T *ptr_r = data(0,0,0,0);
        Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
        for (unsigned long off = (unsigned long)W*H; off; --off) {
          *(ptr_r++) = (T)(pixels->red);
          ++pixels;
        }
      }
      }
      return *this;
#else
      throw CImgIOException(_cimg_instance
                            "load_magick(): Unable to load file '%s' unless libMagick++ is enabled.",
                            cimg_instance,
                            filename);
#endif
    }

// Assembly:
pushq %rbx
subq $0xb0, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq $0x0, 0xa0(%rsp)
jne 0x92183
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x58(%rsp)
movl (%rax), %ecx
movl %ecx, 0x60(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x64(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x68(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x6c(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x70(%rsp)
movb 0x10(%rax), %dl
leaq 0x568f3(%rip), %rcx     # 0xe89d2
leaq 0x379fb(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x78(%rsp)
callq 0x118f0
movq %rax, 0x80(%rsp)
jmp 0x92101
movl 0x6c(%rsp), %r9d
movl 0x68(%rsp), %r8d
movl 0x64(%rsp), %ecx
movl 0x60(%rsp), %edx
movq 0x58(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %r10
movq 0x80(%rsp), %r11
movq %rsp, %rax
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x59063(%rip), %rsi     # 0xeb1a2
xorl %eax, %eax
callq 0x12220
jmp 0x92148
movq 0x58(%rsp), %rdi
leaq 0x6da0c(%rip), %rsi     # 0xffb60
leaq -0x7fcfb(%rip), %rdx    # 0x12460
callq 0x5920
movq 0x58(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x53a0
jmp 0x92270
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x28(%rsp)
movl (%rax), %ecx
movl %ecx, 0x30(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x34(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x38(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x3c(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x40(%rsp)
movb 0x10(%rax), %dl
leaq 0x56807(%rip), %rcx     # 0xe89d2
leaq 0x3790f(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x48(%rsp)
callq 0x118f0
movq %rax, 0x50(%rsp)
jmp 0x921ea
movl 0x3c(%rsp), %r9d
movl 0x38(%rsp), %r8d
movl 0x34(%rsp), %ecx
movl 0x30(%rsp), %edx
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %r10
movq 0x50(%rsp), %r11
movq 0xa0(%rsp), %rbx
movq %rsp, %rax
movq %rbx, 0x18(%rax)
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x58fcc(%rip), %rsi     # 0xeb1fd
xorl %eax, %eax
callq 0x5c880
jmp 0x9223a
movq 0x28(%rsp), %rdi
leaq 0x6da2a(%rip), %rsi     # 0xffc70
leaq -0x3578d(%rip), %rdx    # 0x5cac0
callq 0x5920
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x53a0
movq 0x98(%rsp), %rdi
callq 0x5970
nopl (%rax)