LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_request.c
// Function: http_process_if_modified_since
static int http_process_if_modified_since(http_request_t* rq, http_headers_out_t* out, char* st, char* ed) {
    struct tm time;
    time_t ims;

    if (!strptime(st, "%a, %d %b %Y %H:%M:%S GMT", &time)) {
        log_error("date error.");
        return REQUEST_ERROR;
    }

    ims = mktime(&time);

    if (ims < out->mtime) {
        out->if_modified = 1;   /* 返回 200 */
        out->status = HTTP_OK;
    } else {
        out->if_modified = 2;   /* 返回 304 */
        out->status = HTTP_NOT_MODIFIED;
    }

    return HTTP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x3f9f(%rip), %rsi      # 0x9722
leaq -0x60(%rbp), %rdx
callq 0x2450
cmpq $0x0, %rax
jne 0x57c1
movl $0x4, %edi
leaq 0x43d9(%rip), %rsi      # 0x9b77
leaq 0x447b(%rip), %rdx      # 0x9c20
movl $0xd0, %ecx
leaq 0x4463(%rip), %r8       # 0x9c14
movb $0x0, %al
callq 0x6450
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5829
leaq -0x60(%rbp), %rdi
callq 0x2330
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x5800
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $-0x31, %ecx
orl $0x10, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xff, %ecx
orl $0xc800, %ecx           # imm = 0xC800
movl %ecx, (%rax)
jmp 0x5822
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $-0x31, %ecx
orl $0x20, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xff, %ecx
orl $0x13000, %ecx          # imm = 0x13000
movl %ecx, (%rax)
movl $0xc8, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_request.c
// Function: http_process_if_unmodified_since
static int http_process_if_unmodified_since(http_request_t* rq, http_headers_out_t* out, char* st, char* ed) {
    struct tm time;
    time_t iums;

    if (strptime(st, "%a, %d %b %Y %H:%M:%S GMT", &time)) {
        log_error("date error.");
        return REQUEST_ERROR;
    }

    iums = mktime(&time);

    if (iums > out->mtime) {
        out->if_unmodified = 1; /* 返回 412 */
        out->status = HTTP_PRECONDITION_FAILED;
    }

    return HTTP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x3ebf(%rip), %rsi      # 0x9722
leaq -0x60(%rbp), %rdx
callq 0x2450
cmpq $0x0, %rax
je 0x58a1
movl $0x4, %edi
leaq 0x42f9(%rip), %rsi      # 0x9b77
leaq 0x43ba(%rip), %rdx      # 0x9c3f
movl $0xe6, %ecx
leaq 0x4383(%rip), %r8       # 0x9c14
movb $0x0, %al
callq 0x6450
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x58e8
leaq -0x60(%rbp), %rdi
callq 0x2330
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jle 0x58e1
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
orl $0x40, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xff, %ecx
orl $0x19c00, %ecx          # imm = 0x19C00
movl %ecx, (%rax)
movl $0xc8, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_request.c
// Function: http_request_init
http_request_t* http_request_init(int fd, epoll_t* epoll, config_t* config) {
    http_request_t* rq;

    if ((rq = (http_request_t*)malloc(sizeof(http_request_t))) == NULL) {
        log_error("http_request_t malloc failed.");
        return NULL;
    }

    rq->fd = fd;
    rq->epoll = epoll;
    rq->state = 0;
    rq->have_args = 0;
    rq->bufst = &(rq->buf[0]);
    rq->bufed = &(rq->buf[0]);
    rq->handler = http_process_request_line;    /* 初始时解析请求行 */
    rq->timer.timer_set = 0;
    rq->timer.handler = http_close_connection;  /* 定时器超时回调函数 */
    if (config) {
        rq->root = config->root;
        rq->defile = config->defile;
        rq->timeout = config->timeout;
    }
    
    init_list_head(&(rq->headers_list_head));   /* 初始化链表 */

    return rq;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x20f8, %edi           # imm = 0x20F8
callq 0x22f0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x595a
movl $0x4, %edi
leaq 0x4244(%rip), %rsi      # 0x9b77
leaq 0x4255(%rip), %rdx      # 0x9b8f
movl $0x29, %ecx
leaq 0x425b(%rip), %r8       # 0x9ba1
movb $0x0, %al
callq 0x6450
movq $0x0, -0x8(%rbp)
jmp 0x5a46
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x28(%rbp), %rcx
addq $0x98, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x2098(%rax)
movq -0x28(%rbp), %rcx
addq $0x98, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20a0(%rax)
movq -0x28(%rbp), %rax
leaq 0x94(%rip), %rcx        # 0x5a50
movq %rcx, 0x20f0(%rax)
movq -0x28(%rbp), %rax
movb 0x20e0(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x20e0(%rax)
movq -0x28(%rbp), %rax
leaq -0x1e04(%rip), %rcx     # 0x3be0
movq %rcx, 0x20d8(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x5a31
movq -0x20(%rbp), %rcx
addq $0x8, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x20(%rbp), %rcx
addq $0x108, %rcx            # imm = 0x108
movq -0x28(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x20(%rbp), %rax
movq 0x208(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20e8(%rax)
movq -0x28(%rbp), %rdi
addq $0x58, %rdi
callq 0x62d0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_request.c
// Function: http_process_request_line
static int http_process_request_line(http_request_t* rq) {
    int ret;

    if (rq->timer.timeout) {
        return REQUEST_TIMEOUT;
    }

    if ((ret = http_parse_request_line(rq)) == REQUEST_OK) {
        /* 当返回 REQUEST_OK 时，请求行已解析完毕，继续解析首部字段 */
        rq->handler = http_process_request_headers;
        return http_process_request_headers(rq);
    }
    
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb 0x20e0(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x5a7b
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x5ab2
movq -0x10(%rbp), %rdi
callq 0x4d30
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jne 0x5aac
movq -0x10(%rbp), %rax
leaq 0x269(%rip), %rcx       # 0x5d00
movq %rcx, 0x20f0(%rax)
movq -0x10(%rbp), %rdi
callq 0x5d00
movl %eax, -0x4(%rbp)
jmp 0x5ab2
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_request.c
// Function: http_headers_out_init
http_headers_out_t* http_headers_out_init() {
    http_headers_out_t* out;

    if ((out = (http_headers_out_t*)malloc(sizeof(http_headers_out_t))) == NULL) {
        log_error("http_headers_out_t malloc failed.");
        return NULL;
    }

    out->keep_alive = 0;
    out->if_modified = 0;
    out->if_unmodified = 0;
    out->status = 0;

    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x18, %edi
callq 0x22f0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x5b0c
movl $0x4, %edi
leaq 0x408f(%rip), %rsi      # 0x9b77
leaq 0x40d0(%rip), %rdx      # 0x9bbf
movl $0x48, %ecx
leaq 0x40da(%rip), %r8       # 0x9bd5
movb $0x0, %al
callq 0x6450
movq $0x0, -0x8(%rbp)
jmp 0x5b52
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $-0x10, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $-0x31, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xff, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_request.c
// Function: http_analyze_headers
int http_analyze_headers(http_request_t* rq, http_headers_out_t* out) {
    http_header_t* pos;
    list_head_t* head;
    list_head_t* now;
    list_head_t* next;
    http_headers_in_t* in;
    int len;

    /* 获取链表头 */
    head = &(rq->headers_list_head);

    /* 遍历链表中的每一个节点 */
    list_for_each_entry(pos, head, list_node) {
        /* 对于每一个节点循环判断与每一个字段名是否匹配 */
        len = pos->header_name_end - pos->header_name_start + 1;
        for (in = http_headers_in; strlen(in->name) > 0; ++ in) {
            /* 如果匹配，则执行相应处理函数 */
            if (!strncmp(in->name, pos->header_name_start, len)) {
                if (in->handler != NULL) {
                    in->handler(rq, out, pos->header_value_start, pos->header_value_end);
                }

                break;
            }
        }
    }

    /* 销毁链表中的所有节点 */
    now = head->next;
    while (now != head) {
        next = now->next;
        pos = list_entry(now, http_header_t, list_node);

        list_del(now);
        free(pos);
        pos = NULL;

        now = next;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x58, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x5c3c
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
addq $0x1, %rax
movl %eax, -0x3c(%rbp)
leaq 0x6869(%rip), %rax      # 0xc420
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0x2130
cmpq $0x0, %rax
jbe 0x5c29
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movslq -0x3c(%rbp), %rdx
callq 0x2070
cmpl $0x0, %eax
jne 0x5c19
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5c17
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rcx
callq *%rax
jmp 0x5c29
jmp 0x5c1b
movq -0x38(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x38(%rbp)
jmp 0x5bbb
jmp 0x5c2b
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x5b88
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x5c8a
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
callq 0x63d0
movq -0x18(%rbp), %rdi
callq 0x2030
movq $0x0, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x5c48
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_timer.c
// Function: init_timer
int init_timer() {
    /* 初始化的主要工作就是初始化一颗红黑树 */
    if (rbtree_init(&timer_rbtree, &timer_nil, rbtree_insert_timer) != 0) {
        log_error("rbtree init error.");
        return -1;
    }

    /* 初始化互斥锁，用于多线程使用定时器的同步操作 */
    if (pthread_mutex_init(&timer_mutex, NULL) != 0) {
        log_error("timer mutex init failed.");
        return -1;
    }

    /* 初始化 current_msec ，可做可不做 */
    if (update_current_msec() != 0) {
        log_error("get current time error.");
        return -1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x6799(%rip), %rdi      # 0xc4e8
leaq 0x67aa(%rip), %rsi      # 0xc500
leaq 0xcc3(%rip), %rdx       # 0x6a20
callq 0x6630
cmpl $0x0, %eax
je 0x5d99
movl $0x4, %edi
leaq 0x3eed(%rip), %rsi      # 0x9c60
leaq 0x3efc(%rip), %rdx      # 0x9c76
movl $0x1c, %ecx
leaq 0x3efb(%rip), %r8       # 0x9c81
movb $0x0, %al
callq 0x6450
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5e1d
leaq 0x6790(%rip), %rdi      # 0xc530
xorl %eax, %eax
movl %eax, %esi
callq 0x2460
cmpl $0x0, %eax
je 0x5ddd
movl $0x4, %edi
leaq 0x3ea6(%rip), %rsi      # 0x9c60
leaq 0x3eb5(%rip), %rdx      # 0x9c76
movl $0x22, %ecx
leaq 0x3ec7(%rip), %r8       # 0x9c94
movb $0x0, %al
callq 0x6450
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5e1d
callq 0x6270
cmpl $0x0, %eax
je 0x5e16
movl $0x4, %edi
leaq 0x3e6d(%rip), %rsi      # 0x9c60
leaq 0x3e7c(%rip), %rdx      # 0x9c76
movl $0x28, %ecx
leaq 0x3ea7(%rip), %r8       # 0x9cad
movb $0x0, %al
callq 0x6450
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5e1d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_timer.c
// Function: find_timer
msec_t find_timer() {
    msec_int_t timer;
    rbtree_node_t* node;

    //DBG("find timer pid:%u ready to lock\n", pthread_self());
    pthread_mutex_lock(&timer_mutex);
    //DBG("find timer pid:%u locked\n", pthread_self());

    /* 如果定时器为空，则返回无穷 */
    if (timer_rbtree.root == &timer_nil) {
        //DBG("find timer pid:%u ready to unlock\n", pthread_self());
        pthread_mutex_unlock(&timer_mutex);
        //DBG("find timer pid:%u unlocked\n", pthread_self());
        return TIMER_INFINITE;
    }

    /* 获取红黑树中最左边的节点即键最小的节点 */
    node = rbtree_get_min(&timer_rbtree);
    //ASSERT(node != NULL, "node is NULL.");

    //DBG("find timer pid:%u ready to unlock\n", pthread_self());
    pthread_mutex_unlock(&timer_mutex);
    //DBG("find timer pid:%u unlocked\n", pthread_self());

    /* 计算与当前时间的差值并返回 */
    update_current_msec();

    timer = (msec_int_t)(node->key - current_msec);

    return (msec_t)(timer > 0 ? timer : 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x66f1(%rip), %rdi      # 0xc530
callq 0x24a0
movq 0x669d(%rip), %rax      # 0xc4e8
leaq 0x66ae(%rip), %rcx      # 0xc500
cmpq %rcx, %rax
jne 0x5e6d
leaq 0x66d2(%rip), %rdi      # 0xc530
callq 0x22d0
movq $-0x1, -0x8(%rbp)
jmp 0x5ec1
leaq 0x6674(%rip), %rdi      # 0xc4e8
callq 0x66c0
movq %rax, -0x18(%rbp)
leaq 0x66ac(%rip), %rdi      # 0xc530
callq 0x22d0
callq 0x6270
movq -0x18(%rbp), %rax
movq (%rax), %rax
subq 0x66bc(%rip), %rax      # 0xc558
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jle 0x5eb1
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x5eb9
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0x5eb9
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_timer.c
// Function: expire_timers
int expire_timers() {
    rbtree_node_t* node;
    http_timer_t* timer;
    http_request_t* ev;

    //while (timer_rbtree.root != &timer_nil) {
    for ( ;; ) {
        //DBG("expire timer pid:%u ready to lock\n", pthread_self());
        pthread_mutex_lock(&timer_mutex);

        //DBG("expire timer pid:%u locked\n", pthread_self());
        
        /* 定时器为空，即红黑树为空 */
        if (timer_rbtree.root == &timer_nil) {
            break;
        }

        /* 获取红黑树中最左边的节点即键最小的节点 */
        if ((node = rbtree_get_min(&timer_rbtree)) == NULL) {
            log_error("get min failed.");
            pthread_mutex_unlock(&timer_mutex);
            return -1;
        }

        update_current_msec();

        /* 计算是否超时 */
        if ((msec_int_t)(node->key - current_msec) <= 0) {
            /* 如果超时 */
            /* 删除红黑树中的节点 */
            rbtree_delete(&timer_rbtree, node);

            pthread_mutex_unlock(&timer_mutex);


            /* 通过偏移量获取 timer 指针 */
            timer = (http_timer_t*) ((char*)node - offsetof(http_timer_t, timer_node));

            /* 标记红黑树中已经不监控该事件 */
            timer->timer_set = 0;

            /* 通过偏移量获取事件指针 */
            ev = (http_request_t*) ((char*)timer - offsetof(http_request_t, timer));
            
            /* 标记事件已超时 */
            timer->timeout = 1;

            /* 执行回调函数 */
            if (timer->handler) {
                timer->handler((void*)ev);
            }

            continue;
        }


        break;
    }

    pthread_mutex_unlock(&timer_mutex);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x6651(%rip), %rdi      # 0xc530
callq 0x24a0
movq 0x65fd(%rip), %rax      # 0xc4e8
leaq 0x660e(%rip), %rcx      # 0xc500
cmpq %rcx, %rax
jne 0x5efc
jmp 0x5fdb
leaq 0x65e5(%rip), %rdi      # 0xc4e8
callq 0x66c0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x5f50
movl $0x4, %edi
leaq 0x3d42(%rip), %rsi      # 0x9c60
leaq 0x3da0(%rip), %rdx      # 0x9cc5
movl $0x78, %ecx
leaq 0x3da2(%rip), %r8       # 0x9cd3
movb $0x0, %al
callq 0x6450
leaq 0x65f1(%rip), %rdi      # 0xc530
callq 0x22d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5fee
callq 0x6270
movq -0x10(%rbp), %rax
movq (%rax), %rax
subq 0x65f5(%rip), %rax      # 0xc558
cmpq $0x0, %rax
jg 0x5fd9
movq -0x10(%rbp), %rsi
leaq 0x6574(%rip), %rdi      # 0xc4e8
callq 0x6f10
leaq 0x65b0(%rip), %rdi      # 0xc530
callq 0x22d0
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb 0x38(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x38(%rax)
movq -0x18(%rbp), %rax
addq $-0x20a8, %rax          # imm = 0xDF58
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movb 0x38(%rax), %cl
andb $-0x3, %cl
orb $0x2, %cl
movb %cl, 0x38(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x5fd4
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
jmp 0x5ed8
jmp 0x5fdb
leaq 0x654e(%rip), %rdi      # 0xc530
callq 0x22d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_timer.c
// Function: add_timer
int add_timer(void* http_request, msec_t timeout, timer_handler_t* handler) {
    http_request_t* ev;
    http_timer_t* timer;

    if (http_request == NULL) {
        log_error("event ptr is NULL.");
        return -1;
    }

    if (timeout <= 0) {
        log_error("timeout is invalid.");
        return -1;
    }

    ev = (http_request_t*)http_request;
    timer = &(ev->timer);

    if (timer->timer_set) {
        /* 如果定时器已被设置，则先删除再添加 */
        //log_debug("delete timer first?");
        delete_timer(ev);
    }

    /* 设置标记位和回调函数 */
    timer->timer_set = 1;
    timer->timeout = 0;
    timer->handler = handler;

    update_current_msec();

    /* 设置超时时间 */
    timer->timer_node.key = current_msec + timeout;

    pthread_mutex_lock(&timer_mutex);

    /* 向红黑树中插入节点 */
    //log_debug("ready to insert:%d", timer->timer_node.key);
    if (rbtree_insert(&timer_rbtree, &(timer->timer_node)) != 0) {
        log_error("rbtree insert failed.");
        pthread_mutex_unlock(&timer_mutex);
        return -1;
    }

    pthread_mutex_unlock(&timer_mutex);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x604d
movl $0x4, %edi
leaq 0x3c39(%rip), %rsi      # 0x9c60
leaq 0x3cb5(%rip), %rdx      # 0x9ce3
movl $0xad, %ecx
leaq 0x3cb3(%rip), %r8       # 0x9ced
movb $0x0, %al
callq 0x6450
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6168
cmpq $0x0, -0x18(%rbp)
ja 0x6086
movl $0x4, %edi
leaq 0x3c00(%rip), %rsi      # 0x9c60
leaq 0x3c7c(%rip), %rdx      # 0x9ce3
movl $0xb2, %ecx
leaq 0x3c8d(%rip), %r8       # 0x9d00
movb $0x0, %al
callq 0x6450
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6168
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x20a8, %rax           # imm = 0x20A8
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb 0x38(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x60b6
movq -0x28(%rbp), %rdi
callq 0x6180
movq -0x30(%rbp), %rax
movb 0x38(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x38(%rax)
movq -0x30(%rbp), %rax
movb 0x38(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x38(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x30(%rax)
callq 0x6270
movq 0x646a(%rip), %rcx      # 0xc558
addq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
leaq 0x6430(%rip), %rdi      # 0xc530
callq 0x24a0
movq -0x30(%rbp), %rsi
leaq 0x63d8(%rip), %rdi      # 0xc4e8
callq 0x6ac0
cmpl $0x0, %eax
je 0x6155
movl $0x4, %edi
leaq 0x3b3a(%rip), %rsi      # 0x9c60
leaq 0x3bb6(%rip), %rdx      # 0x9ce3
movl $0xce, %ecx
leaq 0x3bdb(%rip), %r8       # 0x9d14
movb $0x0, %al
callq 0x6450
leaq 0x63e9(%rip), %rdi      # 0xc530
callq 0x22d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6168
leaq 0x63d4(%rip), %rdi      # 0xc530
callq 0x22d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_timer.c
// Function: delete_timer
int delete_timer(void* http_request) {
    http_request_t* ev;

    if (http_request == NULL) {
        log_error("event ptr is NULL.");
        return -1;
    }

    ev = (http_request_t*)http_request;

    pthread_mutex_lock(&timer_mutex);

    /* 删除红黑树中的节点 */
    //log_debug("ready to delete:%d", (ev->timer).timer_node.key);
    if (rbtree_delete(&timer_rbtree, &((ev->timer).timer_node)) != 0) {
        log_error("delete rbtree node failed.");
        pthread_mutex_unlock(&timer_mutex);
        return -1;
    }

    pthread_mutex_unlock(&timer_mutex);

    /* 标记红黑树中已经不监控该事件 */
    (ev->timer).timer_set = 0;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x61c5
movl $0x4, %edi
leaq 0x3ac1(%rip), %rsi      # 0x9c60
leaq 0x3b84(%rip), %rdx      # 0x9d2a
movl $0xdf, %ecx
leaq 0x3b3b(%rip), %r8       # 0x9ced
movb $0x0, %al
callq 0x6450
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6259
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x635c(%rip), %rdi      # 0xc530
callq 0x24a0
movq -0x18(%rbp), %rsi
addq $0x20a8, %rsi           # imm = 0x20A8
leaq 0x62fd(%rip), %rdi      # 0xc4e8
callq 0x6f10
cmpl $0x0, %eax
je 0x6230
movl $0x4, %edi
leaq 0x3a5f(%rip), %rsi      # 0x9c60
leaq 0x3b22(%rip), %rdx      # 0x9d2a
movl $0xea, %ecx
leaq 0x3b23(%rip), %r8       # 0x9d37
movb $0x0, %al
callq 0x6450
leaq 0x630e(%rip), %rdi      # 0xc530
callq 0x22d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6259
leaq 0x62f9(%rip), %rdi      # 0xc530
callq 0x22d0
movq -0x18(%rbp), %rax
movb 0x20e0(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x20e0(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/http/http_timer.c
// Function: update_current_msec
static int update_current_msec() {
    struct timeval cur_time;
    
    if (gettimeofday(&cur_time, NULL) != 0) {
        return -1;
    }

    current_msec = cur_time.tv_sec * 1000 + cur_time.tv_usec / 1000;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21b0
cmpl $0x0, %eax
je 0x6293
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x62c5
imulq $0x3e8, -0x18(%rbp), %rax # imm = 0x3E8
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, 0x629a(%rip)      # 0xc558
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/list.c
// Function: list_del
void list_del(list_head_t* entry) {
    __list_del(entry->prev, entry->next);

    entry->next = (void*) 0;
    entry->prev = (void*) 0;

    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x6340
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/log.c
// Function: log_log
void log_log(enum log_level level, const char* file, const char* function, const int line, const char* fmt, ...) {
    char log[MAX_LOG] = { '\0' };
    char date[18] = { '\0' };
    struct tm* tm;
    time_t now;
    va_list args;

    now = time(NULL);
    tm = localtime(&now);
    strftime(date, sizeof(date), "%y-%m-%d %H:%M:%S", tm);

    va_start(args, fmt);
    vsnprintf(log, sizeof(log), fmt, args);
    va_end(args);

    fprintf(stderr, "[%17s][%s(%d):%s]%s%s: \x1B[0m%s\n", 
                    date, file, line, function, level_colors[level], level_strings[level], log);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
testb %al, %al
je 0x6498
movaps %xmm0, -0x200(%rbp)
movaps %xmm1, -0x1f0(%rbp)
movaps %xmm2, -0x1e0(%rbp)
movaps %xmm3, -0x1d0(%rbp)
movaps %xmm4, -0x1c0(%rbp)
movaps %xmm5, -0x1b0(%rbp)
movaps %xmm6, -0x1a0(%rbp)
movaps %xmm7, -0x190(%rbp)
movq %r9, -0x208(%rbp)
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movaps %xmm0, -0xe0(%rbp)
movaps %xmm0, -0xf0(%rbp)
movaps %xmm0, -0x100(%rbp)
movaps %xmm0, -0x110(%rbp)
movaps %xmm0, -0x120(%rbp)
movaps %xmm0, -0x130(%rbp)
movaps %xmm0, -0x150(%rbp)
movw $0x0, -0x140(%rbp)
xorl %eax, %eax
movl %eax, -0x234(%rbp)
movl %eax, %edi
callq 0x22b0
movq %rax, -0x160(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x2040
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rcx
leaq 0x37f6(%rip), %rdx      # 0x9d52
leaq -0x150(%rbp), %rdi
movq %rdi, -0x240(%rbp)
movl $0x12, %esi
callq 0x2390
leaq -0x230(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x178(%rbp)
movl $0x30, -0x17c(%rbp)
movl $0x28, -0x180(%rbp)
movq -0x30(%rbp), %rdx
leaq -0x130(%rbp), %rbx
movl $0x100, %esi            # imm = 0x100
leaq -0x180(%rbp), %rcx
movq %rbx, %rdi
callq 0x20c0
movq -0x240(%rbp), %rdx
movl -0x234(%rbp), %eax
movq 0x5a1c(%rip), %rcx      # 0xbff0
movq (%rcx), %rdi
movq -0x18(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x20(%rbp), %r9
movl -0xc(%rbp), %esi
movl %esi, %r11d
leaq 0x5e90(%rip), %rsi      # 0xc480
movq (%rsi,%r11,8), %r10
leaq 0x5eb5(%rip), %rsi      # 0xc4b0
movq (%rsi,%r11,8), %r11
movq %rsp, %rsi
movq %rbx, 0x10(%rsi)
movq %r11, 0x8(%rsi)
movq %r10, (%rsi)
leaq 0x3750(%rip), %rsi      # 0x9d64
callq 0x2260
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rbtree.c
// Function: rbtree_init
int rbtree_init(volatile rbtree_t* tree, rbtree_node_t* nil, rbtree_insert_func* insert) {
    if (tree == NULL) {
        log_error("rbtree ptr is NULL.");
        return -1;
    }

    rbtree_dye_black(nil);
    tree->root = nil;
    tree->nil = nil;
    tree->insert = insert;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x667a
movl $0x4, %edi
leaq 0x3776(%rip), %rsi      # 0x9dcd
leaq 0x3781(%rip), %rdx      # 0x9ddf
movl $0x16, %ecx
leaq 0x3781(%rip), %r8       # 0x9deb
movb $0x0, %al
callq 0x6450
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x66ac
movq -0x18(%rbp), %rax
movb $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rbtree.c
// Function: rbtree_get_min
rbtree_node_t* rbtree_get_min(volatile rbtree_t* tree) {
    rbtree_node_t* node;
    rbtree_node_t* nil;

    if (tree == NULL) {
        log_error("rbtree ptr is NULL.");
        return NULL;
    }
    
    node = tree->root;
    nil = tree->nil;

    if (node == nil) {
        return NULL;
    }

    while (node->left_son != nil) {
        node = node->left_son;
    }

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x6703
movl $0x4, %edi
leaq 0x36ee(%rip), %rsi      # 0x9dcd
leaq 0x3719(%rip), %rdx      # 0x9dff
movl $0x2a, %ecx
leaq 0x36f9(%rip), %r8       # 0x9deb
movb $0x0, %al
callq 0x6450
movq $0x0, -0x8(%rbp)
jmp 0x6754
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x672e
movq $0x0, -0x8(%rbp)
jmp 0x6754
jmp 0x6730
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
je 0x674c
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x6730
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rbtree.c
// Function: rbtree_insert_value
void rbtree_insert_value(rbtree_node_t* now, rbtree_node_t* node, rbtree_node_t* nil) {
    rbtree_node_t** ist;    /* 迭代二级指针，最后指向被插入点的地址 */
                            /* 必须为二级指针，因为已经赋值完的一级指针会随着函数返回而释放 */

    /* 普通二叉搜索树的插入 */
    for ( ;; ) {
        /* 判断大小时，键为有符号数 */
        if ((rbtree_key_int_t)node->key < (rbtree_key_int_t)now->key) {
            ist = &(now->left_son);
        } else {
            ist = &(now->right_son);
        }

        if (*ist == nil) {
            break;
        }

        now = *ist;
    }

    *ist = node;

    /* 初始化节点基本信息 */
    node->parent = now;
    node->left_son = nil;
    node->right_son = nil;
    rbtree_dye_red(node);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jge 0x692e
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
jmp 0x693a
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x6949
jmp 0x6956
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x6910
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rbtree.c
// Function: rbtree_insert_uvalue
void rbtree_insert_uvalue(rbtree_node_t* now, rbtree_node_t* node, rbtree_node_t* nil) {
    rbtree_node_t** ist;    /* 迭代二级指针，最后指向被插入点的地址 */
                            /* 必须为二级指针，因为已经赋值完的一级指针会随着函数返回而释放 */

    /* 普通二叉搜索树的插入 */
    for ( ;; ) {
        /* 判断大小时，键为无符号数 */
        if (node->key < now->key) {
            ist = &(now->left_son);
        } else {
            ist = &(now->right_son);
        }

        if (*ist == nil) {
            break;
        }

        now = *ist;
    }

    *ist = node;

    /* 初始化节点基本信息 */
    node->parent = now;
    node->left_son = nil;
    node->right_son = nil;
    rbtree_dye_red(node);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x69be
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
jmp 0x69ca
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x69d9
jmp 0x69e6
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x69a0
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rbtree.c
// Function: rbtree_insert_timer
void rbtree_insert_timer(rbtree_node_t* now, rbtree_node_t* node, rbtree_node_t* nil) {
    rbtree_node_t** ist;    /* 迭代二级指针，最后指向被插入点的地址 */
                            /* 必须为二级指针，因为已经赋值完的一级指针会随着函数返回而释放 */

    /* 普通二叉搜索树的插入 */
    for ( ;; ) {
        /* 考虑如果使用 timer 时溢出 */
        /* 就算是 32 位操作系统，也将有 2^31 大小的缓冲空间 */
        /* (在这个空间内溢出的值计算后仍大于未溢出的值) */
        /* 对于定时器来说使用跨度不会超过这个范围(单位为 ms ) */
        if ((rbtree_key_int_t)(node->key - now->key) < 0) {
            ist = &(now->left_son);
        } else {
            ist = &(now->right_son);
        }

        if (*ist == nil) {
            break;
        }

        now = *ist;
    }

    *ist = node;

    /* 初始化节点基本信息 */
    node->parent = now;
    node->left_son = nil;
    node->right_son = nil;
    rbtree_dye_red(node);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
subq (%rcx), %rax
cmpq $0x0, %rax
jge 0x6a52
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
jmp 0x6a5e
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x6a6d
jmp 0x6a7a
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x6a30
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rbtree.c
// Function: rbtree_left_rotate
static void rbtree_left_rotate(rbtree_node_t** root, rbtree_node_t* node, rbtree_node_t* nil) {
    rbtree_node_t* temp;

    temp = node->right_son; /* 保存 temp 指向 node 的右孩子 */

    /* 更新旋转后 temp 与其新父亲的关系 */
    temp->parent = node->parent;
    if (node == *root) {
        *root = temp;
    } else if (node == node->parent->left_son) {
        node->parent->left_son = temp;
    } else {
        node->parent->right_son = temp;
    }
    
    /* 设置 node 的右孩子为 temp 的左孩子 */
    node->right_son = temp->left_son;
    if (node->right_son != nil) {
        node->right_son->parent = node;
    }
    
    /* 更新旋转后 node 与其新父亲的关系 */
    node->parent = temp;
    node->parent->left_son = node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x6db6
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x6dec
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jne 0x6dda
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0x6dea
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
jmp 0x6dec
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x6e1a
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x10(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rbtree.c
// Function: rbtree_right_rotate
static void rbtree_right_rotate(rbtree_node_t** root, rbtree_node_t* node, rbtree_node_t* nil) {
    rbtree_node_t* temp;

    temp = node->left_son;

    /* 更新旋转后 temp 与其新父亲的关系 */
    temp->parent = node->parent;
    if (node == *root) {
        *root = temp;
    } else if (node == node->parent->left_son) {
        node->parent->left_son = temp;
    } else {
        node->parent->right_son = temp;
    }

    /* 设置 node 的左孩子为 temp 的右孩子 */
    node->left_son = temp->right_son;
    if (node->left_son != nil) {
        node->left_son->parent = node;
    }

    /* 更新旋转后 node 与其新父亲的关系 */
    node->parent = temp;
    node->parent->right_son = node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x6e86
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x6ebc
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jne 0x6eaa
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0x6eba
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
jmp 0x6ebc
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x6eea
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rbtree.c
// Function: rbtree_get_successor
static rbtree_node_t* rbtree_get_successor(rbtree_node_t* node, rbtree_node_t* nil) {
    node = node->right_son; /* 调用该函数时右儿子不会是 nil */

    while (node->left_son != nil) {
        node = node->left_son;
    }

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
je 0x75a4
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x7588
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rio.c
// Function: rio_readn
ssize_t rio_readn(int fd, void* usrbuf, size_t* n) {
    size_t nleft = *n;              /* 剩余多少字节未读 */
    ssize_t nread;
    char* bufp = (char*)usrbuf;     /* 读到 usrbuf 的位置 */
    
    while (nleft > 0) {
        if ((nread = read(fd, bufp, nleft)) < 0) {
            if (errno != EINTR) {   /* 当 read 被中断则忽略，否则返回错误 */
                *n = *n - nleft;
                return -1;
            }
        } else if (nread == 0) {    /* 读到 EOF */
            break;
        } else {
            bufp += nread;
            nleft -= nread;
        }
    }
    return (*n - nleft);            /* 返回读了多少字节 */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jbe 0x7647
movl -0xc(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2220
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jge 0x761f
callq 0x2050
cmpl $0x4, (%rax)
je 0x761d
movq -0x20(%rbp), %rax
movq (%rax), %rcx
subq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x7656
jmp 0x7645
cmpq $0x0, -0x30(%rbp)
jne 0x7628
jmp 0x7647
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x7645
jmp 0x75d6
movq -0x20(%rbp), %rax
movq (%rax), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rio.c
// Function: rio_writen
ssize_t rio_writen(int fd, void* usrbuf, size_t n) {
    size_t nleft = n;       /* 剩余多少字节未写 */
    ssize_t nwrite;       
    char* bufp = usrbuf;    /* 从 usrbuf 写的位置 */

    while (nleft > 0) {
        if ((nwrite = write(fd, bufp, nleft)) <= 0) {
            if (errno != EINTR && errno != EAGAIN) {   /* 当 write 被中断则忽略，否则返回错误 */
                return -1;
            }
        } else {
            bufp += nwrite;
            nleft -= nwrite;
        }
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jbe 0x76e1
movl -0xc(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x20f0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jg 0x76c4
callq 0x2050
cmpl $0x4, (%rax)
je 0x76c2
callq 0x2050
cmpl $0xb, (%rax)
je 0x76c2
movq $-0x1, -0x8(%rbp)
jmp 0x76e9
jmp 0x76df
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x7683
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rio.c
// Function: rio_readn_buf
ssize_t	rio_readn_buf(rio_t* rp, void* usrbuf, size_t n) {
    size_t nleft = n;       /* 剩余多少字节未读 */
    ssize_t nread;
    char* bufp = usrbuf;    /* 读到 usrbuf 的位置 */

    while (nleft > 0) {
        if ((nread = rio_read(rp, bufp, nleft)) < 0) {
            return -1;
        } else if (nread == 0) {
            return 0;       /* 读到 EOF，返回 0 */
        } else {
            bufp += nread;
            nleft -= nread;
        }
    }
    return (n - nleft);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jbe 0x77c0
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x77e0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jge 0x7790
movq $-0x1, -0x8(%rbp)
jmp 0x77cc
cmpq $0x0, -0x30(%rbp)
jne 0x77a1
movq $0x0, -0x8(%rbp)
jmp 0x77cc
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x77be
jmp 0x7764
movq -0x20(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rio.c
// Function: rio_read
static ssize_t rio_read(rio_t* rp, char* usrbuf, size_t n) {
    size_t cnt;

    while (rp->rio_unread <= 0) {   /* 当内部缓冲区没有内容可读时 */
        if ((rp->rio_unread = read(rp->rio_fd, rp->rio_buf, sizeof rp->rio_buf)) < 0) {
            if (errno != EINTR) {   /* 当 read 被中断则忽略，否则返回错误 */
                return -1;
            }
        } else if (rp->rio_unread == 0) {
            return 0;               /* 读到 EOF，返回 0 */
        } else {
            rp->rio_bufptr = rp->rio_buf;
        }
    }
    
    cnt = rp->rio_unread < n ? rp->rio_unread : n;  /* 实际读到的字节数 */
    memcpy(usrbuf, rp->rio_bufptr, cnt);
    rp->rio_bufptr += cnt;
    rp->rio_unread -= cnt;
    return cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jg 0x786a
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x2000, %edx           # imm = 0x2000
callq 0x2220
movq -0x10(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jge 0x783e
callq 0x2050
cmpl $0x4, (%rax)
je 0x783c
movq $-0x1, -0x8(%rbp)
jmp 0x78d6
jmp 0x7868
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x7856
movq $0x0, -0x8(%rbp)
jmp 0x78d6
movq -0x10(%rbp), %rcx
addq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x7868
jmp 0x77f4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x7886
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x788e
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x22a0
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ttoobne[P]bohttpd/src/core/rio.c
// Function: rio_readline_buf
ssize_t	rio_readline_buf(rio_t* rp, void* usrbuf, size_t maxlen) {
    size_t n, rc;
    char c;
    char* bufp = usrbuf;

    for (n = 1; n <= maxlen; ++ n) {
        if ((rc = rio_read(rp, &c, 1)) == 1) {
            *bufp ++ = c;
            if (c == '\n') {        /* 读到换行符 */ 
                n ++ ;
                break;
            }
        } else if (rc == 0) {       /* 读到 EOF */
            break;
        } else {
            return -1;
        }
    }
    *bufp = '\0';
    return (n - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x1, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x797a
movq -0x10(%rbp), %rdi
leaq -0x31(%rbp), %rsi
movl $0x1, %edx
callq 0x77e0
movq %rax, -0x30(%rbp)
cmpq $0x1, %rax
jne 0x7957
movb -0x31(%rbp), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movsbl -0x31(%rbp), %eax
cmpl $0xa, %eax
jne 0x7955
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x797a
jmp 0x796a
cmpq $0x0, -0x30(%rbp)
jne 0x7960
jmp 0x797a
movq $-0x1, -0x8(%rbp)
jmp 0x798d
jmp 0x796c
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x7904
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)