LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpServer_setWebSocket_read_cb(httpServer_t*, void (*)(httpChilent_t*), char const*)
int httpServer_setWebSocket_read_cb(httpServer_t * httpServer, webSocket_cb_t ws_read_cb,const char * url)
{
    if(httpServer == NULL)
        return -1;
    pthread_mutex_lock(&httpServer->lock);
    httpServer->webSocket_url = (char *)malloc(strlen(url)); 
    if(httpServer->webSocket_url == NULL)
    {
        return -1;
    }
    httpServer->ws_read_cb = ws_read_cb;
    strcpy(httpServer->webSocket_url, url);
    pthread_mutex_unlock(&httpServer->lock);
    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 0x9de4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9e56
movq -0x10(%rbp), %rdi
callq 0x4720
movq -0x20(%rbp), %rdi
callq 0x4220
movq %rax, %rdi
callq 0x46a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
jne 0x9e23
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9e56
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x4490
movq -0x10(%rbp), %rdi
callq 0x4390
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpServer_free(httpServer_t*)
int httpServer_free(httpServer_t * httpServer)
{
    if(httpServer == NULL)
        return -1;
    httpServer->shutdown = true;
    if(httpServer->http_supervise_thread != 0)
        pthread_join(httpServer->http_supervise_thread, NULL);
    if(httpServer->http_listeber)
    {
        evconnlistener_free(httpServer->http_listeber);
    }
    if(httpServer->evb_thpool)
    {
        evbase_threadpool_destroy(httpServer->evb_thpool);
    }
    pthread_mutex_lock(&httpServer->clientMap_lock);
    if(httpServer->clientMap)
    {
        BufferevMap:: iterator i;
        for(i=httpServer->clientMap->begin();i != httpServer->clientMap->end(); i++)
        {
            httpChilent_free(i->second);
        }
        delete httpServer->clientMap;

    }
    pthread_mutex_destroy(&httpServer->lock);
    pthread_mutex_destroy(&httpServer->clientMap_lock);
    if(httpServer)
    {
        free(httpServer);
    }
    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9e7f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9fb6
movq -0x10(%rbp), %rax
movl $0x1, 0x84(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x9ea9
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4460
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x9ec1
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x4100
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x9ed9
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0xdc50
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x4720
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x9f89
leaq -0x18(%rbp), %rdi
callq 0xb350
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xb270
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xb240
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xb2a0
testb $0x1, %al
jne 0x9f3b
jmp 0x9f5e
leaq -0x18(%rbp), %rdi
callq 0xb2d0
movq 0x8(%rax), %rdi
callq 0x9800
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xb2f0
movq %rax, -0x30(%rbp)
jmp 0x9f17
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x9f87
movq -0x38(%rbp), %rdi
callq 0xb3a0
movq -0x38(%rbp), %rdi
movl $0x30, %esi
callq 0x4510
jmp 0x9f89
movq -0x10(%rbp), %rdi
callq 0x45d0
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x45d0
cmpq $0x0, -0x10(%rbp)
je 0x9faf
movq -0x10(%rbp), %rdi
callq 0x45f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpServer_getArg(httpServer_t*)
void* httpServer_getArg(httpServer_t *httpServer)
{
    pthread_mutex_lock(&httpServer->lock);
    void * arg = httpServer->arg;
    pthread_mutex_unlock(&httpServer->lock);
    return arg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4720
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4390
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: accpt_error_cb(evconnlistener*, void*)
static void accpt_error_cb(struct evconnlistener *listener, void *ctx)
{
    struct event_base *base = evconnlistener_get_base(listener);
    int err = EVUTIL_SOCKET_ERROR();
    ctx =(void *)ctx;//(消除警告)
    fprintf(stderr, "Got an error %d (%s) the listener."
            "Shuttinf sown.\r\n",err, evutil_socket_error_to_string(err));
    event_base_loopexit(base, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4230
movq %rax, -0x18(%rbp)
callq 0x4070
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x12472(%rip), %rax     # 0x1cfd8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %edi
callq 0x4190
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %edx
movq %rax, %rcx
leaq 0xb1cc(%rip), %rsi      # 0x15d58
movb $0x0, %al
callq 0x46e0
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x43c0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: bufferev_read_cb(bufferevent*, void*)
static void bufferev_read_cb(struct bufferevent *bev,void *ctx)
{
    bev = (struct bufferevent *)bev;
    struct httpChilent_t *client = (struct httpChilent_t *)ctx;
    pthread_mutex_lock(&client->lock);
    if(client->stat == HTTP_WS_DATA )
    {
        if(client->httpServer->ws_read_cb != NULL)
            threadpool_add(client->httpServer->pool, ws_read_cb_thread, client);
        pthread_mutex_unlock(&client->lock);
    }
    else
    {
        client->stat = HTTP_REQUEST;
        if(client->httpServer->handler != NULL)
            threadpool_add(client->httpServer->pool, httpd_handler_thread, client);
        pthread_mutex_unlock(&client->lock);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4720
movq -0x18(%rbp), %rax
cmpl $0x5, 0x38(%rax)
jne 0xac1c
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x90(%rax)
je 0xac11
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x70(%rax), %rdi
movq -0x18(%rbp), %rdx
leaq -0x1adc(%rip), %rsi     # 0x9130
callq 0xfc20
movq -0x18(%rbp), %rdi
callq 0x4390
jmp 0xac5e
movq -0x18(%rbp), %rax
movl $0x3, 0x38(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x88(%rax)
je 0xac55
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x70(%rax), %rdi
movq -0x18(%rbp), %rdx
leaq -0x23c0(%rip), %rsi     # 0x8890
callq 0xfc20
movq -0x18(%rbp), %rdi
callq 0x4390
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: bufferev_write_cb(bufferevent*, void*)
static void bufferev_write_cb(struct bufferevent *bev,void *ctx)
{
    bev = (struct bufferevent *)bev;
    httpChilent_t *client = (httpChilent_t *)ctx;
    pthread_mutex_lock(&client->lock);
    gettimeofday(&client->final_optime,NULL);
    if( client->stat != HTTP_WS_DATA)
        client->stat = HTTP_IDLE;
    if(client->stat == HTTP_WS_DATA)
    {
        WebddSocket_Thread_Cb_arg_t * cb_arg = (WebddSocket_Thread_Cb_arg_t *)malloc(sizeof(WebddSocket_Thread_Cb_arg_t));
        cb_arg->client = client;
        cb_arg->type = Ws_Cb_Type_write;
        threadpool_add(evbase_threadpool_get_threadpool(client->httpServer->evb_thpool), webSocke_thread_cb, cb_arg);
    }
    pthread_mutex_unlock(&client->lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4720
movq -0x18(%rbp), %rdi
addq $0xb8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4780
movq -0x18(%rbp), %rax
cmpl $0x5, 0x38(%rax)
je 0xacc2
movq -0x18(%rbp), %rax
movl $0x2, 0x38(%rax)
movq -0x18(%rbp), %rax
cmpl $0x5, 0x38(%rax)
jne 0xad14
movl $0x10, %edi
callq 0x46a0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x60(%rax), %rdi
callq 0xd800
movq %rax, %rdi
movq -0x20(%rbp), %rdx
leaq -0x30af(%rip), %rsi     # 0x7c60
callq 0xfc20
movq -0x18(%rbp), %rdi
callq 0x4390
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/evbase_threadpool.cpp
// Function: evbase_thread(void*)
void *evbase_thread(void *arg)
{
    struct evbase_thread_arg * evb_th_arg = (struct evbase_thread_arg *)arg;    
    //evbase_threadpool_t *evb_thpool = evb_th_arg->evb_thpool;
    struct event_base *base = evb_th_arg->base;
    //回收内存
    free(arg);
    
    event_reinit(base);

    while(event_base_dispatch(base)==1);
    event_base_free(base);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x45f0
movq -0x18(%rbp), %rdi
callq 0x4810
movq -0x18(%rbp), %rdi
callq 0x4740
cmpl $0x1, %eax
jne 0xdc31
jmp 0xdc21
movq -0x18(%rbp), %rdi
callq 0x46b0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/evbase_threadpool.cpp
// Function: evbase_threadpool_destroy(evbase_threadpool_t*)
void evbase_threadpool_destroy(evbase_threadpool_t * evb_thpool)
{
    if(evb_thpool == NULL)
        return;
    pthread_mutex_lock(&evb_thpool->evbase_thread_list.lock);
    pthread_mutex_destroy(&evb_thpool->evbase_thread_list.lock);
    evb_thpool->shutdown = true;
    if(evb_thpool->manager != 0)
    {
        pthread_join(evb_thpool->manager, NULL);
    }
    if(evb_thpool->pool != NULL)
    {
        threadpool_destroy(evb_thpool->pool);
    }
    evbase_threadpool_free(evb_thpool);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xdc65
jmp 0xdcc5
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x4720
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x45d0
movq -0x8(%rbp), %rax
movl $0x1, 0x40(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0xdca6
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4460
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xdcbc
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0xfb20
movq -0x8(%rbp), %rdi
callq 0xdcd0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/evbase_threadpool.cpp
// Function: evbase_threadpool_free(evbase_threadpool_t*)
void evbase_threadpool_free(evbase_threadpool_t * evb_thpool)
{
    if(evb_thpool == NULL)
        return;
    if(evb_thpool->evbase_thread_list.list != NULL)
    {
        for(evbase_thread_vector::iterator i = evb_thpool->evbase_thread_list.list->begin();
            i != evb_thpool->evbase_thread_list.list->end();i++ )
        {
            if((*i)->base != NULL)
                event_base_free((*i)->base);

            pthread_mutex_lock(&(*i)->monitor_num_locl);    
            pthread_mutex_destroy(&(*i)->monitor_num_locl);    
            free(*i);
        }
        delete evb_thpool->evbase_thread_list.list;
    }
    free(evb_thpool);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xdce8
jmp 0xddcf
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0xddc6
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xe200
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xe270
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xe230
testb $0x1, %al
jne 0xdd2c
jmp 0xdd9b
leaq -0x10(%rbp), %rdi
callq 0xe2a0
movq (%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0xdd54
leaq -0x10(%rbp), %rdi
callq 0xe2a0
movq (%rax), %rax
movq 0x28(%rax), %rdi
callq 0x46b0
leaq -0x10(%rbp), %rdi
callq 0xe2a0
movq (%rax), %rdi
callq 0x4720
leaq -0x10(%rbp), %rdi
callq 0xe2a0
movq (%rax), %rdi
callq 0x45d0
leaq -0x10(%rbp), %rdi
callq 0xe2a0
movq (%rax), %rdi
callq 0x45f0
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xe2c0
movq %rax, -0x20(%rbp)
jmp 0xdd08
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xddc4
movq -0x28(%rbp), %rdi
callq 0xe300
movq -0x28(%rbp), %rdi
movl $0x18, %esi
callq 0x4510
jmp 0xddc6
movq -0x8(%rbp), %rdi
callq 0x45f0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/evbase_threadpool.cpp
// Function: evbase_threadpool_close_event(evbase_threadpool_t*, event_base*)
void evbase_threadpool_close_event(evbase_threadpool_t *evb_thpool ,event_base * base)
{

    for(evbase_thread_vector::iterator i = evb_thpool->evbase_thread_list.list->begin();
        i != evb_thpool->evbase_thread_list.list->end(); i++)
    {
        if((*i)->base == base)
        {
            if((*i)->monitor_num >0)
                (*i)->monitor_num--;
            else
                De_fprintf(stderr, "base监听数为0时发生了 coles_event\r\n");
        }
    }           

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xe200
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xe270
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xe230
testb $0x1, %al
jne 0xe0a8
jmp 0xe163
leaq -0x18(%rbp), %rdi
callq 0xe2a0
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xe14d
leaq -0x18(%rbp), %rdi
callq 0xe2a0
movq (%rax), %rax
cmpl $0x0, 0x30(%rax)
jbe 0xe0eb
leaq -0x18(%rbp), %rdi
callq 0xe2a0
movq (%rax), %rax
movl 0x30(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x30(%rax)
jmp 0xe14b
jmp 0xe0ed
movq 0xeee4(%rip), %rax      # 0x1cfd8
movq (%rax), %rdi
leaq 0x609d(%rip), %rsi      # 0x1419b
leaq 0x7cb0(%rip), %rdx      # 0x15db5
leaq 0x7cc7(%rip), %rcx      # 0x15dd3
movl $0x111, %r8d            # imm = 0x111
movb $0x0, %al
callq 0x46e0
movq 0xeeb8(%rip), %rax      # 0x1cfd8
movq (%rax), %rdi
leaq 0x7cbf(%rip), %rsi      # 0x15de9
movb $0x0, %al
callq 0x46e0
movq 0xeea0(%rip), %rax      # 0x1cfd8
movq (%rax), %rdi
leaq 0x7ba7(%rip), %rsi      # 0x15ce9
movb $0x0, %al
callq 0x46e0
jmp 0xe14b
jmp 0xe14d
jmp 0xe14f
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xe2c0
movq %rax, -0x28(%rbp)
jmp 0xe081
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/Threadpool.cpp
// Function: is_thread_alive(unsigned long)
int is_thread_alive(pthread_t tid)
{
    int kill_rc = pthread_kill(tid, 0);     //发0号信号，测试线程是否存活
    if (kill_rc == ESRCH) {
        return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x4670
movl %eax, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jne 0xf209
movl $0x0, -0x4(%rbp)
jmp 0xf210
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/Threadpool.cpp
// Function: threadpool_destroy(threadpool_t*)
int threadpool_destroy(threadpool_t *pool)
{
    int i;
    if (pool == NULL) {
        return -1;

    }
    pool->shutdown = true;

    /*先销毁管理线程*/
    pthread_join(pool->adjust_tid, NULL);
    int pive_thr_num = pool->threads->size();
    for (i = 0; i < pive_thr_num; i++) {
        /*通知所有的空闲线程*/
        pthread_cond_broadcast(&(pool->queue_not_empty));

    }
    for(pthread_list_t::iterator i=pool->threads->begin(); i != pool->threads->end(); i++)
    {
        pthread_join(*(i), NULL);
    }
    threadpool_free(pool);


    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xfb3f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfc0f
movq -0x10(%rbp), %rax
movl $0x1, 0xd4(%rax)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4460
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x10060
movl %eax, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0xfb9e
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
callq 0x41a0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xfb7b
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x10390
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x103f0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x103c0
testb $0x1, %al
jne 0xfbd9
jmp 0xfbff
leaq -0x20(%rbp), %rdi
callq 0x10420
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4460
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x10440
movq %rax, -0x30(%rbp)
jmp 0xfbb2
movq -0x10(%rbp), %rdi
callq 0xfd00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/Threadpool.cpp
// Function: threadpool_add(threadpool_t*, void* (*)(void*), void*)
int threadpool_add(threadpool_t *pool, void*(*function)(void *arg), void *arg)
{
    pthread_mutex_lock(&(pool->lock));

    /* ==为真，队列已经满， 调wait阻塞 */
    while ((pool->threadpool_task_queue->max_size() == pool->threadpool_task_queue->size()) && (!pool->shutdown)) {
        pthread_cond_wait(&(pool->queue_not_full), &(pool->lock));

    }
    if (pool->shutdown) {
        pthread_mutex_unlock(&(pool->lock));

    }


    /*添加任务到任务队列里*/
    threadpool_task_t task;
    task.function = function;
    task.arg = arg;
    pool->threadpool_task_queue->push_back(task);
    /*添加完任务后，队列不为空，唤醒线程池中 等待处理任务的线程*/
    pthread_cond_signal(&(pool->queue_not_empty));
    pthread_mutex_unlock(&(pool->lock));

    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4720
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rdi
callq 0xffa0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rdi
callq 0xffd0
movq -0x38(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x29(%rbp)
jne 0xfc85
movq -0x8(%rbp), %rax
cmpl $0x0, 0xd4(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xfc8e
jmp 0xfca1
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
movq -0x8(%rbp), %rsi
callq 0x4760
jmp 0xfc3d
movq -0x8(%rbp), %rax
cmpl $0x0, 0xd4(%rax)
je 0xfcb7
movq -0x8(%rbp), %rdi
callq 0x4390
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x10000
movq -0x8(%rbp), %rdi
addq $0x80, %rdi
callq 0x4040
movq -0x8(%rbp), %rdi
callq 0x4390
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/Threadpool.cpp
// Function: threadpool_free(threadpool_t*)
int threadpool_free(threadpool_t *pool)
{
    if (pool == NULL) {
        return -1;

    }

    if (pool->threadpool_task_queue) {
        for(thread_pool_task_queue_t::iterator i=pool->threadpool_task_queue->begin();
            i != pool->threadpool_task_queue->end();i++)
        {
            if((*i).arg != NULL)
            {
                free((*i).arg);
            }
        }
        delete pool->threadpool_task_queue;
    }
    if (pool->threads) {
        delete pool->threads;
        pthread_mutex_lock(&(pool->lock));
        pthread_mutex_destroy(&(pool->lock));
        pthread_mutex_lock(&(pool->thread_counter));
        pthread_mutex_destroy(&(pool->thread_counter));
        pthread_cond_destroy(&(pool->queue_not_empty));
        pthread_cond_destroy(&(pool->queue_not_full));

    }
    free(pool);
    pool = NULL;

    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xfd22
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfe6d
movq -0x10(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0xfdd2
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rsi
leaq -0x30(%rbp), %rdi
callq 0x10170
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rsi
leaq -0x50(%rbp), %rdi
callq 0x10290
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x10260
testb $0x1, %al
jne 0xfd6f
jmp 0xfda4
leaq -0x30(%rbp), %rdi
callq 0x101a0
cmpq $0x0, 0x8(%rax)
je 0xfd91
leaq -0x30(%rbp), %rdi
callq 0x101a0
movq 0x8(%rax), %rdi
callq 0x45f0
jmp 0xfd93
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x102c0
jmp 0xfd48
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
je 0xfdd0
movq -0x78(%rbp), %rdi
callq 0x10300
movq -0x78(%rbp), %rdi
movl $0x50, %esi
callq 0x4510
jmp 0xfdd2
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0xfe55
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, %rax
je 0xfe0c
movq -0x80(%rbp), %rdi
callq 0x10370
movq -0x80(%rbp), %rdi
movl $0x18, %esi
callq 0x4510
movq -0x10(%rbp), %rdi
callq 0x4720
movq -0x10(%rbp), %rdi
callq 0x45d0
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x4720
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x45d0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
callq 0x48e0
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0x48e0
movq -0x10(%rbp), %rdi
callq 0x45f0
movq $0x0, -0x10(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/Threadpool.cpp
// Function: threadpool_all_threadnum(threadpool_t*)
int threadpool_all_threadnum(threadpool_t *pool)
{
    int all_threadnum = -1;
    pthread_mutex_lock(&(pool->lock));
    all_threadnum = pool->threads->size();
    pthread_mutex_unlock(&(pool->lock));
    return all_threadnum;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rdi
callq 0x4720
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x10060
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4390
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/Threadpool.cpp
// Function: threadpool_busy_threadnum(threadpool_t*)
int threadpool_busy_threadnum(threadpool_t *pool)
{
    int busy_threadnum = -1;
    pthread_mutex_lock(&(pool->thread_counter));
    busy_threadnum = pool->busy_thr_num;
    pthread_mutex_unlock(&(pool->thread_counter));
    return busy_threadnum;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x4720
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x4390
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd_test.c
// Function: getFileSize(char const*)
int getFileSize(const char * filename)
{
    int fileSize = 0;
    FILE *fp = NULL;
    if (filename == NULL)
        return 0;
    //以二进制的形式读取
    fp = fopen(filename, "rb");
    if (fp == NULL)
        return 0;
    fseek(fp, 0, SEEK_END);
    fileSize = ftell(fp);
    rewind(fp);
    fclose(fp);
    return fileSize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1259b
movl $0x0, -0x4(%rbp)
jmp 0x125f5
movq -0x10(%rbp), %rdi
leaq 0x3a9d(%rip), %rsi      # 0x16043
callq 0x45e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x125bf
movl $0x0, -0x4(%rbp)
jmp 0x125f5
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x45b0
movq -0x20(%rbp), %rdi
callq 0x4030
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rdi
callq 0x40c0
movq -0x20(%rbp), %rdi
callq 0x44e0
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd_test.c
// Function: ws_read_cb(httpChilent_t*)
void ws_read_cb(struct httpChilent_t * httpChilent)
{
    char buff[1024];
    char ip[INET_ADDRSTRLEN];
    struct sockaddr_in *address = (struct sockaddr_in *)&(httpChilent->addr);
    inet_ntop(AF_INET, &address->sin_addr,ip, INET_ADDRSTRLEN);
    evbuffer_remove(httpChilent->receive_evbuff, buff, evbuffer_get_length(httpChilent->receive_evbuff));
    printf("%s:%d ] %s\r\n",ip, ntohs(address->sin_port) ,  buff);
    ev_webSocket_send(httpChilent->bev, (unsigned char *)"hello!", (unsigned)6,false,WCT_TXTDATA);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa4, %rax
movq %rax, -0x428(%rbp)
movq -0x428(%rbp), %rsi
addq $0x4, %rsi
leaq -0x420(%rbp), %rdx
movl $0x2, %edi
movl $0x10, %ecx
callq 0x4540
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x440(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x4550
movq -0x440(%rbp), %rdi
movq -0x438(%rbp), %rsi
movq %rax, %rdx
callq 0x4640
leaq -0x420(%rbp), %rax
movq %rax, -0x430(%rbp)
movq -0x428(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x4890
movq -0x430(%rbp), %rsi
movzwl %ax, %edx
leaq -0x410(%rbp), %rcx
leaq 0x346e(%rip), %rdi      # 0x160ab
movb $0x0, %al
callq 0x4080
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
leaq 0x3465(%rip), %rsi      # 0x160b8
movl $0x6, %edx
xorl %ecx, %ecx
movl $0xffffffed, %r8d       # imm = 0xFFFFFFED
callq 0x6660
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd_test.c
// Function: close_signal_cb(int, short, void*)
void close_signal_cb(evutil_socket_t sig,short events, void *user_data)
{
    struct event_base *base = (struct event_base *)user_data;
    struct timeval delay = {2, 0};
    if(sig == SIGINT)
    {
        De_printf("2s后程序关闭\r\n");
        event_base_loopexit(base, &delay);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movl %edi, -0x4(%rbp)
movw %ax, -0x6(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x348b(%rip), %rax      # 0x16120
movq %rax, -0x28(%rbp)
movq 0x3488(%rip), %rax      # 0x16128
movq %rax, -0x20(%rbp)
cmpl $0x2, -0x4(%rbp)
jne 0x12cf6
jmp 0x12cac
leaq 0x14e8(%rip), %rdi      # 0x1419b
leaq 0x3405(%rip), %rsi      # 0x160bf
leaq 0x340e(%rip), %rdx      # 0x160cf
movl $0xef, %ecx
movb $0x0, %al
callq 0x4080
leaq 0x340b(%rip), %rdi      # 0x160df
movb $0x0, %al
callq 0x4080
leaq 0x3007(%rip), %rdi      # 0x15ce9
movb $0x0, %al
callq 0x4080
movq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x43c0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd_test.c
// Function: main
int main(void)
{
    u_short port = 8088;
    struct event_base *base;
    struct event * close_signal; 
    httpServer_t * httpServer;
    base = event_base_new();
    set_SERVER_STRING(NULL);
    httpServer = startHttpServe(base ,&port);
    httpServer_setHttpHandler(httpServer, httpd_handler);
    httpServer_setWebSocket_read_cb(httpServer, ws_read_cb, "/");
    close_signal =  evsignal_new(base,SIGINT,close_signal_cb, base); 
    if(!close_signal || event_add(close_signal, NULL) < 0)
    {
        De_fprintf(stderr, "Could not create/add a signal event!\n");
        exit(1);
    }
    event_base_dispatch(base);
    httpServer_free(httpServer);

    event_base_free(base);

    return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movw $0x1f98, -0x6(%rbp)     # imm = 0x1F98
callq 0x47e0
movq %rax, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x12ff0
movq -0x10(%rbp), %rdi
leaq -0x6(%rbp), %rsi
callq 0xa040
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x483(%rip), %rsi      # 0x128c0
callq 0x9c30
movq -0x20(%rbp), %rdi
leaq -0x1d3(%rip), %rsi      # 0x12b80
leaq 0x330c(%rip), %rdx      # 0x16066
callq 0x9dc0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %r8
movl $0x2, %esi
movl $0x18, %edx
leaq -0x108(%rip), %rcx      # 0x12c70
callq 0x4430
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x12d9a
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4210
cmpl $0x0, %eax
jge 0x12e02
jmp 0x12d9c
movq 0xa235(%rip), %rax      # 0x1cfd8
movq (%rax), %rdi
leaq 0x13ee(%rip), %rsi      # 0x1419b
leaq 0x333f(%rip), %rdx      # 0x160f3
leaq 0x3314(%rip), %rcx      # 0x160cf
movl $0x101, %r8d            # imm = 0x101
movb $0x0, %al
callq 0x46e0
movq 0xa209(%rip), %rax      # 0x1cfd8
movq (%rax), %rdi
leaq 0x331f(%rip), %rsi      # 0x160f8
movb $0x0, %al
callq 0x46e0
movq 0xa1f1(%rip), %rax      # 0x1cfd8
movq (%rax), %rdi
leaq 0x2ef8(%rip), %rsi      # 0x15ce9
movb $0x0, %al
callq 0x46e0
movl $0x1, %edi
callq 0x4610
movq -0x10(%rbp), %rdi
callq 0x4740
movq -0x20(%rbp), %rdi
callq 0x9e60
movq -0x10(%rbp), %rdi
callq 0x46b0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/config.c
// Function: set_SERVER_STRING(char*)
void set_SERVER_STRING(char * name)
{
    if(SERVER_STRING_VARIALE == NULL)
    {
        if(name == NULL)
            SERVER_STRING_VARIALE = (char *)malloc(strlen("WebSocket-HttpServer/1.0.0"));
        else
            SERVER_STRING_VARIALE = (char *)malloc(strlen(name));

    }
    else
    {
        SERVER_STRING_VARIALE = (char *) realloc(SERVER_STRING_VARIALE, strlen(name));
    }
    if(name == NULL)
        strcpy(SERVER_STRING_VARIALE,"WebSocket-HttpServer/1.0.0");
    else
        strcpy(SERVER_STRING_VARIALE, name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, 0xa4ec(%rip)      # 0x1d4f0
jne 0x1303a
cmpq $0x0, -0x8(%rbp)
jne 0x13020
movl $0x1a, %edi
callq 0x46a0
movq %rax, 0xa4d2(%rip)      # 0x1d4f0
jmp 0x13038
movq -0x8(%rbp), %rdi
callq 0x4220
movq %rax, %rdi
callq 0x46a0
movq %rax, 0xa4b8(%rip)      # 0x1d4f0
jmp 0x13061
movq 0xa4af(%rip), %rax      # 0x1d4f0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4220
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x47b0
movq %rax, 0xa48f(%rip)      # 0x1d4f0
cmpq $0x0, -0x8(%rbp)
jne 0x1307d
movq 0xa481(%rip), %rdi      # 0x1d4f0
leaq 0x30ba(%rip), %rsi      # 0x16130
callq 0x4490
jmp 0x1308d
movq 0xa46c(%rip), %rdi      # 0x1d4f0
movq -0x8(%rbp), %rsi
callq 0x4490
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/antonblanchard[P]will-it-scale/tests/pwrite3.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char buf[BUFLEN];
	int fd = open(tmpfile, O_RDWR);
	unsigned long offset = getpagesize() * nr;

	assert(fd >= 0);

	while (1) {
		assert(pwrite(fd, buf, BUFLEN, offset) == BUFLEN);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1020, %rsp           # imm = 0x1020
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x3036(%rip), %rdi      # 0x5190
movl $0x2, %esi
movb $0x0, %al
callq 0x1220
movl %eax, -0x1014(%rbp)
callq 0x1270
cltq
imulq -0x10(%rbp), %rax
movq %rax, -0x1020(%rbp)
cmpl $0x0, -0x1014(%rbp)
jl 0x218a
jmp 0x21a9
leaq 0x10ed(%rip), %rdi      # 0x327e
leaq 0x10ee(%rip), %rsi      # 0x3286
movl $0x25, %edx
leaq 0x111d(%rip), %rcx      # 0x32c1
callq 0x1120
jmp 0x21ab
movl -0x1014(%rbp), %edi
leaq -0x1010(%rbp), %rsi
movq -0x1020(%rbp), %rcx
movl $0x1000, %edx           # imm = 0x1000
callq 0x11f0
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x21d3
jmp 0x21f2
leaq 0x111a(%rip), %rdi      # 0x32f4
leaq 0x10a5(%rip), %rsi      # 0x3286
movl $0x28, %edx
leaq 0x10d4(%rip), %rcx      # 0x32c1
callq 0x1120
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x21ab
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/giometti[P]mastering_UNIX_programming/chapter_02/iospeed.c
// Function: main
int main(int argc, char *argv[])
{
	int n, size;
	char buf[MAX_SIZE];

	if (argc < 2) {
		err("invalid command line\n");
		return -1;
	}
	size = atoi(argv[1]);

	while ((n = read(STDIN_FILENO, buf, size)) > 0)
		if (write(STDOUT_FILENO, buf, n) != n)
			err("write error\n");
	if (n < 0)
		err("read error\n");

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100020, %rsp         # imm = 0x100020
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x1199
leaq 0xe7e(%rip), %rdi       # 0x2004
movl $0x16, %esi
callq 0x1220
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1212
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1050
movl %eax, -0x18(%rbp)
leaq -0x100020(%rbp), %rsi
movslq -0x18(%rbp), %rdx
xorl %edi, %edi
callq 0x1040
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x11f4
leaq -0x100020(%rbp), %rsi
movslq -0x14(%rbp), %rdx
movl $0x1, %edi
callq 0x1030
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
je 0x11f2
leaq 0xe32(%rip), %rdi       # 0x201a
movl $0xd, %esi
callq 0x1220
jmp 0x11a9
cmpl $0x0, -0x14(%rbp)
jge 0x120b
leaq 0xe26(%rip), %rdi       # 0x2027
movl $0xc, %esi
callq 0x1220
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x100020, %rsp         # imm = 0x100020
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/spgbld/func.cxx
// Function: parse_arg(int, char**, char const*, int)
int parse_arg(int argc, char* argv[], const char* arg, int n)
{
	for (int i=1; i<argc; i++)
		if (!wcscmp(argv[i], arg) && (argc-1) >= (i+n))
			return i + 1;

	return 0;
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movl $0x1, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x2524
movq 0x18(%rsp), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x10(%rsp), %rsi
callq 0x2250
cmpl $0x0, %eax
jne 0x2515
movl 0x20(%rsp), %eax
subl $0x1, %eax
movl 0x8(%rsp), %ecx
addl 0xc(%rsp), %ecx
cmpl %ecx, %eax
jl 0x2515
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x252c
jmp 0x2517
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x24ce
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/spgbld/func.cxx
// Function: init_hdr()
void init_hdr()
{
	memset(&hdr, 0, sizeof(hdr));
	strncpy(hdr.magic, STR(SPG_MAGIC), sizeof(hdr.magic));
	strncpy(hdr.creator, STR(SB_CRT), sizeof(hdr.creator));
	hdr.ver = SPG_VER;
	hdr.subver = SPG_SUBVER;
	hdr.sp = SPG_SP;
	hdr.page3 = SPG_PAGE3;
	hdr.clk = SPG_CLK;
	hdr.ei = SPG_INT;
	hdr.pager = SPG_PGR;
	hdr.resid = SPG_RES;
	time_t t1 = time(NULL);
	tm* t2 = localtime(&t1);
	hdr.day = t2->tm_mday;
	hdr.month = t2->tm_mon + 1;
	hdr.year = t2->tm_year - 100;
	hdr.second = t2->tm_sec;
	hdr.minute = t2->tm_min;
	hdr.hour = t2->tm_hour;
}

// Assembly:
subq $0x18, %rsp
leaq 0x4a75(%rip), %rdi      # 0x71d0
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x20d0
leaq 0x4a62(%rip), %rdi      # 0x71d0
addq $0x20, %rdi
leaq 0x28c9(%rip), %rsi      # 0x5042
movl $0xc, %edx
callq 0x20c0
leaq 0x4a46(%rip), %rdi      # 0x71d0
addq $0x50, %rdi
leaq 0x28ba(%rip), %rsi      # 0x504f
movl $0x20, %edx
callq 0x20c0
leaq 0x4a2a(%rip), %rax      # 0x71d0
movb 0x2c(%rax), %cl
andb $0xf, %cl
orb $0x10, %cl
leaq 0x4a1a(%rip), %rax      # 0x71d0
movb %cl, 0x2c(%rax)
leaq 0x4a10(%rip), %rax      # 0x71d0
movb 0x2c(%rax), %cl
andb $-0x10, %cl
orb $0x0, %cl
leaq 0x4a00(%rip), %rax      # 0x71d0
movb %cl, 0x2c(%rax)
leaq 0x49f6(%rip), %rax      # 0x71d0
movw $0x5c00, 0x32(%rax)     # imm = 0x5C00
leaq 0x49e9(%rip), %rax      # 0x71d0
movb $0x0, 0x34(%rax)
leaq 0x49de(%rip), %rax      # 0x71d0
movb 0x35(%rax), %cl
andb $-0x4, %cl
orb $0x0, %cl
leaq 0x49ce(%rip), %rax      # 0x71d0
movb %cl, 0x35(%rax)
leaq 0x49c4(%rip), %rax      # 0x71d0
movb 0x35(%rax), %cl
andb $-0x5, %cl
orb $0x0, %cl
leaq 0x49b4(%rip), %rax      # 0x71d0
movb %cl, 0x35(%rax)
leaq 0x49aa(%rip), %rax      # 0x71d0
movw $0x0, 0x36(%rax)
leaq 0x499d(%rip), %rax      # 0x71d0
movw $0x5b00, 0x38(%rax)     # imm = 0x5B00
xorl %eax, %eax
movl %eax, %edi
callq 0x2170
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2120
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl 0xc(%rax), %eax
movb %al, %cl
leaq 0x4969(%rip), %rax      # 0x71d0
movb %cl, 0x2d(%rax)
movq 0x8(%rsp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movb %al, %cl
leaq 0x4952(%rip), %rax      # 0x71d0
movb %cl, 0x2e(%rax)
movq 0x8(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x64, %eax
movb %al, %cl
leaq 0x493b(%rip), %rax      # 0x71d0
movb %cl, 0x2f(%rax)
movq 0x8(%rsp), %rax
movl (%rax), %eax
movb %al, %cl
leaq 0x4928(%rip), %rax      # 0x71d0
movb %cl, 0x3c(%rax)
movq 0x8(%rsp), %rax
movl 0x4(%rax), %eax
movb %al, %cl
leaq 0x4914(%rip), %rax      # 0x71d0
movb %cl, 0x3d(%rax)
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
movb %al, %cl
leaq 0x4900(%rip), %rax      # 0x71d0
movb %cl, 0x3e(%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/spgbld/func.cxx
// Function: num(char*)
u32 num(char *ns)
{
	int n;

	if ((ns[0] == '0') && ns[1] == 'x') {
		sscanf(ns, "%x", &n);
		return n;
	}

	if ((ns[0] == '#') || (ns[0] == '$')) {
		sscanf(ns + 1, "%x", &n);
		return n;

	} else {
		sscanf(ns, "%d", &n);
		return n;
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x2928
movq 0x8(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
jne 0x2928
movq 0x8(%rsp), %rdi
leaq 0x275e(%rip), %rsi      # 0x506e
leaq 0x4(%rsp), %rdx
movb $0x0, %al
callq 0x2180
movslq 0x4(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x298c
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x2942
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x24, %eax
jne 0x296a
movq 0x8(%rsp), %rdi
addq $0x1, %rdi
leaq 0x271c(%rip), %rsi      # 0x506e
leaq 0x4(%rsp), %rdx
movb $0x0, %al
callq 0x2180
movslq 0x4(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x298c
movq 0x8(%rsp), %rdi
leaq 0x26fb(%rip), %rsi      # 0x5071
leaq 0x4(%rsp), %rdx
movb $0x0, %al
callq 0x2180
movslq 0x4(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/spgbld/func.cxx
// Function: store_block(int, char*, int)
void store_block(int i, char* fn, int s)
{
	memset(blk[i].data, 0, sizeof(blk[i].data));
	blk[i].size = s;
	hdr.blk[i].size = sz(blk[i].size);
	FILE* f = fopen(fn, "r");
	fread(blk[i].data, 1, s, f);
	fclose(f);
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movslq 0x24(%rsp), %rax
leaq 0x42e3(%rip), %rdi      # 0x75d0
imulq $0x4408, %rax, %rax     # imm = 0x4408
addq %rax, %rdi
addq $0x408, %rdi            # imm = 0x408
xorl %esi, %esi
movl $0x4000, %edx           # imm = 0x4000
callq 0x20d0
movl 0x14(%rsp), %ecx
movslq 0x24(%rsp), %rdx
leaq 0x42b6(%rip), %rax      # 0x75d0
imulq $0x4408, %rdx, %rdx     # imm = 0x4408
addq %rdx, %rax
movl %ecx, 0x404(%rax)
movslq 0x24(%rsp), %rcx
leaq 0x429a(%rip), %rax      # 0x75d0
imulq $0x4408, %rcx, %rcx     # imm = 0x4408
addq %rcx, %rax
movl 0x404(%rax), %eax
subl $0x1, %eax
sarl $0x9, %eax
movb %al, %cl
movslq 0x24(%rsp), %rdx
leaq 0x3e76(%rip), %rax      # 0x71d0
addq $0x100, %rax            # imm = 0x100
imulq $0x3, %rdx, %rdx
addq %rdx, %rax
movzbl %cl, %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0x1f, %dx
shlw $0x8, %dx
andw $0xe0ff, %cx            # imm = 0xE0FF
orw %dx, %cx
movw %cx, (%rax)
movq 0x18(%rsp), %rdi
leaq 0x1d59(%rip), %rsi      # 0x50e8
callq 0x21f0
movq %rax, 0x8(%rsp)
movslq 0x24(%rsp), %rax
leaq 0x422b(%rip), %rdi      # 0x75d0
imulq $0x4408, %rax, %rax     # imm = 0x4408
addq %rax, %rdi
addq $0x408, %rdi            # imm = 0x408
movslq 0x14(%rsp), %rdx
movq 0x8(%rsp), %rcx
movl $0x1, %esi
callq 0x2290
movq 0x8(%rsp), %rdi
callq 0x2190
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/spgbld/func.cxx
// Function: save_spg(char*)
void save_spg(char* name)
{
	FILE* f = fopen(name, "w+");
	// save header
	fwrite(&hdr, 1, sizeof(hdr), f);

	// save blocks
	for (int i = 0; i < conf.n_blocks; i++) {
		fwrite(&blk[i].data, 1, (hdr.blk[i].size + 1) << 9, f);
	}

	fclose(f);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x17cd(%rip), %rsi      # 0x5262
callq 0x21f0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rcx
leaq 0x3725(%rip), %rdi      # 0x71d0
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x2330
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
leaq 0x444303(%rip), %rcx    # 0x447dd0
cmpl 0x18(%rcx), %eax
jge 0x3b3b
movslq 0x4(%rsp), %rax
leaq 0x3af2(%rip), %rdi      # 0x75d0
imulq $0x4408, %rax, %rax     # imm = 0x4408
addq %rax, %rdi
addq $0x408, %rdi            # imm = 0x408
movslq 0x4(%rsp), %rcx
leaq 0x36d5(%rip), %rax      # 0x71d0
addq $0x100, %rax            # imm = 0x100
imulq $0x3, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
shrw $0x8, %ax
andw $0x1f, %ax
movzbl %al, %eax
addl $0x1, %eax
shll $0x9, %eax
movslq %eax, %rdx
movq 0x8(%rsp), %rcx
movl $0x1, %esi
callq 0x2330
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x3ac2
movq 0x8(%rsp), %rdi
callq 0x2190
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/spgbld/func.cxx
// Function: load_files()
void load_files()
{
	for (int i = 0; i < conf.n_blocks; i++) {
		FILE* f = fopen(blk[i].fname, "r");

		if (!f) error(FNFD);

		hdr.blk[i].size = sz(blk[i].size);
		fseek(f, blk[i].offset, SEEK_SET);
		fread(blk[i].data, 1, blk[i].size, f);
		fclose(f);
	}
}

// Assembly:
subq $0x18, %rsp
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
leaq 0x444269(%rip), %rcx    # 0x447dd0
cmpl 0x18(%rcx), %eax
jge 0x3caa
movslq 0x14(%rsp), %rax
leaq 0x3a54(%rip), %rdi      # 0x75d0
imulq $0x4408, %rax, %rax     # imm = 0x4408
addq %rax, %rdi
leaq 0x155b(%rip), %rsi      # 0x50e8
callq 0x21f0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x3bc5
leaq 0x1676(%rip), %rdi      # 0x521c
movb $0x0, %al
callq 0x2030
leaq 0x148b(%rip), %rdi      # 0x503f
movb $0x0, %al
callq 0x2030
movl $0x5, %edi
callq 0x2210
movslq 0x14(%rsp), %rcx
leaq 0x39ff(%rip), %rax      # 0x75d0
imulq $0x4408, %rcx, %rcx     # imm = 0x4408
addq %rcx, %rax
movl 0x404(%rax), %eax
subl $0x1, %eax
sarl $0x9, %eax
movb %al, %cl
movslq 0x14(%rsp), %rdx
leaq 0x35db(%rip), %rax      # 0x71d0
addq $0x100, %rax            # imm = 0x100
imulq $0x3, %rdx, %rdx
addq %rdx, %rax
movzbl %cl, %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0x1f, %dx
shlw $0x8, %dx
andw $0xe0ff, %cx            # imm = 0xE0FF
orw %dx, %cx
movw %cx, (%rax)
movq 0x8(%rsp), %rdi
movslq 0x14(%rsp), %rcx
leaq 0x39a1(%rip), %rax      # 0x75d0
imulq $0x4408, %rcx, %rcx     # imm = 0x4408
addq %rcx, %rax
movslq 0x400(%rax), %rsi
xorl %edx, %edx
callq 0x21e0
movslq 0x14(%rsp), %rax
leaq 0x397d(%rip), %rdi      # 0x75d0
imulq $0x4408, %rax, %rax     # imm = 0x4408
addq %rax, %rdi
addq $0x408, %rdi            # imm = 0x408
movslq 0x14(%rsp), %rcx
leaq 0x3960(%rip), %rax      # 0x75d0
imulq $0x4408, %rcx, %rcx     # imm = 0x4408
addq %rcx, %rax
movslq 0x404(%rax), %rdx
movq 0x8(%rsp), %rcx
movl $0x1, %esi
callq 0x2290
movq 0x8(%rsp), %rdi
callq 0x2190
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x3b5c
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/spgbld/main.cxx
// Function: main
int main(int argc, char* argv[])
{
	init_hdr();
	parse_args(argc, argv);

	switch (conf.mode) {
	case M_BLD:
		load_ini(conf.in_fname);
		load_files();

		if (conf.packer != PM_NONE)
			pack_blocks();

		save_spg(conf.out_fname);
		break;

	case M_UNP:
		unpack_spg(conf.in_fname);
		break;
	}

	error(OK);
}

// Assembly:
subq $0x18, %rsp
movl $0x0, 0x14(%rsp)
movl %edi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
callq 0x2750
movl 0x10(%rsp), %edi
movq 0x8(%rsp), %rsi
callq 0x2540
movl 0x443336(%rip), %eax    # 0x447dd4
movl %eax, 0x4(%rsp)
subl $0x1, %eax
je 0x4ab4
jmp 0x4aa9
movl 0x4(%rsp), %eax
subl $0x3, %eax
je 0x4ae1
jmp 0x4aed
movq 0x44331d(%rip), %rdi    # 0x447dd8
callq 0x29a0
callq 0x3b50
cmpl $0x0, 0x443304(%rip)    # 0x447dd0
je 0x4ad3
callq 0x33e0
movq 0x443306(%rip), %rdi    # 0x447de0
callq 0x3a80
jmp 0x4aed
movq 0x4432f0(%rip), %rdi    # 0x447dd8
callq 0x3cb0
leaq 0x8b4(%rip), %rdi       # 0x53a8
movb $0x0, %al
callq 0x2030
leaq 0x53d(%rip), %rdi       # 0x503f
movb $0x0, %al
callq 0x2030
xorl %edi, %edi
callq 0x2210
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/spgbld/msg.cxx
// Function: print_help()
void print_help()
{
	printf(STR(SB_VER));
	printf("\n\n");
	printf("Build:	  spgbld -b <input.ini> <output.spg> [-c <pack method>]\n");
	printf("Unpack:	  spgbld -u <input.spg>\n");
	printf("Pack method is:	 auto/-1(default) none/0 mlz/1 hst/2\n");
	printf("\n\n");
}

// Assembly:
pushq %rax
leaq 0x896(%rip), %rdi       # 0x53ae
movb $0x0, %al
callq 0x2030
leaq 0x519(%rip), %rdi       # 0x503f
movb $0x0, %al
callq 0x2030
leaq 0x899(%rip), %rdi       # 0x53cd
movb $0x0, %al
callq 0x2030
leaq 0x8cb(%rip), %rdi       # 0x540d
movb $0x0, %al
callq 0x2030
leaq 0x8de(%rip), %rdi       # 0x542e
movb $0x0, %al
callq 0x2030
leaq 0x4e1(%rip), %rdi       # 0x503f
movb $0x0, %al
callq 0x2030
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/ch6/limit_memory.c
// Function: alloc
void *alloc(void *ud,
            void *ptr,
            size_t osize,
            size_t nsize) {

  // Compute the byte change requested. May be negative.
  long num_bytes_to_add = nsize - (ptr ? osize : 0);

  // Reject the change if it would exceed our limit.
  if (bytes_alloced + num_bytes_to_add > max_bytes) {
    errno = ENOMEM;
    return NULL;
  }

  // Otherwise, free or allocate memory as requested.
  bytes_alloced += num_bytes_to_add;
  if (nsize) return realloc(ptr, nsize);
  free(ptr);
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5611
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x5619
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x5619
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq 0x3bc79(%rip), %rax     # 0x412a8
addq -0x30(%rbp), %rax
cmpq 0x3bc46(%rip), %rax     # 0x41280
jle 0x5651
callq 0x5080
movl $0xc, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x568e
movq -0x30(%rbp), %rax
addq 0x3bc4c(%rip), %rax     # 0x412a8
movq %rax, 0x3bc45(%rip)     # 0x412a8
cmpq $0x0, -0x28(%rbp)
je 0x567d
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x5390
movq %rax, -0x8(%rbp)
jmp 0x568e
movq -0x18(%rbp), %rdi
callq 0x5040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)