// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImgList<double>::load_ffmpeg_external(char const*)
CImgList<T>& load_ffmpeg_external(const char *const filename) {
      if (!filename)
        throw CImgArgumentException(_cimglist_instance
                                    "load_ffmpeg_external(): Specified filename is (null).",
                                    cimglist_instance);
      std::fclose(cimg::fopen(filename,"rb"));            // Check if file exists.
      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());
        cimg_snprintf(filetmp2,sizeof(filetmp2),"%s_000001.ppm",filetmp);
        if ((file=std::fopen(filetmp2,"rb"))!=0) cimg::fclose(file);
      } while (file);
      cimg_snprintf(filetmp2,sizeof(filetmp2),"%s_%%6d.ppm",filetmp);
#if cimg_OS!=2
      cimg_snprintf(command,sizeof(command),"%s -i \"%s\" \"%s\" >/dev/null 2>&1",
                    cimg::ffmpeg_path(),
                    CImg<charT>::string(filename)._system_strescape().data(),
                    CImg<charT>::string(filetmp2)._system_strescape().data());
#else
      cimg_snprintf(command,sizeof(command),"\"%s -i \"%s\" \"%s\"\" >NUL 2>&1",
                    cimg::ffmpeg_path(),
                    CImg<charT>::string(filename)._system_strescape().data(),
                    CImg<charT>::string(filetmp2)._system_strescape().data());
#endif
      cimg::system(command,0);
      const unsigned int omode = cimg::exception_mode();
      cimg::exception_mode() = 0;
      assign();
      unsigned int i = 1;
      for (bool stop_flag = false; !stop_flag; ++i) {
        cimg_snprintf(filetmp2,sizeof(filetmp2),"%s_%.6u.ppm",filetmp,i);
        CImg<T> img;
        try { img.load_pnm(filetmp2); }
        catch (CImgException&) { stop_flag = true; }
        if (img) { img.move_to(*this); std::remove(filetmp2); }
      }
      cimg::exception_mode() = omode;
      if (is_empty())
        throw CImgIOException(_cimglist_instance
                              "load_ffmpeg_external(): Failed to open file '%s' with external command 'ffmpeg'.",
                              cimglist_instance,
                              filename);
      return *this;
    }

