// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x868, %rsp            # imm = 0x868
movl %edx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
leaq 0x460(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x4280
leaq 0x60(%rsp), %rbx
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4280
leaq 0x260(%rsp), %r15
movl $0x200, %edx            # imm = 0x200
movq %r15, %rdi
xorl %esi, %esi
callq 0x4280
leaq 0x3cce9(%rip), %rax     # 0x760f6
leaq 0x3cceb(%rip), %r12     # 0x760ff
movl %ebp, 0xc(%rsp)
testl %ebp, %ebp
cmovneq %rax, %r12
pushq $0x2f
popq %rbp
leaq 0x3be13(%rip), %r14     # 0x7523b
xorl %edi, %edi
xorl %esi, %esi
callq 0x2a028
movq %rax, %r13
callq 0x2a352
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
leaq 0x3bb8e(%rip), %rdx     # 0x74fd6
movq %r13, %rcx
movl %ebp, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4890
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
movq %r12, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4890
movq %r15, %rdi
movq %r14, %rsi
callq 0x45b0
testq %rax, %rax
je 0x39487
movq %rax, %rdi
callq 0x2a2f8
jmp 0x39428
movl 0xc(%rsp), %ebp
xorl %edi, %edi
xorl %esi, %esi
testb %bpl, %bpl
je 0x394ea
callq 0x29e41
movq %rax, %rbx
leaq 0x40(%rsp), %r14
pushq $0x1
popq %rdx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
xorl %ecx, %ecx
callq 0x38750
movq %r14, %rdi
callq 0x387b0
movq 0x18(%rax), %r14
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
callq 0x38750
leaq 0x20(%rsp), %rdi
callq 0x387b0
movq 0x18(%rax), %r9
leaq 0x3cc20(%rip), %rdx     # 0x76108
jmp 0x3953e
callq 0x29d46
movq %rax, %rbx
leaq 0x40(%rsp), %r14
pushq $0x1
popq %rdx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
xorl %ecx, %ecx
callq 0x38750
movq %r14, %rdi
callq 0x387b0
movq 0x18(%rax), %r14
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
callq 0x38750
leaq 0x20(%rsp), %rdi
callq 0x387b0
movq 0x18(%rax), %r9
leaq 0x3cbf3(%rip), %rdx     # 0x76131
leaq 0x460(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x4890
leaq 0x20(%rsp), %rdi
callq 0xdba4
leaq 0x40(%rsp), %rdi
callq 0xdba4
leaq 0x460(%rsp), %rdi
xorl %esi, %esi
callq 0x2e487
callq 0x9eac
movl (%rax), %eax
movl %eax, 0x10(%rsp)
callq 0x9eac
andl $0x0, (%rax)
movq 0x18(%rsp), %rdi
callq 0x2a65a
leaq 0x3cbb3(%rip), %rdx     # 0x76152
leaq 0x260(%rsp), %rbx
leaq 0x60(%rsp), %rcx
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4890
leaq 0x40(%rsp), %rdi
andq $0x0, 0x18(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movb $0x0, 0x10(%rdi)
movq %rbx, %rsi
callq 0x2cd30
cmpq $0x0, 0x58(%rsp)
je 0x3962a
leaq 0x40(%rsp), %rdi
pushq $-0x1
popq %rdx
movq 0x18(%rsp), %rsi
callq 0x39770
leaq 0x260(%rsp), %rdi
callq 0x4990
callq 0x9eac
movl 0x10(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x40(%rsp), %rdi
callq 0x6c96
movq 0x18(%rsp), %rax
addq $0x868, %rsp            # imm = 0x868
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3cb28(%rip), %rax     # 0x76159
leaq 0x3cb2b(%rip), %r15     # 0x76163
testb %bpl, %bpl
cmovneq %rax, %r15
xorl %ebp, %ebp
leaq 0x260(%rsp), %r12
leaq 0x60(%rsp), %r13
leaq 0x20(%rsp), %r14
xorl %ebx, %ebx
testb $0x1, %bl
jne 0x395fe
xorl %ebx, %ebx
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
movq %r15, %rdx
movq %r13, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x4890
andq $0x0, 0x38(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movb $0x0, 0x30(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x2cd30
cmpq $0x0, 0x38(%rsp)
je 0x396b2
movq %r14, %rdi
movq 0x18(%rsp), %rsi
pushq $-0x1
popq %rdx
callq 0x39770
movq %r12, %rdi
callq 0x4990
movq %r14, %rdi
callq 0x6c96
incl %ebp
jmp 0x39655
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x39727
movq %rbx, %rdi
callq 0x41d0
movb $0x1, %bl
callq 0x48d0
jmp 0x39692
jmp 0x39724
jmp 0x396db
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xdba4
jmp 0x396f3
jmp 0x396f0
jmp 0x396f0
jmp 0x396f0
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xdba4
jmp 0x3973b
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x39731
movq %rbx, %rdi
callq 0x41d0
callq 0x48d0
movl 0xc(%rsp), %ebp
jmp 0x395d7
jmp 0x3971f
movq %rax, %rbx
jmp 0x39731
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6c96
leaq 0x40(%rsp), %rdi
callq 0x6c96
movq %rbx, %rdi
callq 0x4950
nop