// File: /workspace/github_cpp_makefile_star2_O2/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 0x2cb6e
movq %rsi, %r14
testq %rsi, %rsi
je 0x2cb8e
movq %rdi, %rbx
xorl %esi, %esi
callq 0x2cc28
movq %rax, %r15
cmpb $0x0, (%rax)
setne %al
movq %rbx, 0x8(%rsp)
cmpq %rbx, %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 0x4280
movb $0x0, (%r14)
leaq 0x489e0(%rip), %r12     # 0x75371
pushq $0x2f
popq %rbp
leaq 0x488a0(%rip), %r13     # 0x7523b
xorl %edi, %edi
xorl %esi, %esi
callq 0x2a028
movq %rax, %rbx
callq 0x2a352
movq %r15, (%rsp)
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4890
movq %r14, %rdi
movq %r13, %rsi
callq 0x45b0
testq %rax, %rax
je 0x2c9e5
movq %rax, %rdi
callq 0x2a2f8
jmp 0x2c99b
xorl %edi, %edi
xorl %esi, %esi
callq 0x2e395
leaq 0x48985(%rip), %rdx     # 0x7537a
leaq 0x10(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %rax, %rcx
movq %r14, %r8
movq 0x8(%rsp), %r12
movq %r12, %r9
xorl %eax, %eax
callq 0x4890
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2e487
leaq 0x48813(%rip), %rsi     # 0x7523b
movq %r14, %rdi
callq 0x45b0
testq %rax, %rax
jne 0x2cb34
xorl %edi, %edi
xorl %esi, %esi
callq 0x2e4f6
leaq 0x4895a(%rip), %rdx     # 0x753a3
leaq 0x10(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %rax, %rcx
movq %r14, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x4890
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2e487
leaq 0x487c4(%rip), %rsi     # 0x7523b
movq %r14, %rdi
callq 0x45b0
testq %rax, %rax
je 0x2cbd8
movq %rax, %rdi
callq 0x2a2f8
leaq 0x48993(%rip), %rdx     # 0x7542a
leaq 0x10(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x4890
movq %r14, %rdi
movq %r15, %rsi
callq 0x42d0
xorl %edi, %edi
xorl %esi, %esi
callq 0x2e5e8
leaq 0x48967(%rip), %rdx     # 0x75430
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rax, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x4890
movq %r15, %rdi
xorl %esi, %esi
callq 0x2e487
leaq 0x4874c(%rip), %rsi     # 0x7523b
movq %r14, %rdi
callq 0x45b0
testq %rax, %rax
jne 0x2cb34
leaq 0x48927(%rip), %rdx     # 0x7542a
leaq 0x10(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x4890
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0x4870f(%rip), %rsi     # 0x7523b
movq %r14, %rdi
callq 0x45b0
movq %rax, %r15
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x4580
movq %r15, %rdi
callq 0x4030
testq %rax, %rax
jle 0x2cbb5
movq %r15, %rdi
callq 0x2a2f8
movq %r14, %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, %r14
leaq 0x4876b(%rip), %rsi     # 0x752ed
movq %rax, %rdi
xorl %eax, %eax
callq 0x9d52
jmp 0x2cbac
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r14
leaq 0x48788(%rip), %rsi     # 0x7532a
movq %rax, %rdi
xorl %eax, %eax
callq 0x9d52
leaq 0x630ad(%rip), %rsi     # 0x8fc60
jmp 0x2cc00
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r14
leaq 0x48800(%rip), %rsi     # 0x753c9
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2a3de
jmp 0x2cbf9
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r14
leaq 0x487dd(%rip), %rsi     # 0x753c9
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2a3de
leaq 0x63100(%rip), %rsi     # 0x8fd00
movq 0x633d1(%rip), %rdx     # 0x8ffd8
movq %r14, %rdi
callq 0x4910
jmp 0x2cc15
jmp 0x2cc15
jmp 0x2cc15
movq %rax, %rbx
movq %r14, %rdi
callq 0x4390
movq %rbx, %rdi
callq 0x4950