// File: romkatv[P]hcproxy/src/event_loop.cc
// Function: hcproxy::EventLoop::Schedule(std::function<void ()>)
void EventLoop::Schedule(std::function<void()> f) {
  CHECK(f);
  CHECK(std::this_thread::get_id() != loop_.get_id());
  auto* p = new std::function<void()>(std::move(f));
  CHECK(write(pipe_[1], &p, sizeof(p)) == sizeof(p)) << Errno();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rsi, -0xc8(%rbp)
movq %rdi, %rax
movq -0xc8(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
callq 0x26250
movb $0x0, -0x31(%rbp)
testb $0x1, %al
jne 0x33675
jmp 0x3367a
jmp 0x33700
leaq 0xb1d5b(%rip), %rsi     # 0xe53dc
leaq -0x30(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movl $0x54, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0xd8(%rbp), %rdi
movb $0x1, -0x31(%rbp)
callq 0x194e0
movq %rax, -0xd0(%rbp)
jmp 0x336b4
movq -0xd0(%rbp), %rdi
leaq 0xb2e86(%rip), %rsi     # 0xe6548
callq 0x1bb10
movq %rax, -0xe0(%rbp)
jmp 0x336d0
movq -0xe0(%rbp), %rdi
leaq 0xb5cad(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0xe8(%rbp)
jmp 0x336ec
movq -0xe8(%rbp), %rsi
leaq -0x45(%rbp), %rdi
callq 0x194f0
jmp 0x336fe
jmp 0x33700
testb $0x1, -0x31(%rbp)
jne 0x33708
jmp 0x3372c
leaq -0x30(%rbp), %rdi
callq 0x19500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x337fc
jmp 0x33805
callq 0x342e0
movq -0xb8(%rbp), %rdi
movq %rax, -0x50(%rbp)
addq $0x50, %rdi
callq 0x34310
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x34360
movb $0x0, -0x79(%rbp)
testb $0x1, %al
jne 0x33760
jmp 0x33765
jmp 0x337eb
leaq 0xb1c70(%rip), %rsi     # 0xe53dc
leaq -0x78(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
movl $0x55, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0xf8(%rbp), %rdi
movb $0x1, -0x79(%rbp)
callq 0x194e0
movq %rax, -0xf0(%rbp)
jmp 0x3379f
movq -0xf0(%rbp), %rdi
leaq 0xb1cc7(%rip), %rsi     # 0xe5474
callq 0x34330
movq %rax, -0x100(%rbp)
jmp 0x337bb
movq -0x100(%rbp), %rdi
leaq 0xb5bc2(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x108(%rbp)
jmp 0x337d7
movq -0x108(%rbp), %rsi
leaq -0x7a(%rbp), %rdi
callq 0x194f0
jmp 0x337e9
jmp 0x337eb
testb $0x1, -0x79(%rbp)
jne 0x337f3
jmp 0x33825
leaq -0x78(%rbp), %rdi
callq 0x19500
leaq -0x30(%rbp), %rdi
callq 0x19500
jmp 0x3397b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x79(%rbp)
jne 0x33942
jmp 0x3394b
movl $0x20, %edi
callq 0x35bb0
movq -0xc0(%rbp), %rsi
movq %rax, %rdi
movq %rdi, -0x110(%rbp)
callq 0x26180
movq -0x110(%rbp), %rcx
movq -0xb8(%rbp), %rax
movq %rcx, -0x88(%rbp)
movl 0x4(%rax), %edi
leaq -0x88(%rbp), %rsi
movl $0x8, %edx
callq 0x158a0
movb $0x0, -0xa9(%rbp)
cmpq $0x8, %rax
jne 0x33880
jmp 0x3392b
leaq 0xb1b55(%rip), %rsi     # 0xe53dc
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x120(%rbp)
movl $0x57, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0x120(%rbp), %rdi
movb $0x1, -0xa9(%rbp)
callq 0x194e0
movq %rax, -0x118(%rbp)
jmp 0x338c0
movq -0x118(%rbp), %rdi
leaq 0xb1bd3(%rip), %rsi     # 0xe54a1
callq 0x343a0
movq %rax, -0x128(%rbp)
jmp 0x338dc
movq -0x128(%rbp), %rdi
leaq 0xb5aa1(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x130(%rbp)
jmp 0x338f8
callq 0x1c0c0
jmp 0x338ff
movq -0x130(%rbp), %rdi
callq 0x1c050
movq %rax, -0x138(%rbp)
jmp 0x33914
movq -0x138(%rbp), %rsi
leaq -0xac(%rbp), %rdi
callq 0x194f0
jmp 0x33929
jmp 0x3392b
testb $0x1, -0xa9(%rbp)
jne 0x33936
jmp 0x33964
leaq -0xa8(%rbp), %rdi
callq 0x19500
leaq -0x78(%rbp), %rdi
callq 0x19500
jmp 0x3397b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0xa9(%rbp)
jne 0x3396d
jmp 0x33979
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0xa8(%rbp), %rdi
callq 0x19500
jmp 0x3397b
movq -0x40(%rbp), %rdi
callq 0xe1080
nopw %cs:(%rax,%rax)