// File: /workspace/github_cpp_makefile_star2_O1/sweeterthancandy[P]linux_event_debugger/linux_events.cpp
// Function: (anonymous namespace)::directory_monitor::start_read()
void start_read(){
                timer_.expires_from_now(boost::posix_time::milliseconds(50));
                timer_.async_wait( [this](boost::system::error_code ec){
                        FD_ZERO ( &descriptors );
                        FD_SET ( fd, &descriptors );
                         
                                 
                        int return_value = select ( fd + 1, &descriptors, NULL, NULL, &time_to_wait);
                         
                        if ( return_value < 0 ) {
                                perror("select");
                        }
                        else if ( ! return_value ) {
                        }
                        else if ( FD_ISSET ( fd, &descriptors ) ) {
                                char buffer[BUF_LEN];
                                int length = read( fd, buffer, BUF_LEN );  

                                if ( length < 0 ) {
                                        perror( "read" );
                                }  

                                for(int i=0;  i < length ; ) {
                                        struct inotify_event *event = ( struct inotify_event * ) &buffer[ i ];
                                        if ( event->len ) {
                                                if ( event->mask & IN_CREATE ) {
                                                        if ( ! (event->mask & IN_ISDIR ) ) {
                                                                sig_(tag_created, dir_ + "/" + event->name); 
                                                        }
                                                }
                                                else if ( event->mask & IN_DELETE ) {
                                                        if ( ! ( event->mask & IN_ISDIR ) ) {
                                                                sig_(tag_deleted, dir_+ "/" + event->name); 
                                                        }
                                                }
                                        }
                                        i += EVENT_SIZE + event->len;
                                }
                        }

                        if( running_ ){
                                start_read();
                        }
                });
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
addq $0x40, %rdi
leaq 0x8(%rsp), %r13
movq $0xc350, (%r13)         # imm = 0xC350
movq %r13, %rsi
callq 0x255d0
leaq 0x20(%rsp), %rax
movq %rbx, (%rax)
movq 0x40(%rbx), %r15
leaq 0x48(%rbx), %r14
leaq 0x80(%rbx), %r12
movq %rax, (%r13)
movq %fs:-0x8, %rax
xorl %ebp, %ebp
testq %rax, %rax
je 0x105d5
movq 0x8(%rax), %rdi
jmp 0x105d7
xorl %edi, %edi
movl $0x60, %esi
callq 0x1704a
movq %rax, %r13
movq %rax, 0x10(%rsp)
movq %rbp, 0x18(%rsp)
movq %rbp, (%rax)
leaq 0x9a(%rip), %rax        # 0x10692
movq %rax, 0x8(%r13)
movl %ebp, 0x10(%r13)
movl %ebp, 0x18(%r13)
movb $0x0, 0x1c(%r13)
leaq 0x312d0(%rip), %rax     # 0x418e0
movq %rax, 0x20(%r13)
movq 0x20(%rsp), %rax
movq %rax, 0x28(%r13)
leaq 0x30(%r13), %rdi
movq %r12, %rsi
callq 0x1d9f6
movq %r13, 0x18(%rsp)
movb $0x1, 0x50(%rbx)
movq 0x68(%r15), %rdi
addq $0x28, %r15
addq $0x58, %rbx
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r13, %r8
callq 0x257a4
leaq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x8(%rsp), %rdi
callq 0x1089c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1068a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1089c
movq %rbx, %rdi
callq 0xb860
movq %rax, %rdi
callq 0x11b61