// File: /workspace/github_cpp_makefile_star2_O1/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 0xfa6b
cmpl $0x1, %esi
je 0xfb4f
testl %esi, %esi
jne 0xfb43
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x34567(%rip), %rdi     # 0x43fe0
callq 0xb580
leaq 0x1dfc6(%rip), %rsi     # 0x2da4b
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 0x1b3c4
movq (%r15), %rdi
callq 0x1cbbe
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 0x32c2b(%rip), %rax     # 0x42701
movq %rax, (%rdi)
movq %r15, %rsi
callq 0x206d2
leaq 0x20(%rsp), %rdi
callq 0x2069a
addq $0xa0, %r12
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x1fa1a
leaq 0x18(%rsp), %rdi
callq 0x1b136
movq %r15, %rdi
callq 0x2069a
leaq 0x40(%rsp), %rdi
callq 0x1b156
addq $0x70, %rbx
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x25098
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xfb43
callq 0x1a96e
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x34483(%rip), %rdi     # 0x43fe0
callq 0xb580
leaq 0x1deec(%rip), %rsi     # 0x2da55
movl $0x9, %edx
movq %rax, %rdi
callq 0xb580
leaq 0x70(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2531a
addq $0x78, %rbx
cmpq %rbx, %rax
je 0xfbb4
movq %rax, %r14
movq 0x40(%rax), %rdi
addq $0x20, %rdi
callq 0x253a4
movq %r15, %rdi
movq %r14, %rsi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x25592
movq 0x34425(%rip), %rdi     # 0x43fe0
leaq 0x1de9d(%rip), %rsi     # 0x2da5f
movl $0xe, %edx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb580
movq %rax, %rbx
jmp 0xfbe9
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2069a
movq %r15, %rdi
callq 0x2069a
leaq 0x40(%rsp), %rdi
callq 0x1b156
jmp 0xfc00
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xfc0f
callq 0x1a96e
movq %rbx, %rdi
callq 0xb860
nop