// File: /workspace/github_cpp_makefile_star2_O3/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::cimg::load_network_external(char const*, char*)
inline char *load_network_external(const char *const filename, char *const filename_local) {
      if (!filename)
        throw CImgArgumentException("cimg::load_network_external(): Specified filename is (null).");
      if (!filename_local)
        throw CImgArgumentException("cimg::load_network_external(): Specified destination string is (null).");
      const char *const _ext = cimg::split_filename(filename), *const ext = (*_ext && _ext>filename)?_ext-1:_ext;
      char command[1024] = { 0 };
      std::FILE *file = 0;
      *filename_local = 0;
      do {
        cimg_snprintf(filename_local,512,"%s%c%s%s",
                      cimg::temporary_path(),cimg_file_separator,cimg::filenamerand(),ext);
        if ((file=std::fopen(filename_local,"rb"))!=0) cimg::fclose(file);
      } while (file);

      // Try with 'curl' first.
      cimg_snprintf(command,sizeof(command),"%s -f --silent --compressed -o \"%s\" \"%s\"",
                    cimg::curl_path(),filename_local,filename);
      cimg::system(command);
      if (!(file = std::fopen(filename_local,"rb"))) {

        // Try with 'wget' else.
        cimg_snprintf(command,sizeof(command),"%s -q -r -l 0 --no-cache -O \"%s\" \"%s\"",
                      cimg::wget_path(),filename_local,filename);
        cimg::system(command);
        if (!(file = std::fopen(filename_local,"rb")))
          throw CImgIOException("cimg::load_network_external(): Failed to load file '%s' with external commands "
                                "'wget' or 'curl'.",filename);
        cimg::fclose(file);

        // Try gunzip it.
        cimg_snprintf(command,sizeof(command),"%s.gz",filename_local);
        std::rename(filename_local,command);
        cimg_snprintf(command,sizeof(command),"%s --quiet \"%s.gz\"",
                      gunzip_path(),filename_local);
        cimg::system(command);
        file = std::fopen(filename_local,"rb");
        if (!file) {
          cimg_snprintf(command,sizeof(command),"%s.gz",filename_local);
          std::rename(command,filename_local);
          file = std::fopen(filename_local,"rb");
        }
      }
      std::fseek(file,0,SEEK_END); // Check if file size is 0.
      if (std::ftell(file)<=0)
        throw CImgIOException("cimg::load_network_external(): Failed to load file '%s' with external commands "
                              "'wget' or 'curl'.",filename);
      cimg::fclose(file);
      return filename_local;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
testq %rdi, %rdi
je 0x398a4
movq %rsi, %rbx
testq %rsi, %rsi
je 0x398c4
movq %rdi, %r14
movq %rdi, %rax
movq %rax, %r15
movq %rax, %rdi
movl $0x2e, %esi
callq 0x41a0
incq %rax
cmpq %r14, %rax
jae 0x3947f
cmpq %r14, %r15
jne 0x394aa
movq %r14, %rdi
callq 0x41e0
movq %rax, %r15
addq %r14, %r15
cmpb $0x0, (%r15)
setne %al
movq %r14, 0x8(%rsp)
cmpq %r14, %r15
seta %cl
andb %al, %cl
movzbl %cl, %eax
subq %rax, %r15
leaq 0x10(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x4290
movb $0x0, (%rbx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x36475
movq %rax, %r12
callq 0x36803
movq %r15, (%rsp)
leaq 0x55f27(%rip), %rdx     # 0x8f41b
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
movq %r12, %rcx
movl $0x2f, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4890
leaq 0x55dcf(%rip), %rsi     # 0x8f2e5
movq %rbx, %rdi
callq 0x45d0
testq %rax, %rax
je 0x395ac
movq 0x6ea7a(%rip), %r14     # 0xa7fa8
leaq 0x55ee6(%rip), %r12     # 0x8f41b
leaq 0x55da9(%rip), %r13     # 0x8f2e5
cmpq %rax, (%r14)
je 0x39569
movq 0x6ea40(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x39569
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x39569
leaq 0x55a9c(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
xorl %edi, %edi
xorl %esi, %esi
callq 0x36475
movq %rax, %rbp
callq 0x36803
movq %r15, (%rsp)
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
movq %r12, %rdx
movq %rbp, %rcx
movl $0x2f, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4890
movq %rbx, %rdi
movq %r13, %rsi
callq 0x45d0
testq %rax, %rax
jne 0x3953c
xorl %edi, %edi
xorl %esi, %esi
callq 0x3b85a
leaq 0x55e68(%rip), %rdx     # 0x8f424
leaq 0x10(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rax, %rcx
movq %rbx, %r8
movq 0x8(%rsp), %r14
movq %r14, %r9
xorl %eax, %eax
callq 0x4890
movq %r15, %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x3963c
addl $0x10, %eax
movq %rax, %rdi
callq 0x4040
movq %rax, %r12
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x4240
movabsq $0x7665642f203e3220, %rax # imm = 0x7665642F203E3220
movq %rax, (%r12,%r15)
movabsq $0x6c6c756e2f7665, %rax # imm = 0x6C6C756E2F7665
movq %rax, 0x6(%r12,%r15)
movq %r12, %rdi
callq 0x4490
movq %r12, %rdi
callq 0x4690
leaq 0x55ca2(%rip), %rsi     # 0x8f2e5
movq %rbx, %rdi
callq 0x45d0
testq %rax, %rax
jne 0x39823
xorl %edi, %edi
xorl %esi, %esi
callq 0x3b9bf
leaq 0x55de9(%rip), %rdx     # 0x8f44d
leaq 0x10(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rax, %rcx
movq %rbx, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x4890
movq %r15, %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x396df
addl $0x10, %eax
movq %rax, %rdi
callq 0x4040
movq %rax, %r12
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x4240
movabsq $0x7665642f203e3220, %rax # imm = 0x7665642F203E3220
movq %rax, (%r12,%r15)
movabsq $0x6c6c756e2f7665, %rax # imm = 0x6C6C756E2F7665
movq %rax, 0x6(%r12,%r15)
movq %r12, %rdi
callq 0x4490
movq %r12, %rdi
callq 0x4690
leaq 0x55bff(%rip), %rsi     # 0x8f2e5
movq %rbx, %rdi
callq 0x45d0
testq %rax, %rax
je 0x3990e
movq 0x6e8aa(%rip), %rcx     # 0xa7fa8
cmpq %rax, (%rcx)
je 0x3972b
movq 0x6e87e(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x3972b
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x3972b
leaq 0x558da(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
leaq 0x55da2(%rip), %rdx     # 0x8f4d4
leaq 0x10(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4890
movq %rbx, %rdi
movq %r15, %rsi
callq 0x42e0
xorl %edi, %edi
xorl %esi, %esi
callq 0x3bb24
leaq 0x55d76(%rip), %rdx     # 0x8f4da
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rax, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4890
movq %r15, %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x397d7
addl $0x10, %eax
movq %rax, %rdi
callq 0x4040
movq %rax, %r12
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x4240
movabsq $0x7665642f203e3220, %rax # imm = 0x7665642F203E3220
movq %rax, (%r12,%r15)
movabsq $0x6c6c756e2f7665, %rax # imm = 0x6C6C756E2F7665
movq %rax, 0x6(%r12,%r15)
movq %r12, %rdi
callq 0x4490
movq %r12, %rdi
callq 0x4690
leaq 0x55b07(%rip), %rsi     # 0x8f2e5
movq %rbx, %rdi
callq 0x45d0
testq %rax, %rax
jne 0x39823
leaq 0x55ce2(%rip), %rdx     # 0x8f4d4
leaq 0x10(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4890
movq %r15, %rdi
movq %rbx, %rsi
callq 0x42e0
leaq 0x55aca(%rip), %rsi     # 0x8f2e5
movq %rbx, %rdi
callq 0x45d0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4590
movq %r15, %rdi
callq 0x4030
testq %rax, %rax
jle 0x398eb
testq %r15, %r15
je 0x39881
movq 0x6e756(%rip), %rax     # 0xa7fa8
cmpq %r15, (%rax)
je 0x3988f
movq 0x6e72a(%rip), %rax     # 0xa7f88
cmpq %r15, (%rax)
je 0x3988f
movq %r15, %rdi
callq 0x4550
testl %eax, %eax
je 0x3988f
leaq 0x55786(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
jmp 0x3988f
leaq 0x5574a(%rip), %rdi     # 0x8efd2
xorl %eax, %eax
callq 0xbb10
movq %rbx, %rax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %rbx
leaq 0x55adf(%rip), %rsi     # 0x8f397
movq %rax, %rdi
xorl %eax, %eax
callq 0xc16a
jmp 0x398e2
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %rbx
leaq 0x55afc(%rip), %rsi     # 0x8f3d4
movq %rax, %rdi
xorl %eax, %eax
callq 0xc16a
leaq 0x6e367(%rip), %rsi     # 0xa7c50
jmp 0x39936
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %rbx
leaq 0x55b74(%rip), %rsi     # 0x8f473
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x36908
jmp 0x3992f
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %rbx
leaq 0x55b51(%rip), %rsi     # 0x8f473
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x36908
leaq 0x6e3ba(%rip), %rsi     # 0xa7cf0
movq 0x6e693(%rip), %rdx     # 0xa7fd0
movq %rbx, %rdi
callq 0x4910
jmp 0x3994b
jmp 0x3994b
jmp 0x3994b
movq %rax, %r14
movq %rbx, %rdi
callq 0x43c0
movq %r14, %rdi
callq 0x4960