// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImgList<double>::_load_gif_external(char const*, bool)
CImgList<T>& _load_gif_external(const char *const filename, const bool use_graphicsmagick=false) {
      char command[1024] = { 0 }, filetmp[512] = { 0 }, filetmp2[512] = { 0 };
      std::FILE *file = 0;
      do {
        cimg_snprintf(filetmp,sizeof(filetmp),"%s%c%s",cimg::temporary_path(),cimg_file_separator,cimg::filenamerand());
        if (use_graphicsmagick) cimg_snprintf(filetmp2,sizeof(filetmp2),"%s.png.0",filetmp);
        else cimg_snprintf(filetmp2,sizeof(filetmp2),"%s-0.png",filetmp);
        if ((file=std::fopen(filetmp2,"rb"))!=0) cimg::fclose(file);
      } while (file);
#if cimg_OS!=2
      if (use_graphicsmagick) cimg_snprintf(command,sizeof(command),"%s convert \"%s\" \"%s.png\" >/dev/null 2>&1",
                                            cimg::graphicsmagick_path(),
                                            CImg<charT>::string(filename)._system_strescape().data(),
                                            CImg<charT>::string(filetmp)._system_strescape().data());
      else cimg_snprintf(command,sizeof(command),"%s \"%s\" \"%s.png\" >/dev/null 2>&1",
                         cimg::imagemagick_path(),
                         CImg<charT>::string(filename)._system_strescape().data(),
                         CImg<charT>::string(filetmp)._system_strescape().data());
#else
      if (use_graphicsmagick) cimg_snprintf(command,sizeof(command),"\"%s convert \"%s\" \"%s.png\"\" >NUL 2>&1",
                                            cimg::graphicsmagick_path(),
                                            CImg<charT>::string(filename)._system_strescape().data(),
                                            CImg<charT>::string(filetmp)._system_strescape().data());
      else cimg_snprintf(command,sizeof(command),"\"%s \"%s\" \"%s.png\"\" >NUL 2>&1",
                         cimg::imagemagick_path(),
                         CImg<charT>::string(filename)._system_strescape().data(),
                         CImg<charT>::string(filetmp)._system_strescape().data());
#endif
      cimg::system(command,0);
      const unsigned int omode = cimg::exception_mode();
      cimg::exception_mode() = 0;
      assign();

      // Try to read a single frame gif.
      cimg_snprintf(filetmp2,sizeof(filetmp2),"%s.png",filetmp);
      CImg<T> img;
      try { img.load_png(filetmp2); }
      catch (CImgException&) { }
      if (img) { img.move_to(*this); std::remove(filetmp2); }
      else { // Try to read animated gif.
        unsigned int i = 0;
        for (bool stop_flag = false; !stop_flag; ++i) {
          if (use_graphicsmagick) cimg_snprintf(filetmp2,sizeof(filetmp2),"%s.png.%u",filetmp,i);
          else cimg_snprintf(filetmp2,sizeof(filetmp2),"%s-%u.png",filetmp,i);
          CImg<T> img;
          try { img.load_png(filetmp2); }
          catch (CImgException&) { stop_flag = true; }
          if (img) { img.move_to(*this); std::remove(filetmp2); }
        }
      }
      cimg::exception_mode() = omode;
      return *this;
    }

