// File: /workspace/github_cpp_makefile_star2_O1/ncbi[P]amr/curl_easy.cpp
// Function: CURL_sp::Curl::download(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Curl::download (const string &url,
                     const string &fName) 
{
  ASSERT (! fName. empty ());  
  
  {
    OFStream f (fName);
    curl_easy_setopt (eh, CURLOPT_WRITEFUNCTION, write_stream_cb);
    curl_easy_setopt (eh, CURLOPT_WRITEDATA, & f);
    process (url, "download");
  }
  
  IFStream f (fName);
  string s;
  f >> s;
  if (s == "<?xml")
    throw runtime_error ("Cannot download " + strQuote (fName));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x9930
movl $0x0, (%rax)
cmpq $0x0, 0x8(%rbx)
je 0x59325
leaq 0xe0(%rsp), %rdi
movq %rbx, %rsi
callq 0x45d96
movq (%r15), %rdi
leaq 0x53e(%rip), %rdx       # 0x59706
movl $0x4e2b, %esi           # imm = 0x4E2B
xorl %eax, %eax
callq 0x97c0
movq (%r15), %rdi
leaq 0xe0(%rsp), %rdx
movl $0x2711, %esi           # imm = 0x2711
xorl %eax, %eax
callq 0x97c0
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x6550(%rip), %rsi      # 0x5f74c
leaq 0x6551(%rip), %rdx      # 0x5f754
movq %rsp, %rdi
callq 0x10cc2
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x59e1a
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x5922f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
leaq 0x1c252(%rip), %rax     # 0x75488
leaq 0x1d8(%rsp), %r14
movq %rax, -0xf8(%r14)
leaq 0x1c264(%rip), %rax     # 0x754b0
movq %rax, (%r14)
leaq 0xe8(%rsp), %rdi
callq 0x9590
movq %r14, %rdi
callq 0x9660
leaq 0xe0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2d892
movq %rsp, %rsi
movq %r12, (%rsi)
movq $0x0, 0x8(%rsi)
movb $0x0, 0x10(%rsi)
movq %r14, %rdi
callq 0x93a0
leaq 0x64bd(%rip), %rsi      # 0x5f755
movq %rsp, %rdi
callq 0x9810
testl %eax, %eax
je 0x593b7
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x592be
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
leaq 0x1b8db(%rip), %rax     # 0x74ba0
leaq 0x1e0(%rsp), %rbx
movq %rax, -0x100(%rbx)
leaq 0x1b8ed(%rip), %rax     # 0x74bc8
movq %rax, (%rbx)
leaq 0xf0(%rsp), %r14
movq %r14, %rdi
callq 0x9590
leaq 0x1b8fb(%rip), %rax     # 0x74bf0
movq %rax, -0x10(%r14)
leaq 0x1b918(%rip), %rax     # 0x74c18
movq %rax, (%rbx)
movq $0x0, -0x8(%r14)
movq %rbx, %rdi
callq 0x9660
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x9750
testl %eax, %eax
jne 0x59414
leaq 0xb0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x63b3(%rip), %rsi      # 0x5f6f8
leaq 0x63c2(%rip), %rdx      # 0x5f70e
leaq 0xa0(%rsp), %rdi
callq 0x10cc2
leaq 0xc0(%rsp), %rdi
movl $0x6c, %esi
callq 0x11774
leaq 0x40(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x11471
leaq 0x2162(%rip), %rsi      # 0x5b4ee
leaq 0x40(%rsp), %rdi
callq 0x95e0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x5941e
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x5942b
movl $0x10, %edi
callq 0x9320
movq %rax, %r14
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movl $0x22, %edx
callq 0x19b63
leaq 0x637e(%rip), %rsi      # 0x5f75b
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x45985
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x9220
xorl %ebp, %ebp
movq 0x1cbab(%rip), %rsi     # 0x75fb0
movq 0x1cb7c(%rip), %rdx     # 0x75f88
movq %r14, %rdi
callq 0x9570
movl $0x1, %edi
callq 0x95f0
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x90(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x62b8(%rip), %rsi      # 0x5f70f
leaq 0x62ed(%rip), %rdx      # 0x5f74b
leaq 0x80(%rsp), %rdi
callq 0x10cc2
leaq 0x2b2f(%rip), %rsi      # 0x5bfa1
leaq 0x80(%rsp), %rdi
callq 0x95e0
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x594a1
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x594ae
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
movq 0x8(%rax), %rsi
leaq 0x60(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x11471
leaq 0x2556(%rip), %rsi      # 0x5ba34
movq %rsp, %rdi
callq 0x95e0
leaq 0xf0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x5950a
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x5951d
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
movq 0x8(%rax), %rdx
leaq 0xe0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x16073
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x59566
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x59566
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59586
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x59586
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x595a2
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x595a2
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x595c4
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x595c4
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x595e0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x595e0
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59600
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x59600
movq %rax, %rbx
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59626
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x59626
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x596fe
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x596fe
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59672
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x59672
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5969a
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x5969a
movq %rax, %rbx
jmp 0x596fe
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x596ac
movq %r14, %rdi
callq 0x97f0
jmp 0x596ac
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x596c2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
leaq 0xe0(%rsp), %rdi
callq 0x13f72
jmp 0x596fe
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x596f1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x596f1
jmp 0x596ee
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x45e68
movq %rbx, %rdi
callq 0x95b0