// File: /workspace/github_cpp_makefile_star2_O3/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 0x5924f
leaq 0xe0(%rsp), %rdi
movq %rbx, %rsi
callq 0x45b88
movq (%r15), %rdi
leaq 0x553(%rip), %rdx       # 0x59645
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 0x6616(%rip), %rsi      # 0x5f73c
leaq 0x6617(%rip), %rdx      # 0x5f744
movq %rsp, %rdi
callq 0x10cc8
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x59d4c
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x59159
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
leaq 0x1c358(%rip), %rax     # 0x754b8
leaq 0x1d8(%rsp), %r14
movq %rax, -0xf8(%r14)
leaq 0x1c36a(%rip), %rax     # 0x754e0
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 0x2d576
movq %rsp, %rsi
movq %r12, (%rsi)
movq $0x0, 0x8(%rsi)
movb $0x0, 0x10(%rsi)
movq %r14, %rdi
callq 0x93a0
leaq 0x6583(%rip), %rsi      # 0x5f745
movq %rsp, %rdi
callq 0x9810
testl %eax, %eax
je 0x592e1
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x591e8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
leaq 0x1b9e1(%rip), %rax     # 0x74bd0
leaq 0x1e0(%rsp), %rbx
movq %rax, -0x100(%rbx)
leaq 0x1b9f3(%rip), %rax     # 0x74bf8
movq %rax, (%rbx)
leaq 0xf0(%rsp), %r14
movq %r14, %rdi
callq 0x9590
leaq 0x1ba01(%rip), %rax     # 0x74c20
movq %rax, -0x10(%r14)
leaq 0x1ba1e(%rip), %rax     # 0x74c48
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 0x5933e
leaq 0xb0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6479(%rip), %rsi      # 0x5f6e8
leaq 0x6488(%rip), %rdx      # 0x5f6fe
leaq 0xa0(%rsp), %rdi
callq 0x10cc8
leaq 0xc0(%rsp), %rdi
movl $0x6c, %esi
callq 0x11784
leaq 0x40(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x11481
leaq 0x2238(%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 0x59348
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x59355
movl $0x10, %edi
callq 0x9320
movq %rax, %r14
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movl $0x22, %edx
callq 0x19abe
leaq 0x6444(%rip), %rsi      # 0x5f74b
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x45767
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x9220
xorl %ebp, %ebp
movq 0x1cc81(%rip), %rsi     # 0x75fb0
movq 0x1cc52(%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 0x637e(%rip), %rsi      # 0x5f6ff
leaq 0x63b3(%rip), %rdx      # 0x5f73b
leaq 0x80(%rsp), %rdi
callq 0x10cc8
leaq 0x2c05(%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 0x593cb
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x593d8
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 0x11481
leaq 0x262c(%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 0x59434
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x59447
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 0x16026
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x59490
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x59490
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x594b0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x594b0
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x594cc
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x594cc
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x594ee
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x594ee
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x5950a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x5950a
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5952a
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x5952a
movq %rax, %rbx
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59550
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x59550
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5963d
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x5963d
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59594
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x9100
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x595af
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x9100
testb %bpl, %bpl
jne 0x595de
jmp 0x595eb
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x595de
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x595de
movq %rax, %rbx
jmp 0x5963d
movq %rax, %rbx
movq %r14, %rdi
callq 0x97f0
jmp 0x595eb
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x59601
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
leaq 0xe0(%rsp), %rdi
callq 0x13f42
jmp 0x5963d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x59630
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x9100
jmp 0x59630
jmp 0x5962d
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x45c5a
movq %rbx, %rdi
callq 0x95b0