LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/evbase_threadpool.cpp
// Function: manager_thread(void*)
void *manager_thread(void *evbase_threadpool)
{
    evbase_threadpool_t *evb_thpool = (evbase_threadpool_t*)evbase_threadpool; 
    while(!evb_thpool->shutdown)
    {
        usleep(BASE_MANAGER_TIMER*1000);        
        pthread_mutex_lock(&evb_thpool->evbase_thread_list.lock);
        for(evbase_thread_vector::iterator i = evb_thpool->evbase_thread_list.list->begin();
            i != evb_thpool->evbase_thread_list.list->end(); )
        {
            pthread_mutex_lock(&(*i)->monitor_num_locl);    
            if((*i)->monitor_num == 0 && evb_thpool->evbase_thread_list.list->size() > 1){
                if(!event_base_loopbreak((*i)->base))
                {
                    event_base_dispatch((*i)->base);
                    pthread_mutex_destroy(&(*i)->monitor_num_locl);
                    evb_thpool->evbase_thread_list.list->erase(i);
                    free(*i);
                }
                else
                {
                    pthread_mutex_unlock(&(*i)->monitor_num_locl);    
                    i++;
                }
            }
            else
            {
                pthread_mutex_unlock(&(*i)->monitor_num_locl);    
                i++;
            }
        }
        pthread_mutex_unlock(&evb_thpool->evbase_thread_list.lock);
    }
    return NULL;
}