// Assembly:
subq $0x9c8, %rsp            # imm = 0x9C8
movb %dl, %al
movq %rdi, 0x9c0(%rsp)
movq %rsi, 0x9b8(%rsp)
andb $0x1, %al
movb %al, 0x9b7(%rsp)
movq 0x9c0(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0x5b0(%rsp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x52a0
leaq 0x3b0(%rsp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x52a0
leaq 0x1b0(%rsp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x52a0
movq $0x0, 0x1a8(%rsp)
leaq 0x3b0(%rsp), %rax
movq %rax, 0xa0(%rsp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x5c290
movq %rax, 0xa8(%rsp)
callq 0x5c7a0
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rcx
movq %rax, %r9
movl $0x200, %esi            # imm = 0x200
leaq 0x6c5c8(%rip), %rdx     # 0xe8ef9
movl $0x2f, %r8d
movb $0x0, %al
callq 0x5890
testb $0x1, 0x9b7(%rsp)
je 0x7c96d
leaq 0x1b0(%rsp), %rdi
leaq 0x3b0(%rsp), %rcx
movl $0x200, %esi            # imm = 0x200
leaq 0x6d6b7(%rip), %rdx     # 0xea01b
movb $0x0, %al
callq 0x5890
jmp 0x7c990
leaq 0x1b0(%rsp), %rdi
leaq 0x3b0(%rsp), %rcx
movl $0x200, %esi            # imm = 0x200
leaq 0x6d69b(%rip), %rdx     # 0xea024
movb $0x0, %al
callq 0x5890
leaq 0x1b0(%rsp), %rdi
leaq 0x6c7bf(%rip), %rsi     # 0xe915e
callq 0x55c0
movq %rax, 0x1a8(%rsp)
cmpq $0x0, %rax
je 0x7c9bf
movq 0x1a8(%rsp), %rdi
callq 0x5c6f0
jmp 0x7c9c1
cmpq $0x0, 0x1a8(%rsp)
jne 0x7c8ea
testb $0x1, 0x9b7(%rsp)
je 0x7cb21
leaq 0x5b0(%rsp), %rax
movq %rax, 0x78(%rsp)
xorl %esi, %esi
movl %esi, 0x84(%rsp)
movl %esi, %edi
callq 0x5bfb0
movl 0x84(%rsp), %ecx
movq %rax, 0x88(%rsp)
movq 0x9b8(%rsp), %rsi
leaq 0x188(%rsp), %rdi
movq %rdi, 0x90(%rsp)
movl $0x1, %edx
callq 0x7ab40
movq 0x90(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x98(%rsp)
jmp 0x7ca43
movq 0x98(%rsp), %rdi
callq 0x1a3e0
movq %rax, 0x70(%rsp)
leaq 0x158(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7ab40
jmp 0x7ca73
leaq 0x158(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x68(%rsp)
jmp 0x7ca87
movq 0x68(%rsp), %rdi
callq 0x1a3e0
movq 0x78(%rsp), %rdi
movq 0x88(%rsp), %rcx
movq 0x70(%rsp), %r8
movq %rax, %r9
movl $0x400, %esi            # imm = 0x400
leaq 0x6d57b(%rip), %rdx     # 0xea02d
movb $0x0, %al
callq 0x5890
leaq 0x158(%rsp), %rdi
callq 0x1a320
leaq 0x188(%rsp), %rdi
callq 0x1a320
jmp 0x7cc49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x7cb0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x1a320
leaq 0x188(%rsp), %rdi
callq 0x1a320
jmp 0x7cf44
leaq 0x5b0(%rsp), %rax
movq %rax, 0x40(%rsp)
xorl %esi, %esi
movl %esi, 0x4c(%rsp)
movl %esi, %edi
callq 0x5be40
movl 0x4c(%rsp), %ecx
movq %rax, 0x50(%rsp)
movq 0x9b8(%rsp), %rsi
leaq 0x138(%rsp), %rdi
movq %rdi, 0x58(%rsp)
movl $0x1, %edx
callq 0x7ab40
movq 0x58(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x60(%rsp)
jmp 0x7cb74
movq 0x60(%rsp), %rdi
callq 0x1a3e0
movq %rax, 0x38(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7ab40
jmp 0x7cba1
leaq 0x118(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x30(%rsp)
jmp 0x7cbb5
movq 0x30(%rsp), %rdi
callq 0x1a3e0
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x38(%rsp), %r8
movq %rax, %r9
movl $0x400, %esi            # imm = 0x400
leaq 0x6d479(%rip), %rdx     # 0xea056
movb $0x0, %al
callq 0x5890
leaq 0x118(%rsp), %rdi
callq 0x1a320
leaq 0x138(%rsp), %rdi
callq 0x1a320
jmp 0x7cc49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x7cc37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x1a320
leaq 0x138(%rsp), %rdi
callq 0x1a320
jmp 0x7cf44
xorl %eax, %eax
movl %eax, 0x1c(%rsp)
movl %eax, %esi
leaq 0x5b0(%rsp), %rdi
callq 0x66380
callq 0x124b0
movl (%rax), %eax
movl %eax, 0x114(%rsp)
callq 0x124b0
movq 0xb0(%rsp), %rdi
movl $0x0, (%rax)
callq 0x5cdc0
movl 0x1c(%rsp), %eax
leaq 0x6d3e8(%rip), %rdx     # 0xea077
leaq 0x1b0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movl $0x200, %esi            # imm = 0x200
leaq 0x3b0(%rsp), %rcx
callq 0x5890
leaq 0xf0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xb6c0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x63510
jmp 0x7ccd1
jmp 0x7cd19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
movl 0x17c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x7cf37
movq 0x180(%rsp), %rdi
callq 0x51e0
movq %rax, 0xe8(%rsp)
callq 0x58d0
jmp 0x7cd17
jmp 0x7cd19
leaq 0xf0(%rsp), %rdi
callq 0x5cf30
cmpq $0x0, %rax
je 0x7cd73
movq 0xb0(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7cfc0
jmp 0x7cd48
leaq 0x1b0(%rsp), %rdi
callq 0x59c0
jmp 0x7cef8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x7cf37
movl $0x0, 0xe4(%rsp)
movb $0x0, 0xe3(%rsp)
movb 0xe3(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x7cd98
jmp 0x7cef6
testb $0x1, 0x9b7(%rsp)
je 0x7cdcf
leaq 0x1b0(%rsp), %rdi
leaq 0x3b0(%rsp), %rcx
movl 0xe4(%rsp), %r8d
movl $0x200, %esi            # imm = 0x200
leaq 0x6d2b8(%rip), %rdx     # 0xea07e
movb $0x0, %al
callq 0x5890
jmp 0x7cdfa
leaq 0x1b0(%rsp), %rdi
leaq 0x3b0(%rsp), %rcx
movl 0xe4(%rsp), %r8d
movl $0x200, %esi            # imm = 0x200
leaq 0x6d295(%rip), %rdx     # 0xea088
movb $0x0, %al
callq 0x5890
leaq 0xc0(%rsp), %rdi
callq 0xb6c0
jmp 0x7ce09
leaq 0xc0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x63510
jmp 0x7ce20
jmp 0x7ce70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
movl 0x17c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x7cee7
movq 0x180(%rsp), %rdi
callq 0x51e0
movq %rax, 0xb8(%rsp)
movb $0x1, 0xe3(%rsp)
callq 0x58d0
jmp 0x7ce6e
jmp 0x7ce70
leaq 0xc0(%rsp), %rdi
callq 0x5cf30
cmpq $0x0, %rax
je 0x7cec4
movq 0xb0(%rsp), %rsi
leaq 0xc0(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7cfc0
jmp 0x7ce9f
leaq 0x1b0(%rsp), %rdi
callq 0x59c0
jmp 0x7cec4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x7cee7
leaq 0xc0(%rsp), %rdi
callq 0xa540
movl 0xe4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe4(%rsp)
jmp 0x7cd86
leaq 0xc0(%rsp), %rdi
callq 0xa540
jmp 0x7cf37
jmp 0x7cef8
movl 0x114(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x124b0
movq %rax, 0x10(%rsp)
jmp 0x7cf0f
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
leaq 0xf0(%rsp), %rdi
callq 0xa540
movq 0xb0(%rsp), %rax
addq $0x9c8, %rsp            # imm = 0x9C8
retq
leaq 0xf0(%rsp), %rdi
callq 0xa540
movq 0x180(%rsp), %rdi
callq 0x5970
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)