// File: /workspace/github_cpp_makefile_star2_O3/sweeterthancandy[P]linux_event_debugger/linux_events.cpp
// Function: (anonymous namespace)::driver::process_event_((anonymous namespace)::tag, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void process_event_(tag t, std::string const& dir){
                switch(t){
                        case tag_existing:
                        case tag_created:{
                                std::cerr << dir << " created\n";
                                auto sptr = std::make_shared<event_monitor>(io_, dir);
                                sptr->start();
                                sptr->connect( [this](std::string const& dev, const struct input_event& ev){
                                       pretty_print_(dev, ev);
                                });
                                monitors_.emplace(dir, sptr);
                                break;
                        }
                        case tag_deleted:{
                                std::cerr << dir << " deleted\n";
                                auto iter = monitors_.find(dir);
                                if( iter == monitors_.end()){
                                        std::cerr << "can't find it\n";
                                        break;
                                }
                                iter->second->stop();
                                monitors_.erase(iter);
                                break;
                        }
                }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0x2, %esi
je 0xfae9
cmpl $0x1, %esi
je 0xfbcd
testl %esi, %esi
jne 0xfbc1
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x334f1(%rip), %rdi     # 0x42fe8
callq 0xb580
leaq 0x1cf48(%rip), %rsi     # 0x2ca4b
movl $0x9, %edx
movq %rax, %rdi
callq 0xb580
movq %rsp, %r15
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1b078
movq (%r15), %rdi
callq 0x1c7e6
movq (%rsp), %r12
leaq 0x58(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r15)
movaps %xmm0, -0x18(%r15)
leaq 0x20(%rsp), %rdi
movq %rbx, 0x8(%rdi)
leaq 0x31c7d(%rip), %rax     # 0x417d1
movq %rax, (%rdi)
movq %r15, %rsi
callq 0x20126
leaq 0x20(%rsp), %rdi
callq 0x200ee
addq $0xa0, %r12
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x1f4aa
leaq 0x18(%rsp), %rdi
callq 0x1ae08
movq %r15, %rdi
callq 0x200ee
leaq 0x40(%rsp), %rdi
callq 0x1ae28
addq $0x70, %rbx
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24cda
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xfbc1
callq 0x1a652
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x3340d(%rip), %rdi     # 0x42fe8
callq 0xb580
leaq 0x1ce6e(%rip), %rsi     # 0x2ca55
movl $0x9, %edx
movq %rax, %rdi
callq 0xb580
leaq 0x70(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x24f5c
addq $0x78, %rbx
cmpq %rbx, %rax
je 0xfc32
movq %rax, %r14
movq 0x40(%rax), %rdi
addq $0x20, %rdi
callq 0x24fe6
movq %r15, %rdi
movq %r14, %rsi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x251ae
movq 0x333af(%rip), %rdi     # 0x42fe8
leaq 0x1ce1f(%rip), %rsi     # 0x2ca5f
movl $0xe, %edx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb580
movq %rax, %rbx
jmp 0xfc67
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x200ee
movq %r15, %rdi
callq 0x200ee
leaq 0x40(%rsp), %rdi
callq 0x1ae28
jmp 0xfc7e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xfc8d
callq 0x1a652
movq %rbx, %rdi
callq 0xb860
nop