// Assembly:
cmpl $0x0, 0x40(%rdi)
jne 0x8802
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x8ce4(%rip), %r12      # 0x1142c
imull $0x3e8, (%r12), %edi    # imm = 0x3E8
callq 0x35d0
movq %r14, %rdi
callq 0x3620
movq 0x30(%rbx), %rax
movq (%rax), %r15
cmpq 0x8(%rax), %r15
je 0x87e7
movq (%r15), %rdi
callq 0x3620
movq (%r15), %rdi
cmpl $0x0, 0x30(%rdi)
jne 0x879c
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
cmpq $0x9, %rcx
jb 0x879c
movq 0x28(%rdi), %rdi
callq 0x3590
movq (%r15), %rdi
testl %eax, %eax
je 0x87ab
callq 0x3310
addq $0x8, %r15
movq 0x30(%rbx), %rax
jmp 0x8764
movq 0x28(%rdi), %rdi
callq 0x3640
movq (%r15), %rdi
callq 0x34e0
movq 0x30(%rbx), %r13
leaq 0x8(%r15), %rsi
movq 0x8(%r13), %rdx
cmpq %rdx, %rsi
je 0x87d8
subq %rsi, %rdx
movq %r15, %rdi
callq 0x36a0
addq $-0x8, 0x8(%r13)
movq (%r15), %rdi
callq 0x3500
jmp 0x87a5
movq %r14, %rdi
callq 0x3310
cmpl $0x0, 0x40(%rbx)
je 0x8748
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq (%rdi), %rbx
callq 0x3500
movq %rbx, %rdi
callq 0x3720
movq %rbx, %rdi
callq 0x3640
cmpl $0x1, %eax
je 0x8816
movq %rbx, %rdi
callq 0x35b0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x8882
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x3620
movq %r14, %rdi
callq 0x34e0
movl $0x1, 0x40(%rbx)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x8866
xorl %esi, %esi
callq 0x33b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8873
callq 0x918d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8883
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x890c
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x88ff
movq (%rax), %r15
movq 0x30(%rbx), %r14
cmpq 0x8(%r14), %r15
je 0x88d9
movq (%r15), %rax
movq 0x28(%rax), %rdi
testq %rdi, %rdi
je 0x88bb
callq 0x35b0
movq (%r15), %rdi
callq 0x3620
movq (%r15), %rdi
callq 0x34e0
movq (%r15), %rdi
callq 0x3500
addq $0x8, %r15
jmp 0x88a0
testq %r14, %r14
je 0x88ff
movq (%r14), %rdi
testq %rdi, %rdi
je 0x88f2
movq 0x10(%r14), %rsi
subq %rdi, %rsi
callq 0x3460
movl $0x18, %esi
movq %r14, %rdi
callq 0x3460
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3500
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq 0x30(%rdi), %rax
movq (%rax), %r15
cmpq 0x8(%rax), %r15
je 0x8ace
movq %rsi, %rbx
movq %rdi, %r14
movq (%r15), %rax
cmpq %rbx, 0x28(%rax)
jne 0x8ab7
movl 0x30(%rax), %ecx
testl %ecx, %ecx
je 0x8ac7
decl %ecx
movl %ecx, 0x30(%rax)
addq $0x8, %r15
movq 0x30(%r14), %rax
cmpq 0x8(%rax), %r15
jne 0x8aa2
jmp 0x8ace
callq 0x3e8a
jmp 0x8ab7
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x9207
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, 0xd4(%rdi)
movq 0xb0(%rdi), %rdi
xorl %esi, %esi
callq 0x33b0
movq 0xb8(%rbx), %rax
movl 0x10(%rax), %ebp
testl %ebp, %ebp
jle 0x91d2
leaq 0x80(%rbx), %r14
movq %r14, %rdi
callq 0x3180
decl %ebp
jne 0x91c6
movq 0xb8(%rbx), %rax
movq (%rax), %r14
cmpq %rax, %r14
je 0x91f8
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0x33b0
movq (%r14), %r14
cmpq 0xb8(%rbx), %r14
jne 0x91e1
movq %rbx, %rdi
callq 0x92fd
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3620
leaq 0x50(%rbx), %r12
movabsq $0x7ffffffffffffff, %r13 # imm = 0x7FFFFFFFFFFFFFF
movq 0xc0(%rbx), %rax
movq 0x48(%rax), %rcx
movq %rcx, %rdx
subq 0x28(%rax), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
shlq $0x5, %rdx
movq 0x30(%rax), %rcx
subq 0x38(%rax), %rcx
movq 0x20(%rax), %rsi
sarq $0x4, %rcx
subq 0x10(%rax), %rsi
sarq $0x4, %rsi
addq %rcx, %rsi
addq %rdx, %rsi
cmpq %r13, %rsi
jne 0x9291
cmpl $0x0, 0xd4(%rbx)
jne 0x9291
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3660
jmp 0x9236
cmpl $0x0, 0xd4(%rbx)
je 0x92a2
movq %rbx, %rdi
callq 0x3310
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq 0xc0(%rbx), %rdi
movq 0x30(%rdi), %rax
movq 0x40(%rdi), %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
je 0x92d1
movups (%rsp), %xmm0
movups %xmm0, (%rax)
addq $0x10, 0x30(%rdi)
jmp 0x92d9
movq %rsp, %rsi
callq 0x96b8
leaq 0x80(%rbx), %rdi
callq 0x3040
movq %rbx, %rdi
callq 0x3310
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x9408
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0xc0(%rdi), %rax
testq %rax, %rax
je 0x9385
movq 0x10(%rax), %r15
movq 0xc0(%rbx), %r14
cmpq 0x30(%r14), %r15
je 0x936b
movq 0x20(%rax), %r13
movq 0x28(%rax), %r12
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x9345
callq 0x3500
addq $0x10, %r15
cmpq %r13, %r15
jne 0x935e
movq 0x8(%r12), %r15
addq $0x8, %r12
leaq 0x200(%r15), %r13
movq 0xc0(%rbx), %r14
cmpq 0x30(%r14), %r15
jne 0x9337
testq %r14, %r14
je 0x9385
movq %r14, %rdi
callq 0x98ce
movl $0x50, %esi
movq %r14, %rdi
callq 0x3460
movq 0xb8(%rbx), %r14
testq %r14, %r14
je 0x93f4
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x93ae
movq (%rdi), %r15
movl $0x18, %esi
callq 0x3460
movq %r15, %rdi
cmpq %r14, %r15
jne 0x9399
movl $0x18, %esi
movq %r14, %rdi
callq 0x3460
movq %rbx, %rdi
callq 0x3620
movq %rbx, %rdi
callq 0x34e0
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x3620
movq %r14, %rdi
callq 0x34e0
leaq 0x80(%rbx), %rdi
callq 0x37c0
leaq 0x50(%rbx), %rdi
callq 0x37c0
movq %rbx, %rdi
callq 0x3500
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3620
movq 0xb8(%rbx), %rax
movl 0x10(%rax), %ebp
movq %rbx, %rdi
callq 0x3310
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movq %r14, %rdi
callq 0x3620
movl 0xcc(%rbx), %ebx
movq %r14, %rdi
callq 0x3310
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x9bf8
leaq 0x3423(%rip), %rsi      # 0xcfe4
callq 0x34f0
testq %rax, %rax
je 0x9bf8
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x34c0
movq %r14, %rdi
callq 0x3030
movq %rax, %rbx
movq %r14, %rdi
callq 0x30b0
movq %r14, %rdi
callq 0x3430
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x410, %rsp            # imm = 0x410
movq %rdi, %rbx
leaq 0xa8(%rdi), %rsi
leaq -0x30(%rbp), %r14
movl $0x2, %edi
movq %r14, %rdx
movl $0x10, %ecx
callq 0x3480
movq 0x98(%rbx), %r15
movq %r15, %rdi
callq 0x3490
leaq -0x430(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x3540
movzwl 0xa6(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %edx
leaq 0x303c(%rip), %rdi      # 0xd04c
movq %r14, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0x3080
movq 0x30(%rbx), %rdi
leaq 0x3031(%rip), %rsi      # 0xd059
movl $0x6, %edx
xorl %ecx, %ecx
movl $0xffffffed, %r8d       # imm = 0xFFFFFFED
callq 0x529c
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rbx
subq $0x18, %rsp
movups 0x3066(%rip), %xmm0     # 0xd0c0
movaps %xmm0, -0x20(%rbp)
cmpl $0x2, %edi
jne 0xa0ab
movq %rdx, %rbx
leaq 0x113e(%rip), %rdi      # 0xb1ab
leaq 0x2fec(%rip), %rsi      # 0xd060
leaq 0x2ff5(%rip), %rdx      # 0xd070
movl $0xef, %ecx
xorl %eax, %eax
callq 0x3080
leaq 0x301d(%rip), %rdi      # 0xd0ab
callq 0x3680
leaq 0x1444(%rip), %rdi      # 0xb4de
callq 0x3680
leaq -0x20(%rbp), %rsi
movq %rbx, %rdi
callq 0x3330
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq -0x12(%rbp), %r14
movw $0x1f98, (%r14)         # imm = 0x1F98
callq 0x36f0
movq %rax, %rbx
xorl %edi, %edi
callq 0xa250
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7929
movq %rax, %r14
leaq -0x2f2(%rip), %rsi      # 0x9df9
movq %rax, %rdi
callq 0x76e9
leaq -0x155(%rip), %rsi      # 0x9fa5
leaq 0x2f06(%rip), %rdx      # 0xd007
movq %r14, %rdi
callq 0x77ad
leaq -0xc6(%rip), %rcx       # 0xa04a
movq %rbx, %rdi
movl $0x2, %esi
movl $0x18, %edx
movq %rbx, %r8
callq 0x3380
testq %rax, %rax
je 0xa15b
movq %rax, %rdi
xorl %esi, %esi
callq 0x31e0
testl %eax, %eax
js 0xa15b
movq %rbx, %rdi
callq 0x3640
movq %r14, %rdi
callq 0x7811
movq %rbx, %rdi
callq 0x35b0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x40a9
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x71ff(%rip), %r14      # 0x11460
testq %r14, %r14
je 0xa27b
movq %rbx, %rdi
callq 0x31f0
movq %r14, %rdi
movq %rax, %rsi
callq 0x36c0
jmp 0xa297
testq %rbx, %rbx
je 0xa28d
movq %rbx, %rdi
callq 0x31f0
movq %rax, %rdi
jmp 0xa292
movl $0x1a, %edi
callq 0x35a0
movq %rax, 0x71c2(%rip)      # 0x11460
testq %rbx, %rbx
je 0xa2b2
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x33e0
movups 0x2e22(%rip), %xmm0     # 0xd0db
movups %xmm0, 0xb(%rax)
movups 0x2e0c(%rip), %xmm0     # 0xd0d0
movups %xmm0, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2434(%rip), %rdi      # 0x5180
movl $0x2, %esi
xorl %eax, %eax
callq 0x2230
movl %eax, %ebp
callq 0x2280
testl %ebp, %ebp
js 0x2dc3
movslq %eax, %r14
imulq %r15, %r14
movq %rsp, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
movq %r14, %rcx
callq 0x2200
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x2da4
movq %rsp, %r15
incq (%rbx)
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
movq %r15, %rsi
movq %r14, %rcx
callq 0x2200
cmpq $0x1000, %rax           # imm = 0x1000
je 0x2d87
leaq 0x549(%rip), %rdi       # 0x32f4
leaq 0x4d4(%rip), %rsi       # 0x3286
leaq 0x508(%rip), %rcx       # 0x32c1
movl $0x28, %edx
callq 0x2130
leaq 0x4b4(%rip), %rdi       # 0x327e
leaq 0x4b5(%rip), %rsi       # 0x3286
leaq 0x4e9(%rip), %rcx       # 0x32c1
movl $0x25, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x100000, %rsp         # imm = 0x100000
cmpl $0x1, %edi
jg 0x1191
leaq 0xe8c(%rip), %rsi       # 0x2004
movl $0x16, %edx
movl $0x2, %edi
callq 0x1030
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x121c
movq 0x8(%rsi), %rdi
callq 0x1050
movslq %eax, %r14
xorl %ebx, %ebx
movq %rsp, %rsi
xorl %edi, %edi
movq %r14, %rdx
callq 0x1040
movq %rax, %r13
testl %r13d, %r13d
jle 0x1201
movq %rsp, %r15
leaq 0xe5c(%rip), %r12       # 0x201a
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movl $0x1, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1030
cmpq %r13, %rax
je 0x11ec
movl $0xd, %edx
movl $0x2, %edi
movq %r12, %rsi
callq 0x1030
xorl %edi, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1040
movq %rax, %r13
testl %r13d, %r13d
jg 0x11be
testl %r13d, %r13d
jns 0x121c
leaq 0xe1a(%rip), %rsi       # 0x2027
movl $0xc, %edx
movl $0x2, %edi
callq 0x1030
movl %ebx, %eax
addq $0x100000, %rsp         # imm = 0x100000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl $0x2, %edi
jl 0x23d3
movq %rdx, %r14
movq %rsi, %r15
movslq %ecx, %rax
movl %edi, %r13d
movq %r13, %rbp
subq %rax, %rbp
movl $0x1, %r12d
movq (%r15,%r12,8), %rdi
movq %r14, %rsi
callq 0x2190
testl %eax, %eax
jne 0x23c3
cmpq %rbp, %r12
jl 0x23cd
incq %r12
cmpq %r12, %r13
jne 0x23ae
jmp 0x23d3
incl %r12d
movl %r12d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/salextpuru[P]speccy-toochain/src/spgbld/func.cxx
// Function: parse_args(int, char**)
void parse_args(int argc, char* argv[])
{
	int i;
	conf.packer = PM_AUTO;

	if (i = parse_arg(argc, argv, "-b", 2)) {
		conf.mode = M_BLD;
		conf.in_fname = argv[i];
		conf.out_fname = argv[i+1];

		if (i = parse_arg(argc, argv, "-c", 1))
			if( !strcmp("auto",argv[i]) ){
				conf.packer = PM_AUTO;
			}
			else if( !strcmp("none",argv[i]) ){
				conf.packer = PM_NONE;
			}
			else if( !strcmp("mlz",argv[i]) ){
				conf.packer = PM_MLZ;
			}
			else if( !strcmp("hst",argv[i]) ){
				conf.packer = PM_HST;
			}
			else {
				conf.packer = (C_PACK)_wtoi(argv[i]);
			}

		return;
	}

	if (i = parse_arg(argc, argv, "-u", 1)) {
		conf.mode = M_UNP;
		conf.in_fname = argv[i];
		return;
	}

	print_help();
	error(ARG);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x44496c(%rip), %r14    # 0x446d60
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
leaq 0x1c33(%rip), %rdx      # 0x4035
movl $0x2, %ecx
callq 0x2384
testl %eax, %eax
je 0x24ac
movl $0x1, 0x4(%r14)
cltq
movq (%rbx,%rax,8), %rcx
movq %rcx, 0x8(%r14)
movq 0x8(%rbx,%rax,8), %rax
movq %rax, 0x10(%r14)
leaq 0x1c02(%rip), %rdx      # 0x4038
movl %ebp, %edi
movq %rbx, %rsi
movl $0x1, %ecx
callq 0x2384
testl %eax, %eax
je 0x24fc
cltq
movq (%rbx,%rax,8), %rbx
leaq 0x1be1(%rip), %rdi      # 0x403b
movq %rbx, %rsi
callq 0x2190
testl %eax, %eax
je 0x24da
leaq 0x1bd3(%rip), %rdi      # 0x4040
movq %rbx, %rsi
callq 0x2190
testl %eax, %eax
je 0x24e3
leaq 0x1bc5(%rip), %rdi      # 0x4045
movq %rbx, %rsi
callq 0x2190
testl %eax, %eax
je 0x24ec
leaq 0x1bb6(%rip), %rdi      # 0x4049
movq %rbx, %rsi
callq 0x2190
testl %eax, %eax
je 0x24f5
movq %rbx, %rdi
callq 0x21f0
movl %eax, (%r14)
jmp 0x24fc
leaq 0x1b9a(%rip), %rdx      # 0x404d
movl %ebp, %edi
movq %rbx, %rsi
movl $0x1, %ecx
callq 0x2384
testl %eax, %eax
je 0x2501
movl $0x3, 0x4(%r14)
cltq
movq (%rbx,%rax,8), %rax
movq %rax, 0x8(%r14)
jmp 0x24fc
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
jmp 0x24fc
movl $0x0, (%r14)
jmp 0x24fc
movl $0x1, (%r14)
jmp 0x24fc
movl $0x2, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
callq 0x3de0
leaq 0x1b43(%rip), %rdi      # 0x4050
xorl %eax, %eax
callq 0x2030
leaq 0x1db5(%rip), %rdi      # 0x42d0
callq 0x21d0
movl $0x1, %edi
callq 0x2150
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbx
subq $0x10, %rsp
leaq 0x3c2a(%rip), %rbx      # 0x6160
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2070
movabsq $0x6d75727463657053, %rax # imm = 0x6D75727463657053
movq %rax, 0x20(%rbx)
movl $0x676f7250, 0x28(%rbx) # imm = 0x676F7250
movups 0x1ab3(%rip), %xmm0     # 0x4014
movups %xmm0, 0x50(%rbx)
movups 0x1ab8(%rip), %xmm0     # 0x4024
movups %xmm0, 0x60(%rbx)
movb $0x10, 0x2c(%rbx)
movw $0x5c00, 0x32(%rbx)     # imm = 0x5C00
movb $0x0, 0x34(%rbx)
andb $-0x8, 0x35(%rbx)
movl $0x5b000000, 0x36(%rbx) # imm = 0x5B000000
xorl %edi, %edi
callq 0x20d0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x2090
movb 0xc(%rax), %cl
movb %cl, 0x2d(%rbx)
movb 0x10(%rax), %cl
incb %cl
movb %cl, 0x2e(%rbx)
movb 0x14(%rax), %cl
addb $-0x64, %cl
movb %cl, 0x2f(%rbx)
movb (%rax), %cl
movb %cl, 0x3c(%rbx)
movb 0x4(%rax), %cl
movb %cl, 0x3d(%rbx)
movb 0x8(%rax), %al
movb %al, 0x3e(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rax
movb (%rdi), %al
cmpb $0x30, %al
jne 0x25d8
cmpb $0x78, 0x1(%rdi)
je 0x25e1
addb $-0x23, %al
cmpb $0x1, %al
ja 0x25ea
incq %rdi
leaq 0x1a85(%rip), %rsi      # 0x406d
jmp 0x25f1
leaq 0x1a7f(%rip), %rsi      # 0x4070
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x20f0
movslq 0x4(%rsp), %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movslq %edi, %r12
imulq $0x4408, %r12, %rax     # imm = 0x4408
leaq 0x386b(%rip), %rcx      # 0x6560
leaq (%rcx,%rax), %r14
addq $0x408, %r14            # imm = 0x408
movl $0x4000, %edx           # imm = 0x4000
movq %r14, %rdi
xorl %esi, %esi
callq 0x2070
movl %ebx, -0x4(%r14)
leal -0x1(%rbx), %eax
leaq (%r12,%r12,2), %rcx
leaq 0x343f(%rip), %rdx      # 0x6160
movzwl 0x100(%rdx,%rcx), %esi
shrl %eax
andl $0x1f00, %eax           # imm = 0x1F00
andl $0xffffe0ff, %esi       # imm = 0xFFFFE0FF
orl %eax, %esi
movw %si, 0x100(%rdx,%rcx)
leaq 0x13a0(%rip), %rsi      # 0x40e7
movq %r15, %rdi
callq 0x2130
movq %rax, %r15
movslq %ebx, %rdx
movl $0x1, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x21c0
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2100
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0xea1(%rip), %rsi       # 0x423b
callq 0x2130
movq %rax, %rbx
leaq 0x2db7(%rip), %rdi      # 0x6160
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %rax, %rcx
callq 0x2250
leaq 0x44399e(%rip), %r15    # 0x446d60
cmpl $0x0, 0x18(%r15)
jle 0x341f
movl $0x100, %r12d           # imm = 0x100
addq 0x2bfa(%rip), %r12      # 0x5fd0
movl $0x408, %r14d           # imm = 0x408
addq 0x2bfd(%rip), %r14      # 0x5fe0
xorl %r13d, %r13d
movzwl (%r12), %eax
andl $0x1f00, %eax           # imm = 0x1F00
leaq 0x200(,%rax,2), %rdx
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2250
incq %r13
movslq 0x18(%r15), %rax
addq $0x3, %r12
addq $0x4408, %r14           # imm = 0x4408
cmpq %rax, %r13
jl 0x33e6
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2100
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x44391e(%rip), %r12    # 0x446d60
cmpl $0x0, 0x18(%r12)
jle 0x34e7
movl $0x100, %r13d           # imm = 0x100
addq 0x2b75(%rip), %r13      # 0x5fd0
movl $0x408, %ebx            # imm = 0x408
addq 0x2b79(%rip), %rbx      # 0x5fe0
xorl %ebp, %ebp
leaq 0xc77(%rip), %r14       # 0x40e7
leaq -0x408(%rbx), %rdi
movq %r14, %rsi
callq 0x2130
testq %rax, %rax
je 0x34f6
movq %rax, %r15
movl -0x4(%rbx), %eax
decl %eax
movzwl (%r13), %ecx
shrl %eax
andl $0x1f00, %eax           # imm = 0x1F00
andl $0xffffe0ff, %ecx       # imm = 0xFFFFE0FF
orl %eax, %ecx
movw %cx, (%r13)
movslq -0x8(%rbx), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x2120
movslq -0x4(%rbx), %rdx
movl $0x1, %esi
movq %rbx, %rdi
movq %r15, %rcx
callq 0x21c0
movq %r15, %rdi
callq 0x2100
incq %rbp
movslq 0x18(%r12), %rax
addq $0x3, %r13
addq $0x4408, %rbx           # imm = 0x4408
cmpq %rax, %rbp
jl 0x3470
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcf8(%rip), %rdi       # 0x41f5
xorl %eax, %eax
callq 0x2030
leaq 0xdc5(%rip), %rdi       # 0x42d0
callq 0x21d0
movl $0x5, %edi
callq 0x2150
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
callq 0x252a
movl %ebp, %edi
movq %rbx, %rsi
callq 0x23e4
movl 0x442feb(%rip), %eax    # 0x446d64
cmpl $0x3, %eax
je 0x3db0
cmpl $0x1, %eax
jne 0x3dbc
movq 0x442fde(%rip), %rdi    # 0x446d68
callq 0x2604
callq 0x3430
cmpl $0x0, 0x442fc5(%rip)    # 0x446d60
je 0x3da2
callq 0x2d78
movq 0x442fc7(%rip), %rdi    # 0x446d70
callq 0x338a
jmp 0x3dbc
movq 0x442fb1(%rip), %rdi    # 0x446d68
callq 0x351a
leaq 0x5da(%rip), %rdi       # 0x439d
xorl %eax, %eax
callq 0x2030
leaq 0x4ff(%rip), %rdi       # 0x42d0
callq 0x21d0
xorl %edi, %edi
callq 0x2150
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
leaq 0x5bb(%rip), %rdi       # 0x43a3
xorl %eax, %eax
callq 0x2030
leaq 0x4da(%rip), %rbx       # 0x42d0
movq %rbx, %rdi
callq 0x21d0
leaq 0x5bd(%rip), %rdi       # 0x43c2
callq 0x21d0
leaq 0x5f0(%rip), %rdi       # 0x4401
callq 0x21d0
leaq 0x604(%rip), %rdi       # 0x4421
callq 0x21d0
movq %rbx, %rdi
popq %rbx
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O1/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
testq %rsi, %rsi
cmoveq %rsi, %rdx
movq %rcx, %rax
subq %rdx, %rax
addq 0x28abc(%rip), %rax     # 0x2d2d0
cmpq 0x28a8d(%rip), %rax     # 0x2d2a8
jle 0x482a
callq 0x40a0
movl $0xc, (%rax)
jmp 0x4847
movq %rax, 0x28a9f(%rip)     # 0x2d2d0
movq %rsi, %rdi
testq %rcx, %rcx
je 0x4842
movq %rcx, %rsi
popq %rbp
jmp 0x43d0
callq 0x4050
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/ch6/limit_memory.c
// Function: main
int main() {
  lua_State *L = lua_newstate(alloc, NULL);
  luaL_openlibs(L);

  print_status();
  while (accept_and_run_a_line(L)) print_status();

  lua_close(L);
  print_status();
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq -0x77(%rip), %rdi       # 0x47fc
xorl %esi, %esi
callq 0x4bda
movq %rax, %rbx
movq %rax, %rdi
callq 0x9138
movq 0x28a44(%rip), %rsi     # 0x2d2d0
leaq 0x1b771(%rip), %rdi     # 0x20004
xorl %eax, %eax
callq 0x4180
movq %rbx, %rdi
callq 0x1f5b8
testl %eax, %eax
je 0x48ca
leaq 0x1b757(%rip), %r14     # 0x20004
movq 0x28a1c(%rip), %rsi     # 0x2d2d0
movq %r14, %rdi
xorl %eax, %eax
callq 0x4180
movq %rbx, %rdi
callq 0x1f5b8
testl %eax, %eax
jne 0x48ad
movq %rbx, %rdi
callq 0x4ee0
movq 0x289f7(%rip), %rsi     # 0x2d2d0
leaq 0x1b724(%rip), %rdi     # 0x20004
xorl %eax, %eax
callq 0x4180
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/ch6/interpreter.c
// Function: accept_and_run_a_line
int accept_and_run_a_line(lua_State *L) {

  char buff[2048];

  // Read input and exit early if there is an end of stream.
  printf("> ");
  if (!fgets(buff, sizeof(buff), stdin)) {
    printf("\n");
    return 0;
  }

  // Try to run the line, printing errors if there are any.
  int error = luaL_loadstring(L, buff);
  if (!error) error = lua_pcall(L, 0, 0, 0);
  if (error) {
    fprintf(stderr, "%s\n", lua_tostring(L, -1));
    lua_pop(L, 1);
  }

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x800, %rsp            # imm = 0x800
movq %rdi, %rbx
leaq 0x245a(%rip), %rdi      # 0x21a2a
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x4180
movq 0xd9ef(%rip), %rax      # 0x2cfd0
movq (%rax), %rdx
leaq -0x810(%rbp), %rdi
movl $0x800, %esi            # imm = 0x800
callq 0x4250
testq %rax, %rax
je 0x1f63b
leaq -0x810(%rbp), %rsi
movq %rbx, %rdi
callq 0x14d00
testl %eax, %eax
jne 0x1f62b
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa3e6
movl $0x1, %r14d
testl %eax, %eax
je 0x1f645
movq %rbx, %rdi
callq 0x46c5
movl $0x1, %r14d
jmp 0x1f645
movl $0xa, %edi
callq 0x4070
movl %r14d, %eax
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/amanelis[P]uici/client.c
// Function: main
int main(int argc, char *argv[]) {
   int bytescopied;
   int communfd;
   u_port_t portnumber;
 
   if (argc != 3) {
      fprintf(stderr, "Usage: %s host port\n", argv[0]);
      return 1;
   }
   portnumber = (u_port_t)atoi(argv[2]);

   if ((communfd = u_connect(portnumber, argv[1])) == -1) {
      perror("Failed to make connection");
      return 1;
   }
   fprintf(stderr, "[%ld]:connected %s\n", (long)getpid(), argv[1]);
   bytescopied = copyfile(STDIN_FILENO, communfd);
   fprintf(stderr, "[%ld]:sent %d bytes\n", (long)getpid(), bytescopied);
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0x13d2
movq 0x10(%rbx), %rdi
callq 0x11a0
movq 0x8(%rbx), %rsi
movzwl %ax, %edi
callq 0x1d79
cmpl $-0x1, %eax
jne 0x13e1
leaq 0xc4e(%rip), %rdi       # 0x2019
callq 0x1180
jmp 0x13da
movq %rbx, %rdi
callq 0x1220
movl $0x1, %eax
jmp 0x13f1
addq $0x8, %rbx
movq %rbx, %rdi
movl %eax, %esi
callq 0x1243
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/amanelis[P]uici/uiciname.c
// Function: addr2name
void addr2name(struct in_addr addr, char *name, int namelen) {
   struct hostent *hostptr;

   if (pthread_mutex_lock(&mutex) == -1) {
      strncpy(name, inet_ntoa(addr), namelen-1); 
      name[namelen-1] = 0;
      return;
   }
   hostptr = gethostbyaddr((char *)&addr, 4, AF_INET);
   if (hostptr == NULL)
      strncpy(name, inet_ntoa(addr), namelen-1); 
   else  
      strncpy(name, hostptr->h_name, namelen-1);
   pthread_mutex_unlock(&mutex);
   name[namelen-1] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, -0x14(%rbp)
leaq 0x2641(%rip), %rdi      # 0x4120
callq 0x11e0
cmpl $-0x1, %eax
je 0x1b06
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x2, %edx
callq 0x11b0
testq %rax, %rax
je 0x1b29
movq (%rax), %rsi
jmp 0x1b34
movl -0x14(%rbp), %edi
callq 0x1090
movslq %r14d, %r14
leaq -0x1(%r14), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1040
leaq (%rbx,%r14), %rax
decq %rax
jmp 0x1b58
movl -0x14(%rbp), %edi
callq 0x1090
movq %rax, %rsi
leal -0x1(%r14), %eax
movslq %eax, %rdx
movq %rbx, %rdi
callq 0x1040
leaq 0x25d6(%rip), %rdi      # 0x4120
callq 0x1130
movslq %r14d, %rax
addq %rbx, %rax
decq %rax
movb $0x0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/amanelis[P]uici/uiciname.c
// Function: name2addr
int name2addr(char *name, in_addr_t *addrp) {
   struct hostent *hp;
 
   if (isdigit((int)(*name)))
      *addrp = inet_addr(name);
   else {
      if (pthread_mutex_lock(&mutex) == -1)
         return -1;
      hp = gethostbyname(name);
      if (hp == NULL) {
         pthread_mutex_unlock(&mutex);
         return -1;
      }
      memcpy((char *)addrp, hp->h_addr_list[0], hp->h_length);
      pthread_mutex_unlock(&mutex);
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
callq 0x11f0
movq (%rax), %rax
movsbq (%r15), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x1bcc
leaq 0x2592(%rip), %rdi      # 0x4120
callq 0x11e0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x1bd9
movq %r15, %rdi
callq 0x10f0
testq %rax, %rax
je 0x1be7
movq 0x18(%rax), %rcx
movq (%rcx), %rsi
movslq 0x14(%rax), %rdx
movq %rbx, %rdi
callq 0x1110
leaq 0x255b(%rip), %rdi      # 0x4120
callq 0x1130
jmp 0x1bd6
movq %r15, %rdi
callq 0x10e0
movl %eax, (%rbx)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2532(%rip), %rdi      # 0x4120
callq 0x1130
jmp 0x1bd9
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/openshmem-org[P]openshmem-examples/c/iip.c
// Function: main
int
main(void)
{
    int me;

    shmem_init();
    me = shmem_my_pe();

    n = 3;

    shmem_barrier_all();

    if (me == 0) {
        shmem_int_p(&n, 42, 1);
    }

    shmem_barrier_all();

    /* now check */

    if (me == 1) {
        printf("PE %d: n = %d, %s\n", me, n, (n == 42) ? "OK" : "FAIL");
    }

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %rbx
callq 0x1080
callq 0x1060
movl %eax, %ebx
movl $0x3, 0x2eb9(%rip)      # 0x405c
callq 0x1070
testl %ebx, %ebx
jne 0x11c2
leaq 0x2ea9(%rip), %rdi      # 0x405c
movl $0x2a, %esi
movl $0x1, %edx
callq 0x1040
callq 0x1070
cmpl $0x1, %ebx
jne 0x11fa
movl 0x2e8a(%rip), %edx      # 0x405c
cmpl $0x2a, %edx
leaq 0xe3b(%rip), %rax       # 0x2017
leaq 0xe37(%rip), %rcx       # 0x201a
cmoveq %rax, %rcx
leaq 0xe16(%rip), %rdi       # 0x2004
movl $0x1, %esi
xorl %eax, %eax
callq 0x1030
callq 0x1050
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.3/thread-create3.c
// Function: char_print
void* char_print (void* parameters)
{
/* Cast the cookie pointer to the right type. */
	struct char_print_parms* p = (struct char_print_parms*) parameters;
	int i;
	for (i = 0; i < p->count; ++i)
	fputc (p->character, stderr);
	return NULL;
}

// Assembly:
cmpl $0x0, 0x4(%rdi)
jle 0x1197
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x2e7f(%rip), %r15      # 0x3ff8
movsbl (%rbx), %edi
movq (%r15), %rsi
callq 0x1030
incl %r14d
cmpl 0x4(%rbx), %r14d
jl 0x1179
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.3/thread-create3.c
// Function: main
int main ()
{
	pthread_t thread1_id;
	pthread_t thread2_id;
	struct char_print_parms thread1_args;
	struct char_print_parms thread2_args;

  /* Create a new thread to print 30,000 x's. */
	thread1_args.character = 'x';
	thread1_args.count = 30000;
	pthread_create (&thread1_id, NULL, &char_print, &thread1_args);

  /* Create a new thread to print 20,000 o's. */
	thread2_args.character = 'o';
	thread2_args.count = 20000;
	pthread_create (&thread2_id, NULL, &char_print, &thread2_args);
  // Asegurarse que el primer hilo haya acabado
	pthread_join(thread1_id, NULL);
  // Asegurarse que el segundo hilo haya acabado
	pthread_join(thread2_id, NULL);

  //Ahora podemos hacer return
	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq -0x38(%rbp), %rcx
movb $0x78, (%rcx)
movl $0x7530, 0x4(%rcx)      # imm = 0x7530
leaq -0x60(%rip), %rbx       # 0x115c
leaq -0x28(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1040
leaq -0x30(%rbp), %rcx
movb $0x6f, (%rcx)
movl $0x4e20, 0x4(%rcx)      # imm = 0x4E20
leaq -0x20(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1040
movq (%r14), %rdi
xorl %esi, %esi
callq 0x1050
movq (%r15), %rdi
xorl %esi, %esi
callq 0x1050
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/fq2b.c
// Function: read10xWhitelist
void read10xWhitelist (char *fileName)
{ FILE *f = fopen (fileName, "r") ;
  if (!f) die ("failed to open 10x whitelist file %s\n", fileName) ;
  char s[32] ;
  U32 u ; 
  int i,j,n = 0 ;

  if (!(table = calloc ((size_t)1<<32, 1))) die ("can't allocate barcode table") ;
  for (i = 0 ; i < 16 ; ++i)
    for (j = 0 ; j < 4 ; ++j)
      { mask[i*4 + j] = ~(3 << (2*i)) ; bits[i*4 + j] = j << (2*i) ; }
  
  while (!feof (f) && fscanf (f, "%s\n", s))
    { ++n ;
      if (strlen(s) != 16) die ("bad barcode line % in %s: %s", n, fileName, s) ;
      seqPack (s, &u, 16) ;
      for (i = 0 ; i < 16 ; ++i)
	{ U8 ui = 1 + i*4 + ((u >> (2*i)) & 0x3) ; /* code to reset i'th base to u[i] */
	  for (j = 0 ; j < 4 ; ++j) table[switchBase(u,1+i*4+j)] = ui ;
	}
    }
  fclose (f) ;
  fprintf (stderr, "read %d barcodes from file %s\n", n, fileName) ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x2e57(%rip), %rsi      # 0x408c
movq %rdi, (%rsp)
callq 0x1190
movq %rax, %r14
testq %rax, %rax
jne 0x1258
leaq 0x2e41(%rip), %rdi      # 0x408e
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x3264
movabsq $0x100000000, %rdi      # imm = 0x100000000
pushq $0x1
popq %rsi
callq 0x10f0
movq %rax, 0x66e7(%rip)      # 0x7958
testq %rax, %rax
jne 0x1284
leaq 0x2e37(%rip), %rdi      # 0x40b4
xorl %eax, %eax
callq 0x3264
leaq 0x67d5(%rip), %rax      # 0x7a60
leaq 0x66ce(%rip), %rdx      # 0x7960
xorl %esi, %esi
pushq $0x3
popq %rdi
leaq (%rsi,%rsi), %rcx
movl %edi, %r8d
shll %cl, %r8d
notl %r8d
xorl %r9d, %r9d
movl %r9d, %r10d
shll %cl, %r10d
movl %r8d, (%rdx,%r9,4)
movl %r10d, (%rax,%r9,4)
incq %r9
cmpq $0x4, %r9
jne 0x12a7
incq %rsi
addq $0x10, %rax
addq $0x10, %rdx
cmpq $0x10, %rsi
jne 0x1297
movq %r14, %rdi
callq 0x1130
xorl %ebp, %ebp
testl %eax, %eax
jne 0x13a6
leaq 0x10(%rsp), %r12
pushq $0x10
popq %rbx
leaq 0x6670(%rip), %r15      # 0x7960
leaq 0x6769(%rip), %r13      # 0x7a60
xorl %ebp, %ebp
movq %r14, %rdi
leaq 0x2e06(%rip), %rsi      # 0x4109
movq %r12, %rdx
xorl %eax, %eax
callq 0x1050
testl %eax, %eax
je 0x13a6
incl %ebp
movq %r12, %rdi
callq 0x1090
cmpq $0x10, %rax
je 0x133c
leaq 0x2da5(%rip), %rdi      # 0x40d1
movl %ebp, %esi
movq (%rsp), %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x3264
movq %r12, %rdi
leaq 0xc(%rsp), %rsi
movl %ebx, %edx
callq 0x16b3
movl 0xc(%rsp), %eax
xorl %edx, %edx
xorl %esi, %esi
leal (%rsi,%rsi), %ecx
movl %eax, %edi
shrl %cl, %edi
andl $0x3, %edi
leal (%rdi,%rsi,4), %ecx
incb %cl
xorl %edi, %edi
leaq (%rdx,%rdi), %r8
movl (%r15,%r8), %r9d
andl %eax, %r9d
orl (%r13,%r8), %r9d
movq 0x65dd(%rip), %r8       # 0x7958
movb %cl, (%r8,%r9)
addq $0x4, %rdi
cmpq $0x10, %rdi
jne 0x1364
incq %rsi
addq $0x10, %rdx
cmpq $0x10, %rsi
jne 0x1353
movq %r14, %rdi
callq 0x1130
testl %eax, %eax
je 0x12f9
movq %r14, %rdi
callq 0x1080
movq 0x5c43(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2d2f(%rip), %rsi      # 0x40ee
movl %ebp, %edx
movq (%rsp), %rcx
xorl %eax, %eax
callq 0x1120
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/fq2b.c
// Function: packInit
void packInit (void)
{
  if (isPackInitialised) return ;
  int i ;
  static int sIndex[] = {'a','c','g','t','A','C','G','T'} ;
  for (i = 0 ; i < 8 ; ++i) sPack[sIndex[i]] = i%4 ;
  for (i = '$' + 20 ; i < 256 ; ++i) qPack[i] = 1 ;
  isPackInitialised = TRUE ;
}

// Assembly:
cmpb $0x0, 0x5acd(%rip)      # 0x7130
jne 0x16b2
leaq 0x29a4(%rip), %rax      # 0x4010
xorl %ecx, %ecx
leaq 0x5acb(%rip), %rdx      # 0x7140
movl %ecx, %esi
andl $0x3, %esi
movslq (%rax), %rdi
movl %esi, (%rdx,%rdi,4)
incq %rcx
addq $0x4, %rax
cmpq $0x8, %rcx
jne 0x1675
movl $0x38, %eax
leaq 0x5ea7(%rip), %rcx      # 0x7540
movl $0x1, (%rcx,%rax,4)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x1699
movb $0x1, 0x5a7e(%rip)      # 0x7130
retq