// File: MarkOates[P]file-downloader/test_file_downloader.cpp
// Function: FileDownloader_will_download_a_remote_file_invoker()
BOOST_AUTO_TEST_CASE(FileDownloader_will_download_a_remote_file)
{
   std::string file_url = "https://www.allegro.cc/theme/default/image/logo.png";
   std::string local_filename = "logo.png";
   FileDownloader::FileHandle handle = FileDownloader::download_file(file_url, local_filename);

   BOOST_CHECK_EQUAL(true, std::ifstream(local_filename).good());

   remove(local_filename.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9c0, %rsp            # imm = 0x9C0
movq 0xe1ee(%rip), %rax      # 0x15280
movq %rax, -0x8e8(%rbp)
leaq 0x80d5(%rip), %rsi      # 0xf175
leaq -0x10(%rbp), %rdi
movl $0x18, %edx
callq 0xa680
leaq -0x1b8(%rbp), %rdi
movq %rdi, -0x8e0(%rbp)
xorl %esi, %esi
movl $0x198, %edx            # imm = 0x198
callq 0x3180
movq -0x8e0(%rbp), %rdi
callq 0xb9c0
movq -0x8e0(%rbp), %rdi
callq 0xb9f0
movq %rax, %rdi
movb $0x22, -0x1b9(%rbp)
leaq -0x1b9(%rbp), %rsi
callq 0xb980
movq %rax, -0x8d8(%rbp)
jmp 0x70ff
movq -0x8d8(%rbp), %rdi
leaq 0x8242(%rip), %rsi      # 0xf34f
callq 0xbe40
movq %rax, -0x8f0(%rbp)
jmp 0x711b
movq -0x8f0(%rbp), %rdi
leaq 0x84be(%rip), %rsi      # 0xf5e7
callq 0xb920
movq %rax, -0x8f8(%rbp)
jmp 0x7137
movq -0x8f8(%rbp), %rdi
callq 0xba00
movq %rax, -0x900(%rbp)
jmp 0x714c
movq -0x900(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0xb8c0
jmp 0x715e
movq -0x8e8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movl $0x37, %edx
leaq -0x20(%rbp), %rcx
callq 0x3130
jmp 0x7179
leaq -0x1b8(%rbp), %rdi
callq 0xba50
movq 0xe0f4(%rip), %rax      # 0x15280
movq %rax, -0x918(%rbp)
leaq 0x7fdb(%rip), %rsi      # 0xf175
leaq -0x1e0(%rbp), %rdi
movl $0x18, %edx
callq 0xa680
leaq -0x388(%rbp), %rdi
movq %rdi, -0x910(%rbp)
xorl %esi, %esi
movl $0x198, %edx            # imm = 0x198
callq 0x3180
movq -0x910(%rbp), %rdi
callq 0xb9c0
movq -0x910(%rbp), %rdi
callq 0xb9f0
movq %rax, %rdi
movb $0x22, -0x389(%rbp)
leaq -0x389(%rbp), %rsi
callq 0xb980
movq %rax, -0x908(%rbp)
jmp 0x71fc
movq -0x908(%rbp), %rdi
leaq 0x8145(%rip), %rsi      # 0xf34f
callq 0xbe40
movq %rax, -0x920(%rbp)
jmp 0x7218
movq -0x920(%rbp), %rdi
leaq 0x83d0(%rip), %rsi      # 0xf5f6
callq 0xba80
movq %rax, -0x928(%rbp)
jmp 0x7234
movq -0x928(%rbp), %rdi
callq 0xba00
movq %rax, -0x930(%rbp)
jmp 0x7249
movq -0x930(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0xb8c0
jmp 0x725e
movq -0x918(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
movl $0x37, %edx
leaq -0x1f0(%rbp), %rcx
callq 0x3130
jmp 0x727f
leaq -0x388(%rbp), %rdi
callq 0xba50
leaq -0x1cd(%rbp), %rdi
callq 0xbe70
movq 0xdfe2(%rip), %rax      # 0x15280
movq %rax, -0x948(%rbp)
leaq 0x7ec9(%rip), %rsi      # 0xf175
leaq -0x3a0(%rbp), %rdi
movl $0x18, %edx
callq 0xa680
leaq -0x548(%rbp), %rdi
movq %rdi, -0x940(%rbp)
xorl %esi, %esi
movl $0x198, %edx            # imm = 0x198
callq 0x3180
movq -0x940(%rbp), %rdi
callq 0xb9c0
movq -0x940(%rbp), %rdi
callq 0xb9f0
movq %rax, %rdi
movb $0x22, -0x549(%rbp)
leaq -0x549(%rbp), %rsi
callq 0xb980
movq %rax, -0x938(%rbp)
jmp 0x730e
movq -0x938(%rbp), %rdi
leaq 0x8033(%rip), %rsi      # 0xf34f
callq 0xbe40
movq %rax, -0x950(%rbp)
jmp 0x732a
movq -0x950(%rbp), %rdi
leaq 0x82ce(%rip), %rsi      # 0xf606
callq 0xbad0
movq %rax, -0x958(%rbp)
jmp 0x7346
movq -0x958(%rbp), %rdi
callq 0xba00
movq %rax, -0x960(%rbp)
jmp 0x735b
movq -0x960(%rbp), %rsi
leaq -0x3b0(%rbp), %rdi
callq 0xb8c0
jmp 0x7370
movq -0x948(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
movl $0x37, %edx
leaq -0x3b0(%rbp), %rcx
callq 0x3130
jmp 0x7391
leaq -0x548(%rbp), %rdi
callq 0xba50
leaq -0x1cd(%rbp), %rdi
callq 0x7680
movq 0xded0(%rip), %rax      # 0x15280
movq %rax, -0x978(%rbp)
leaq 0x7db7(%rip), %rsi      # 0xf175
leaq -0x560(%rbp), %rdi
movl $0x18, %edx
callq 0xa680
leaq -0x708(%rbp), %rdi
movq %rdi, -0x970(%rbp)
xorl %esi, %esi
movl $0x198, %edx            # imm = 0x198
callq 0x3180
movq -0x970(%rbp), %rdi
callq 0xb9c0
movq -0x970(%rbp), %rdi
callq 0xb9f0
movq %rax, %rdi
movb $0x22, -0x709(%rbp)
leaq -0x709(%rbp), %rsi
callq 0xb980
movq %rax, -0x968(%rbp)
jmp 0x7420
movq -0x968(%rbp), %rdi
leaq 0x7f21(%rip), %rsi      # 0xf34f
callq 0xbe40
movq %rax, -0x980(%rbp)
jmp 0x743c
movq -0x980(%rbp), %rdi
leaq 0x81c9(%rip), %rsi      # 0xf613
callq 0xbb00
movq %rax, -0x988(%rbp)
jmp 0x7458
movq -0x988(%rbp), %rdi
callq 0xba00
movq %rax, -0x990(%rbp)
jmp 0x746d
movq -0x990(%rbp), %rsi
leaq -0x570(%rbp), %rdi
callq 0xb8c0
jmp 0x7482
movq -0x978(%rbp), %rdi
leaq -0x560(%rbp), %rsi
movl $0x37, %edx
leaq -0x570(%rbp), %rcx
callq 0x3130
jmp 0x74a3
leaq -0x708(%rbp), %rdi
callq 0xba50
leaq -0x1cd(%rbp), %rdi
callq 0xbe90
movq 0xddbe(%rip), %rax      # 0x15280
movq %rax, -0x9a8(%rbp)
leaq 0x7ca5(%rip), %rsi      # 0xf175
leaq -0x720(%rbp), %rdi
movl $0x18, %edx
callq 0xa680
leaq -0x8c8(%rbp), %rdi
movq %rdi, -0x9a0(%rbp)
xorl %esi, %esi
movl $0x198, %edx            # imm = 0x198
callq 0x3180
movq -0x9a0(%rbp), %rdi
callq 0xb9c0
movq -0x9a0(%rbp), %rdi
callq 0xb9f0
movq %rax, %rdi
movb $0x22, -0x8c9(%rbp)
leaq -0x8c9(%rbp), %rsi
callq 0xb980
movq %rax, -0x998(%rbp)
jmp 0x7532
movq -0x998(%rbp), %rdi
leaq 0x7e0f(%rip), %rsi      # 0xf34f
callq 0xbe40
movq %rax, -0x9b0(%rbp)
jmp 0x754e
movq -0x9b0(%rbp), %rdi
leaq 0x80ca(%rip), %rsi      # 0xf626
callq 0xb920
movq %rax, -0x9b8(%rbp)
jmp 0x756a
movq -0x9b8(%rbp), %rdi
callq 0xba00
movq %rax, -0x9c0(%rbp)
jmp 0x757f
movq -0x9c0(%rbp), %rsi
leaq -0x730(%rbp), %rdi
callq 0xb8c0
jmp 0x7594
movq -0x9a8(%rbp), %rdi
leaq -0x720(%rbp), %rsi
movl $0x37, %edx
leaq -0x730(%rbp), %rcx
callq 0x3130
jmp 0x75b5
leaq -0x8c8(%rbp), %rdi
callq 0xba50
addq $0x9c0, %rsp            # imm = 0x9C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0xba50
jmp 0x7668
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x388(%rbp), %rdi
callq 0xba50
jmp 0x7668
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x548(%rbp), %rdi
callq 0xba50
jmp 0x7668
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x708(%rbp), %rdi
callq 0xba50
jmp 0x7668
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0xba50
movq -0x1c8(%rbp), %rdi
callq 0x3260
nopw %cs:(%rax,%rax)