// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::load_dcraw_external(char const*)
CImg<T>& load_dcraw_external(const char *const filename) {
      if (!filename)
        throw CImgArgumentException(_cimg_instance
                                    "load_dcraw_external(): Specified filename is (null).",
                                    cimg_instance);
      std::fclose(cimg::fopen(filename,"rb"));            // Check if file exists.
      char command[1024] = { 0 }, filetmp[512] = { 0 };
      std::FILE *file = 0;
      const CImg<charT> s_filename = CImg<charT>::string(filename)._system_strescape();
#if cimg_OS==1
      cimg_snprintf(command,sizeof(command),"%s -w -4 -c \"%s\"",
                    cimg::dcraw_path(),s_filename.data());
      file = popen(command,"r");
      if (file) {
        const unsigned int omode = cimg::exception_mode();
        cimg::exception_mode() = 0;
        try { load_pnm(file); } catch (...) {
          pclose(file);
          cimg::exception_mode() = omode;
          throw CImgIOException(_cimg_instance
                                "load_dcraw_external(): Failed to load file '%s' with external command 'dcraw'.",
                                cimg_instance,
                                filename);
        }
        pclose(file);
        return *this;
      }
#endif
      do {
        cimg_snprintf(filetmp,sizeof(filetmp),"%s%c%s.ppm",
                      cimg::temporary_path(),cimg_file_separator,cimg::filenamerand());
        if ((file=std::fopen(filetmp,"rb"))!=0) cimg::fclose(file);
      } while (file);
      cimg_snprintf(command,sizeof(command),"%s -w -4 -c \"%s\" > \"%s\"",
                    cimg::dcraw_path(),s_filename.data(),CImg<charT>::string(filetmp)._system_strescape().data());
      cimg::system(command,cimg::dcraw_path());
      if (!(file = std::fopen(filetmp,"rb"))) {
        cimg::fclose(cimg::fopen(filename,"r"));
        throw CImgIOException(_cimg_instance
                              "load_dcraw_external(): Failed to load file '%s' with external command 'dcraw'.",
                              cimg_instance,
                              filename);

      } else cimg::fclose(file);
      load_pnm(filetmp);
      std::remove(filetmp);
      return *this;
    }

