// File: istellartech[P]OpenTsiolkovsky/src/../lib/csv.h
// Function: io::detail::AsynchronousReader::init(std::unique_ptr<io::ByteSourceBase, std::default_delete<io::ByteSourceBase>>)
void init(std::unique_ptr<ByteSourceBase>arg_byte_source){
                                std::unique_lock<std::mutex>guard(lock);
                                byte_source = std::move(arg_byte_source);
                                desired_byte_count = -1;
                                termination_requested = false;
                                worker = std::thread(
                                        [&]{
                                                std::unique_lock<std::mutex>guard(lock);
                                                try{
                                                        for(;;){
                                                                read_requested_condition.wait(
                                                                        guard, 
                                                                        [&]{
                                                                                return desired_byte_count != -1 || termination_requested;
                                                                        }
                                                                );
                                                                if(termination_requested)
                                                                        return;

                                                                read_byte_count = byte_source->read(buffer, desired_byte_count);
                                                                desired_byte_count = -1;
                                                                if(read_byte_count == 0)
                                                                        break;
                                                                read_finished_condition.notify_one();
                                                        }
                                                }catch(...){
                                                        read_error = std::current_exception();
                                                }
                                                read_finished_condition.notify_one();
                                        }
                                );
                        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x48(%rbp)
addq $0x30, %rsi
leaq -0x20(%rbp), %rdi
callq 0x3eaf0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x3f980
movq -0x48(%rbp), %rax
movl $0xffffffff, 0x28(%rax) # imm = 0xFFFFFFFF
movb $0x0, 0x10(%rax)
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3f9b0
jmp 0x3f8a8
movq -0x48(%rbp), %rdi
addq $0x8, %rdi
leaq -0x28(%rbp), %rsi
callq 0x3fa70
leaq -0x28(%rbp), %rdi
callq 0x3eba0
leaq -0x20(%rbp), %rdi
callq 0x3eb30
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3eb30
movq -0x38(%rbp), %rdi
callq 0x67a0
nop