// Assembly:
subq $0x958, %rsp            # imm = 0x958
movq %rdi, 0x950(%rsp)
movq %rsi, 0x948(%rsp)
movq 0x950(%rsp), %rax
movq %rax, 0xa8(%rsp)
cmpq $0x0, 0x948(%rsp)
jne 0x91a11
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movq %rcx, 0x90(%rsp)
movq %rcx, 0x88(%rsp)
movl (%rax), %ecx
movl %ecx, 0x98(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x9c(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0xa0(%rsp)
callq 0x7c860
movq 0x90(%rsp), %rdi
movl 0x98(%rsp), %edx
movl 0x9c(%rsp), %ecx
movq 0xa0(%rsp), %r8
movq %rax, %r9
leaq 0x594b8(%rip), %rsi     # 0xeae7f
xorl %eax, %eax
callq 0x12220
jmp 0x919d0
movq 0x88(%rsp), %rdi
leaq 0x6e181(%rip), %rsi     # 0xffb60
leaq -0x7f586(%rip), %rdx    # 0x12460
callq 0x5920
movq 0x88(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x940(%rsp)
movl %eax, 0x93c(%rsp)
callq 0x53a0
jmp 0x91edd
movq 0x948(%rsp), %rdi
leaq 0x5773e(%rip), %rsi     # 0xe915e
callq 0x654a0
movq %rax, %rdi
callq 0x5530
leaq 0x530(%rsp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x52a0
leaq 0x330(%rsp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x52a0
leaq 0x130(%rsp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x52a0
movq $0x0, 0x128(%rsp)
leaq 0x330(%rsp), %rax
movq %rax, 0x78(%rsp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x5c290
movq %rax, 0x80(%rsp)
callq 0x5c7a0
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rcx
movq %rax, %r9
movl $0x200, %esi            # imm = 0x200
leaq 0x57443(%rip), %rdx     # 0xe8ef9
movl $0x2f, %r8d
movb $0x0, %al
callq 0x5890
leaq 0x130(%rsp), %rdi
leaq 0x330(%rsp), %rcx
movl $0x200, %esi            # imm = 0x200
leaq 0x593f9(%rip), %rdx     # 0xeaed8
movb $0x0, %al
callq 0x5890
leaq 0x130(%rsp), %rdi
leaq 0x57669(%rip), %rsi     # 0xe915e
callq 0x55c0
movq %rax, 0x128(%rsp)
cmpq $0x0, %rax
je 0x91b15
movq 0x128(%rsp), %rdi
callq 0x5c6f0
jmp 0x91b17
cmpq $0x0, 0x128(%rsp)
jne 0x91a75
leaq 0x593b9(%rip), %rdx     # 0xeaee6
xorl %eax, %eax
movl %eax, 0x5c(%rsp)
leaq 0x130(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
leaq 0x330(%rsp), %rcx
callq 0x5890
movl 0x5c(%rsp), %esi
leaq 0x530(%rsp), %rax
movq %rax, 0x50(%rsp)
movl %esi, %edi
callq 0x91ef0
movl 0x5c(%rsp), %ecx
movq %rax, 0x60(%rsp)
movq 0x948(%rsp), %rsi
leaq 0x108(%rsp), %rdi
movq %rdi, 0x68(%rsp)
movl $0x1, %edx
callq 0x7ab40
movq 0x68(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x70(%rsp)
jmp 0x91b9e
movq 0x70(%rsp), %rdi
callq 0x1a3e0
movq %rax, 0x48(%rsp)
leaq 0xe8(%rsp), %rdi
leaq 0x130(%rsp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7ab40
jmp 0x91bcb
leaq 0xe8(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x40(%rsp)
jmp 0x91bdf
movq 0x40(%rsp), %rdi
callq 0x1a3e0
movq 0x50(%rsp), %rdi
movq 0x60(%rsp), %rcx
movq 0x48(%rsp), %r8
movq %rax, %r9
movl $0x400, %esi            # imm = 0x400
leaq 0x592eb(%rip), %rdx     # 0xeaef2
movb $0x0, %al
callq 0x5890
leaq 0xe8(%rsp), %rdi
callq 0x1a320
leaq 0x108(%rsp), %rdi
callq 0x1a320
leaq 0x530(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x66380
callq 0x124b0
movl (%rax), %eax
movl %eax, 0xe4(%rsp)
callq 0x124b0
movq 0xa8(%rsp), %rdi
movl $0x0, (%rax)
callq 0x5cdc0
movl $0x1, 0xe0(%rsp)
movb $0x0, 0xdf(%rsp)
movb 0xdf(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x91c84
jmp 0x91dfc
movl 0xe0(%rsp), %r8d
leaq 0x5927f(%rip), %rdx     # 0xeaf12
xorl %eax, %eax
leaq 0x130(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movl $0x200, %esi            # imm = 0x200
leaq 0x330(%rsp), %rcx
callq 0x5890
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xb6c0
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x63540
jmp 0x91cd7
jmp 0x91d73
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x940(%rsp)
movl %eax, 0x93c(%rsp)
jmp 0x91d13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x940(%rsp)
movl %eax, 0x93c(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x1a320
leaq 0x108(%rsp), %rdi
callq 0x1a320
jmp 0x91edd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x940(%rsp)
movl %eax, 0x93c(%rsp)
movl 0x93c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x91dea
movq 0x940(%rsp), %rdi
callq 0x51e0
movq %rax, 0xb0(%rsp)
movb $0x1, 0xdf(%rsp)
callq 0x58d0
jmp 0x91d71
jmp 0x91d73
leaq 0xb8(%rsp), %rdi
callq 0x5cf30
cmpq $0x0, %rax
je 0x91dc7
movq 0xa8(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7cfc0
jmp 0x91da2
leaq 0x130(%rsp), %rdi
callq 0x59c0
jmp 0x91dc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x940(%rsp)
movl %eax, 0x93c(%rsp)
jmp 0x91dea
leaq 0xb8(%rsp), %rdi
callq 0xa540
movl 0xe0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe0(%rsp)
jmp 0x91c72
leaq 0xb8(%rsp), %rdi
callq 0xa540
jmp 0x91edd
movl 0xe4(%rsp), %eax
movl %eax, 0x2c(%rsp)
callq 0x124b0
movl 0x2c(%rsp), %ecx
movq 0xa8(%rsp), %rdi
movl %ecx, (%rax)
callq 0x5ce60
testb $0x1, %al
jne 0x91e28
jmp 0x91ecd
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movl (%rax), %ecx
movl %ecx, 0x18(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x1c(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
callq 0x7c860
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %edx
movl 0x1c(%rsp), %ecx
movq 0x20(%rsp), %r8
movq %rax, %r9
movq 0x948(%rsp), %rsi
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x59092(%rip), %rsi     # 0xeaf1e
xorl %eax, %eax
callq 0x5c880
jmp 0x91e95
movq 0x8(%rsp), %rdi
leaq 0x6ddcf(%rip), %rsi     # 0xffc70
leaq -0x353e8(%rip), %rdx    # 0x5cac0
callq 0x5920
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x940(%rsp)
movl %eax, 0x93c(%rsp)
callq 0x53a0
jmp 0x91edd
movq 0xa8(%rsp), %rax
addq $0x958, %rsp            # imm = 0x958
retq
movq 0x940(%rsp), %rdi
callq 0x5970
nopw (%rax,%rax)