// File: romkatv[P]hcproxy/src/event_loop.cc
// Function: hcproxy::EventLoop::Add(hcproxy::EventHandler*, int)
void EventLoop::Add(EventHandler* eh, int events) {
  CHECK(eh);
  CHECK(!eh->event_loop_);
  CHECK(std::this_thread::get_id() == loop_.get_id());
  eh->IncRef();
  eh->event_loop_ = this;
  eh->deadline_ = Clock::now() + timeout_;
  expire_.AddTail(eh);
  epoll_.Add(eh->fd_, events, eh);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, -0x39(%rbp)
cmpq $0x0, %rax
je 0x32c24
jmp 0x32caa
leaq 0xb27b1(%rip), %rsi     # 0xe53dc
leaq -0x38(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movl $0x38, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0xd8(%rbp), %rdi
movb $0x1, -0x39(%rbp)
callq 0x194e0
movq %rax, -0xd0(%rbp)
jmp 0x32c5e
movq -0xd0(%rbp), %rdi
leaq 0xb27af(%rip), %rsi     # 0xe541b
callq 0x19450
movq %rax, -0xe0(%rbp)
jmp 0x32c7a
movq -0xe0(%rbp), %rdi
leaq 0xb6703(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0xe8(%rbp)
jmp 0x32c96
movq -0xe8(%rbp), %rsi
leaq -0x4d(%rbp), %rdi
callq 0x194f0
jmp 0x32ca8
jmp 0x32caa
testb $0x1, -0x39(%rbp)
jne 0x32cb2
jmp 0x32cd6
leaq -0x38(%rbp), %rdi
callq 0x19500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x39(%rbp)
jne 0x32d84
jmp 0x32d8d
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movb $0x0, -0x71(%rbp)
cmpq $0x0, %rax
jne 0x32ced
jmp 0x32d73
leaq 0xb26e8(%rip), %rsi     # 0xe53dc
leaq -0x70(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
movl $0x39, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0xf8(%rbp), %rdi
movb $0x1, -0x71(%rbp)
callq 0x194e0
movq %rax, -0xf0(%rbp)
jmp 0x32d27
movq -0xf0(%rbp), %rdi
leaq 0xb26e9(%rip), %rsi     # 0xe541e
callq 0x19650
movq %rax, -0x100(%rbp)
jmp 0x32d43
movq -0x100(%rbp), %rdi
leaq 0xb663a(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x108(%rbp)
jmp 0x32d5f
movq -0x108(%rbp), %rsi
leaq -0x72(%rbp), %rdi
callq 0x194f0
jmp 0x32d71
jmp 0x32d73
testb $0x1, -0x71(%rbp)
jne 0x32d7b
jmp 0x32dad
leaq -0x70(%rbp), %rdi
callq 0x19500
leaq -0x38(%rbp), %rdi
callq 0x19500
jmp 0x32f9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x71(%rbp)
jne 0x32e95
jmp 0x32e9e
callq 0x342e0
movq -0xc8(%rbp), %rdi
movq %rax, -0x80(%rbp)
addq $0x50, %rdi
callq 0x34310
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x27c50
movb $0x0, -0xa9(%rbp)
testb $0x1, %al
jne 0x32dea
jmp 0x32def
jmp 0x32e7e
leaq 0xb25e6(%rip), %rsi     # 0xe53dc
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x118(%rbp)
movl $0x3a, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0x118(%rbp), %rdi
movb $0x1, -0xa9(%rbp)
callq 0x194e0
movq %rax, -0x110(%rbp)
jmp 0x32e2f
movq -0x110(%rbp), %rdi
leaq 0xb25f2(%rip), %rsi     # 0xe542f
callq 0x34330
movq %rax, -0x120(%rbp)
jmp 0x32e4b
movq -0x120(%rbp), %rdi
leaq 0xb6532(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x128(%rbp)
jmp 0x32e67
movq -0x128(%rbp), %rsi
leaq -0xaa(%rbp), %rdi
callq 0x194f0
jmp 0x32e7c
jmp 0x32e7e
testb $0x1, -0xa9(%rbp)
jne 0x32e89
jmp 0x32ec1
leaq -0xa8(%rbp), %rdi
callq 0x19500
leaq -0x70(%rbp), %rdi
callq 0x19500
jmp 0x32f9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0xa9(%rbp)
jne 0x32f8d
jmp 0x32f99
movq -0x10(%rbp), %rdi
callq 0x31860
movq -0xc8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
callq 0x3ef20
movq -0xc8(%rbp), %rsi
movq %rax, -0xc0(%rbp)
addq $0x48, %rsi
leaq -0xc0(%rbp), %rdi
callq 0x217f0
movq %rax, %rcx
movq -0xc8(%rbp), %rax
movq %rcx, -0xb8(%rbp)
movq -0x10(%rbp), %rcx
movq -0xb8(%rbp), %rdx
movq %rdx, 0x20(%rcx)
addq $0x38, %rax
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x138(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x130(%rbp)
je 0x32f53
movq -0x138(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x130(%rbp)
movq -0x140(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0x18560
movq -0xc8(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rcx
callq 0x2c080
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0xa8(%rbp), %rdi
callq 0x19500
jmp 0x32f9b
movq -0x48(%rbp), %rdi
callq 0xe1080
nopw %cs:(%rax,%rax)