// Assembly:
pushq %rbx
subq $0x820, %rsp            # imm = 0x820
movq %rdi, 0x810(%rsp)
movq %rsi, 0x808(%rsp)
movq 0x810(%rsp), %rax
movq %rax, 0x178(%rsp)
cmpq $0x0, 0x808(%rsp)
jne 0x63b53
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x178(%rsp), %rax
movq %rcx, 0x148(%rsp)
movl (%rax), %ecx
movl %ecx, 0x150(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x154(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x158(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x15c(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x160(%rsp)
movb 0x10(%rax), %dl
leaq 0x84f41(%rip), %rcx     # 0xe89d2
leaq 0x66049(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x168(%rsp)
callq 0x118f0
movq %rax, 0x170(%rsp)
jmp 0x63ab6
movl 0x15c(%rsp), %r9d
movl 0x158(%rsp), %r8d
movl 0x154(%rsp), %ecx
movl 0x150(%rsp), %edx
movq 0x148(%rsp), %rdi
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %r10
movq 0x170(%rsp), %r11
movq %rsp, %rax
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x8633d(%rip), %rsi     # 0xe9e46
xorl %eax, %eax
callq 0x12220
jmp 0x63b12
movq 0x148(%rsp), %rdi
leaq 0x9c03f(%rip), %rsi     # 0xffb60
leaq -0x516c8(%rip), %rdx    # 0x12460
callq 0x5920
movq 0x148(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x800(%rsp)
movl %eax, 0x7fc(%rsp)
callq 0x53a0
jmp 0x642b8
movq 0x808(%rsp), %rdi
leaq 0x855fc(%rip), %rsi     # 0xe915e
callq 0x654a0
movq %rax, %rdi
callq 0x5530
leaq 0x3f0(%rsp), %rdi
xorl %esi, %esi
movl %esi, 0x134(%rsp)
movl $0x400, %edx            # imm = 0x400
callq 0x52a0
movl 0x134(%rsp), %esi
leaq 0x1f0(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
callq 0x52a0
movl 0x134(%rsp), %ecx
movq $0x0, 0x1e8(%rsp)
movq 0x808(%rsp), %rsi
leaq 0x1a8(%rsp), %rdi
movq %rdi, 0x138(%rsp)
movl $0x1, %edx
callq 0x7ab40
movq 0x138(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x140(%rsp)
jmp 0x63bef
movq 0x140(%rsp), %rsi
leaq 0x1c8(%rsp), %rdi
callq 0x7b450
jmp 0x63c06
leaq 0x1a8(%rsp), %rdi
callq 0x1a320
leaq 0x3f0(%rsp), %rax
movq %rax, 0x120(%rsp)
xorl %esi, %esi
movl %esi, %edi
callq 0x7b790
movq %rax, 0x128(%rsp)
jmp 0x63c36
leaq 0x1c8(%rsp), %rdi
callq 0x7b900
movq %rax, 0x118(%rsp)
jmp 0x63c4d
movq 0x118(%rsp), %r8
movq 0x128(%rsp), %rcx
movq 0x120(%rsp), %rdi
leaq 0x8623d(%rip), %rdx     # 0xe9ea9
xorl %eax, %eax
movl $0x400, %esi            # imm = 0x400
callq 0x5890
leaq 0x70a33(%rip), %rsi     # 0xd46b2
leaq 0x3f0(%rsp), %rdi
callq 0x5180
movq %rax, 0x110(%rsp)
jmp 0x63c96
movq 0x110(%rsp), %rax
movq %rax, 0x1e8(%rsp)
cmpq $0x0, 0x1e8(%rsp)
je 0x63f24
callq 0x124b0
movq %rax, 0x108(%rsp)
jmp 0x63cc4
movq 0x108(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x1a4(%rsp)
callq 0x124b0
movq %rax, 0x100(%rsp)
jmp 0x63ce4
movq 0x178(%rsp), %rdi
movq 0x100(%rsp), %rax
movl $0x0, (%rax)
movq 0x1e8(%rsp), %rsi
callq 0x7b910
jmp 0x63d09
jmp 0x63ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x800(%rsp)
movl %eax, 0x7fc(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0x1a320
jmp 0x642b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x800(%rsp)
movl %eax, 0x7fc(%rsp)
jmp 0x642ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x800(%rsp)
movl %eax, 0x7fc(%rsp)
movq 0x800(%rsp), %rdi
callq 0x51e0
movq 0x1e8(%rsp), %rdi
callq 0x5740
jmp 0x63d7d
movl 0x1a4(%rsp), %eax
movl %eax, 0xf4(%rsp)
callq 0x124b0
movq %rax, 0xf8(%rsp)
jmp 0x63d9a
movq 0xf8(%rsp), %rax
movl 0xf4(%rsp), %ecx
movl %ecx, (%rax)
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x178(%rsp), %rax
movq %rcx, 0xc0(%rsp)
movl (%rax), %ecx
movl %ecx, 0xc8(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0xcc(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0xd0(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0xd4(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0xd8(%rsp)
movb 0x10(%rax), %dl
leaq 0x84bcd(%rip), %rcx     # 0xe89d2
leaq 0x65cd5(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0xe0(%rsp)
callq 0x118f0
movq %rax, 0xe8(%rsp)
jmp 0x63e2a
movl 0xd4(%rsp), %r9d
movl 0xd0(%rsp), %r8d
movl 0xcc(%rsp), %ecx
movl 0xc8(%rsp), %edx
movq 0xc0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %r10
movq 0xe8(%rsp), %r11
movq 0x808(%rsp), %rbx
movq %rsp, %rax
movq %rbx, 0x18(%rax)
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x86031(%rip), %rsi     # 0xe9eba
xorl %eax, %eax
callq 0x5c880
jmp 0x63e92
movq 0xc0(%rsp), %rdi
leaq 0x9bdcf(%rip), %rsi     # 0xffc70
leaq -0x73e8(%rip), %rdx     # 0x5cac0
callq 0x5920
jmp 0x642cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x800(%rsp)
movl %eax, 0x7fc(%rsp)
jmp 0x63ee9
movq 0xc0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x800(%rsp)
movl %eax, 0x7fc(%rsp)
callq 0x53a0
callq 0x58d0
jmp 0x63ef0
jmp 0x642ab
movq 0x1e8(%rsp), %rdi
callq 0x5740
jmp 0x63f04
movq 0x178(%rsp), %rax
movq %rax, 0x818(%rsp)
movl $0x1, 0x1a0(%rsp)
jmp 0x6428d
jmp 0x63f26
leaq 0x1f0(%rsp), %rax
movq %rax, 0xb0(%rsp)
xorl %esi, %esi
movl %esi, %edi
callq 0x5c290
movq %rax, 0xb8(%rsp)
jmp 0x63f49
callq 0x5c7a0
movq %rax, 0xa8(%rsp)
jmp 0x63f58
movq 0xa8(%rsp), %r9
movq 0xb8(%rsp), %rcx
movq 0xb0(%rsp), %rdi
leaq 0x85fc0(%rip), %rdx     # 0xe9f37
xorl %eax, %eax
movl $0x200, %esi            # imm = 0x200
movl $0x2f, %r8d
callq 0x5890
leaq 0x851ce(%rip), %rsi     # 0xe915e
leaq 0x1f0(%rsp), %rdi
callq 0x55c0
movq %rax, 0xa0(%rsp)
jmp 0x63fa7
movq 0xa0(%rsp), %rax
movq %rax, 0x1e8(%rsp)
cmpq $0x0, %rax
je 0x63fce
movq 0x1e8(%rsp), %rdi
callq 0x5c6f0
jmp 0x63fcc
jmp 0x63fce
jmp 0x63fd0
cmpq $0x0, 0x1e8(%rsp)
jne 0x63f26
leaq 0x3f0(%rsp), %rax
movq %rax, 0x90(%rsp)
xorl %esi, %esi
movl %esi, %edi
callq 0x7b790
movq %rax, 0x98(%rsp)
jmp 0x64002
leaq 0x1c8(%rsp), %rdi
callq 0x7b900
movq %rax, 0x88(%rsp)
jmp 0x64019
leaq 0x180(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7ab40
jmp 0x64037
leaq 0x180(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x80(%rsp)
jmp 0x6404e
movq 0x80(%rsp), %rdi
callq 0x1a3e0
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rcx
movq 0x88(%rsp), %r8
movq %rax, %r9
leaq 0x85ec5(%rip), %rdx     # 0xe9f42
xorl %eax, %eax
movl %eax, 0x6c(%rsp)
movl $0x400, %esi            # imm = 0x400
callq 0x5890
leaq 0x180(%rsp), %rdi
callq 0x1a320
movl 0x6c(%rsp), %esi
leaq 0x3f0(%rsp), %rax
movq %rax, 0x70(%rsp)
movl %esi, %edi
callq 0x7b790
movq %rax, 0x78(%rsp)
jmp 0x640b9
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdi
callq 0x66380
jmp 0x640ca
leaq 0x8508d(%rip), %rsi     # 0xe915e
leaq 0x1f0(%rsp), %rdi
callq 0x55c0
movq %rax, 0x60(%rsp)
jmp 0x640e5
movq 0x60(%rsp), %rax
movq %rax, 0x1e8(%rsp)
cmpq $0x0, %rax
jne 0x6423d
movq 0x808(%rsp), %rdi
leaq 0x705a7(%rip), %rsi     # 0xd46b2
callq 0x654a0
movq %rax, 0x58(%rsp)
jmp 0x64117
movq 0x58(%rsp), %rdi
callq 0x5c6f0
jmp 0x64123
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x178(%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 0x84867(%rip), %rcx     # 0xe89d2
leaq 0x6596f(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x48(%rsp)
callq 0x118f0
movq %rax, 0x50(%rsp)
jmp 0x6418a
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 0x808(%rsp), %rbx
movq %rsp, %rax
movq %rbx, 0x18(%rax)
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x85ce9(%rip), %rsi     # 0xe9eba
xorl %eax, %eax
callq 0x5c880
jmp 0x641da
movq 0x28(%rsp), %rdi
leaq 0x9ba8a(%rip), %rsi     # 0xffc70
leaq -0x772d(%rip), %rdx     # 0x5cac0
callq 0x5920
jmp 0x642cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x800(%rsp)
movl %eax, 0x7fc(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x1a320
jmp 0x642ab
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x800(%rsp)
movl %eax, 0x7fc(%rsp)
callq 0x53a0
jmp 0x642ab
movq 0x1e8(%rsp), %rdi
callq 0x5c6f0
jmp 0x6424c
jmp 0x6424e
movq 0x178(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x63540
jmp 0x64265
leaq 0x1f0(%rsp), %rdi
callq 0x59c0
movq 0x178(%rsp), %rax
movq %rax, 0x818(%rsp)
movl $0x1, 0x1a0(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x1a320
movq 0x818(%rsp), %rax
addq $0x820, %rsp            # imm = 0x820
popq %rbx
retq
leaq 0x1c8(%rsp), %rdi
callq 0x1a320
movq 0x800(%rsp), %rdi
callq 0x5970
movq %rax, %rdi
callq 0xcb20
nopl (%rax)