// File: /workspace/github_cpp_makefile_star2_O1/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 0x3c473
movq %rsi, %r14
cmpb $0x2d, (%rsi)
jne 0x3c003
movzbl 0x1(%r14), %eax
cmpl $0x2e, %eax
je 0x3bff7
testl %eax, %eax
jne 0x3c003
movq 0x70faa(%rip), %rax     # 0xacfa8
movq (%rax), %rdi
jmp 0x3c015
leaq 0x57dab(%rip), %rsi     # 0x93db5
movq %r14, %rdi
callq 0x45c0
movq %rax, %rdi
testq %rdi, %rdi
je 0x3c4e0
callq 0x4540
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 0x3c07c
movzbl 0x1(%r14), %eax
cmpl $0x2e, %eax
je 0x3c070
testl %eax, %eax
jne 0x3c07c
movq 0x70f31(%rip), %rax     # 0xacfa8
movq (%rax), %rax
jmp 0x3c08b
leaq 0x43260(%rip), %rsi     # 0x7f2e3
movq %r14, %rdi
callq 0x45c0
testq %rax, %rax
je 0x3c50d
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq 0x70f04(%rip), %r14     # 0xacfa8
movq 0x70edd(%rip), %rbx     # 0xacf88
cmpq %rax, (%r14)
je 0x3c0d1
cmpq %rax, (%rbx)
je 0x3c0d1
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x3c0d1
leaq 0x57a04(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
callq 0x384af
leaq 0x58c91(%rip), %rdx     # 0x94d6e
leaq 0x250(%rsp), %r15
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x4880
leaq 0x57cb7(%rip), %rsi     # 0x93db5
movq %r15, %rdi
callq 0x45c0
testq %rax, %rax
je 0x3c174
leaq 0x58c5c(%rip), %r15     # 0x94d6e
leaq 0x250(%rsp), %r12
leaq 0x57c94(%rip), %r13     # 0x93db5
leaq 0x579a4(%rip), %rbp     # 0x93acc
cmpq %rax, (%r14)
je 0x3c14a
cmpq %rax, (%rbx)
je 0x3c14a
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x3c14a
movq %rbp, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
callq 0x384af
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4880
movq %r12, %rdi
movq %r13, %rsi
callq 0x45c0
testq %rax, %rax
jne 0x3c128
xorl %edi, %edi
xorl %esi, %esi
callq 0x37ec9
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 0x106cc
addq $0x10, %rsp
movq %r13, %rdi
callq 0x4b1dc
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 0x106cc
addq $0x10, %rsp
leaq 0x10(%rsp), %rdi
callq 0x4b1dc
movq 0x8(%rsp), %rbp
movq 0x18(%rax), %r9
leaq 0x58b30(%rip), %rdx     # 0x94d4b
leaq 0x450(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r12, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x4880
cmpb $0x0, 0x20(%rsp)
jne 0x3c24b
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3c24b
callq 0x4680
cmpb $0x0, 0x40(%rsp)
jne 0x3c261
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x3c261
callq 0x4680
leaq 0x450(%rsp), %rdi
callq 0x41e0
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
andq %rax, %r12
je 0x3c2c8
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 0x4480
movq %r13, %rdi
callq 0x4680
movq %r15, %rax
movq %rax, %r12
movq %rax, %rdi
movl $0x2e, %esi
callq 0x41a0
incq %rax
cmpq %r15, %rax
jae 0x3c2cb
leaq 0x250(%rsp), %rax
cmpq %rax, %r12
je 0x3c314
leaq 0x250(%rsp), %rsi
movl %esi, %eax
notl %eax
addl %eax, %r12d
leaq 0x50(%rsp), %rdi
movq %r12, %rdx
callq 0x4430
movb $0x0, 0x50(%rsp,%r12)
jmp 0x3c326
leaq 0x50(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x44d0
leaq 0x58a41(%rip), %rdx     # 0x94d6e
leaq 0x450(%rsp), %r15
leaq 0x50(%rsp), %rcx
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
xorl %eax, %eax
callq 0x4880
leaq 0x57a65(%rip), %rsi     # 0x93db5
movq %r15, %rdi
callq 0x45c0
testq %rax, %rax
jne 0x3c398
leaq 0x58a05(%rip), %rdx     # 0x94d69
leaq 0x450(%rsp), %r12
leaq 0x50(%rsp), %rcx
movl $0x400, %esi            # imm = 0x400
movq %r12, %rdi
xorl %eax, %eax
callq 0x4880
leaq 0x57a2e(%rip), %rsi     # 0x93db5
movq %r12, %rdi
callq 0x45c0
testq %rax, %rax
je 0x3c537
cmpq %rax, (%r14)
je 0x3c3be
cmpq %rax, (%rbx)
je 0x3c3be
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x3c3be
leaq 0x57717(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
movq %rbp, %rdi
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x4c946
movq %r15, %rdi
callq 0x49a0
movq %r15, %rax
movq %rax, %r14
movq %rax, %rdi
movl $0x2e, %esi
callq 0x41a0
incq %rax
cmpq %r15, %rax
jae 0x3c3d8
leaq 0x450(%rsp), %rax
cmpq %rax, %r14
je 0x3c421
leaq 0x450(%rsp), %rsi
movl %esi, %eax
notl %eax
addl %eax, %r14d
leaq 0x50(%rsp), %rdi
movq %r14, %rdx
callq 0x4430
movb $0x0, 0x50(%rsp,%r14)
jmp 0x3c433
leaq 0x50(%rsp), %rdi
leaq 0x450(%rsp), %rsi
callq 0x44d0
leaq 0x589ba(%rip), %rdx     # 0x94df4
leaq 0x450(%rsp), %r14
leaq 0x50(%rsp), %rcx
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
xorl %eax, %eax
callq 0x4880
movq %r14, %rdi
callq 0x49a0
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 0x36ea4(%rip), %rax     # 0x73338
leaq 0x38277(%rip), %r10     # 0x74712
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x57741(%rip), %r11     # 0x93bef
leaq 0x58832(%rip), %rsi     # 0x94ce7
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0xc196
addq $0x20, %rsp
leaq 0x7074f(%rip), %rsi     # 0xacc20
movq 0x70af8(%rip), %rdx     # 0xacfd0
movq %r14, %rdi
callq 0x4900
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
leaq 0x5975e(%rip), %rsi     # 0x95c52
leaq 0x578ba(%rip), %rcx     # 0x93db5
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x385b4
jmp 0x3c58e
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
leaq 0x59731(%rip), %rsi     # 0x95c52
leaq 0x42dbb(%rip), %rcx     # 0x7f2e3
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x385b4
jmp 0x3c58e
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 0x36ddf(%rip), %rax     # 0x73338
leaq 0x381b2(%rip), %r10     # 0x74712
cmpb $0x0, 0x10(%rbp)
cmovneq %rax, %r10
leaq 0x57680(%rip), %r11     # 0x93bef
leaq 0x587ff(%rip), %rsi     # 0x94d75
movq %r15, %rdi
xorl %eax, %eax
pushq (%rsp)
pushq %r11
pushq %r10
pushq 0x18(%rbp)
callq 0x385b4
addq $0x20, %rsp
leaq 0x7075b(%rip), %rsi     # 0xaccf0
movq 0x70a34(%rip), %rdx     # 0xacfd0
movq %r15, %rdi
callq 0x4900
jmp 0x3c5a8
jmp 0x3c5a8
movq %rax, %rbx
movq %r15, %rdi
jmp 0x3c5b6
movq %rax, %rbx
movq %r14, %rdi
callq 0x43b0
jmp 0x3c5f3
movq %rax, %rbx
cmpb $0x0, 0x20(%rsp)
jne 0x3c5dd
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3c5dd
callq 0x4680
jmp 0x3c5dd
jmp 0x3c5da
movq %rax, %rbx
cmpb $0x0, 0x40(%rsp)
jne 0x3c5f3
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x3c5f3
callq 0x4680
movq %rbx, %rdi
callq 0x4950
nop