LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_connection.c
// Function: qq_close_connection
void
qq_close_connection(qq_connection_t *c)
{
    qq_socket_t  fd;

    if (c->fd == (qq_socket_t) -1) {
        qq_log_error(0, "qq_close_connection() connection already closed");
        return;
    }

    if (c->read->timer_set) {
        qq_event_del_timer(c->read);
    }

    if (c->write->timer_set) {
        qq_event_del_timer(c->write);
    }

    qq_epoll_del_connection(c);

    if (c->read->posted) {
        qq_delete_posted_event(c->read);
    }

    if (c->write->posted) {
        qq_delete_posted_event(c->write);
    }

    c->read->closed = 1;
    c->write->closed = 1;

    qq_free_connection(c);

    fd = c->fd;
    c->fd = (qq_socket_t) -1;

    if (close(fd) == -1) {
        qq_log_error(errno, "qq_close_connection(fd:%d) failed", fd);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $-0x1, 0x18(%rdi)
je 0x297a
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testb $0x8, 0x9(%r14)
je 0x2892
leaq 0x20(%r14), %rsi
leaq 0xca88(%rip), %rdi      # 0xf310
callq 0x8313
andb $-0x9, 0x9(%r14)
movq 0x10(%rbx), %r14
testb $0x8, 0x9(%r14)
je 0x28b2
leaq 0x20(%r14), %rsi
leaq 0xca68(%rip), %rdi      # 0xf310
callq 0x8313
andb $-0x9, 0x9(%r14)
movq %rbx, %rdi
callq 0x2e05
movq 0x8(%rbx), %rax
movl 0x8(%rax), %ecx
testw %cx, %cx
jns 0x28f4
andl $0xffff7fff, %ecx       # imm = 0xFFFF7FFF
movl %ecx, 0x8(%rax)
movq 0x8(%rbx), %rsi
movq 0x48(%rsi), %rax
movq 0x50(%rsi), %rcx
movq %rax, (%rcx)
movq 0x48(%rsi), %rax
movq %rcx, 0x8(%rax)
leaq 0x7934(%rip), %rdi      # 0xa221
xorl %eax, %eax
callq 0x6daa
movq 0x10(%rbx), %rax
movl 0x8(%rax), %ecx
testw %cx, %cx
jns 0x292e
andl $0xffff7fff, %ecx       # imm = 0xFFFF7FFF
movl %ecx, 0x8(%rax)
movq 0x10(%rbx), %rsi
movq 0x48(%rsi), %rax
movq 0x50(%rsi), %rcx
movq %rax, (%rcx)
movq 0x48(%rsi), %rax
movq %rcx, 0x8(%rax)
leaq 0x78fa(%rip), %rdi      # 0xa221
xorl %eax, %eax
callq 0x6daa
movq 0x8(%rbx), %rax
movl $0x10000, %ecx          # imm = 0x10000
orl %ecx, 0x8(%rax)
movq 0x10(%rbx), %rax
orl %ecx, 0x8(%rax)
leaq 0xc968(%rip), %rax      # 0xf2b0
movq (%rax), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rax
movq %rbx, 0x18(%rax)
incq 0x20(%rax)
movl 0x18(%rbx), %r14d
movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF
movl %r14d, %edi
callq 0x2320
cmpl $-0x1, %eax
je 0x298e
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7870(%rip), %rsi      # 0xa1f1
xorl %edi, %edi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x6c5d
callq 0x2030
movl (%rax), %edi
leaq 0x78a3(%rip), %rsi      # 0xa23f
movl %r14d, %edx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x6c5d
nop
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_cycle.c
// Function: qq_cycle_init
qq_int_t
qq_cycle_init(void)
{
    qq_pool_t          *pool;
    qq_cycle_t         *cycle;

    pool = qq_create_pool(QQ_CYCLE_POOL_SIZE);
    if (pool == NULL) {
        qq_log_error(0, "qq_create_pool(%d) failed", QQ_CYCLE_POOL_SIZE);
        return QQ_ERROR;
    }

    cycle = qq_pcalloc(pool, sizeof(qq_cycle_t));
    if (cycle == NULL) {
        qq_log_error(0, "qq_pcalloc() failed");
        qq_destroy_pool(pool);
        return QQ_ERROR;
    }
    cycle->pool = pool;
    qq_cycle = cycle;

    if (qq_app_init(cycle) == QQ_ERROR) {
        qq_log_error(0, "qq_app_init() failed");
        return QQ_ERROR;
    }

    if (qq_create_listening(cycle) == QQ_ERROR) {
        qq_log_error(0, "qq_create_listening() failed");
        return QQ_ERROR;
    }

    if (qq_open_listening_sockets(cycle) == QQ_ERROR) {
        qq_log_error(0, "qq_open_listening_sockets() failed");
        return QQ_ERROR;
    }

    if (qq_configure_listening_sockets(cycle) == QQ_ERROR) {
        qq_log_error(0, "qq_configure_listening_sockets() failed");
        return QQ_ERROR;
    }

    if (qq_event_init(cycle) == QQ_ERROR) {
        qq_log_error(0, "qq_event_init() failed");
        return QQ_ERROR;
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0x4000, %edi           # imm = 0x4000
callq 0x7dcc
testq %rax, %rax
je 0x2a2e
movq %rax, %r14
movl $0x58, %esi
movq %rax, %rdi
callq 0x7e46
testq %rax, %rax
je 0x2a45
movq %rax, %rbx
movq %r14, (%rax)
movq %rax, 0xc8cc(%rip)      # 0xf2b0
movq %rax, %rdi
callq 0x25e4
cmpq $-0x1, %rax
je 0x2a5f
movq %rbx, %rdi
callq 0x662c
cmpq $-0x1, %rax
je 0x2a68
movq %rbx, %rdi
callq 0x675d
cmpq $-0x1, %rax
je 0x2a71
movq %rbx, %rdi
callq 0x69fa
cmpq $-0x1, %rax
je 0x2a7a
movq %rbx, %rdi
callq 0x311c
cmpq $-0x1, %rax
je 0x2a83
xorl %eax, %eax
jmp 0x2a9a
leaq 0x782c(%rip), %rsi      # 0xa261
xorl %edi, %edi
movl $0x4000, %edx           # imm = 0x4000
xorl %eax, %eax
callq 0x6c5d
jmp 0x2a93
leaq 0x782f(%rip), %rsi      # 0xa27b
xorl %edi, %edi
xorl %eax, %eax
callq 0x6c5d
movq %r14, %rdi
callq 0x2338
jmp 0x2a93
leaq 0x7829(%rip), %rsi      # 0xa28f
jmp 0x2a8a
leaq 0x7835(%rip), %rsi      # 0xa2a4
jmp 0x2a8a
leaq 0x7849(%rip), %rsi      # 0xa2c1
jmp 0x2a8a
leaq 0x7863(%rip), %rsi      # 0xa2e4
jmp 0x2a8a
leaq 0x7882(%rip), %rsi      # 0xa30c
xorl %edi, %edi
xorl %eax, %eax
callq 0x6c5d
movq $-0x1, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_cycle.c
// Function: qq_cycle_done
void
qq_cycle_done(void)
{
    qq_log_debug("qq_cycle_done()");

    qq_close_listening_sockets(qq_cycle);

    qq_app_done(qq_cycle);

    qq_event_done(qq_cycle);

    qq_destroy_pool(qq_cycle->pool);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7879(%rip), %rdi      # 0xa323
xorl %eax, %eax
callq 0x6daa
movq 0xc7f8(%rip), %rdi      # 0xf2b0
callq 0x6a97
movq 0xc7ec(%rip), %rdi      # 0xf2b0
callq 0x2676
movq 0xc7e0(%rip), %rdi      # 0xf2b0
callq 0x339c
movq 0xc7d4(%rip), %rax      # 0xf2b0
movq (%rax), %rdi
popq %rbp
jmp 0x2338
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_epoll.c
// Function: qq_epoll_init
qq_int_t
qq_epoll_init(void)
{
    if (ep == -1) {
        ep = epoll_create(QQ_CONNECTION_NUMBER);

        if (ep == -1) {
            qq_log_error(errno, "epoll_create() failed");
            return QQ_ERROR;
        }
    }

    nevents = QQ_EPOLL_EVENT_NUMBER;
    if (event_list) {
        free(event_list);
    }
    event_list = qq_alloc(sizeof(struct epoll_event) * nevents);
    if (event_list == NULL) {
        qq_log_error(0, "epoll_event malloc(%d) failed", nevents);
        return QQ_ERROR;
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x1, 0xc6bd(%rip)     # 0xf1b0
jne 0x2b0a
movl $0x4e20, %edi           # imm = 0x4E20
callq 0x2310
movl %eax, 0xc6ab(%rip)      # 0xf1b0
cmpl $-0x1, %eax
je 0x2b53
movb $0x1, 0xc7a7(%rip)      # 0xf2b8
movq 0xc7a8(%rip), %rdi      # 0xf2c0
testq %rdi, %rdi
je 0x2b22
callq 0x2338
movl $0x1d4c0, %edi          # imm = 0x1D4C0
callq 0x243c
movq %rax, 0xc78d(%rip)      # 0xf2c0
testq %rax, %rax
je 0x2b3c
xorl %eax, %eax
jmp 0x2b6f
leaq 0x7806(%rip), %rsi      # 0xa349
movl $0x2710, %edx           # imm = 0x2710
xorl %edi, %edi
xorl %eax, %eax
callq 0x6c5d
jmp 0x2b68
callq 0x2030
movl (%rax), %edi
leaq 0x77d2(%rip), %rsi      # 0xa333
xorl %eax, %eax
callq 0x6c5d
movq $-0x1, %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_epoll.c
// Function: qq_epoll_done
void
qq_epoll_done(void)
{
    qq_log_debug("qq_epoll_done()");

    if (close(ep) == -1) {
        qq_log_error(errno, "epoll close() failed");
    }
    ep = -1;

    free(event_list);
    event_list = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x77eb(%rip), %rdi      # 0xa367
xorl %eax, %eax
callq 0x6daa
movl 0xc627(%rip), %edi      # 0xf1b0
callq 0x2320
cmpl $-0x1, %eax
jne 0x2ba8
callq 0x2030
movl (%rax), %edi
leaq 0x77d6(%rip), %rsi      # 0xa377
xorl %eax, %eax
callq 0x6c5d
movl $0xffffffff, 0xc5fe(%rip) # imm = 0xFFFFFFFF
movq 0xc707(%rip), %rdi      # 0xf2c0
callq 0x2338
movq $0x0, 0xc6f7(%rip) # 0xf2c0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_epoll.c
// Function: qq_epoll_add_event
qq_int_t
qq_epoll_add_event(qq_event_t *ev, qq_int_t event)
{
    int                  op;
    uint32_t             events, prev;
    qq_event_t          *e;
    qq_connection_t     *c;
    struct epoll_event   ee;

    c = ev->data;

    if (event == QQ_READ_EVENT) {
        e = c->write;
        prev = EPOLLOUT;
        events = EPOLLIN|EPOLLRDHUP;
    } else {
        e = c->read;
        prev = EPOLLIN|EPOLLRDHUP;
        events = EPOLLOUT;
    }

    if (e->active) {
        op = EPOLL_CTL_MOD;
        events |= prev;
    } else {
        op = EPOLL_CTL_ADD;
    }

    ee.events = events | EPOLLET;
    ee.data.ptr = (void *) ((uintptr_t) c | ev->instance);

    qq_log_debug("epoll add event: fd:%d op:%d ev:%08XD", c->fd, op, ee.events);

    if (epoll_ctl(ep, op, c->fd, &ee) == -1) {
        qq_log_error(errno, "epoll_ctl(%d, %d) failed", op, c->fd);
        return QQ_ERROR;
    }

    ev->active = 1;

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r12
xorl %eax, %eax
cmpq $0x1, %rsi
sete %al
movl $0x80002001, %ecx       # imm = 0x80002001
movl $0x80000004, %edx       # imm = 0x80000004
cmovel %ecx, %edx
movq 0x8(%r12,%rax,8), %rax
movl 0x8(%rax), %eax
andl $0x8, %eax
movl %eax, %r14d
shrl $0x2, %r14d
incl %r14d
testl %eax, %eax
movl $0x80002005, %ecx       # imm = 0x80002005
cmovel %edx, %ecx
leaq -0x2c(%rbp), %r15
movl %ecx, (%r15)
movl 0x8(%rdi), %eax
shrl $0x2, %eax
andl $0x1, %eax
orq %r12, %rax
movq %rax, 0x4(%r15)
movl 0x18(%r12), %esi
leaq 0x7754(%rip), %rdi      # 0xa38c
movl %r14d, %edx
xorl %eax, %eax
callq 0x6daa
movl 0xc568(%rip), %edi      # 0xf1b0
movl 0x18(%r12), %edx
movl %r14d, %esi
movq %r15, %rcx
callq 0x2270
cmpl $-0x1, %eax
je 0x2c65
orb $0x8, 0x8(%rbx)
xorl %eax, %eax
jmp 0x2c89
callq 0x2030
movl (%rax), %edi
movl 0x18(%r12), %ecx
leaq 0x773a(%rip), %rsi      # 0xa3b2
movl %r14d, %edx
xorl %eax, %eax
callq 0x6c5d
movq $-0x1, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_epoll.c
// Function: qq_epoll_del_event
qq_int_t
qq_epoll_del_event(qq_event_t *ev, qq_int_t event)
{
    int                  op;
    uint32_t             prev;
    qq_event_t          *e;
    qq_connection_t     *c;
    struct epoll_event   ee;

    c = ev->data;

    if (event == QQ_READ_EVENT) {
        e = c->write;
        prev = EPOLLOUT;
    } else {
        e = c->read;
        prev = EPOLLIN|EPOLLRDHUP;
    }

    if (e->active) {
        op = EPOLL_CTL_MOD;
        ee.events = prev | EPOLLET;
        ee.data.ptr = (void *) ((uintptr_t) c | ev->instance);
    } else {
        op = EPOLL_CTL_DEL;
        ee.events = 0;
        ee.data.ptr = NULL;
    }

    qq_log_debug("epoll del event: fd:%d op:%d ev:%08XD", c->fd, op, ee.events);

    if (epoll_ctl(ep, op, c->fd, &ee) == -1) {
        qq_log_error(errno, "epoll_ctl(%d, %d) failed", op, c->fd);
        return QQ_ERROR;
    }

    ev->active = 0;

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r12
xorl %eax, %eax
cmpq $0x1, %rsi
sete %al
movq 0x8(%r12,%rax,8), %rax
testb $0x8, 0x8(%rax)
jne 0x2cd0
movl $0x0, -0x2c(%rbp)
movl $0x2, %r14d
xorl %eax, %eax
jmp 0x2cf6
cmpq $0x1, %rsi
movl $0x80000004, %eax       # imm = 0x80000004
movl $0x80002001, %ecx       # imm = 0x80002001
cmovel %eax, %ecx
movl %ecx, -0x2c(%rbp)
movl 0x8(%rbx), %eax
shrl $0x2, %eax
andl $0x1, %eax
orq %r12, %rax
movl $0x3, %r14d
leaq -0x2c(%rbp), %r15
movq %rax, 0x4(%r15)
movl 0x18(%r12), %esi
movl (%r15), %ecx
leaq 0x76be(%rip), %rdi      # 0xa3cb
movl %r14d, %edx
xorl %eax, %eax
callq 0x6daa
movl 0xc493(%rip), %edi      # 0xf1b0
movl 0x18(%r12), %edx
movl %r14d, %esi
movq %r15, %rcx
callq 0x2270
cmpl $-0x1, %eax
je 0x2d3a
andb $-0x9, 0x8(%rbx)
xorl %eax, %eax
jmp 0x2d5e
callq 0x2030
movl (%rax), %edi
movl 0x18(%r12), %ecx
leaq 0x7665(%rip), %rsi      # 0xa3b2
movl %r14d, %edx
xorl %eax, %eax
callq 0x6c5d
movq $-0x1, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_epoll.c
// Function: qq_epoll_add_connection
qq_int_t
qq_epoll_add_connection(qq_connection_t *c)
{
    struct epoll_event  ee;

    ee.events = EPOLLIN|EPOLLOUT|EPOLLET|EPOLLRDHUP;
    ee.data.ptr = (void *) ((uintptr_t) c | c->read->instance);

    qq_log_debug("epoll add connection: fd:%d ev:%08XD", c->fd, ee.events);

    if (epoll_ctl(ep, EPOLL_CTL_ADD, c->fd, &ee) == -1) {
        qq_log_error(errno, "epoll_ctl(EPOLL_CTL_ADD, %d) failed", c->fd);
        return QQ_ERROR;
    }

    c->read->active = 1;
    c->write->active = 1;

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x1c(%rbp), %r14
movl $0x80002005, (%r14)     # imm = 0x80002005
movq 0x8(%rdi), %rax
movl 0x8(%rax), %eax
shrl $0x2, %eax
andl $0x1, %eax
orq %rdi, %rax
movq %rax, 0x4(%r14)
movl 0x18(%rdi), %esi
leaq 0x764f(%rip), %rdi      # 0xa3f1
movl $0x80002005, %edx       # imm = 0x80002005
xorl %eax, %eax
callq 0x6daa
movl 0xc3fc(%rip), %edi      # 0xf1b0
movl 0x18(%rbx), %edx
movl $0x1, %esi
movq %r14, %rcx
callq 0x2270
cmpl $-0x1, %eax
je 0x2ddd
movq 0x8(%rbx), %rax
orl $0x8, 0x8(%rax)
movq 0x10(%rbx), %rax
orl $0x8, 0x8(%rax)
xorl %eax, %eax
jmp 0x2dfc
callq 0x2030
movl (%rax), %edi
movl 0x18(%rbx), %edx
leaq 0x7628(%rip), %rsi      # 0xa416
xorl %eax, %eax
callq 0x6c5d
movq $-0x1, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_epoll.c
// Function: qq_epoll_del_connection
qq_int_t
qq_epoll_del_connection(qq_connection_t *c)
{
    struct epoll_event  ee;

    qq_log_debug("epoll del connection: fd:%d", c->fd);

    ee.events = 0;
    ee.data.ptr = NULL;

    if (epoll_ctl(ep, EPOLL_CTL_DEL, c->fd, &ee) == -1) {
        qq_log_error(errno, "epoll_ctl(EPOLL_CTL_DEL, %d) failed", c->fd);
        return QQ_ERROR;
    }

    c->read->active = 0;
    c->write->active = 0;

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x18(%rdi), %esi
leaq 0x761f(%rip), %rdi      # 0xa43a
xorl %eax, %eax
callq 0x6daa
leaq -0x14(%rbp), %rcx
movl $0x0, (%rcx)
movq $0x0, 0x4(%rcx)
movl 0xc376(%rip), %edi      # 0xf1b0
movl 0x18(%rbx), %edx
movl $0x2, %esi
callq 0x2270
cmpl $-0x1, %eax
je 0x2e60
movq 0x8(%rbx), %rax
andl $-0x9, 0x8(%rax)
movq 0x10(%rbx), %rax
andl $-0x9, 0x8(%rax)
xorl %eax, %eax
jmp 0x2e7f
callq 0x2030
movl (%rax), %edi
movl 0x18(%rbx), %edx
leaq 0x75e5(%rip), %rsi      # 0xa456
xorl %eax, %eax
callq 0x6c5d
movq $-0x1, %rax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_event.c
// Function: qq_events_process
void
qq_events_process(void)
{
    qq_msec_t  delta;

    delta = qq_current_msec;

    qq_epoll_process_events(qq_event_find_timer(), QQ_UPDATE_TIME);

    delta = qq_current_msec - delta;
    qq_log_debug("timer delta: %d", delta);

    qq_event_process_posted(&qq_posted_accept_events);

    if (delta) {
        qq_event_expire_timers();
    }

    qq_event_process_posted(&qq_posted_events);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xc376(%rip), %rbx      # 0xf6c0
movq (%rbx), %r14
callq 0x3ac2
movl $0x1, %esi
movq %rax, %rdi
callq 0x2e86
movq (%rbx), %rbx
leaq 0x72bd(%rip), %rdi      # 0xa626
movq %rbx, %rsi
subq %r14, %rsi
xorl %eax, %eax
callq 0x6daa
leaq 0xbf4b(%rip), %rdi      # 0xf2c8
callq 0x3a14
cmpq %r14, %rbx
je 0x338c
callq 0x3b0c
leaq 0xbf45(%rip), %rdi      # 0xf2d8
popq %rbx
popq %r14
popq %rbp
jmp 0x3a14
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_event.c
// Function: qq_event_done
void
qq_event_done(qq_cycle_t *cycle)
{
    qq_log_debug("qq_event_done()");

    qq_epoll_done();

    free(cycle->connections);

    free(cycle->read_events);

    free(cycle->write_events);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x728a(%rip), %rdi      # 0xa636
xorl %eax, %eax
callq 0x6daa
callq 0x2b71
movq 0x10(%rbx), %rdi
callq 0x2338
movq 0x28(%rbx), %rdi
callq 0x2338
movq 0x30(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2338
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_event.c
// Function: qq_handle_read_event
qq_int_t
qq_handle_read_event(qq_event_t *rev)
{
    if (!rev->active && !rev->ready) {
        if (qq_epoll_add_event(rev, QQ_READ_EVENT)
            == QQ_ERROR)
        {
            return QQ_ERROR;
        }
    }

    return QQ_OK;
}

// Assembly:
testb $0x28, 0x8(%rdi)
jne 0x33f4
pushq %rbp
movq %rsp, %rbp
movl $0x1, %esi
callq 0x2bcb
cmpq $-0x1, %rax
popq %rbp
je 0x33f7
xorl %eax, %eax
retq
movq $-0x1, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_event_accept.c
// Function: qq_enable_accept_events
static qq_int_t
qq_enable_accept_events(qq_cycle_t *cycle)
{
    qq_uint_t         i;
    qq_listening_t   *ls;
    qq_connection_t  *c;

    ls = cycle->listening;
    for (i = 0; i < cycle->nlistening; i++) {
        c = ls[i].connection;
        if (c == NULL || c->read->active) {
            continue;
        }

        if (qq_epoll_add_event(c->read, QQ_READ_EVENT) == QQ_ERROR) {
            return QQ_ERROR;
        }
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpq $0x0, 0x38(%rdi)
je 0x3715
movq %rdi, %r14
movq 0x40(%rdi), %r15
addq $0x58, %r15
xorl %ebx, %ebx
xorl %r12d, %r12d
movq (%r15), %rax
testq %rax, %rax
je 0x3706
movq 0x8(%rax), %rdi
testb $0x8, 0x8(%rdi)
jne 0x3706
movl $0x1, %esi
callq 0x2bcb
cmpq $-0x1, %rax
je 0x3719
incq %r12
addq $0x60, %r15
cmpq 0x38(%r14), %r12
jb 0x36e4
jmp 0x3720
xorl %ebx, %ebx
jmp 0x3720
movq $-0x1, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_event_accept.c
// Function: qq_close_accepted_connection
static void
qq_close_accepted_connection(qq_connection_t *c)
{
    qq_socket_t  fd;

    qq_free_connection(c);

    fd = c->fd;
    c->fd = (qq_socket_t) -1;

    if (close(fd) == -1) {
        qq_log_error(errno, "close sockets failed");
    }

    if (c->pool) {
        qq_destroy_pool(c->pool);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x283c
movl 0x18(%rbx), %edi
movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF
callq 0x2320
cmpl $-0x1, %eax
jne 0x3763
callq 0x2030
movl (%rax), %edi
leaq 0x6f48(%rip), %rsi      # 0xa6a4
xorl %eax, %eax
callq 0x6c5d
movq 0x40(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x3777
popq %rbx
popq %rbp
jmp 0x2338
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_event_posted.c
// Function: qq_event_process_posted
void
qq_event_process_posted(qq_queue_t *posted)
{
    qq_queue_t  *q;
    qq_event_t  *ev;

    while (!qq_queue_empty(posted)) {
        q = qq_queue_head(posted);
        ev = qq_queue_data(q, qq_event_t, queue);

        qq_log_debug("qq_event_process_posted(ev:%p)", ev);

        qq_delete_posted_event(ev);

        ev->handler(ev);
    }
}

// Assembly:
cmpq %rdi, (%rdi)
je 0x3a8c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6d3c(%rip), %r14      # 0xa76d
leaq 0x67e9(%rip), %r15      # 0xa221
movq 0x8(%rbx), %r13
leaq -0x48(%r13), %r12
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x6daa
andb $0x7f, -0x3f(%r13)
movq (%r13), %rax
movq 0x8(%r13), %rcx
movq %rax, (%rcx)
movq (%r13), %rax
movq %rcx, 0x8(%rax)
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x6daa
movq %r12, %rdi
callq *-0x38(%r13)
cmpq %rbx, (%rbx)
jne 0x3a38
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_event_timer.c
// Function: qq_event_find_timer
qq_msec_t
qq_event_find_timer(void)
{
    qq_msec_int_t      timer;
    qq_rbtree_node_t  *node, *root, *sentinel;

    if (qq_event_timer_rbtree.root == &qq_event_timer_sentinel) {
        return QQ_TIMER_INFINITE;
    }

    root     = qq_event_timer_rbtree.root;
    sentinel = qq_event_timer_rbtree.sentinel;

    node = qq_rbtree_min(root, sentinel);
    timer = (qq_msec_int_t) (node->key - qq_current_msec);

    return (qq_msec_t) (timer > 0 ? timer : 0);
}

// Assembly:
movq 0xb847(%rip), %rax      # 0xf310
leaq 0xb818(%rip), %rcx      # 0xf2e8
cmpq %rcx, %rax
je 0x3b04
pushq %rbp
movq %rsp, %rbp
movq 0xb838(%rip), %rcx      # 0xf318
movq %rax, %rdx
movq 0x8(%rax), %rax
cmpq %rcx, %rax
jne 0x3ae0
movq (%rdx), %rcx
leaq 0xbbca(%rip), %rax      # 0xf6c0
subq (%rax), %rcx
xorl %eax, %eax
testq %rcx, %rcx
cmovgq %rcx, %rax
popq %rbp
retq
movq $-0x1, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_event_timer.c
// Function: qq_event_expire_timers
void
qq_event_expire_timers(void)
{
    qq_event_t        *ev;
    qq_rbtree_node_t  *node, *root, *sentinel;

    sentinel = qq_event_timer_rbtree.sentinel;

    for ( ;; ) {
        root = qq_event_timer_rbtree.root;

        if (root == sentinel) {
            return;
        }

        node = qq_rbtree_min(root, sentinel);

        /* node->key > qq_current_msec */

        if ((qq_msec_int_t) (node->key - qq_current_msec) > 0) {
            return;
        }

        ev = (qq_event_t *) ((char *) node - offsetof(qq_event_t, timer));
        qq_rbtree_delete(&qq_event_timer_rbtree, &ev->timer);

        ev->timer_set = 0;
        ev->timedout = 1;
        ev->handler(ev);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xb7f7(%rip), %r12      # 0xf318
movq 0xb7e8(%rip), %rax      # 0xf310
cmpq %r12, %rax
je 0x3b86
leaq 0xbb8c(%rip), %r13      # 0xf6c0
movl $0xfffff3ff, %ebx       # imm = 0xFFFFF3FF
movq %rax, %r14
movq 0x8(%rax), %rax
cmpq %r12, %rax
jne 0x3b39
movq (%r14), %rax
subq (%r13), %rax
testq %rax, %rax
jg 0x3b86
leaq -0x20(%r14), %r15
leaq 0xb7b4(%rip), %rdi      # 0xf310
movq %r14, %rsi
callq 0x8313
movl -0x18(%r14), %eax
andl %ebx, %eax
orl $0x400, %eax            # imm = 0x400
movl %eax, -0x18(%r14)
movq %r15, %rdi
callq *-0x10(%r14)
movq 0xb78f(%rip), %rax      # 0xf310
cmpq %r12, %rax
jne 0x3b39
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_ios_app.c
// Function: qq_ios_app_init
qq_int_t
qq_ios_app_init(qq_cycle_t *cycle)
{
    if (qq_add_listening_config(SOCK_STREAM,
        QQ_IOS_APP_TCP_LISTENING_PORT,
        QQ_IOS_APP_TCP_LISTENING_POOL_SIZE,
        qq_ios_app_init_connection_handler) == QQ_ERROR)
    {
        qq_log_error(0, "qq_ios_app_init()->qq_add_listening_config() failed");
        return QQ_ERROR;
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x37(%rip), %rcx        # 0x3c1e
movl $0x400, %edx            # imm = 0x400
movl $0x1, %edi
movl $0x2710, %esi           # imm = 0x2710
callq 0x659c
cmpq $-0x1, %rax
je 0x3c05
xorl %eax, %eax
jmp 0x3c1c
leaq 0x6b8f(%rip), %rsi      # 0xa79b
xorl %edi, %edi
xorl %eax, %eax
callq 0x6c5d
movq $-0x1, %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_ios_app.c
// Function: qq_ios_app_init_connection_handler
static void
qq_ios_app_init_connection_handler(qq_connection_t *c)
{
    qq_event_t   *rev, *wev;

    qq_log_debug("qq_ios_app_init_connection_handler()");

    rev = c->read;
    rev->handler = qq_ios_app_wait_request_handler;

    wev = c->write;
    wev->handler = qq_ios_app_write_event_handler;

    qq_event_add_timer(rev, QQ_IOS_APP_ACCEPT_TIMEOUT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x6bb2(%rip), %rdi      # 0xa7e1
xorl %eax, %eax
callq 0x6daa
movq 0x8(%rbx), %r14
leaq 0x97(%rip), %rax        # 0x3cd8
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rax
leaq 0x1c4(%rip), %rcx       # 0x3e14
movq %rcx, 0x10(%rax)
leaq 0xba65(%rip), %rax      # 0xf6c0
movl $0xbb8, %ebx            # imm = 0xBB8
addq (%rax), %rbx
testb $0x8, 0x9(%r14)
je 0x3c99
movq %rbx, %rax
subq 0x20(%r14), %rax
movq %rax, %rcx
negq %rcx
cmovsq %rax, %rcx
cmpq $0x12c, %rcx            # imm = 0x12C
jb 0x3cb2
leaq 0x20(%r14), %rsi
leaq 0xb681(%rip), %rdi      # 0xf310
callq 0x8313
andb $-0x9, 0x9(%r14)
leaq 0x20(%r14), %rsi
movq %rbx, 0x20(%r14)
leaq 0xb668(%rip), %rdi      # 0xf310
callq 0x8098
orb $0x8, 0x9(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_ios_app.c
// Function: qq_ios_app_process_request_handler
static void
qq_ios_app_process_request_handler(qq_event_t *rev)
{
    qq_connection_t   *c;
    ssize_t            n;
    size_t             size;

    c = rev->data;

    if (c->buffer->last - c->buffer->pos > 0) {
        qq_ios_app_process_package(c);
        c->buffer->last = c->buffer->pos;
        return;
    }

    n = c->recv(c, (u_char *)c->buffer->pos,
        (size_t)((uintptr_t)c->buffer->end - (uintptr_t)c->buffer->start));
    if (n == QQ_AGAIN) {
        if (qq_handle_read_event(rev) != QQ_OK) {
            qq_app_close_connection(c);
        }
        return;
    }

    if (n == QQ_ERROR) {
        qq_app_close_connection(c);
        return;
    }

    if (n == 0) {
        qq_log_error(0, "client closed connection");
        qq_app_close_connection(c);
        return;
    }

    c->buffer->last += n;
    qq_ios_app_process_package(c);
    c->buffer->last = c->buffer->pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rbx
movq 0x20(%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
subq %rsi, %rcx
testq %rcx, %rcx
jle 0x3e4d
movq %rsi, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
movq %rdi, %r14
movq 0x28(%rax), %rdx
subq 0x20(%rax), %rdx
movq %rbx, %rdi
callq *0x28(%rbx)
testq %rax, %rax
je 0x3e7e
cmpq $-0x1, %rax
je 0x3e8e
cmpq $-0x2, %rax
jne 0x3e9a
movq %r14, %rdi
callq 0x33d9
testq %rax, %rax
jne 0x3e8e
jmp 0x3e48
leaq 0x69a3(%rip), %rsi      # 0xa828
xorl %edi, %edi
xorl %eax, %eax
callq 0x6c5d
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x26a2
movq 0x20(%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x8(%rax)
jmp 0x3e48
nop
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: qq_cjson_init
int qq_cjson_init(size_t size)
{
    void *p;

    p = memalign(16, size);
    if (p == NULL) {
        return -1;
    }

    qq_cjson_buf = (qq_cjson_buf_t *) p;
    qq_cjson_buf->start = (u_char *) p + sizeof(qq_cjson_buf_t);
    qq_cjson_buf->pos = qq_cjson_buf->start;
    qq_cjson_buf->end = (u_char *) p + size;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %edi
movq %rbx, %rsi
callq 0x22b0
testq %rax, %rax
je 0x3ee0
movq %rax, 0xb45e(%rip)      # 0xf328
leaq 0x18(%rax), %rcx
movq %rcx, (%rax)
movq %rcx, 0x8(%rax)
addq %rax, %rbx
movq %rbx, 0x10(%rax)
xorl %eax, %eax
jmp 0x3ee5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_InitHooks
void cJSON_InitHooks(cJSON_Hooks* hooks)
{
    if (!hooks) { /* Reset hooks */
        cJSON_malloc = malloc;
        cJSON_free = free;
        return;
    }

	cJSON_malloc = (hooks->malloc_fn)?hooks->malloc_fn:malloc;
	cJSON_free	 = (hooks->free_fn)?hooks->free_fn:free;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x3f34
movq (%rdi), %rax
testq %rax, %rax
jne 0x3f22
movq 0xb0be(%rip), %rax      # 0xefe0
movq %rax, 0xb28f(%rip)      # 0xf1b8
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3f42
jmp 0x3f49
movq 0xb0a5(%rip), %rax      # 0xefe0
movq %rax, 0xb276(%rip)      # 0xf1b8
movq 0xb08f(%rip), %rax      # 0xefd8
movq %rax, 0xb270(%rip)      # 0xf1c0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_Delete
void cJSON_Delete(cJSON *c)
{
	cJSON *next;
	while (c)
	{
		next=c->next;
		if (!(c->type&cJSON_IsReference) && c->child) cJSON_Delete(c->child);
		if (!(c->type&cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring);
		if (!(c->type&cJSON_StringIsConst) && c->string) cJSON_free(c->string);
		cJSON_free(c);
		c=next;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x3fba
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rbx, %r14
movq (%rbx), %rbx
testb $0x1, 0x19(%r14)
jne 0x3f7c
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x3f7c
callq 0x3f52
testb $0x1, 0x19(%r14)
jne 0x3f92
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x3f92
callq *0xb22e(%rip)           # 0xf1c0
testb $0x2, 0x19(%r14)
jne 0x3fa8
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x3fa8
callq *0xb218(%rip)           # 0xf1c0
movq %r14, %rdi
callq *0xb20f(%rip)           # 0xf1c0
testq %rbx, %rbx
jne 0x3f61
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_ParseWithOpts
cJSON *cJSON_ParseWithOpts(const char *value,const char **return_parse_end,int require_null_terminated)
{
	const char *end=0;
	cJSON *c=cJSON_New_Item();
	ep=0;
	if (!c) return 0;       /* memory fail */

	end=parse_value(c,skip(value));
	if (!end)	{cJSON_Delete(c);return 0;}	/* parse failure. ep is set. */

	/* if we require null-terminated JSON without appended garbage, skip and then check for a null terminator */
	if (require_null_terminated) {end=skip(end);if (*end) {cJSON_Delete(c);ep=end;return 0;}}
	if (return_parse_end) *return_parse_end=end;
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
movl $0x40, %edi
callq *0xb1de(%rip)           # 0xf1b8
testq %rax, %rax
je 0x4056
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0xb331(%rip) # 0xf330
testq %r12, %r12
je 0x4015
decq %r12
movb 0x1(%r12), %al
incq %r12
decb %al
cmpb $0x20, %al
jb 0x4007
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4083
testq %rax, %rax
je 0x406d
movq %rax, %r12
testl %r15d, %r15d
je 0x4063
decq %r12
movb 0x1(%r12), %al
incq %r12
decb %al
cmpb $0x20, %al
jb 0x4030
cmpb $0x0, (%r12)
je 0x4063
movq %rbx, %rdi
callq 0x3f52
movq %r12, 0xb2dc(%rip)      # 0xf330
jmp 0x4075
movq $0x0, 0xb2cf(%rip) # 0xf330
jmp 0x4075
testq %r14, %r14
je 0x4077
movq %r12, (%r14)
jmp 0x4077
movq %rbx, %rdi
callq 0x3f52
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: print_value
static char *print_value(cJSON *item,int depth,int fmt,printbuffer *p)
{
	char *out=0;
	if (!item) return 0;
	if (p)
	{
		switch ((item->type)&255)
		{
			case cJSON_NULL:	{out=ensure(p,5);	if (out) strcpy(out,"null");	break;}
			case cJSON_False:	{out=ensure(p,6);	if (out) strcpy(out,"false");	break;}
			case cJSON_True:	{out=ensure(p,5);	if (out) strcpy(out,"true");	break;}
			case cJSON_Number:	out=print_number(item,p);break;
			case cJSON_String:	out=print_string(item,p);break;
			case cJSON_Array:	out=print_array(item,depth,fmt,p);break;
			case cJSON_Object:	out=print_object(item,depth,fmt,p);break;
		}
	}
	else
	{
		switch ((item->type)&255)
		{
			case cJSON_NULL:	out=cJSON_strdup("null");	break;
			case cJSON_False:	out=cJSON_strdup("false");break;
			case cJSON_True:	out=cJSON_strdup("true"); break;
			case cJSON_Number:	out=print_number(item,0);break;
			case cJSON_String:	out=print_string(item,0);break;
			case cJSON_Array:	out=print_array(item,depth,fmt,0);break;
			case cJSON_Object:	out=print_object(item,depth,fmt,0);break;
		}
	}
	return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x440c
movb 0x18(%rdi), %al
testq %rcx, %rcx
je 0x4357
cmpb $0x6, %al
ja 0x440c
movzbl %al, %eax
leaq 0x6591(%rip), %r8       # 0xa8d0
movslq (%r8,%rax,4), %rax
addq %r8, %rax
jmpq *%rax
movq %rcx, %rdi
movl $0x6, %esi
callq 0x5831
jmp 0x437d
cmpb $0x6, %al
ja 0x440c
movzbl %al, %eax
leaq 0x6583(%rip), %rcx      # 0xa8ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x6, %edi
callq *0xae3b(%rip)           # 0xf1b8
testq %rax, %rax
je 0x440c
movw $0x65, 0x4(%rax)
movl $0x736c6166, (%rax)     # imm = 0x736C6166
jmp 0x440e
movq %rcx, %rdi
movl $0x5, %esi
callq 0x5831
jmp 0x43d7
movq %rcx, %rdi
movl $0x5, %esi
callq 0x5831
jmp 0x43fb
movq %rcx, %rsi
jmp 0x43ea
movq 0x20(%rdi), %rdi
movq %rcx, %rsi
jmp 0x43c6
movq 0x20(%rdi), %rdi
xorl %esi, %esi
popq %rbp
jmp 0x636f
movl $0x5, %edi
callq *0xade1(%rip)           # 0xf1b8
testq %rax, %rax
je 0x440c
movb $0x0, 0x4(%rax)
movl $0x6c6c756e, (%rax)     # imm = 0x6C6C756E
jmp 0x440e
xorl %esi, %esi
popq %rbp
jmp 0x58e0
movl $0x5, %edi
callq *0xadbd(%rip)           # 0xf1b8
testq %rax, %rax
je 0x440c
movb $0x0, 0x4(%rax)
movl $0x65757274, (%rax)     # imm = 0x65757274
jmp 0x440e
xorl %eax, %eax
popq %rbp
retq
xorl %ecx, %ecx
popq %rbp
jmp 0x5a6d
xorl %ecx, %ecx
popq %rbp
jmp 0x5d86
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_PrintBuffered
char *cJSON_PrintBuffered(cJSON *item,int prebuffer,int fmt)
{
	printbuffer p;
	p.buffer=(char*)cJSON_malloc(prebuffer);
	p.length=prebuffer;
	p.offset=0;
	return print_value(item,0,fmt,&p);
	return p.buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rdi, %r14
movslq %esi, %r15
movq %r15, %rdi
callq *0xad6a(%rip)           # 0xf1b8
leaq -0x28(%rbp), %rcx
movq %rax, (%rcx)
movl %r15d, 0x8(%rcx)
movl $0x0, 0xc(%rcx)
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x4318
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_Duplicate
cJSON *cJSON_Duplicate(cJSON *item,int recurse)
{
	cJSON *newitem,*cptr,*nptr=0,*newchild;
	/* Bail on bad ptr */
	if (!item) return 0;
	/* Create new item */
	newitem=cJSON_New_Item();
	if (!newitem) return 0;
	/* Copy over all vars */
	newitem->type=item->type&(~cJSON_IsReference),newitem->valueint=item->valueint,newitem->valuedouble=item->valuedouble;
	if (item->valuestring)	{newitem->valuestring=cJSON_strdup(item->valuestring);	if (!newitem->valuestring)	{cJSON_Delete(newitem);return 0;}}
	if (item->string)		{newitem->string=cJSON_strdup(item->string);			if (!newitem->string)		{cJSON_Delete(newitem);return 0;}}
	/* If non-recursive, then we're done! */
	if (!recurse) return newitem;
	/* Walk the ->next chain for the child. */
	cptr=item->child;
	while (cptr)
	{
		newchild=cJSON_Duplicate(cptr,1);		/* Duplicate (with recurse) each item in the ->next chain */
		if (!newchild) {cJSON_Delete(newitem);return 0;}
		if (nptr)	{nptr->next=newchild,newchild->prev=nptr;nptr=newchild;}	/* If newitem->child already set, then crosswire ->prev and ->next and move on */
		else		{newitem->child=newchild;nptr=newchild;}					/* Set newitem->child and move to it */
		cptr=cptr->next;
	}
	return newitem;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x503f
movl %esi, %r15d
movq %rdi, %r14
movl $0x40, %edi
callq *0xa290(%rip)           # 0xf1b8
testq %rax, %rax
je 0x503f
movq %rax, %rbx
movl %r15d, -0x2c(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
andl 0x18(%r14), %eax
movl %eax, 0x18(%rbx)
movl 0x28(%r14), %eax
movl %eax, 0x28(%rbx)
movsd 0x30(%r14), %xmm0
movsd %xmm0, 0x30(%rbx)
movq 0x20(%r14), %r12
testq %r12, %r12
je 0x4fb0
movq %r12, %rdi
callq 0x20d0
movq %rax, %r15
incq %r15
movq %r15, %rdi
callq *0xa230(%rip)           # 0xf1b8
testq %rax, %rax
je 0x4fa0
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x21c0
jmp 0x4fa3
xorl %r13d, %r13d
movq %r13, 0x20(%rbx)
testq %r13, %r13
je 0x5037
movq 0x38(%r14), %r12
testq %r12, %r12
je 0x4ff4
movq %r12, %rdi
callq 0x20d0
movq %rax, %r15
incq %r15
movq %r15, %rdi
callq *0xa1e8(%rip)           # 0xf1b8
testq %rax, %rax
je 0x4fe8
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x21c0
jmp 0x4feb
xorl %r13d, %r13d
movq %r13, 0x38(%rbx)
testq %r13, %r13
je 0x5037
cmpl $0x0, -0x2c(%rbp)
je 0x5041
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x5041
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x1, %esi
callq 0x4f00
testq %rax, %rax
je 0x5037
testq %r15, %r15
je 0x5026
movq %rax, (%r15)
movq %r15, 0x8(%rax)
jmp 0x502a
movq %rax, 0x10(%rbx)
movq (%r14), %r14
movq %rax, %r15
testq %r14, %r14
jne 0x5006
jmp 0x5041
movq %rbx, %rdi
callq 0x3f52
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_Minify
void cJSON_Minify(char *json)
{
	char *into=json;
	while (*json)
	{
		if (*json==' ') json++;
		else if (*json=='\t') json++;	/* Whitespace characters. */
		else if (*json=='\r') json++;
		else if (*json=='\n') json++;
		else if (*json=='/' && json[1]=='/')  while (*json && *json!='\n') json++;	/* double-slash comments, to end of line. */
		else if (*json=='/' && json[1]=='*') {while (*json && !(*json=='*' && json[1]=='/')) json++;json+=2;}	/* multiline comments. */
		else if (*json=='\"'){*into++=*json++;while (*json && *json!='\"'){if (*json=='\\') *into++=*json++;*into++=*json++;}*into++=*json++;} /* string literals, which are \" sensitive. */
		else *into++=*json++;			/* All other characters. */
	}
	*into=0;	/* and null-terminate. */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movb (%rdi), %cl
movzbl %cl, %edx
cmpl $0x1f, %edx
jg 0x5075
cmpl $0x9, %edx
jle 0x508a
cmpl $0xa, %edx
je 0x508c
cmpl $0xd, %edx
je 0x508c
jmp 0x50da
cmpl $0x2f, %edx
je 0x5091
cmpl $0x22, %edx
je 0x5103
cmpl $0x20, %edx
je 0x508c
jmp 0x50da
jne 0x50d6
incq %rdi
jmp 0x505a
cmpb $0x2f, 0x1(%rdi)
jne 0x50a8
movzbl (%rdi), %ecx
testl %ecx, %ecx
je 0x505a
cmpl $0xa, %ecx
je 0x505a
incq %rdi
jmp 0x5097
cmpl $0x22, %edx
je 0x5103
cmpl $0x2f, %edx
jne 0x50da
cmpb $0x2a, 0x1(%rdi)
jne 0x50e7
addq $0x2, %rdi
movzbl -0x2(%rdi), %ecx
cmpl $0x2a, %ecx
je 0x50cb
testl %ecx, %ecx
jne 0x50d1
jmp 0x505a
cmpb $0x2f, -0x1(%rdi)
je 0x505a
incq %rdi
jmp 0x50bc
testl %edx, %edx
je 0x5127
incq %rdi
movb %cl, (%rax)
incq %rax
jmp 0x505a
cmpb $0x22, %cl
je 0x5103
jmp 0x50da
incq %rax
incq %rdi
jmp 0x5101
addq $0x2, %rdi
movb %cl, 0x1(%rax)
addq $0x2, %rax
movb (%rdi), %cl
movb %cl, (%rax)
movzbl 0x1(%rdi), %ecx
cmpl $0x5c, %ecx
je 0x50f6
testl %ecx, %ecx
je 0x5117
cmpl $0x22, %ecx
jne 0x50ee
addq $0x2, %rdi
movb %cl, 0x1(%rax)
addq $0x2, %rax
jmp 0x505a
movb $0x0, (%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: qq_cjson_malloc
static void *qq_cjson_malloc(size_t size)
{
    u_char  *m;

    qq_log_debug("qq_cjson_malloc(size: %d)", size);

    m = qq_cjson_buf->pos;
    m = qq_cjson_align_ptr(m, QQ_CJSON_ALIGNMENT);

    if ((size_t)(qq_cjson_buf->end - m) >= size) {
        qq_cjson_buf->pos = m + size;
        return m;
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x581a(%rip), %rdi      # 0xa957
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x6daa
movq 0xa1d7(%rip), %rax      # 0xf328
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rdx
addq $0x7, %rcx
andq $-0x8, %rcx
subq %rcx, %rdx
cmpq %rbx, %rdx
jb 0x5173
addq %rcx, %rbx
movq %rbx, 0x8(%rax)
movq %rcx, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: parse_array
static const char *parse_array(cJSON *item,const char *value)
{
	cJSON *child;
	if (*value!='[')	{ep=value;return 0;}	/* not an array! */

	item->type=cJSON_Array;
	value=skip(value+1);
	if (*value==']') return value+1;	/* empty array. */

	item->child=child=cJSON_New_Item();
	if (!item->child) return 0;		 /* memory fail */
	value=skip(parse_value(child,skip(value)));	/* skip any spacing, get the value. */
	if (!value) return 0;

	while (*value==',')
	{
		cJSON *new_item;
		if (!(new_item=cJSON_New_Item())) return 0; 	/* memory fail */
		child->next=new_item;new_item->prev=child;child=new_item;
		value=skip(parse_value(child,skip(value+1)));
		if (!value) return 0;	/* memory fail */
	}

	if (*value==']') return value+1;	/* end of array */
	ep=value;return 0;	/* malformed. */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x5b, (%rsi)
jne 0x550e
movq %rdi, %r14
movl $0x5, 0x18(%rdi)
incq %rbx
movb (%rbx), %al
leal -0x1(%rax), %ecx
incq %rbx
cmpb $0x20, %cl
jb 0x540e
cmpb $0x5d, %al
je 0x5517
movl $0x40, %edi
callq *0x9d8a(%rip)           # 0xf1b8
movq %rax, %r15
testq %rax, %rax
je 0x5523
addq $-0x2, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
movq %r15, 0x10(%r14)
movb 0x1(%rbx), %al
incq %rbx
decb %al
cmpb $0x20, %al
jb 0x5458
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4083
movq %rax, %r14
testq %rax, %rax
je 0x5487
decq %r14
movb 0x1(%r14), %al
incq %r14
decb %al
cmpb $0x20, %al
jb 0x547a
testq %r14, %r14
je 0x5515
xorl %ebx, %ebx
movzbl (%r14), %eax
cmpl $0x2c, %eax
jne 0x5529
movl $0x40, %edi
callq *0x9d0e(%rip)           # 0xf1b8
testq %rax, %rax
je 0x5506
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %rax, (%r15)
movq %r15, 0x8(%rax)
movb 0x1(%r14), %al
incq %r14
decb %al
cmpb $0x20, %al
jb 0x54cb
movq %r12, %rdi
movq %r14, %rsi
callq 0x4083
movq %rax, %r14
testq %rax, %rax
je 0x54fb
decq %r14
movb 0x1(%r14), %al
incq %r14
decb %al
cmpb $0x20, %al
jb 0x54ee
testq %r14, %r14
setne %al
movq %r12, %r15
jmp 0x5508
xorl %eax, %eax
testb %al, %al
jne 0x5492
jmp 0x5517
movq %rbx, 0x9e1b(%rip)      # 0xf330
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, 0x10(%r14)
jmp 0x5515
cmpl $0x5d, %eax
jne 0x5536
incq %r14
movq %r14, %rbx
jmp 0x5517
movq %r14, 0x9df3(%rip)      # 0xf330
jmp 0x5515
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: parse_hex4
static unsigned parse_hex4(const char *str)
{
	unsigned h=0;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	h=h<<4;str++;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	h=h<<4;str++;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	h=h<<4;str++;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	return h;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
leal -0x30(%rax), %esi
movb $-0x30, %cl
movb $-0x30, %dl
cmpb $0xa, %sil
jb 0x5782
leal -0x41(%rax), %esi
movb $-0x37, %dl
cmpb $0x6, %sil
jb 0x5782
leal -0x61(%rax), %esi
movb $-0x57, %dl
cmpb $0x5, %sil
ja 0x582d
movb 0x1(%rdi), %sil
leal -0x30(%rsi), %r8d
cmpb $0xa, %r8b
jb 0x57ac
leal -0x41(%rsi), %r8d
movb $-0x37, %cl
cmpb $0x6, %r8b
jb 0x57ac
leal -0x61(%rsi), %r8d
movb $-0x57, %cl
cmpb $0x5, %r8b
ja 0x582d
movb 0x2(%rdi), %r8b
leal -0x30(%r8), %r11d
movb $-0x30, %r9b
movb $-0x30, %r10b
cmpb $0xa, %r11b
jb 0x57da
leal -0x41(%r8), %r11d
movb $-0x37, %r10b
cmpb $0x6, %r11b
jb 0x57da
leal -0x61(%r8), %r11d
movb $-0x57, %r10b
cmpb $0x5, %r11b
ja 0x582d
movb 0x3(%rdi), %dil
leal -0x30(%rdi), %r11d
cmpb $0xa, %r11b
jb 0x5802
leal -0x41(%rdi), %r11d
movb $-0x37, %r9b
cmpb $0x6, %r11b
jb 0x5802
leal -0x61(%rdi), %r11d
movb $-0x57, %r9b
cmpb $0x5, %r11b
ja 0x582d
addb %dl, %al
movzbl %al, %eax
addb %cl, %sil
movzbl %sil, %ecx
shll $0x8, %eax
shll $0x4, %ecx
addl %eax, %ecx
addb %r10b, %r8b
movzbl %r8b, %edx
addl %ecx, %edx
shll $0x4, %edx
addb %r9b, %dil
movzbl %dil, %eax
addl %edx, %eax
jmp 0x582f
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: ensure
static char* ensure(printbuffer *p,int needed)
{
	char *newbuffer;int newsize;
	if (!p || !p->buffer) return 0;
	needed+=p->offset;
	if (needed<=p->length) return p->buffer+p->offset;

	newsize=pow2gt(needed);
	newbuffer=(char*)cJSON_malloc(newsize);
	if (!newbuffer) {cJSON_free(p->buffer);p->length=0,p->buffer=0;return 0;}
	if (newbuffer) memcpy(newbuffer,p->buffer,p->length);
	cJSON_free(p->buffer);
	p->length=newsize;
	p->buffer=newbuffer;
	return newbuffer+p->offset;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x58b4
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0xc(%rdi), %rcx
addl %ecx, %esi
cmpl 0x8(%rdi), %esi
jle 0x58b7
decl %esi
movl %esi, %eax
sarl %eax
orl %esi, %eax
movl %eax, %ecx
sarl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %r15d
sarl $0x10, %r15d
orl %ecx, %r15d
incl %r15d
movslq %r15d, %rdi
callq *0x9934(%rip)           # 0xf1b8
testq %rax, %rax
je 0x58bc
movq %rax, %r14
movq (%rbx), %rsi
movslq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x21c0
movq (%rbx), %rdi
callq *0x991c(%rip)           # 0xf1c0
movl %r15d, 0x8(%rbx)
movq %r14, (%rbx)
movslq 0xc(%rbx), %rax
addq %r14, %rax
jmp 0x58d5
xorl %eax, %eax
retq
addq %rcx, %rax
jmp 0x58d5
movq (%rbx), %rdi
callq *0x98fb(%rip)           # 0xf1c0
movl $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq