LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/svftoserial.cpp
// Function: hexstrToBinstr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string hexstrToBinstr(string hex)	// Funzione di conversione stringa esadecimale in stringa binaria
{
		string bin;

		for(unsigned k = 0; k != hex.length(); ++k)
		{
			bin += hexCharToBin(hex[k]);
		}

		return bin;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rsi, -0x60(%rbp)
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x33a0
movl $0x0, -0x18(%rbp)
movq -0x60(%rbp), %rdi
movl -0x18(%rbp), %eax
movq %rax, -0x68(%rbp)
callq 0x3410
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
je 0x8f49
movq -0x60(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0x3540
movq %rax, -0x70(%rbp)
jmp 0x8eef
movq -0x70(%rbp), %rax
movsbl (%rax), %esi
leaq -0x38(%rbp), %rdi
callq 0x8940
jmp 0x8f01
movq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3380
jmp 0x8f10
leaq -0x38(%rbp), %rdi
callq 0x3190
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8ebf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x8f66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3190
jmp 0x8f66
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x8f5c
movq -0x58(%rbp), %rdi
callq 0x3190
movq -0x50(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3190
movq -0x40(%rbp), %rdi
callq 0x34a0
nopl (%rax,%rax)
// File: Smattr[P]ibpf/interpreter.cpp
// Function: Machine::decode(char const*)
Instruction Machine::decode(const char *data) {
    Instruction i;
    i.opcode = static_cast<uint16_t>(data[0]) | (static_cast<uint16_t>(data[1]) << 8);
    i.jt = data[2];
    i.jf = data[3];
    i.k = static_cast<uint32_t>(data[0]) |
          (static_cast<uint32_t>(data[1]) << 8) |
          (static_cast<uint32_t>(data[2]) << 16) |
          (static_cast<uint32_t>(data[3]) << 24);
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x6(%rbp)
movq -0x18(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x5(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movsbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movsbl 0x3(%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Smattr[P]ibpf/interpreter.cpp
// Function: Machine::run(std::vector<char, std::allocator<char>>)
void Machine::run(const std::vector<char> program) {

    if (program.size() % INSTRUCTION_SIZE != 0) 
        throw MisalignedProgram();

    Instruction i;
    do {
        if (pc >= program.size() / INSTRUCTION_SIZE)
            throw ProgramCounterOutOfRange();

        i = decode(program.data() + pc * INSTRUCTION_SIZE);

    } while (!apply(i));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, %rax
movq -0x48(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x3db0
andq $0x7, %rax
cmpq $0x0, %rax
je 0x3572
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
callq 0x43d0
jmp 0x3541
movq -0x50(%rbp), %rdi
leaq 0x66ec(%rip), %rsi      # 0x9c38
leaq 0xebd(%rip), %rdx       # 0x4410
callq 0x2270
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x2100
jmp 0x362a
jmp 0x3574
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x58(%rbp)
callq 0x3db0
movq %rax, %rcx
movq -0x58(%rbp), %rax
shrq $0x3, %rcx
cmpq %rcx, %rax
jb 0x35e1
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
callq 0x4430
jmp 0x35b3
movq -0x60(%rbp), %rdi
leaq 0x6692(%rip), %rsi      # 0x9c50
leaq 0xeab(%rip), %rdx       # 0x4470
callq 0x2270
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x2100
jmp 0x362a
movq -0x40(%rbp), %rdi
callq 0x3d90
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movl 0x4(%rdi), %eax
shll $0x3, %eax
movl %eax, %eax
addq %rax, %rsi
callq 0x3470
movq %rax, -0x2c(%rbp)
movq -0x2c(%rbp), %rax
movq %rax, -0x24(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x2480
xorb $-0x1, %al
testb $0x1, %al
jne 0x3574
addq $0x60, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x2280
nopw %cs:(%rax,%rax)
// File: Smattr[P]ibpf/interpreter.cpp
// Function: read_file(char const*)
std::vector<char> read_file(const char *filename) {
    std::ifstream s(filename, std::ios::in|std::ios::binary);
    if (!s.is_open())
        throw std::runtime_error("failed to open file");

    std::vector<char> data((std::istreambuf_iterator<char>(s)),
        (std::istreambuf_iterator<char>()));
    
    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x270(%rbp)
movq %rdi, %rax
movq %rax, -0x268(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x260(%rbp)
movl $0x8, %edi
movl $0x4, %esi
callq 0x4490
movq -0x260(%rbp), %rsi
movl %eax, %edx
leaq -0x218(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x22a0
movq -0x258(%rbp), %rdi
callq 0x2220
movb %al, -0x24a(%rbp)
jmp 0x36ae
movb -0x24a(%rbp), %al
testb $0x1, %al
jne 0x373c
jmp 0x36be
movl $0x10, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x278(%rbp)
leaq 0x2cfb(%rip), %rsi      # 0x63d7
callq 0x2070
jmp 0x36e3
movq -0x278(%rbp), %rdi
movq 0x68ff(%rip), %rsi      # 0x9ff0
movq 0x68b8(%rip), %rdx      # 0x9fb0
callq 0x2270
jmp 0x3823
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x380b
movq -0x278(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
callq 0x2100
jmp 0x380b
movb $0x0, -0x225(%rbp)
leaq -0x238(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x44b0
leaq -0x248(%rbp), %rdi
callq 0x4510
leaq -0x249(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x2290
movq -0x270(%rbp), %rdi
movq -0x280(%rbp), %r9
movq -0x238(%rbp), %rsi
movl -0x230(%rbp), %edx
movq -0x248(%rbp), %rcx
movl -0x240(%rbp), %r8d
callq 0x4540
jmp 0x37a5
leaq -0x249(%rbp), %rdi
callq 0x2170
movb $0x1, -0x225(%rbp)
testb $0x1, -0x225(%rbp)
jne 0x37ef
jmp 0x37e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x249(%rbp), %rdi
callq 0x2170
jmp 0x380b
movq -0x270(%rbp), %rdi
callq 0x45d0
leaq -0x218(%rbp), %rdi
callq 0x2040
movq -0x268(%rbp), %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
leaq -0x218(%rbp), %rdi
callq 0x2040
movq -0x220(%rbp), %rdi
callq 0x2280
nopw %cs:(%rax,%rax)
// File: Smattr[P]ibpf/interpreter.cpp
// Function: Register::operator+=(unsigned int const&)
Register &operator+= (const uint32_t &x) {
            if (!written)
                throw UndefinedRead(nullptr);
            value += x;
            return *this;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
testb $0x1, 0x4(%rax)
jne 0x3fab
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x4930
jmp 0x3f7d
movq -0x30(%rbp), %rdi
leaq 0x5d30(%rip), %rsi      # 0x9cb8
leaq 0x9e1(%rip), %rdx       # 0x4970
callq 0x2270
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x2100
jmp 0x3fbf
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x2280
nopl (%rax,%rax)
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::~timer_qheap()
timer_qheap::~timer_qheap() {
    if (this->tfd != -1) {
        ::close(this->tfd);
        this->tfd = -1;
    }
    for (const auto &v : this->qheap)
        delete v;
    this->qheap.clear();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x13d26(%rip), %rcx     # 0x29fb0
addq $0x10, %rcx
movq %rcx, (%rax)
cmpl $-0x1, 0x30(%rax)
je 0x162b2
movq 0x8(%rsp), %rax
movl 0x30(%rax), %edi
callq 0x16000
jmp 0x162a6
movq 0x8(%rsp), %rax
movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x15800
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x157c0
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x15c00
testb $0x1, %al
jne 0x162f3
jmp 0x1632b
leaq 0x20(%rsp), %rdi
callq 0x15230
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x1631d
movq (%rsp), %rdi
callq 0x15060
jmp 0x1631f
leaq 0x20(%rsp), %rdi
callq 0x15e90
jmp 0x162de
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
callq 0x14200
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
callq 0x15e10
movq 0x8(%rsp), %rdi
callq 0x15760
addq $0x38, %rsp
retq
movq %rax, %rdi
callq 0x16de0
nop
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::open()
int timer_qheap::open() {
    int fd = ::timerfd_create(CLOCK_BOOTTIME, TFD_NONBLOCK|TFD_CLOEXEC);
    if (fd == -1) {
        fprintf(stderr, "reactor: timerfd_create fail! %s\n", strerror(errno));
        return -1;
    }
    this->tfd = fd;
    return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x7, %edi
movl $0x80800, %esi          # imm = 0x80800
callq 0x15cf0
movl %eax, 0x14(%rsp)
cmpl $-0x1, 0x14(%rsp)
jne 0x163f6
movq 0x13c0c(%rip), %rax     # 0x29fd0
movq (%rax), %rax
movq %rax, (%rsp)
callq 0x140c0
movl (%rax), %edi
callq 0x144d0
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0xcc1b(%rip), %rsi      # 0x23000
movb $0x0, %al
callq 0x15860
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x1640a
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, 0x30(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::adjust_timerfd(long)
void timer_qheap::adjust_timerfd(int64_t delay /*millisecond*/) {
    struct timespec ts;
    ts.tv_sec = delay / 1000;
    ts.tv_nsec = delay % 1000 * 1000 * 1000;
    if (delay < 1)
        ts.tv_nsec = 1;
    struct itimerspec its;
    ::memset(&its, 0, sizeof(its));
    its.it_value = ts;
    ::timerfd_settime(this->tfd, 0 /*Relative time*/, &its, nullptr);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, 0x30(%rsp)
cmpq $0x1, 0x38(%rsp)
jge 0x1647e
movq $0x1, 0x30(%rsp)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x14900
movq (%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movl 0x30(%rax), %edi
xorl %esi, %esi
leaq 0x8(%rsp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x14d60
addq $0x48, %rsp
retq
nop
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::schedule(ev_handler*, int, int)
int timer_qheap::schedule(ev_handler *eh, const int delay, const int interval) {
    if (eh == nullptr)
        return -1;

    struct timeval tv;
    ::gettimeofday(&tv, nullptr);
    int64_t now = int64_t(tv.tv_sec) * 1000 + tv.tv_usec / 1000; // millisecond
    auto item = new timer_item();
    item->eh = eh;
    item->expire_at = now + delay;
    item->interval = interval;
    eh->set_timer(item);
    this->insert(item);

    auto min = this->qheap[0];
    if (min->expire_at != this->timerfd_settime) {
        this->adjust_timerfd(min->expire_at - now);
        this->timerfd_settime = min->expire_at;
    }
    return 0;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movl %edx, 0x4c(%rsp)
movl %ecx, 0x48(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x164f5
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x1660f
leaq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15ad0
imulq $0x3e8, 0x38(%rsp), %rax # imm = 0x3E8
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movl $0x18, %edi
callq 0x15120
movq %rax, %rdi
movq %rdi, 0x10(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x14900
movq 0x10(%rsp), %rdi
callq 0x15b60
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rcx
movslq 0x4c(%rsp), %rax
addq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x8(%rax)
movl 0x48(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x150b0
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x14fe0
movq 0x18(%rsp), %rdi
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15a10
movq 0x18(%rsp), %rcx
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
cmpq 0x38(%rcx), %rax
je 0x16607
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
subq 0x30(%rsp), %rsi
callq 0x14150
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x38(%rax)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax,%rax)
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::cancel(ev_handler*)
void timer_qheap::cancel(ev_handler *eh) {
    auto item = eh->get_timer();
    if (item == nullptr)
        return;
    item->eh = nullptr;
    item->expire_at = 1;
    eh->set_timer(nullptr);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x14420
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x16645
jmp 0x1666b
movq (%rsp), %rax
movq $0x0, 0x10(%rax)
movq (%rsp), %rax
movq $0x1, 0x8(%rax)
movq 0x8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x150b0
addq $0x18, %rsp
retq
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::shift_up(int)
void timer_qheap::shift_up(int idx) {
    auto item = this->qheap[idx];
    while (idx > 0
        && item->expire_at < this->qheap[get_parent_index(idx)]->expire_at) {
        this->qheap[idx] = this->qheap[get_parent_index(idx)];
        idx = get_parent_index(idx);
    }
    this->qheap[idx] = item;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x28(%rsp)
addq $0x40, %rdi
movslq 0x3c(%rsp), %rsi
callq 0x15a10
movq (%rax), %rax
movq %rax, 0x30(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x3c(%rsp)
movb %al, 0x27(%rsp)
jle 0x166ee
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
addq $0x40, %rdi
movl 0x3c(%rsp), %eax
subl $0x1, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movslq %eax, %rsi
callq 0x15a10
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq (%rcx), %rcx
cmpq 0x8(%rcx), %rax
setl %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x166f8
jmp 0x16753
movq 0x28(%rsp), %rdi
addq $0x40, %rdi
movl 0x3c(%rsp), %eax
subl $0x1, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movslq %eax, %rsi
callq 0x15a10
movq 0x28(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x10(%rsp)
addq $0x40, %rdi
movslq 0x3c(%rsp), %rsi
callq 0x15a10
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
movl 0x3c(%rsp), %eax
subl $0x1, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, 0x3c(%rsp)
jmp 0x1669d
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x40, %rdi
movslq 0x3c(%rsp), %rsi
callq 0x15a10
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
addq $0x48, %rsp
retq
nopl (%rax)
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::shift_down(int)
void timer_qheap::shift_down(int idx) {
    int min_child = 0;
    auto item = this->qheap[idx];
    while (true) {
        min_child = get_child_index(idx, 0);
        if (min_child >= static_cast<int>(this->qheap.size()))
            break;

        for (int i = 1; i < 4; ++i) {
            int child_idx = get_child_index(idx, i);
            if (child_idx < static_cast<int>(this->qheap.size())
                && this->qheap[child_idx]->expire_at < this->qheap[min_child]->expire_at)
                min_child = child_idx;
        }

        if (this->qheap[min_child]->expire_at >= item->expire_at)
            break;

        this->qheap[idx] = this->qheap[min_child];
        idx = min_child;
    }
    this->qheap[idx] = item;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl $0x0, 0x38(%rsp)
addq $0x40, %rdi
movslq 0x3c(%rsp), %rsi
callq 0x15a10
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %rdi
movl 0x3c(%rsp), %eax
shll $0x2, %eax
addl $0x0, %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
movl 0x38(%rsp), %eax
movl %eax, 0x1c(%rsp)
addq $0x40, %rdi
callq 0x159f0
movq %rax, %rcx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jl 0x167ec
jmp 0x168f9
movl $0x1, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x1688f
movq 0x20(%rsp), %rdi
movl 0x3c(%rsp), %eax
shll $0x2, %eax
addl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x18(%rsp)
addq $0x40, %rdi
callq 0x159f0
movq %rax, %rcx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0x1687d
movq 0x20(%rsp), %rdi
addq $0x40, %rdi
movslq 0x28(%rsp), %rsi
callq 0x15a10
movq 0x20(%rsp), %rdi
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
addq $0x40, %rdi
movslq 0x38(%rsp), %rsi
callq 0x15a10
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq (%rcx), %rcx
cmpq 0x8(%rcx), %rax
jge 0x1687d
movl 0x28(%rsp), %eax
movl %eax, 0x38(%rsp)
jmp 0x1687f
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x167f4
movq 0x20(%rsp), %rdi
addq $0x40, %rdi
movslq 0x38(%rsp), %rsi
callq 0x15a10
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x30(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jl 0x168b6
jmp 0x168f9
movq 0x20(%rsp), %rdi
addq $0x40, %rdi
movslq 0x38(%rsp), %rsi
callq 0x15a10
movq 0x20(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x8(%rsp)
addq $0x40, %rdi
movslq 0x3c(%rsp), %rsi
callq 0x15a10
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movl 0x38(%rsp), %eax
movl %eax, 0x3c(%rsp)
jmp 0x167b5
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
addq $0x40, %rdi
movslq 0x3c(%rsp), %rsi
callq 0x15a10
movq (%rsp), %rcx
movq %rcx, (%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::pop_min(long, long&)
timer_item* timer_qheap::pop_min(int64_t now, int64_t &delta) {
    if (this->qheap.empty())
        return nullptr;

    auto min = this->qheap[0];
    delta = min->expire_at - now;
    if (delta > 0)
        return nullptr;

    delta = 0;
    this->qheap[0] = this->qheap.back();
    this->qheap.pop_back();
    this->shift_down(0);

    return min;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x40, %rdi
callq 0x14170
testb $0x1, %al
jne 0x1695c
jmp 0x1696a
movq $0x0, 0x30(%rsp)
jmp 0x16a0e
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15a10
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rcx
subq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
jle 0x169b0
movq $0x0, 0x30(%rsp)
jmp 0x16a0e
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
addq $0x40, %rdi
callq 0x14760
movq 0x8(%rsp), %rdi
movq (%rax), %rax
movq %rax, (%rsp)
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15a10
movq (%rsp), %rcx
movq 0x8(%rsp), %rdi
movq %rcx, (%rax)
addq $0x40, %rdi
callq 0x15c30
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x148b0
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::handle_expired(long)
int64_t timer_qheap::handle_expired(int64_t now) {
    if (this->qheap.empty())
        return -1;

    int64_t delta = 0;
    while (true) {
        auto item = this->pop_min(now, delta);
        if (item == nullptr)
            break;

        if (item->eh == nullptr) { // canceled
            delete item;
            continue;
        }
        if (item->eh->on_timeout(now) == true && item->interval > 0) {
            item->expire_at = now + item->interval;
            this->insert(item);
        } else {
            item->eh->set_timer(nullptr);
            delete item;
        }
    }
    return delta;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x18(%rsp)
addq $0x40, %rdi
callq 0x14170
testb $0x1, %al
jne 0x16a47
jmp 0x16a55
movq $-0x1, 0x40(%rsp)
jmp 0x16b3b
movq $0x0, 0x28(%rsp)
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x152b0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x16a84
jmp 0x16b31
movq 0x20(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x16aac
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x16aaa
movq 0x10(%rsp), %rdi
callq 0x15060
jmp 0x16a5e
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x30(%rsp), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x16afe
movq 0x20(%rsp), %rax
cmpl $0x0, (%rax)
jle 0x16afe
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movslq (%rax), %rax
addq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rsi
callq 0x14fe0
jmp 0x16b2c
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x150b0
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x16b2a
movq 0x8(%rsp), %rdi
callq 0x15060
jmp 0x16b2c
jmp 0x16a5e
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: shaovie[P]reactor/src/timer_qheap.cpp
// Function: timer_qheap::on_read()
bool timer_qheap::on_read() {
    int64_t v = 0;
    int ret = 0;
    do {
        ret = ::read(this->tfd, &v, sizeof(v));
        if (ret == -1 && errno == EINTR)
            continue;
    } while (false); 

    struct timeval tv;
    ::gettimeofday(&tv, nullptr);
    int64_t now = int64_t(tv.tv_sec) * 1000 + tv.tv_usec / 1000; // millisecond
    auto delay = this->handle_expired(now);
    if (delay > 0)
        this->adjust_timerfd(delay);
    return true;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x8(%rsp), %rax
movl 0x30(%rax), %edi
leaq 0x38(%rsp), %rsi
movl $0x8, %edx
callq 0x15880
movl %eax, 0x34(%rsp)
cmpl $-0x1, 0x34(%rsp)
jne 0x16ba2
callq 0x140c0
cmpl $0x4, (%rax)
jne 0x16ba2
jmp 0x16ba4
jmp 0x16ba4
leaq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x15ad0
movq 0x8(%rsp), %rdi
imulq $0x3e8, 0x20(%rsp), %rax # imm = 0x3E8
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
callq 0x14b10
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jle 0x16c08
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x14150
movb $0x1, %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: shaovie[P]reactor/src/poller.cpp
// Function: poller::destroy()
void poller::destroy() {
    if (this->efd == -1) {
        ::close(this->efd);
        this->efd = -1;
    }
    if (this->poll_descs != nullptr) {
        delete this->poll_descs;
        this->poll_descs = nullptr;
    }
    if (this->ready_events != nullptr) {
        delete[] this->ready_events;
        this->ready_events = nullptr;
    }
    if (this->io_buf != nullptr) {
        delete[] this->io_buf;
        this->io_buf = nullptr;
    }
    if (this->timer != nullptr) {
        delete this->timer;
        this->timer = nullptr;
    }
    if (this->async_sendq != nullptr) {
        delete this->async_sendq;
        this->async_sendq = nullptr;
    }
    if (this->poll_sync_opterate != nullptr) {
        delete this->poll_sync_opterate;
        this->poll_sync_opterate = nullptr;
    }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpl $-0x1, 0x4(%rax)
jne 0x182c2
movq 0x38(%rsp), %rax
movl 0x4(%rax), %edi
callq 0x16000
movq 0x38(%rsp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movq 0x38(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x18303
movq 0x38(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x182f6
movq 0x30(%rsp), %rdi
callq 0x15240
movq 0x30(%rsp), %rdi
callq 0x15060
movq 0x38(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1833a
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x1832d
movq 0x28(%rsp), %rdi
callq 0x155c0
movq 0x38(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x18371
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x18364
movq 0x20(%rsp), %rdi
callq 0x155c0
movq 0x38(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x183a9
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x1839c
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x38(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x183e1
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x183d4
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x38(%rsp), %rax
movq $0x0, 0x28(%rax)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x18419
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x1840c
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x38(%rsp), %rax
movq $0x0, 0x38(%rax)
addq $0x48, %rsp
retq
nop
// File: shaovie[P]reactor/src/poller.cpp
// Function: poller::add(ev_handler*, int, unsigned int)
int poller::add(ev_handler *eh, const int fd, const uint32_t ev) {
    eh->set_poller(this);
    int64_t seq = this->seq.fetch_add(1, std::memory_order_relaxed);
    eh->set_seq(seq);
    auto pd = this->poll_descs->new_one(fd);
    pd->fd = fd;
    pd->eh = eh;
    pd->events = ev;
    pd->seq = seq;
    this->poll_descs->store(fd, pd);

    struct epoll_event epev;
    epev.events = ev;
    epev.data.ptr = pd;

    if (::epoll_ctl(this->efd, EPOLL_CTL_ADD, fd, &epev) == 0)
        return 0;
    this->poll_descs->del(fd);
    return -1;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movl %ecx, 0x40(%rsp)
movq 0x50(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0x14550
movq 0x8(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x80(%rsp)
movq $0x1, 0x78(%rsp)
movl $0x0, 0x74(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x74(%rsp), %eax
movq 0x78(%rsp), %rcx
movq %rcx, 0x68(%rsp)
decl %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0x4, %eax
ja 0x184ad
movq 0x18(%rsp), %rax
leaq 0xabc4(%rip), %rcx      # 0x23068
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rcx
movq 0x68(%rsp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, 0x60(%rsp)
jmp 0x18519
movq 0x10(%rsp), %rcx
movq 0x68(%rsp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, 0x60(%rsp)
jmp 0x18519
movq 0x10(%rsp), %rcx
movq 0x68(%rsp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, 0x60(%rsp)
jmp 0x18519
movq 0x10(%rsp), %rcx
movq 0x68(%rsp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, 0x60(%rsp)
jmp 0x18519
movq 0x10(%rsp), %rcx
movq 0x68(%rsp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x15ed0
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdi
movl 0x44(%rsp), %esi
callq 0x152d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x30(%rsp)
movl 0x44(%rsp), %edx
movq 0x30(%rsp), %rcx
movl %edx, (%rcx)
movq 0x48(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq %rdx, 0x10(%rcx)
movl 0x40(%rsp), %edx
movq 0x30(%rsp), %rcx
movl %edx, 0x4(%rcx)
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq %rdx, 0x8(%rcx)
movq 0x30(%rax), %rdi
movl 0x44(%rsp), %esi
movq 0x30(%rsp), %rdx
callq 0x15830
movq 0x8(%rsp), %rax
movl 0x40(%rsp), %ecx
movl %ecx, 0x24(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movl 0x4(%rax), %edi
movl 0x44(%rsp), %edx
movl $0x1, %esi
leaq 0x24(%rsp), %rcx
callq 0x15730
cmpl $0x0, %eax
jne 0x185d2
movl $0x0, 0x5c(%rsp)
jmp 0x185ec
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdi
movl 0x44(%rsp), %esi
callq 0x160d0
movl $0xffffffff, 0x5c(%rsp) # imm = 0xFFFFFFFF
movl 0x5c(%rsp), %eax
addq $0x88, %rsp
retq
nopl (%rax,%rax)
// File: shaovie[P]reactor/src/poller.cpp
// Function: poller::append(int, unsigned int)
int poller::append(const int fd, const uint32_t ev) {
    auto pd = this->poll_descs->load(fd);
    if (pd == nullptr)
        return -1;

    // Always save first, recover if failed  (this method is for multi-threading scenarios)."
    pd->events |= ev;
    
    struct epoll_event epev;
    epev.events = pd->events;
    epev.data.ptr = pd;
    if (::epoll_ctl(this->efd, EPOLL_CTL_MOD, fd, &epev) != 0) {
        pd->events &= ~ev;
        return -1;
    }

    return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x15600
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x186de
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x18746
movq (%rsp), %rax
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
orl 0x4(%rcx), %edx
movl %edx, 0x4(%rcx)
movq 0x18(%rsp), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, 0xc(%rsp)
movq 0x18(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movl 0x4(%rax), %edi
movl 0x24(%rsp), %edx
movl $0x3, %esi
leaq 0xc(%rsp), %rcx
callq 0x15730
cmpl $0x0, %eax
je 0x1873e
movl 0x20(%rsp), %ecx
xorl $-0x1, %ecx
movq 0x18(%rsp), %rax
andl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x18746
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: shaovie[P]reactor/src/poller.cpp
// Function: poller::remove(int, unsigned int)
int poller::remove(const int fd, const uint32_t ev) {
    if (ev == ev_handler::ev_all) {
        this->poll_descs->del(fd);
        return ::epoll_ctl(this->efd, EPOLL_CTL_DEL, fd, nullptr);
    }
    auto pd = this->poll_descs->load(fd);
    if (pd == nullptr)
        return -1;
    if ((pd->events & (~ev)) == 0) {
        this->poll_descs->del(fd);
        return ::epoll_ctl(this->efd, EPOLL_CTL_DEL, fd, nullptr);
    }

    // Always save first, recover if failed  (this method is for multi-threading scenarios)."
    pd->events &= (~ev);

    struct epoll_event epev;
    epev.events = pd->events;
    epev.data.ptr = pd;
    if (::epoll_ctl(this->efd, EPOLL_CTL_MOD, fd, &epev) != 0) {
        pd->events |= ev;
        return -1;
    }

    return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x2005, 0x20(%rsp)     # imm = 0x2005
jne 0x187a7
movq (%rsp), %rax
movq 0x30(%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x160d0
movq (%rsp), %rax
movl 0x4(%rax), %edi
movl 0x24(%rsp), %edx
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x15730
movl %eax, 0x34(%rsp)
jmp 0x18880
movq (%rsp), %rax
movq 0x30(%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x15600
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x187d2
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x18880
movq 0x18(%rsp), %rax
movl 0x4(%rax), %eax
movl 0x20(%rsp), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x18818
movq (%rsp), %rax
movq 0x30(%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x160d0
movq (%rsp), %rax
movl 0x4(%rax), %edi
movl 0x24(%rsp), %edx
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x15730
movl %eax, 0x34(%rsp)
jmp 0x18880
movq (%rsp), %rax
movl 0x20(%rsp), %edx
xorl $-0x1, %edx
movq 0x18(%rsp), %rcx
andl 0x4(%rcx), %edx
movl %edx, 0x4(%rcx)
movq 0x18(%rsp), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, 0xc(%rsp)
movq 0x18(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movl 0x4(%rax), %edi
movl 0x24(%rsp), %edx
movl $0x3, %esi
leaq 0xc(%rsp), %rcx
callq 0x15730
cmpl $0x0, %eax
je 0x18878
movl 0x20(%rsp), %ecx
movq 0x18(%rsp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x18880
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: shaovie[P]reactor/src/poller.cpp
// Function: poller::set_cpu_affinity()
void poller::set_cpu_affinity() {
    if (this->cpu_id == -1)
        return;
    cpu_set_t cpu_set;
    CPU_ZERO(&cpu_set);
    CPU_SET(this->cpu_id, &cpu_set);
    if (pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpu_set) != 0)
        fprintf(stderr, "reactor: set cpu affinity fail! %s\n", strerror(errno));
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $-0x1, (%rax)
jne 0x188b6
jmp 0x18972
jmp 0x188b8
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x14900
movq 0x18(%rsp), %rax
movslq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
shrq $0x3, %rax
cmpq $0x80, %rax
jae 0x18912
movq 0x28(%rsp), %rcx
andq $0x3f, %rcx
movl $0x1, %eax
shlq %cl, %rax
movq 0x28(%rsp), %rcx
shrq $0x6, %rcx
orq 0x30(%rsp,%rcx,8), %rax
movq %rax, 0x30(%rsp,%rcx,8)
movq %rax, 0x10(%rsp)
jmp 0x1891b
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x1891b
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x14f30
movq %rax, %rdi
movl $0x80, %esi
leaq 0x30(%rsp), %rdx
callq 0x15cb0
cmpl $0x0, %eax
je 0x18972
movq 0x11688(%rip), %rax     # 0x29fd0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x140c0
movl (%rax), %edi
callq 0x144d0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0xa7e8(%rip), %rsi      # 0x23153
movb $0x0, %al
callq 0x15860
addq $0xb8, %rsp
retq
nopw (%rax,%rax)
// File: shaovie[P]reactor/src/poll_desc.h
// Function: poll_desc_map::~poll_desc_map()
~poll_desc_map() {
        if (this->arr != nullptr)
            delete[] this->arr;
        this->mtx.lock();
        for (const auto &kv : this->map)
            delete kv.second;
        
        this->mtx.unlock();
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x8(%rax)
je 0x190ca
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x190c8
movq 0x10(%rsp), %rdi
callq 0x155c0
jmp 0x190ca
movq 0x18(%rsp), %rdi
addq $0x48, %rdi
callq 0x15f40
jmp 0x190da
movq 0x18(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x16060
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x14cc0
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x14ea0
testb $0x1, %al
jne 0x1911b
jmp 0x19156
leaq 0x30(%rsp), %rdi
callq 0x15b10
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x19148
movq 0x8(%rsp), %rdi
callq 0x15060
jmp 0x1914a
leaq 0x30(%rsp), %rdi
callq 0x15040
jmp 0x19106
movq 0x18(%rsp), %rdi
addq $0x48, %rdi
callq 0x157a0
jmp 0x19166
movq 0x18(%rsp), %rdi
addq $0x10, %rdi
callq 0x15d70
addq $0x48, %rsp
retq
movq %rax, %rdi
callq 0x16de0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: shaovie[P]reactor/src/poll_desc.h
// Function: poll_desc_map::store(int, poll_desc*)
inline void store(const int i, poll_desc *v) {
        if (i < this->arr_size)
            return;

        this->mtx.lock();
        this->map[i] = v;
        this->mtx.unlock();
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movl 0x1c(%rsp), %eax
cmpl (%rcx), %eax
jge 0x192a6
jmp 0x192e5
movq 0x8(%rsp), %rdi
addq $0x48, %rdi
callq 0x15f40
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
addq $0x10, %rdi
leaq 0x1c(%rsp), %rsi
callq 0x15940
movq (%rsp), %rcx
movq 0x8(%rsp), %rdi
movq %rcx, (%rax)
addq $0x48, %rdi
callq 0x157a0
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: shaovie[P]reactor/src/poll_desc.h
// Function: poll_desc_map::del(int)
void del(const int i) {
        if (i < this->arr_size) {
            poll_desc *p = &(this->arr[i]);
            p->events =  0;
            p->fd     = -1;
            p->seq    = -1;
            p->eh     = nullptr;
            return;
        }
        this->mtx.lock();
        auto ret = this->map.find(i);
        if (ret != this->map.end()) {
            delete ret->second;
            this->map.erase(ret);
        }
        this->mtx.unlock();
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movl 0x3c(%rsp), %eax
cmpl (%rcx), %eax
jge 0x1935f
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x3c(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movl $0x0, 0x4(%rax)
movq 0x30(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0x30(%rsp), %rax
movq $-0x1, 0x8(%rax)
movq 0x30(%rsp), %rax
movq $0x0, 0x10(%rax)
jmp 0x193fe
movq 0x8(%rsp), %rdi
addq $0x48, %rdi
callq 0x15f40
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x3c(%rsp), %rsi
callq 0x155e0
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
addq $0x10, %rdi
callq 0x14cc0
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x14ea0
testb $0x1, %al
jne 0x193ad
jmp 0x193f0
leaq 0x28(%rsp), %rdi
callq 0x15da0
movq 0x8(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x193ce
movq (%rsp), %rdi
callq 0x15060
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
callq 0x15bc0
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rdi
addq $0x48, %rdi
callq 0x157a0
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: shaovie[P]reactor/src/poll_desc.h
// Function: poll_desc_map::load(int)
inline poll_desc *load(const int i) {
        if (i < this->arr_size) {
            poll_desc *p = &(this->arr[i]);
            if (p->fd == -1)
                return nullptr;
            return p;
        }
        std::lock_guard<std::mutex> g(this->mtx);
        auto ret = this->map.find(i);
        if (ret != this->map.end())
            return ret->second;

        return nullptr;
    }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movq 0x58(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movl 0x54(%rsp), %eax
cmpl (%rcx), %eax
jge 0x19470
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x54(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
cmpl $-0x1, (%rax)
jne 0x19461
movq $0x0, 0x60(%rsp)
jmp 0x19521
movq 0x48(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x19521
movq 0x10(%rsp), %rsi
addq $0x48, %rsi
leaq 0x40(%rsp), %rdi
callq 0x152f0
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
leaq 0x54(%rsp), %rsi
callq 0x155e0
movq %rax, 0x8(%rsp)
jmp 0x1949d
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
addq $0x10, %rdi
callq 0x14cc0
movq %rax, 0x20(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x14ea0
testb $0x1, %al
jne 0x194cf
jmp 0x19506
leaq 0x38(%rsp), %rdi
callq 0x15da0
movq 0x8(%rax), %rax
movq %rax, 0x60(%rsp)
movl $0x1, 0x1c(%rsp)
jmp 0x19517
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x15aa0
jmp 0x1952b
movq $0x0, 0x60(%rsp)
movl $0x1, 0x1c(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x15aa0
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x15ce0
nopw %cs:(%rax,%rax)
nop
// File: shaovie[P]reactor/src/poll_sync_opt.cpp
// Function: poll_sync_opt::~poll_sync_opt()
poll_sync_opt::~poll_sync_opt() {
   if (this->efd != -1)
        ::close(this->efd);
    
   if (this->readq != nullptr)
       delete this->readq;
   if (this->writeq != nullptr)
       delete this->writeq;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xe686(%rip), %rcx      # 0x29fc0
addq $0x10, %rcx
movq %rcx, (%rax)
cmpl $-0x1, 0x30(%rax)
je 0x1b958
movq 0x18(%rsp), %rax
movl 0x30(%rax), %edi
callq 0x16000
jmp 0x1b956
jmp 0x1b958
movq 0x18(%rsp), %rax
cmpq $0x0, 0x68(%rax)
je 0x1b98e
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x1b98c
movq 0x10(%rsp), %rdi
callq 0x15720
movq 0x10(%rsp), %rdi
callq 0x15060
jmp 0x1b98e
movq 0x18(%rsp), %rax
cmpq $0x0, 0x70(%rax)
je 0x1b9c4
movq 0x18(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x1b9c2
movq 0x8(%rsp), %rdi
callq 0x15720
movq 0x8(%rsp), %rdi
callq 0x15060
jmp 0x1b9c4
movq 0x18(%rsp), %rdi
callq 0x15760
addq $0x28, %rsp
retq
movq %rax, %rdi
callq 0x16de0
nopl (%rax,%rax)
// File: shaovie[P]reactor/src/poll_sync_opt.cpp
// Function: poll_sync_opt::do_sync(poll_sync_opt::opt_arg const&)
void poll_sync_opt::do_sync(const poll_sync_opt::opt_arg &arg) {
    if (arg.type == poll_sync_opt::sync_cache_t) {
        auto p = (poll_sync_opt::sync_cache *)arg.arg;
        this->poll->poll_cache_set(p->id, p->value, p->free_func);
        delete p;
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x1bab1
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rax
movl (%rax), %esi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
callq 0x14e00
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x1baaf
movq (%rsp), %rdi
callq 0x15060
jmp 0x1bab1
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: shaovie[P]reactor/src/poll_sync_opt.cpp
// Function: poll_sync_opt::open(poller*)
int poll_sync_opt::open(poller *poll) {
    int fd = ::eventfd(0, EFD_NONBLOCK|EFD_CLOEXEC);
    if (fd == -1) {
        fprintf(stderr, "reactor: create eventfd fail! %s\n", strerror(errno));
        return -1;
    }
    if (poll->add(this, fd, ev_handler::ev_read) == -1) {
        fprintf(stderr, "reactor: add eventfd to poller fail! %s\n", strerror(errno));
        ::close(fd);
        return -1;
    }
    this->efd = fd;
    return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %edi, %edi
movl $0x80800, %esi          # imm = 0x80800
callq 0x15490
movl %eax, 0x1c(%rsp)
cmpl $-0x1, 0x1c(%rsp)
jne 0x1bb2a
movq 0xe4da(%rip), %rax      # 0x29fd0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x140c0
movl (%rax), %edi
callq 0x144d0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x76a8(%rip), %rsi      # 0x231c1
movb $0x0, %al
callq 0x15860
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x1bb9d
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %edx
movl $0x2001, %ecx           # imm = 0x2001
callq 0x15f80
cmpl $-0x1, %eax
jne 0x1bb89
movq 0xe482(%rip), %rax      # 0x29fd0
movq (%rax), %rax
movq %rax, (%rsp)
callq 0x140c0
movl (%rax), %edi
callq 0x144d0
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x7674(%rip), %rsi      # 0x231e3
movb $0x0, %al
callq 0x15860
movl 0x1c(%rsp), %edi
callq 0x16000
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x1bb9d
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
movl %ecx, 0x30(%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: shaovie[P]reactor/src/poll_sync_opt.cpp
// Function: poll_sync_opt::on_read()
bool poll_sync_opt::on_read() {
    if (this->readq->empty()) {
        this->mtx.lock();
        std::swap(this->readq, this->writeq);
        this->mtx.unlock();
    }
    for (auto i = 0; i < 8 && !this->readq->empty(); ++i) {
        poll_sync_opt::opt_arg &arg = this->readq->front();
        this->do_sync(arg);
        this->readq->pop_front();
    }
    if (!this->readq->empty()) // Ignore readable eventfd, continue
        return true;

    int64_t v = 0;
    int ret = 0;
    do {
        ret = ::read(this->efd, (void *)&v, sizeof(v));
    } while (ret == -1 && errno == EINTR);

    this->notified.store(0);
    return true;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x68(%rax), %rdi
callq 0x14d00
testb $0x1, %al
jne 0x1c342
jmp 0x1c373
movq 0x18(%rsp), %rdi
addq $0x38, %rdi
callq 0x15f40
movq 0x18(%rsp), %rsi
movq %rsi, %rdi
addq $0x68, %rdi
addq $0x70, %rsi
callq 0x15790
movq 0x18(%rsp), %rdi
addq $0x38, %rdi
callq 0x157a0
movl $0x0, 0x3c(%rsp)
xorl %eax, %eax
cmpl $0x8, 0x3c(%rsp)
movb %al, 0x17(%rsp)
jge 0x1c39c
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x14d00
xorb $-0x1, %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x1c3a6
jmp 0x1c3e3
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x14520
movq 0x18(%rsp), %rdi
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rsi
callq 0x141e0
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x14600
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x1c37b
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x14d00
testb $0x1, %al
jne 0x1c3ff
movb $0x1, 0x4f(%rsp)
jmp 0x1c4d5
movq $0x0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x18(%rsp), %rax
movl 0x30(%rax), %edi
leaq 0x28(%rsp), %rsi
movl $0x8, %edx
callq 0x15880
movl %eax, 0x24(%rsp)
xorl %eax, %eax
cmpl $-0x1, 0x24(%rsp)
movb %al, 0x16(%rsp)
jne 0x1c447
callq 0x140c0
cmpl $0x4, (%rax)
sete %al
movb %al, 0x16(%rsp)
movb 0x16(%rsp), %al
testb $0x1, %al
jne 0x1c410
movq 0x18(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x60(%rsp)
movl $0x0, 0x5c(%rsp)
movl $0x5, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x58(%rsp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x140d0
movl %eax, 0x54(%rsp)
movl 0x58(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x5c(%rsp), %ecx
movl %ecx, 0x50(%rsp)
subl $0x3, %eax
je 0x1c4b8
jmp 0x1c4a0
movl 0x10(%rsp), %eax
subl $0x5, %eax
je 0x1c4c5
jmp 0x1c4ab
movq 0x8(%rsp), %rax
movl 0x50(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x1c4d0
movq 0x8(%rsp), %rax
movl 0x50(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x1c4d0
movq 0x8(%rsp), %rcx
movl 0x50(%rsp), %eax
xchgl %eax, (%rcx)
movb $0x1, 0x4f(%rsp)
movb 0x4f(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
// File: shaovie[P]reactor/src/ringq.h
// Function: ringq<poll_sync_opt::opt_arg>::push_back(poll_sync_opt::opt_arg const&)
inline void push_back(const item_t &v) {
        if (this->full())
            this->grow();
        this->rq[this->tail] = v;
        this->tail = (this->tail + 1) % this->size;
        ++(this->len);
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x158b0
testb $0x1, %al
jne 0x1c5d2
jmp 0x1c5db
movq (%rsp), %rdi
callq 0x146d0
movq (%rsp), %rax
movq 0x8(%rsp), %rsi
movq 0x10(%rax), %rdi
movslq 0x8(%rax), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x15d80
movq (%rsp), %rcx
movl 0x8(%rcx), %eax
addl $0x1, %eax
cltd
idivl (%rcx)
movq (%rsp), %rax
movl %edx, 0x8(%rax)
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: shaovie[P]reactor/src/poller.h
// Function: poller::poll_cache_set(int, void*, void (*)(void*))
void poll_cache_set(const int id, void *val, void (*free_func)(void *)) {
        auto itor = this->pcache.find(id);
        if (itor != this->pcache.end())
            free_func(itor->second);
        this->pcache[id] = val;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x50, %rdi
leaq 0x3c(%rsp), %rsi
callq 0x14a80
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x50, %rdi
callq 0x15840
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x155a0
testb $0x1, %al
jne 0x1c67c
jmp 0x1c69e
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x15190
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq 0x8(%rcx), %rdi
callq *%rax
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
addq $0x50, %rdi
leaq 0x3c(%rsp), %rsi
callq 0x15210
movq (%rsp), %rcx
movq %rcx, (%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)