// File: /workspace/github_cpp_makefile_star2_O3/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::load_medcon_external(char const*)
CImg<T>& load_medcon_external(const char *const filename) {
      if (!filename)
        throw CImgArgumentException(_cimg_instance
                                    "load_medcon_external(): Specified filename is (null).",
                                    cimg_instance);
      std::fclose(cimg::fopen(filename,"rb"));            // Check if file exists.
      char command[1024] = { 0 }, filetmp[512] = { 0 }, body[512] = { 0 };
      cimg::fclose(cimg::fopen(filename,"r"));
      std::FILE *file = 0;
      do {
        cimg_snprintf(filetmp,sizeof(filetmp),"%s.hdr",cimg::filenamerand());
        if ((file=std::fopen(filetmp,"rb"))!=0) cimg::fclose(file);
      } while (file);
      cimg_snprintf(command,sizeof(command),"%s -w -c anlz -o \"%s\" -f \"%s\"",
                    cimg::medcon_path(),
                    CImg<charT>::string(filetmp)._system_strescape().data(),
                    CImg<charT>::string(filename)._system_strescape().data());
      cimg::system(command);
      cimg::split_filename(filetmp,body);

      cimg_snprintf(command,sizeof(command),"%s.hdr",body);
      file = std::fopen(command,"rb");
      if (!file) {
        cimg_snprintf(command,sizeof(command),"m000-%s.hdr",body);
        file = std::fopen(command,"rb");
        if (!file) {
          throw CImgIOException(_cimg_instance
                                "load_medcon_external(): Failed to load file '%s' with external command 'medcon'.",
                                cimg_instance,
                                filename);
        }
      }
      cimg::fclose(file);
      load_analyze(command);
      std::remove(command);
      cimg::split_filename(command,body);
      cimg_snprintf(command,sizeof(command),"%s.img",body);
      std::remove(command);
      return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x858, %rsp            # imm = 0x858
movq %rdi, %rbx
testq %rsi, %rsi
je 0x3a6d3
movq %rsi, %r14
cmpb $0x2d, (%rsi)
jne 0x3a263
movzbl 0x1(%r14), %eax
cmpl $0x2e, %eax
je 0x3a257
testl %eax, %eax
jne 0x3a263
movq 0x6dd4a(%rip), %rax     # 0xa7fa8
movq (%rax), %rdi
jmp 0x3a275
leaq 0x5507b(%rip), %rsi     # 0x8f2e5
movq %r14, %rdi
callq 0x45d0
movq %rax, %rdi
testq %rdi, %rdi
je 0x3a740
callq 0x4550
leaq 0x450(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x4290
leaq 0x250(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x4290
leaq 0x50(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x4290
cmpb $0x2d, (%r14)
jne 0x3a2dc
movzbl 0x1(%r14), %eax
cmpl $0x2e, %eax
je 0x3a2d0
testl %eax, %eax
jne 0x3a2dc
movq 0x6dcd1(%rip), %rax     # 0xa7fa8
movq (%rax), %rax
jmp 0x3a2eb
leaq 0x40530(%rip), %rsi     # 0x7a813
movq %r14, %rdi
callq 0x45d0
testq %rax, %rax
je 0x3a76d
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq 0x6dca4(%rip), %r14     # 0xa7fa8
movq 0x6dc7d(%rip), %rbx     # 0xa7f88
cmpq %rax, (%r14)
je 0x3a331
cmpq %rax, (%rbx)
je 0x3a331
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x3a331
leaq 0x54cd4(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
callq 0x36803
leaq 0x55f61(%rip), %rdx     # 0x9029e
leaq 0x250(%rsp), %r15
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x4890
leaq 0x54f87(%rip), %rsi     # 0x8f2e5
movq %r15, %rdi
callq 0x45d0
testq %rax, %rax
je 0x3a3d4
leaq 0x55f2c(%rip), %r15     # 0x9029e
leaq 0x250(%rsp), %r12
leaq 0x54f64(%rip), %r13     # 0x8f2e5
leaq 0x54c74(%rip), %rbp     # 0x8effc
cmpq %rax, (%r14)
je 0x3a3aa
cmpq %rax, (%rbx)
je 0x3a3aa
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x3a3aa
movq %rbp, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
callq 0x36803
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4890
movq %r12, %rdi
movq %r13, %rsi
callq 0x45d0
testq %rax, %rax
jne 0x3a388
xorl %edi, %edi
xorl %esi, %esi
callq 0x36309
movq %rax, %r12
leaq 0x250(%rsp), %r15
movq %r15, %rdi
callq 0x41e0
leal 0x1(%rax), %edx
subq $0x8, %rsp
leaq 0x38(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
callq 0x1073a
addq $0x10, %rsp
movq %r13, %rdi
callq 0x492e0
movq 0x18(%rax), %r13
movq (%rsp), %rbp
movq %rbp, %rdi
callq 0x41e0
leal 0x1(%rax), %edx
subq $0x8, %rsp
leaq 0x18(%rsp), %rdi
movq %rbp, %rsi
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
callq 0x1073a
addq $0x10, %rsp
leaq 0x10(%rsp), %rdi
callq 0x492e0
movq 0x8(%rsp), %rbp
movq 0x18(%rax), %r9
leaq 0x55e00(%rip), %rdx     # 0x9027b
leaq 0x450(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r12, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x4890
cmpb $0x0, 0x20(%rsp)
jne 0x3a4ab
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3a4ab
callq 0x4690
cmpb $0x0, 0x40(%rsp)
jne 0x3a4c1
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x3a4c1
callq 0x4690
leaq 0x450(%rsp), %rdi
callq 0x41e0
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
andq %rax, %r12
je 0x3a528
addl $0x10, %eax
movq %rax, %rdi
callq 0x4040
movq %rax, %r13
leaq 0x450(%rsp), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x4240
movabsq $0x7665642f203e3220, %rax # imm = 0x7665642F203E3220
movq %rax, (%r13,%r12)
movabsq $0x6c6c756e2f7665, %rax # imm = 0x6C6C756E2F7665
movq %rax, 0x6(%r13,%r12)
movq %r13, %rdi
callq 0x4490
movq %r13, %rdi
callq 0x4690
movq %r15, %rax
movq %rax, %r12
movq %rax, %rdi
movl $0x2e, %esi
callq 0x41a0
incq %rax
cmpq %r15, %rax
jae 0x3a52b
leaq 0x250(%rsp), %rax
cmpq %rax, %r12
je 0x3a574
leaq 0x250(%rsp), %rsi
movl %esi, %eax
notl %eax
addl %eax, %r12d
leaq 0x50(%rsp), %rdi
movq %r12, %rdx
callq 0x4440
movb $0x0, 0x50(%rsp,%r12)
jmp 0x3a586
leaq 0x50(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x44e0
leaq 0x55d11(%rip), %rdx     # 0x9029e
leaq 0x450(%rsp), %r15
leaq 0x50(%rsp), %rcx
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
xorl %eax, %eax
callq 0x4890
leaq 0x54d35(%rip), %rsi     # 0x8f2e5
movq %r15, %rdi
callq 0x45d0
testq %rax, %rax
jne 0x3a5f8
leaq 0x55cd5(%rip), %rdx     # 0x90299
leaq 0x450(%rsp), %r12
leaq 0x50(%rsp), %rcx
movl $0x400, %esi            # imm = 0x400
movq %r12, %rdi
xorl %eax, %eax
callq 0x4890
leaq 0x54cfe(%rip), %rsi     # 0x8f2e5
movq %r12, %rdi
callq 0x45d0
testq %rax, %rax
je 0x3a797
cmpq %rax, (%r14)
je 0x3a61e
cmpq %rax, (%rbx)
je 0x3a61e
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x3a61e
leaq 0x549e7(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
movq %rbp, %rdi
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x4aaee
movq %r15, %rdi
callq 0x49b0
movq %r15, %rax
movq %rax, %r14
movq %rax, %rdi
movl $0x2e, %esi
callq 0x41a0
incq %rax
cmpq %r15, %rax
jae 0x3a638
leaq 0x450(%rsp), %rax
cmpq %rax, %r14
je 0x3a681
leaq 0x450(%rsp), %rsi
movl %esi, %eax
notl %eax
addl %eax, %r14d
leaq 0x50(%rsp), %rdi
movq %r14, %rdx
callq 0x4440
movb $0x0, 0x50(%rsp,%r14)
jmp 0x3a693
leaq 0x50(%rsp), %rdi
leaq 0x450(%rsp), %rsi
callq 0x44e0
leaq 0x55c8a(%rip), %rdx     # 0x90324
leaq 0x450(%rsp), %r14
leaq 0x50(%rsp), %rcx
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
xorl %eax, %eax
callq 0x4890
movq %r14, %rdi
callq 0x49b0
movq %rbp, %rax
addq $0x858, %rsp            # imm = 0x858
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r14
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x34174(%rip), %rax     # 0x6e868
leaq 0x35547(%rip), %r10     # 0x6fc42
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x54a11(%rip), %r11     # 0x8f11f
leaq 0x55b02(%rip), %rsi     # 0x90217
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0xc16a
addq $0x20, %rsp
leaq 0x6d51f(%rip), %rsi     # 0xa7c50
movq 0x6d898(%rip), %rdx     # 0xa7fd0
movq %r14, %rdi
callq 0x4910
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
leaq 0x56a2e(%rip), %rsi     # 0x91182
leaq 0x54b8a(%rip), %rcx     # 0x8f2e5
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x36908
jmp 0x3a7ee
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
leaq 0x56a01(%rip), %rsi     # 0x91182
leaq 0x4008b(%rip), %rcx     # 0x7a813
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x36908
jmp 0x3a7ee
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
movl (%rbp), %edx
movl 0x4(%rbp), %ecx
movl 0x8(%rbp), %r8d
movl 0xc(%rbp), %r9d
leaq 0x340af(%rip), %rax     # 0x6e868
leaq 0x35482(%rip), %r10     # 0x6fc42
cmpb $0x0, 0x10(%rbp)
cmovneq %rax, %r10
leaq 0x54950(%rip), %r11     # 0x8f11f
leaq 0x55acf(%rip), %rsi     # 0x902a5
movq %r15, %rdi
xorl %eax, %eax
pushq (%rsp)
pushq %r11
pushq %r10
pushq 0x18(%rbp)
callq 0x36908
addq $0x20, %rsp
leaq 0x6d4fb(%rip), %rsi     # 0xa7cf0
movq 0x6d7d4(%rip), %rdx     # 0xa7fd0
movq %r15, %rdi
callq 0x4910
jmp 0x3a808
jmp 0x3a808
movq %rax, %rbx
movq %r15, %rdi
jmp 0x3a816
movq %rax, %rbx
movq %r14, %rdi
callq 0x43c0
jmp 0x3a853
movq %rax, %rbx
cmpb $0x0, 0x20(%rsp)
jne 0x3a83d
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3a83d
callq 0x4690
jmp 0x3a83d
jmp 0x3a83a
movq %rax, %rbx
cmpb $0x0, 0x40(%rsp)
jne 0x3a853
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x3a853
callq 0x4690
movq %rbx, %rdi
callq 0x4960
nop