// File: /workspace/github_cpp_makefile_star2_O2/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 0xe467
cmpl $0x1, %esi
je 0xe529
testl %esi, %esi
jne 0xe51d
movq 0x34b72(%rip), %rdi     # 0x42fe0
movq %r14, %rsi
callq 0xb4b0
leaq 0x198a4(%rip), %rsi     # 0x27d21
movq %rax, %rdi
callq 0xb510
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x17af0
movq (%r15), %rdi
callq 0x190da
movq (%rsp), %r15
leaq 0x58(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r12)
movaps %xmm0, -0x18(%r12)
leaq 0x20(%rsp), %rdi
movq %rbx, 0x8(%rdi)
leaq 0x331bb(%rip), %rax     # 0x41681
movq %rax, (%rdi)
movq %r12, %rsi
callq 0x1c56a
leaq 0x20(%rsp), %rdi
callq 0x1c55a
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movq %r15, %rsi
callq 0x17b12
leaq 0x18(%rsp), %rdi
callq 0x177c6
leaq 0x40(%rsp), %rdi
callq 0x17b2a
addq $0x70, %rbx
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20406
leaq 0x8(%rsp), %rdi
callq 0x16e76
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x34ab0(%rip), %rdi     # 0x42fe0
movq %r14, %rsi
callq 0xb4b0
leaq 0x197ec(%rip), %rsi     # 0x27d2b
movq %rax, %rdi
callq 0xb510
leaq 0x70(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x20696
addq $0x78, %rbx
cmpq %rbx, %rax
je 0xe585
movq %rax, %r14
movq 0x40(%rax), %rdi
addq $0x20, %rdi
callq 0x2070c
movq %r15, %rdi
movq %r14, %rsi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x20882
movq 0x34a54(%rip), %rdi     # 0x42fe0
leaq 0x197a2(%rip), %rsi     # 0x27d35
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb510
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x17b2a
jmp 0xe5d6
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1c55a
movq %r12, %rdi
callq 0x1c55a
leaq 0x40(%rsp), %rdi
callq 0x177fc
jmp 0xe5d6
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x16e76
movq %rbx, %rdi
callq 0xb900