// File: /workspace/github_cpp_makefile_star2_O1/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 0x3b645
movq %rsi, %rbx
testq %rsi, %rsi
je 0x3b665
movq %rdi, %r14
movq %rdi, %rax
movq %rax, %r15
movq %rax, %rdi
movl $0x2e, %esi
callq 0x41a0
incq %rax
cmpq %r14, %rax
jae 0x3b220
cmpq %r14, %r15
jne 0x3b24b
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 0x38039
movq %rax, %r12
callq 0x384af
movq %r15, (%rsp)
leaq 0x58c56(%rip), %rdx     # 0x93eeb
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
movq %r12, %rcx
movl $0x2f, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4880
leaq 0x58afe(%rip), %rsi     # 0x93db5
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
je 0x3b34d
movq 0x71cd9(%rip), %r14     # 0xacfa8
leaq 0x58c15(%rip), %r12     # 0x93eeb
leaq 0x58ad8(%rip), %r13     # 0x93db5
cmpq %rax, (%r14)
je 0x3b30a
movq 0x71c9f(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x3b30a
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x3b30a
leaq 0x587cb(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
xorl %edi, %edi
xorl %esi, %esi
callq 0x38039
movq %rax, %rbp
callq 0x384af
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 0x4880
movq %rbx, %rdi
movq %r13, %rsi
callq 0x45c0
testq %rax, %rax
jne 0x3b2dd
xorl %edi, %edi
xorl %esi, %esi
callq 0x3d5f6
leaq 0x58b97(%rip), %rdx     # 0x93ef4
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 0x4880
movq %r15, %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x3b3dd
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 0x4480
movq %r12, %rdi
callq 0x4680
leaq 0x589d1(%rip), %rsi     # 0x93db5
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
jne 0x3b5c4
xorl %edi, %edi
xorl %esi, %esi
callq 0x3d75f
leaq 0x58b18(%rip), %rdx     # 0x93f1d
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 0x4880
movq %r15, %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x3b480
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 0x4480
movq %r12, %rdi
callq 0x4680
leaq 0x5892e(%rip), %rsi     # 0x93db5
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
je 0x3b6af
movq 0x71b09(%rip), %rcx     # 0xacfa8
cmpq %rax, (%rcx)
je 0x3b4cc
movq 0x71add(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x3b4cc
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x3b4cc
leaq 0x58609(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
leaq 0x58ad1(%rip), %rdx     # 0x93fa4
leaq 0x10(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4880
movq %rbx, %rdi
movq %r15, %rsi
callq 0x42e0
xorl %edi, %edi
xorl %esi, %esi
callq 0x3d8c8
leaq 0x58aa5(%rip), %rdx     # 0x93faa
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rax, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4880
movq %r15, %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x3b578
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 0x4480
movq %r12, %rdi
callq 0x4680
leaq 0x58836(%rip), %rsi     # 0x93db5
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
jne 0x3b5c4
leaq 0x58a11(%rip), %rdx     # 0x93fa4
leaq 0x10(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4880
movq %r15, %rdi
movq %rbx, %rsi
callq 0x42e0
leaq 0x587f9(%rip), %rsi     # 0x93db5
movq %rbx, %rdi
callq 0x45c0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4580
movq %r15, %rdi
callq 0x4030
testq %rax, %rax
jle 0x3b68c
testq %r15, %r15
je 0x3b622
movq 0x719b5(%rip), %rax     # 0xacfa8
cmpq %r15, (%rax)
je 0x3b630
movq 0x71989(%rip), %rax     # 0xacf88
cmpq %r15, (%rax)
je 0x3b630
movq %r15, %rdi
callq 0x4540
testl %eax, %eax
je 0x3b630
leaq 0x584b5(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
jmp 0x3b630
leaq 0x58479(%rip), %rdi     # 0x93aa2
xorl %eax, %eax
callq 0xbb52
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 0x5880e(%rip), %rsi     # 0x93e67
movq %rax, %rdi
xorl %eax, %eax
callq 0xc196
jmp 0x3b683
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %rbx
leaq 0x5882b(%rip), %rsi     # 0x93ea4
movq %rax, %rdi
xorl %eax, %eax
callq 0xc196
leaq 0x71596(%rip), %rsi     # 0xacc20
jmp 0x3b6d7
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %rbx
leaq 0x588a3(%rip), %rsi     # 0x93f43
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x385b4
jmp 0x3b6d0
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %rbx
leaq 0x58880(%rip), %rsi     # 0x93f43
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x385b4
leaq 0x71619(%rip), %rsi     # 0xaccf0
movq 0x718f2(%rip), %rdx     # 0xacfd0
movq %rbx, %rdi
callq 0x4900
jmp 0x3b6ec
jmp 0x3b6ec
jmp 0x3b6ec
movq %rax, %r14
movq %rbx, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x4950