LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdb_init
int hdb_init(hdb_t *hdb)
{
    if (pthread_mutex_init(&hdb->mutex, NULL)) return -1;
    TAILQ_INIT(&hdb->open_list);
    TAILQ_INIT(&hdb->close_list);
    hdb->num_open = 0;
    hdb->num_close = 0;

    int i;
    for (i = 0; i < HTAB_SIZE; i++) {
        LIST_INIT((hdb->htab + i));
    }
    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x2450
testl %eax, %eax
je 0x2c2e
pushq $-0x1
popq %rax
popq %rbx
retq
leaq 0x28(%rbx), %rax
andq $0x0, 0x28(%rbx)
movq %rax, 0x30(%rbx)
leaq 0x38(%rbx), %rax
andq $0x0, 0x38(%rbx)
movq %rax, 0x40(%rbx)
andq $0x0, 0x48(%rbx)
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0x400, %rcx            # imm = 0x400
je 0x2c2c
andq $0x0, 0x50(%rbx,%rcx,8)
incq %rcx
jmp 0x2c51
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdb_append
int hdb_append(hdb_t *hdb, const char *hdict_path){
    hdict_t *hd, *ihd = NULL;
    char rpath[1024];
    realpath(hdict_path, rpath);

    int hdict_errno = 0;
    hdict_t *hdict = hdict_open(rpath, &hdict_errno);
    if(NULL == hdict) return hdict_errno;
    LOCK(hdb);
    //use the label to generate hash id
    uint64_t key_hash = bkdr_hash(hdict->hdict_meta->label);
    uint32_t hash = HASH(key_hash);
    for (hd = LIST_FIRST(&hdb->htab[hash]); hd; hd = LIST_NEXT(hd, h_link)) {
        if (hd->hdict_meta->version <= hdict->hdict_meta->version) {
            ihd = hd;
            break;
        }
    }
    hdict->hdid = key_hash;
    TAILQ_INSERT_TAIL(&hdb->open_list, hdict, link);
    if(NULL == ihd){
        LIST_INSERT_HEAD(&hdb->htab[hash], hdict, h_link);
    }else{
        LIST_INSERT_BEFORE(ihd, hdict, h_link);
    }
    hdb->num_open++;
    UNLK(hdb);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x410, %rsp            # imm = 0x410
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x2260
leaq 0xc(%rsp), %rsi
andl $0x0, (%rsi)
movq %r14, %rdi
callq 0x25bc
testq %rax, %rax
je 0x2d15
movq %rax, %r14
movq %rbx, %rdi
callq 0x2460
movq 0x58(%r14), %r15
leaq 0x5(%r15), %rdi
callq 0x3ef0
movl %eax, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
leaq (%rbx,%rcx,8), %rcx
addq $0x50, %rcx
movq %rcx, %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x2cdd
movq 0x58(%rdx), %rsi
movl (%rsi), %esi
cmpl (%r15), %esi
jbe 0x2cdd
addq $0x10, %rdx
jmp 0x2cc4
movq %rax, 0x50(%r14)
andq $0x0, (%r14)
movq 0x30(%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0x30(%rbx)
testq %rdx, %rdx
je 0x2d1b
movq 0x18(%rdx), %rax
movq %r14, %rcx
addq $0x10, %rcx
movq %rax, 0x18(%r14)
movq %rdx, 0x10(%r14)
movq %r14, (%rax)
movq %rcx, 0x18(%rdx)
jmp 0x2d39
movl 0xc(%rsp), %eax
jmp 0x2d46
movq (%rcx), %rax
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x2d32
movq %r14, %rdx
addq $0x10, %rdx
movq %rdx, 0x18(%rax)
movq %r14, (%rcx)
movq %rcx, 0x18(%r14)
incl 0x48(%rbx)
movq %rbx, %rdi
callq 0x22a0
xorl %eax, %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdb_reopen
int hdb_reopen(hdb_t *hdb, const char *hdict_path)
{
    hdict_t *hd, *next;
    uint32_t hash;
    char rpath[1024];
    realpath(hdict_path, rpath);

    int hdict_errno = 0;
    hdict_t *hdict = hdict_open(rpath, &hdict_errno);
    if (hdict == NULL) return hdict_errno;
    uint64_t hdid = bkdr_hash(hdict->hdict_meta->label);

    LOCK(hdb);
    for (hd = TAILQ_FIRST(&hdb->open_list); hd; hd = next) {
        next = TAILQ_NEXT(hd, link);
        if (hd->hdid == hdid && strcmp(hd->hdict_meta->label, hdict->hdict_meta->label) == 0) {
            LIST_REMOVE(hd, h_link);
            TAILQ_REMOVE(&hdb->open_list, hd, link);
            hdb->num_open--;
            TAILQ_INSERT_TAIL(&hdb->close_list, hd, link);
            hdb->num_close++;
            break;
        }
    }
    hdict->hdid = hdid;
    TAILQ_INSERT_TAIL(&hdb->open_list, hdict, link);
    /* put the hdb ptr to simple hash table */
    hash = HASH(hdict->hdid);
    LIST_INSERT_HEAD(&hdb->htab[hash], hdict, h_link);
    hdb->num_open++;
    UNLK(hdb);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x2260
leaq 0xc(%rsp), %rsi
andl $0x0, (%rsi)
movq %r14, %rdi
callq 0x25bc
testq %rax, %rax
je 0x2dfb
movq %rax, %r14
movq 0x58(%rax), %r12
addq $0x5, %r12
movq %r12, %rdi
callq 0x3ef0
movq %rax, %r15
movq %rbx, %rdi
callq 0x2460
movq 0x28(%rbx), %rbp
testq %rbp, %rbp
je 0x2e2e
movq %rbp, %r13
movq (%rbp), %rbp
cmpq %r15, 0x50(%r13)
jne 0x2dae
movq 0x58(%r13), %rdi
addq $0x5, %rdi
movq %r12, %rsi
callq 0x2210
testl %eax, %eax
jne 0x2dae
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
testq %rax, %rax
je 0x2de5
movq %rcx, 0x18(%rax)
movq %rax, (%rcx)
movq (%r13), %rax
movq 0x8(%r13), %rcx
testq %rax, %rax
je 0x2e01
movq %rcx, 0x8(%rax)
jmp 0x2e05
movl 0xc(%rsp), %eax
jmp 0x2e7f
movq %rcx, 0x30(%rbx)
movq %rax, (%rcx)
andq $0x0, (%r13)
movq 0x40(%rbx), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rax)
movq %r13, 0x40(%rbx)
movq 0x48(%rbx), %xmm0
paddd 0x29e7(%rip), %xmm0     # 0x5810
movq %xmm0, 0x48(%rbx)
movq %r15, 0x50(%r14)
andq $0x0, (%r14)
movq 0x30(%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0x30(%rbx)
andl $0x3ff, %r15d           # imm = 0x3FF
leaq (%rbx,%r15,8), %rax
addq $0x50, %rax
movq (%rax), %rcx
movq %rcx, 0x10(%r14)
testq %rcx, %rcx
je 0x2e6b
movq %r14, %rdx
addq $0x10, %rdx
movq %rdx, 0x18(%rcx)
movq %r14, (%rax)
movq %rax, 0x18(%r14)
incl 0x48(%rbx)
movq %rbx, %rdi
callq 0x22a0
xorl %eax, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdb_close
int hdb_close(hdb_t *hdb, const char* label, uint32_t version_id)
{
    if(NULL == label){
        return 0;
    }
    uint64_t hdid = bkdr_hash(label);
    int found = 0;
    hdict_t *hd, *next;
    LOCK(hdb);
    for (hd = TAILQ_FIRST(&hdb->open_list); hd; hd = next) {
        next = TAILQ_NEXT(hd, link);
        if (hd->hdid == hdid && strcmp(hd->hdict_meta->label, label) == 0) {
            if (version_id != 0 && hd->hdict_meta->version != version_id){
                continue;
            }
            LIST_REMOVE(hd, h_link);
            TAILQ_REMOVE(&hdb->open_list, hd, link);
            hdb->num_open--;
            TAILQ_INSERT_TAIL(&hdb->close_list, hd, link);
            hdb->num_close++;
            found += 1;
            if (version_id != 0){
                break;
            }
        }
    }
    UNLK(hdb);

    return found;
}

// Assembly:
testq %rsi, %rsi
je 0x2f8c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3ef0
movq %rax, %r12
movq %rbx, %rdi
callq 0x2460
movq 0x28(%rbx), %r15
movl $0x0, 0xc(%rsp)
movq %rbx, 0x10(%rsp)
testq %r15, %r15
je 0x2f6c
movq %r15, %r13
movq (%r15), %r15
cmpq %r12, 0x50(%r13)
jne 0x2ed4
movq 0x58(%r13), %rbx
leaq 0x5(%rbx), %rdi
movq %r14, %rsi
callq 0x2210
testl %eax, %eax
jne 0x2ed4
testl %ebp, %ebp
je 0x2f05
cmpl %ebp, (%rbx)
jne 0x2ed4
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
testq %rax, %rax
je 0x2f16
movq %rcx, 0x18(%rax)
movq %rax, (%rcx)
movq (%r13), %rax
movq 0x8(%r13), %rcx
testq %rax, %rax
movq 0x10(%rsp), %rbx
je 0x2f31
movq %rcx, 0x8(%rax)
jmp 0x2f35
movq %rcx, 0x30(%rbx)
movq %rax, (%rcx)
andq $0x0, (%r13)
incl 0xc(%rsp)
movq 0x40(%rbx), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rax)
movq %r13, 0x40(%rbx)
movq 0x48(%rbx), %xmm0
paddd 0x28b3(%rip), %xmm0     # 0x5810
movq %xmm0, 0x48(%rbx)
testl %ebp, %ebp
je 0x2ed4
jmp 0x2f71
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x22a0
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdb_ref
hdict_t *hdb_ref(hdb_t *hdb, const char* label)
{
    hdict_t *hdict = NULL;
    if (NULL == label){
        return hdict;
    }
    hdict_t *hd;
    LOCK(hdb);
    uint64_t hdid = bkdr_hash(label);
    uint32_t hash = HASH(hdid);
    for (hd = LIST_FIRST(&hdb->htab[hash]); hd; hd = LIST_NEXT(hd, h_link)) {
        if (hd->hdid == hdid) {
            hd->ref++;
            hdict = hd;
            break;
        }
    }
    UNLK(hdb);
    return hdict;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x319c
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2460
movq %r14, %rdi
callq 0x3ef0
movl %eax, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
leaq (%rbx,%rcx,8), %r14
addq $0x50, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x31a5
cmpq %rax, 0x50(%r14)
je 0x31a1
addq $0x10, %r14
jmp 0x3188
xorl %r14d, %r14d
jmp 0x31ad
incl 0x4c(%r14)
movq %rbx, %rdi
callq 0x22a0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdb_deref
int hdb_deref(hdb_t *hdb, hdict_t *hdict)
{
    LOCK(hdb);
    hdict->ref--;
    UNLK(hdb);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2460
decl 0x4c(%rbx)
movq %r14, %rdi
callq 0x22a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/connection.c
// Function: conn_close
void conn_close(conn *c) {
    event_del(&c->event);

    if (settings.verbose > 1)
        fprintf(stderr, "<%d connection closed.\n", c->sfd);

    close(c->sfd);

    if (freecurr < freetotal) {
        freeconns[freecurr++] = c;
    } else {
        conn **new_freeconns = realloc(freeconns, sizeof(conn *)*freetotal*2);
        if (new_freeconns) {
            freetotal *= 2;
            freeconns = new_freeconns;
            freeconns[freecurr++] = c;
        } else {
            if (settings.verbose > 0)
                fprintf(stderr, "Couldn't realloc freeconns\n");
            free(c->rbuf);
            free(c->wbuf);
            free(c);

            STATS_LOCK(stats);
            stats.conn_structs--;
            STATS_UNLOCK(stats);
        }
    }

    STATS_LOCK(stats);
    stats.curr_conns--;
    STATS_UNLOCK(stats);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x2150
leaq 0x5e09(%rip), %r14      # 0x9270
cmpl $0x2, 0x10(%r14)
jge 0x353f
movl (%rbx), %edi
callq 0x2190
leaq 0x5f04(%rip), %r15      # 0x9384
movslq (%r15), %rax
leaq 0x5ef6(%rip), %r12      # 0x9380
movslq (%r12), %rsi
leaq 0x5ee3(%rip), %r13      # 0x9378
movq (%r13), %rdi
cmpl %esi, %eax
jge 0x34a9
leal 0x1(%rax), %ecx
movl %ecx, (%r15)
movq %rbx, (%rdi,%rax,8)
jmp 0x3518
shlq $0x4, %rsi
callq 0x2300
testq %rax, %rax
je 0x34ce
shll (%r12)
movq %rax, (%r13)
movslq (%r15), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%r15)
movq %rbx, (%rax,%rcx,8)
jmp 0x3518
cmpl $0x0, 0x10(%r14)
jg 0x355e
movq 0x90(%rbx), %rdi
callq 0x2030
movq 0xa8(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2030
leaq 0x5e88(%rip), %r14      # 0x9388
leaq 0x28(%r14), %rbx
movq %rbx, %rdi
callq 0x2460
decl 0x4(%r14)
movq %rbx, %rdi
callq 0x22a0
leaq 0x5e69(%rip), %r14      # 0x9388
leaq 0x28(%r14), %rbx
movq %rbx, %rdi
callq 0x2460
decl (%r14)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x22a0
movq 0x5ab2(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movl (%rbx), %edx
leaq 0x24dd(%rip), %rsi      # 0x5a2f
xorl %eax, %eax
callq 0x2230
jmp 0x3472
movq 0x5a93(%rip), %rax      # 0x8ff8
movq (%rax), %rcx
leaq 0x24d8(%rip), %rdi      # 0x5a47
pushq $0x1b
popq %rsi
pushq $0x1
popq %rdx
callq 0x2400
jmp 0x34d9
nop
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/connection_queue.c
// Function: cq_init
void cq_init(struct conn_queue *cq, int wakeup) {
    pthread_mutex_init(&cq->lock, NULL);
    pthread_cond_init(&cq->cond, NULL);
    cq->length = 0;
    cq->wakeup = wakeup;
    cq->head = NULL;
    cq->tail = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
addq $0x18, %rdi
xorl %esi, %esi
callq 0x2450
leaq 0x40(%r14), %rdi
xorl %esi, %esi
callq 0x2290
andl $0x0, 0x10(%r14)
movl %ebx, 0x14(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/connection_queue.c
// Function: cq_push
void cq_push(struct conn_queue *cq, conn *item) {
    item->next = NULL;

    pthread_mutex_lock(&cq->lock);
    if (NULL == cq->tail)
        cq->head = item;
    else
        cq->tail->next = item;
    cq->tail = item;
    cq->length++;
    if (cq->wakeup) pthread_cond_signal(&cq->cond);
    pthread_mutex_unlock(&cq->lock);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
andq $0x0, 0xe0(%rsi)
leaq 0x18(%rdi), %rbx
movq %rbx, %rdi
callq 0x2460
movq 0x8(%r14), %rax
leaq 0xe0(%rax), %rcx
testq %rax, %rax
cmoveq %r14, %rcx
movq %r15, (%rcx)
movq %r15, 0x8(%r14)
incl 0x10(%r14)
cmpl $0x0, 0x14(%r14)
je 0x3606
addq $0x40, %r14
movq %r14, %rdi
callq 0x21e0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/connection_queue.c
// Function: cq_pop
conn *cq_pop(struct conn_queue *cq) {
    conn *item;

    assert(cq->wakeup);
    pthread_mutex_lock(&cq->lock);
    while (NULL == cq->head)
        pthread_cond_wait(&cq->cond, &cq->lock);
    item = cq->head;
    cq->head = item->next;
    if (NULL == cq->head)
        cq->tail = NULL;
    cq->length--;
    pthread_mutex_unlock(&cq->lock);

    return item;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x14(%rdi)
je 0x3677
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq %r14, %rdi
callq 0x2460
leaq 0x40(%rbx), %r12
movq (%rbx), %r15
testq %r15, %r15
jne 0x3649
movq %r12, %rdi
movq %r14, %rsi
callq 0x2110
jmp 0x3634
movq 0xe0(%r15), %rax
movq %rax, (%rbx)
testq %rax, %rax
jne 0x365d
andq $0x0, 0x8(%rbx)
decl 0x10(%rbx)
movq %r14, %rdi
callq 0x22a0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x23e5(%rip), %rdi      # 0x5a63
leaq 0x23e9(%rip), %rsi      # 0x5a6e
leaq 0x23f5(%rip), %rcx      # 0x5a81
pushq $0x1f
popq %rdx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/connection_queue.c
// Function: cq_peek
conn *cq_peek(struct conn_queue *cq) {
    conn *item;

    pthread_mutex_lock(&cq->lock);
    item = cq->head;
    if (NULL != item) {
        cq->head = item->next;
        if (NULL == cq->head)
            cq->tail = NULL;
        cq->length--;
    }
    pthread_mutex_unlock(&cq->lock);

    return item;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
leaq 0x18(%rdi), %rbx
movq %rbx, %rdi
callq 0x2460
movq (%r15), %r14
testq %r14, %r14
je 0x36c8
movq 0xe0(%r14), %rax
movq %rax, (%r15)
testq %rax, %rax
jne 0x36c4
andq $0x0, 0x8(%r15)
decl 0x10(%r15)
movq %rbx, %rdi
callq 0x22a0
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/connection_queue.c
// Function: cq_length
uint32_t cq_length(struct conn_queue *cq) {
    int length;
    pthread_mutex_lock(&cq->lock);
    length = cq->length;
    pthread_mutex_unlock(&cq->lock);
    return length;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq %r14, %rdi
callq 0x2460
movl 0x10(%rbx), %ebx
movq %r14, %rdi
callq 0x22a0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/network.c
// Function: update_event
int update_event(conn *c, const int new_flags) {
    assert(c != NULL);

    struct event_base *base = c->event.ev_base;
    if (c->ev_flags == new_flags)
        return 1;
    if (c->ev_flags != 0) {
        if (event_del(&c->event) == -1) return 0;
    }
    event_set(&c->event, c->sfd, new_flags, event_handler, (void *)c);
    event_base_set(base, &c->event);
    c->ev_flags = new_flags;
    if (event_add(&c->event, 0) == -1) return 0;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x378d
movl %esi, %ebp
movq %rdi, %rbx
movswl 0x88(%rdi), %eax
cmpl %esi, %eax
jne 0x3725
pushq $0x1
popq %rax
jmp 0x3782
leaq 0x8(%rbx), %r14
movq 0x48(%rbx), %r15
testw %ax, %ax
je 0x373f
movq %r14, %rdi
callq 0x2150
cmpl $-0x1, %eax
je 0x3780
movl (%rbx), %esi
movswl %bp, %ebp
leaq 0x5f(%rip), %rcx        # 0x37aa
movq %r14, %rdi
movl %ebp, %edx
movq %rbx, %r8
callq 0x2350
movq %r15, %rdi
movq %r14, %rsi
callq 0x2060
movw %bp, 0x88(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x2220
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
setne %al
jmp 0x3782
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2320(%rip), %rdi      # 0x5ab4
leaq 0x2323(%rip), %rsi      # 0x5abe
leaq 0x2326(%rip), %rcx      # 0x5ac8
pushq $0x11
popq %rdx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/network.c
// Function: event_handler
void event_handler(const int fd, const short which, void *arg) {
    conn *c;

    c = (conn *)arg;
    assert(c != NULL);

    c->which = which;

    if (fd != c->sfd) {
        if (settings.verbose > 0)
            fprintf(stderr, "Catastrophic: event fd doesn't match conn fd!\n");
        conn_close(c);
        return;
    }

    drive_machine(c);

    return;
}

// Assembly:
pushq %rbx
testq %rdx, %rdx
je 0x37fb
movq %rdx, %rbx
movw %si, 0x8a(%rdx)
cmpl %edi, (%rdx)
jne 0x37c7
movq %rbx, %rdi
popq %rbx
jmp 0x3a80
leaq 0x5aa2(%rip), %rax      # 0x9270
cmpl $0x0, 0x10(%rax)
jg 0x37dd
movq %rbx, %rdi
popq %rbx
jmp 0x344b
movq 0x5814(%rip), %rax      # 0x8ff8
movq (%rax), %rcx
leaq 0x2427(%rip), %rdi      # 0x5c15
pushq $0x2e
popq %rsi
pushq $0x1
popq %rdx
callq 0x2400
jmp 0x37d4
leaq 0x22b2(%rip), %rdi      # 0x5ab4
leaq 0x22b5(%rip), %rsi      # 0x5abe
leaq 0x23d2(%rip), %rcx      # 0x5be2
movl $0xe9, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/network.c
// Function: process_command
int process_command(conn *c, char *command) {
    if (strcmp(command, "quit") == 0) {
        c->state = conn_closing;
        return STAY_IN;
    } else if (strcmp(command, "stop") == 0) {
        exit(0);
    } else if (strcmp(command, "version") == 0) {
        // compat with old php Memcache client
        out_string(c, VERSION);
        return STAY_IN;
    } else {
        if (event_del(&c->event) == -1) {
            out_string(c, "SERVER_ERROR can't forward");
            return STAY_IN;
        }
        gettimeofday(&c->tv, NULL);
        c->ev_flags = 0;
        c->cmd = command;
        cq_push(&REQ, c);
        return FORWARD_OUT;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x22c1(%rip), %rsi      # 0x5aec
movq %r14, %rdi
callq 0x2210
testl %eax, %eax
je 0x389b
leaq 0x22b3(%rip), %rsi      # 0x5af1
movq %r14, %rdi
callq 0x2210
testl %eax, %eax
je 0x38c7
leaq 0x20c6(%rip), %rsi      # 0x5917
movq %r14, %rdi
callq 0x2210
testl %eax, %eax
je 0x38a4
leaq 0x8(%rbx), %rdi
callq 0x2150
cmpl $-0x1, %eax
je 0x38ad
leaq 0xd0(%rbx), %rdi
xorl %esi, %esi
callq 0x2170
andw $0x0, 0x88(%rbx)
movq %r14, 0xc8(%rbx)
leaq 0x5a01(%rip), %rdi      # 0x9290
movq %rbx, %rsi
callq 0x35b7
pushq $0x1
jmp 0x38be
movl $0x3, 0x4(%rbx)
jmp 0x38bc
leaq 0x224b(%rip), %rsi      # 0x5af6
jmp 0x38b4
leaq 0x2250(%rip), %rsi      # 0x5b04
movq %rbx, %rdi
callq 0x3f6f
pushq $0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
callq 0x23f0
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/network.c
// Function: try_read_command
int try_read_command(conn *c) {
    char *el, *cont;

    if (!c->rbytes)
        return 0;
    el = (char *)memchr(c->rcurr, '\n', c->rbytes);
    if (!el)
        return 0;
    cont = el + 1;
    if (el - c->rcurr > 1 && *(el - 1) == '\r') {
        el--;
    }
    *el = '\0';

    int res = process_command(c, c->rcurr);

    c->rbytes -= (cont - c->rcurr);
    c->rcurr = cont;

    return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq 0xa4(%rdi), %rdx
testq %rdx, %rdx
je 0x393f
movq %rdi, %rbx
movq 0x98(%rdi), %r14
pushq $0xa
popq %rsi
movq %r14, %rdi
callq 0x21b0
testq %rax, %rax
je 0x393f
leaq 0x1(%rax), %r15
movq %rax, %rcx
subq %r14, %rcx
cmpq $0x2, %rcx
jl 0x3915
leaq -0x1(%rax), %rcx
cmpb $0xd, -0x1(%rax)
cmoveq %rcx, %rax
movb $0x0, (%rax)
movq 0x98(%rbx), %rsi
movq %rbx, %rdi
callq 0x381a
movl 0x98(%rbx), %ecx
subl %r15d, %ecx
addl %ecx, 0xa4(%rbx)
movq %r15, 0x98(%rbx)
jmp 0x3941
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/network.c
// Function: try_read_network
int try_read_network(conn *c) {
    int gotdata = 0;
    int res;

    if (c->rcurr != c->rbuf) {
        if (c->rbytes != 0) /* otherwise there's nothing to copy */
            memmove(c->rbuf, c->rcurr, c->rbytes);
        c->rcurr = c->rbuf;
    }

    while (1) {
        if (c->rbytes >= c->rsize) {
            char *new_rbuf = (char *)realloc(c->rbuf, c->rsize*2);
            if (!new_rbuf) {
                if (settings.verbose > 0)
                    fprintf(stderr, "Couldn't realloc input buffer\n");
                c->rbytes = 0; /* ignore what we read */
                out_string(c, "SERVER_ERROR out of memory");
                c->write_and_go = conn_closing;
                return 1;
            }
            c->rcurr  = c->rbuf = new_rbuf;
            c->rsize *= 2;
        }
        int avail = c->rsize - c->rbytes;
        res = read(c->sfd, c->rbuf + c->rbytes, avail);
        if (res > 0) {
            gotdata = 1;
            c->rbytes += res;
            if (res == avail) {
                continue;
            } else {
                break;
            }
        }
        if (res == 0) {
            /* connection closed */
            c->state = conn_closing;
            return 1;
        }

        if (res == -1) {
            if (errno == EAGAIN || errno == EWOULDBLOCK) break;
            else {
                c->state = conn_closing;
                return 1;
            }
        }
    }
    return gotdata;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x90(%rdi), %rax
movq 0x98(%rdi), %rsi
cmpq %rax, %rsi
je 0x3986
movslq 0xa4(%rbx), %rdx
testq %rdx, %rdx
je 0x397f
movq %rax, %rdi
callq 0x2330
movq 0x90(%rbx), %rax
movq %rax, 0x98(%rbx)
xorl %ebp, %ebp
pushq $0x1
popq %r14
movl 0xa0(%rbx), %r15d
movl 0xa4(%rbx), %ecx
cmpl %r15d, %ecx
jl 0x39d6
movslq %r15d, %rsi
addq %rsi, %rsi
movq %rax, %rdi
callq 0x2300
testq %rax, %rax
je 0x3a12
movq %rax, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movl 0xa0(%rbx), %r15d
movl 0xa4(%rbx), %ecx
addl %r15d, %r15d
movl %r15d, 0xa0(%rbx)
subl %ecx, %r15d
movl (%rbx), %edi
movslq %ecx, %rsi
addq %rax, %rsi
movslq %r15d, %rdx
callq 0x21c0
testl %eax, %eax
jle 0x39fd
addl %eax, 0xa4(%rbx)
movl %r14d, %ebp
cmpl %eax, %r15d
je 0x3a06
jmp 0x3a52
cmpl $-0x1, %eax
je 0x3a41
testl %eax, %eax
je 0x3a4b
movq 0x90(%rbx), %rax
jmp 0x398c
leaq 0x5857(%rip), %rax      # 0x9270
cmpl $0x0, 0x10(%rax)
jg 0x3a62
andl $0x0, 0xa4(%rbx)
leaq 0x2111(%rip), %rsi      # 0x5b3e
movq %rbx, %rdi
callq 0x3f6f
movl $0x3, 0xc0(%rbx)
jmp 0x3a52
callq 0x2040
cmpl $0xb, (%rax)
je 0x3a55
movl $0x3, 0x4(%rbx)
movl %r14d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x558f(%rip), %rax      # 0x8ff8
movq (%rax), %rcx
leaq 0x20ac(%rip), %rdi      # 0x5b1f
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x2400
jmp 0x3a1f
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/network.c
// Function: notify_handler
void notify_handler(const int fd, const short which, void *arg) {
    if (fd != notify_receive_fd) {
        if (settings.verbose > 0)
            fprintf(stderr, "Catastrophic: event fd doesn't match conn fd!\n");
        return;
    }
    char buf[1];
    if (read(fd, buf, 1) != 1) {
        if (settings.verbose > 0)
            fprintf(stderr, "Can't read from event pipe\n");
    }

    conn *c = cq_peek(&RSP);
    if (c != NULL) {
        c->wcurr = c->wbuf;
        c->state = conn_write;
        c->write_and_go = conn_read;

        drive_machine(c);
    }

    return;
}

// Assembly:
leaq 0x5697(%rip), %rax      # 0x9370
cmpl %edi, (%rax)
jne 0x3d3b
pushq %rax
leaq 0x7(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x21c0
cmpq $0x1, %rax
je 0x3cfe
leaq 0x5578(%rip), %rax      # 0x9270
cmpl $0x0, 0x10(%rax)
jg 0x3d49
leaq 0x55fb(%rip), %rdi      # 0x9300
callq 0x3694
testq %rax, %rax
je 0x3d36
movq 0xa8(%rax), %rcx
movq %rcx, 0xb0(%rax)
movl $0x2, 0x4(%rax)
movl $0x1, 0xc0(%rax)
movq %rax, %rdi
callq 0x3a80
addq $0x8, %rsp
retq
leaq 0x552e(%rip), %rax      # 0x9270
cmpl $0x0, 0x10(%rax)
jg 0x3d67
retq
movq 0x52a8(%rip), %rax      # 0x8ff8
movq (%rax), %rcx
leaq 0x1eea(%rip), %rdi      # 0x5c44
pushq $0x1b
popq %rsi
pushq $0x1
popq %rdx
callq 0x2400
jmp 0x3cfe
movq 0x528a(%rip), %rax      # 0x8ff8
movq (%rax), %rcx
leaq 0x1e9d(%rip), %rdi      # 0x5c15
pushq $0x2e
popq %rsi
pushq $0x1
popq %rdx
jmp 0x2400
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/network.c
// Function: server_socket
int server_socket(const int port) {
    int sfd;
    struct linger ling = {0, 0};
    struct sockaddr_in addr;
    int flags = 1;

    if ((sfd = new_socket()) == -1) {
        return -1;
    }

    setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags));
    setsockopt(sfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&flags, sizeof(flags));
    setsockopt(sfd, SOL_SOCKET, SO_LINGER, (void *)&ling, sizeof(ling));
    setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, (void *)&flags, sizeof(flags));

    memset(&addr, 0, sizeof(addr));

    addr.sin_family = AF_INET;
    addr.sin_port = htons(port);
    addr.sin_addr = settings.interf;
    if (bind(sfd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
        perror("bind()");
        close(sfd);
        return -1;
    }

    if (listen(sfd, 1024) == -1) {
        perror("listen()");
        close(sfd);
        return -1;
    }
    return sfd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %r14d
andq $0x0, 0x10(%rsp)
movl $0x1, 0xc(%rsp)
callq 0x3d83
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0x3ec1
movl %eax, %ebp
pushq $0x1
popq %r15
pushq $0x2
popq %rdx
leaq 0xc(%rsp), %r12
pushq $0x4
popq %r13
movl %eax, %edi
movl %r15d, %esi
movq %r12, %rcx
movl %r13d, %r8d
callq 0x20d0
pushq $0x9
popq %rdx
movl %ebp, %edi
movl %r15d, %esi
movq %r12, %rcx
movl %r13d, %r8d
callq 0x20d0
pushq $0xd
popq %rdx
leaq 0x10(%rsp), %rcx
pushq $0x8
popq %r8
movl %ebp, %edi
movl %r15d, %esi
callq 0x20d0
pushq $0x6
popq %rsi
movl %ebp, %edi
movl %r15d, %edx
movq %r12, %rcx
movl %r13d, %r8d
callq 0x20d0
leaq 0x18(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movw $0x2, (%rsi)
rolw $0x8, %r14w
movw %r14w, 0x2(%rsi)
leaq 0x53d7(%rip), %rax      # 0x9270
movl 0x8(%rax), %eax
movl %eax, 0x4(%rsi)
pushq $0x10
popq %rdx
movl %ebp, %edi
callq 0x2310
cmpl $-0x1, %eax
je 0x3ed2
movl %ebp, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x22e0
cmpl $-0x1, %eax
je 0x3edb
movl %ebp, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d90(%rip), %rdi      # 0x5c69
jmp 0x3ee2
leaq 0x1d8e(%rip), %rdi      # 0x5c70
callq 0x2380
movl %ebp, %edi
callq 0x2190
jmp 0x3ec1
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/util.c
// Function: bkdr_hash
uint64_t bkdr_hash(const char* str){
    if(NULL == str){
        return 0;
    }
    uint64_t seed = 1313131313;
    uint64_t hash = 0;
    while(*str){
        hash = hash * seed + (*str++);
    }
    return hash;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x3f0f
movsbq (%rdi), %rcx
testq %rcx, %rcx
je 0x3f0f
imulq $0x4e44cb31, %rax, %rax # imm = 0x4E44CB31
incq %rdi
addq %rcx, %rax
jmp 0x3ef7
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/util.c
// Function: pack_string
void pack_string(conn *c, const char *str) {
    int len;

    len = strlen(str);
    if (len + 2 > c->wsize) {
        /* ought to be always enough. just fail for simplicity */
        str = "SERVER_ERROR output line too long";
        len = strlen(str);
    }

    strcpy(c->wbuf, str);
    strcat(c->wbuf, "\r\n");
    c->wbytes = len + 2;

    return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2130
addl $0x2, %eax
cmpl 0xb8(%r14), %eax
leaq 0x1d46(%rip), %rsi      # 0x5c79
cmovleq %rbx, %rsi
movq 0xa8(%r14), %rdi
pushq $0x23
popq %rbp
cmovlel %eax, %ebp
callq 0x2090
movq 0xa8(%r14), %rbx
movq %rbx, %rdi
callq 0x2130
movb $0x0, 0x2(%rbx,%rax)
movw $0xa0d, (%rbx,%rax)     # imm = 0xA0D
movl %ebp, 0xbc(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/util.c
// Function: out_string
void out_string(conn *c, const char *str) {
    pack_string(c, str);
    c->wcurr = c->wbuf;
    c->state = conn_write;
    c->write_and_go = conn_read;
    return;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3f10
movq 0xa8(%rbx), %rax
movq %rax, 0xb0(%rbx)
movl $0x2, 0x4(%rbx)
movl $0x1, 0xc0(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/util.c
// Function: bigger_prime
int bigger_prime(int m){
    int i;
    for(i= m; ; i++){
        if(isprime(i)){
            return i;
        }
    }
}

// Assembly:
pushq $0x2
popq %rcx
testl %edi, %edi
jle 0x3fb2
movl %ecx, %esi
cmpl %edi, %esi
jge 0x3fb6
movl %edi, %eax
xorl %edx, %edx
divl %esi
incl %esi
testl %edx, %edx
jne 0x3fa2
incl %edi
jmp 0x3f9c
movl %edi, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/build-lua/.out/LuaToC/test/cfl.c
// Function: requirefile
static int requirefile(lua_State *L)
{
   const char *path = lua_tostring(L, -1);
   size_t ndx;

   for (ndx = 0; ndx < ARRAYLENGTH(rfiles); ++ndx) {
      if (!strcmp(path, rfiles[ndx].pszPath)) {
         lua_pushlstring(L, rfiles[ndx].pc, rfiles[ndx].cb);
         return 1;
      }
   }
   return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0x807b
movq %rax, %r15
leaq 0x247ce(%rip), %r12     # 0x2bed0
xorl %ecx, %ecx
leaq 0x18(%rcx), %r13
cmpq $0x48, %r13
je 0x7736
movq (%rcx,%r12), %rsi
movq %r15, %rdi
callq 0x72c0
movq %r13, %rcx
testl %eax, %eax
jne 0x7704
movq -0x10(%r13,%r12), %rsi
movq -0x8(%r13,%r12), %rdx
movq %r14, %rdi
callq 0x823b
pushq $0x1
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/build-lua/.out/LuaToC/test/cfl.c
// Function: main
int main (int argc, char **argv)
{
   int exitCode = EXIT_FAILURE;
   int nErr;
   lua_State *L;

   L = luaL_newstate();
   if (L == NULL) {
      fprintf(stderr, "lua_open failed: not enough memory\n");
      return EXIT_FAILURE;
   }

   lua_pushcfunction(L, &pmain);
   lua_pushinteger(L, argc);
   lua_pushlightuserdata(L, argv);
   nErr = lua_pcall(L, 2, 1, 0);

   if (nErr == LUA_ERRRUN) {
      fprintf(stderr, "pmain error:\n%s\n", lua_tostring(L, -1));
   } else if (nErr) {
      fprintf(stderr, "pmain failed: err = %d\n", nErr);
   } else if (lua_isnumber(L, 1)) {
      exitCode = lua_tointeger(L, 1);
   }

   lua_close(L);
   return exitCode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
callq 0xa6d9
testq %rax, %rax
je 0x780f
movq %rax, %rbx
leaq 0xea(%rip), %rsi        # 0x7850
movq %rax, %rdi
xorl %edx, %edx
callq 0x83ce
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x8205
movq %rbx, %rdi
movq %r14, %rsi
callq 0x846b
pushq $0x2
popq %rsi
pushq $0x1
popq %r14
movq %rbx, %rdi
movl %r14d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8ad2
testl %eax, %eax
jne 0x77dd
pushq $0x1
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7d83
testl %eax, %eax
je 0x77c7
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7fb8
movq %rax, %r14
movq %rbx, %rdi
callq 0x13cdb
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x2, %eax
jne 0x7831
movq 0x25807(%rip), %rax     # 0x2cff0
movq (%rax), %r15
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x807b
leaq 0x16828(%rip), %rsi     # 0x1e028
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x72f0
jmp 0x77c7
movq 0x257da(%rip), %rax     # 0x2cff0
movq (%rax), %rcx
leaq 0x167e4(%rip), %rdi     # 0x1e004
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x7520
pushq $0x1
popq %r14
jmp 0x77cf
movq 0x257b8(%rip), %rcx     # 0x2cff0
movq (%rcx), %rdi
leaq 0x167f7(%rip), %rsi     # 0x1e039
movl %eax, %edx
xorl %eax, %eax
callq 0x72f0
jmp 0x77c7
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/build-lua/.out/LuaToC/test/cfl.c
// Function: pmain
static int pmain(lua_State *L)
{
   int argc = lua_tointeger(L, 1);
   char **argv = (char **) lua_touserdata(L, 2);
   int n;

   lua_gc(L, LUA_GCSTOP, 0);
   luaL_openlibs(L);
   lua_gc(L, LUA_GCRESTART, 0);

   if (luaL_loadbuffer(L, mods[0].pc, mods[0].cb, mods[0].pszSource)) {
      return lua_error(L);
   }

   lua_createtable(L, argc-1, 1);        // argv
   for (n = 0; n < argc; ++n) {
      lua_pushstring(L, argv[n]);
      lua_rawseti(L, -2, n);
   }

   lua_pushcfunction(L, &getModInfo);    // getModInfo
   lua_pushcfunction(L, &getModFunc);    // getModFunc
   lua_pushliteral(L, "pre");      // preloads

   lua_call(L, 4, 1);

   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x7fb8
movq %rax, %r15
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x814b
movq %rax, %r12
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8ca3
movq %rbx, %rdi
callq 0xde0c
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x8ca3
leaq 0x1686e(%rip), %rsi     # 0x1e110
leaq 0x167c5(%rip), %rcx     # 0x1e06e
movl $0x1f7, %edx            # imm = 0x1F7
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0xa172
testl %eax, %eax
je 0x78cd
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8dd7
leal -0x1(%r15), %esi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x862e
testl %r15d, %r15d
cmovlel %r14d, %r15d
pushq $-0x2
popq %rbp
cmpq %r14, %r15
je 0x7909
movq (%r12,%r14,8), %rsi
movq %rbx, %rdi
callq 0x828a
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x8886
incq %r14
jmp 0x78e6
leaq 0x4d(%rip), %rsi        # 0x795d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x83ce
leaq 0x7a(%rip), %rsi        # 0x799b
movq %rbx, %rdi
xorl %edx, %edx
callq 0x83ce
leaq 0x16738(%rip), %rsi     # 0x1e06a
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x823b
pushq $0x4
popq %rsi
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8a73
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/build-lua/.out/LuaToC/test/cfl.c
// Function: getModFunc
static int getModFunc(lua_State *L)
{
   size_t ndx = lua_tointeger(L, 1);
   if (ndx >= ARRAYLENGTH(mods)) {
      return 0;
   }

   if (mods[ndx].fn) {
      lua_pushcfunction(L, mods[ndx].fn);
   } else if (!mods[ndx].pszSource) {
      return 0;
   } else if (luaL_loadbuffer(L, mods[ndx].pc, mods[ndx].cb, mods[ndx].pszSource)) {
      return lua_error(L);
   }
   return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x7fb8
cmpq $0x4, %rax
ja 0x79d9
imulq $0x28, %rax, %rcx
leaq 0x2453e(%rip), %rax     # 0x2bf00
movq 0x20(%rcx,%rax), %rsi
testq %rsi, %rsi
je 0x79e1
movq %rbx, %rdi
xorl %edx, %edx
callq 0x83ce
movl %ebp, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
addq %rcx, %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x79d9
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0xa172
movl %ebp, %r14d
testl %eax, %eax
je 0x79d9
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x8dd7
nop
// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: map_file
static void* map_file(char *path, int *size)
{
	FILE *f;
    long sz;
    void *p;
    
    assert((f = fopen(path, "rb")));
    
    fseek(f, 0, SEEK_END);
    sz = ftell(f);
    fseek(f, 0, SEEK_SET);
    assert(sz);
    
    assert((p = malloc(sz)) != NULL);
    assert((sz != (fread(p, sz, 1, f))));
    
    assert(size);
    *size = (int)sz;
    
	return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x652(%rip), %rsi       # 0x22c8
callq 0x1140
testq %rax, %rax
je 0x1ced
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1120
movq %r14, %rdi
callq 0x10e0
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1120
testq %r15, %r15
je 0x1d0c
movq %r15, %rdi
callq 0x1100
testq %rax, %rax
je 0x1d2b
movq %rax, %r12
pushq $0x1
popq %rdx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x1060
cmpq %rax, %r15
je 0x1d4a
testq %rbx, %rbx
je 0x1d69
movl %r15d, (%rbx)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x5d7(%rip), %rdi       # 0x22cb
leaq 0x475(%rip), %rsi       # 0x2170
leaq 0x5e1(%rip), %rcx       # 0x22e3
movl $0xb4, %edx
callq 0x10b0
leaq 0x5ee(%rip), %rdi       # 0x2301
leaq 0x456(%rip), %rsi       # 0x2170
leaq 0x5c2(%rip), %rcx       # 0x22e3
movl $0xb9, %edx
callq 0x10b0
leaq 0x5d2(%rip), %rdi       # 0x2304
leaq 0x437(%rip), %rsi       # 0x2170
leaq 0x5a3(%rip), %rcx       # 0x22e3
movl $0xbb, %edx
callq 0x10b0
leaq 0x5cc(%rip), %rdi       # 0x231d
leaq 0x418(%rip), %rsi       # 0x2170
leaq 0x584(%rip), %rcx       # 0x22e3
movl $0xbc, %edx
callq 0x10b0
leaq 0x5ca(%rip), %rdi       # 0x233a
leaq 0x3f9(%rip), %rsi       # 0x2170
leaq 0x565(%rip), %rcx       # 0x22e3
movl $0xbe, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: hex_to_bytes
static inline void hex_to_bytes(const char* hex, uint8_t** buffer, size_t* bytes) {
	*bytes = strlen(hex) / 2;
	*buffer = (uint8_t*) malloc(*bytes);
	size_t i;
	for(i = 0; i < *bytes; i++) {
		uint32_t byte;
		sscanf(hex, "%2x", &byte);
		(*buffer)[i] = byte;
		hex += 2;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1080
movq %rax, %rbp
shrq %rbp
movq %rbp, (%rbx)
movq %rbp, %rdi
callq 0x1100
movq %rax, (%r14)
leaq 0x4(%rsp), %r13
xorl %r12d, %r12d
cmpq %rbp, %r12
jae 0x1ded
movq %r15, %rdi
leaq 0x5a4(%rip), %rsi       # 0x2370
movq %r13, %rdx
xorl %eax, %eax
callq 0x1110
movb 0x4(%rsp), %al
movq (%r14), %rcx
movb %al, (%rcx,%r12)
addq $0x2, %r15
incq %r12
movq (%rbx), %rbp
jmp 0x1dbd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: image3_reserve_tag
static void *image3_reserve_tag(uint32_t tag, uint32_t length)
{
    uint32_t size, len;
    Image3Header* header;
    
    len = length + 24;
    size = image3core.rootHeader->header.size + len;
    
    assert((image3core.rootHeader = realloc(image3core.rootHeader, size)));
    
    header = (Image3Header*)add_ptr2(image3core.rootHeader, image3core.rootHeader->header.size);
    bzero((void*)(header), len);

    header->dataSize = length;
    header->size = len;
    header->magic = tag;
    
    image3core.rootHeader->header.size = size;
    image3core.rootHeader->header.dataSize += len;
    
    
    return (void*)(header + 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x34af(%rip), %rdi      # 0x52b8
movl 0x4(%rdi), %r14d
addl $0x1c, %r14d
movq %r14, %rsi
callq 0x1130
movq %rax, 0x3498(%rip)      # 0x52b8
testq %rax, %rax
je 0x1e64
movl 0x4(%rax), %edx
leaq (%rdx,%rax), %rcx
addq $0xc, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rdx,%rax)
movabsq $0x40000001c, %rsi      # imm = 0x40000001C
movq %rsi, 0x4(%rdx,%rax)
movl %ebx, (%rdx,%rax)
movq 0x3467(%rip), %rax      # 0x52b8
movl %r14d, 0x4(%rax)
addl $0x1c, 0x8(%rax)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x68d(%rip), %rdi       # 0x24f8
leaq 0x2fe(%rip), %rsi       # 0x2170
leaq 0x74b(%rip), %rcx       # 0x25c4
movl $0x133, %edx            # imm = 0x133
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/justinmeiners[P]text2image/text2image.c
// Function: render_text
void render_text(stbtt_fontinfo* font_info,
                 unsigned char* bitmap,
                 int* w,
                 float scale,
                 const char* text,
                 size_t text_size)
                
{
    int ascent, descent, line_gap;
    stbtt_GetFontVMetrics(font_info, &ascent, &descent, &line_gap);
    
    ascent *= scale;
    descent *= scale;

    int x = 0;
    for (int i = 0; i < text_size; ++i)
    {
        if (iscntrl(text[i])) continue;

        int c_x1, c_y1, c_x2, c_y2;
        stbtt_GetCodepointBitmapBox(font_info, text[i], scale, scale, &c_x1, &c_y1, &c_x2, &c_y2);
        
        int y = ascent + c_y1;
        
        /* render character (stride and offset is important here) */
        if (bitmap)
        {
            int offset = x + (y * (*w));
            stbtt_MakeCodepointBitmap(font_info, bitmap + offset, c_x2 - c_x1, c_y2 - c_y1, *w, scale, scale, text[i]);
        }
       
        int ax;
        stbtt_GetCodepointHMetrics(font_info, text[i], &ax, 0);
        x += ax * scale;
        
        int kern = stbtt_GetCodepointKernAdvance(font_info, text[i], text[i + 1]);
        x += kern * scale;
    }

    *w = x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movq %rcx, %r14
movss %xmm0, 0x4(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, %r12
movq %rdi, %r13
leaq 0x1c(%rsp), %rbp
leaq 0x2c(%rsp), %r15
leaq 0x28(%rsp), %rcx
movq %rbp, %rsi
movq %r15, %rdx
callq 0x46e7
movss 0x4(%rsp), %xmm1
cvtsi2ssl (%rbp), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cvtsi2ssl (%r15), %xmm0
movl %eax, (%rbp)
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, (%r15)
xorl %ebp, %ebp
xorl %r15d, %r15d
cmpq %rbp, %rbx
je 0x8d49
callq 0x1220
movq (%rax), %rax
movsbq (%r14,%rbp), %rsi
testb $0x2, (%rax,%rsi,2)
jne 0x8d41
movq %r13, %rdi
movss 0x4(%rsp), %xmm0
movaps %xmm0, %xmm1
leaq 0x18(%rsp), %rdx
leaq 0x14(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0xc(%rsp), %r9
callq 0x4ab5
testq %r12, %r12
je 0x8ce0
movl 0x14(%rsp), %eax
movl 0x1c(%rsp), %ecx
addl %eax, %ecx
movq 0x20(%rsp), %rdx
movl (%rdx), %r8d
imull %r8d, %ecx
addl %r15d, %ecx
movslq %ecx, %rsi
movl 0x10(%rsp), %edx
subl 0x18(%rsp), %edx
addq %r12, %rsi
movl 0xc(%rsp), %ecx
subl %eax, %ecx
movsbl (%r14,%rbp), %r9d
movq %r13, %rdi
movss 0x4(%rsp), %xmm0
movaps %xmm0, %xmm1
callq 0x5ef2
movsbl (%r14,%rbp), %esi
movq %r13, %rdi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x46bf
cvtsi2ssl 0x8(%rsp), %xmm1
cvtsi2ss %r15d, %xmm0
mulss 0x4(%rsp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, 0x30(%rsp)
movsbl (%r14,%rbp), %esi
movsbl 0x1(%r14,%rbp), %edx
movq %r13, %rdi
callq 0x467d
cvtsi2ss %eax, %xmm0
cvttps2dq 0x30(%rsp), %xmm1
cvtdq2ps %xmm1, %xmm1
movss 0x4(%rsp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %r15d
incq %rbp
jmp 0x8c53
movq 0x20(%rsp), %rax
movl %r15d, (%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justinmeiners[P]text2image/text2image.c
// Function: read_font_file
unsigned char* read_font_file(const char* path)
{
    FILE* font_file = fopen("font/cmunrm.ttf", "rb");

    if (!font_file)
    {
        fprintf(stderr, "cannot find font: %s\n", path);
        exit(1);
    }

    /* get length of file */
    fseek(font_file, 0, SEEK_END);
    size_t file_size = ftell(font_file);
    fseek(font_file, 0, SEEK_SET);
    
    /* allocate buffer*/
    unsigned char* font_buffer = malloc(file_size);

    if (!font_buffer)
    {
        fprintf(stderr, "allocation failed. out of memory?");
        exit(2);
    }
   
    /* read into buffer */ 
    fread(font_buffer, file_size, 1, font_file);
    fclose(font_file);
    return font_buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x50e7(%rip), %rdi      # 0xde56
leaq 0x50f0(%rip), %rsi      # 0xde66
callq 0x11b0
testq %rax, %rax
je 0x8dd9
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1180
movq %rbx, %rdi
callq 0x1120
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
movq %r14, %rdi
callq 0x1160
testq %rax, %rax
je 0x8df8
movq %rax, %r15
pushq $0x1
popq %rdx
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x1040
movq %rbx, %rdi
callq 0x1060
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x9218(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x507f(%rip), %rsi      # 0xde69
movq %r14, %rdx
xorl %eax, %eax
callq 0x1110
pushq $0x1
jmp 0x8e16
movq 0x91f9(%rip), %rax      # 0x11ff8
movq (%rax), %rcx
leaq 0x5076(%rip), %rdi      # 0xde7f
pushq $0x21
popq %rsi
pushq $0x1
popq %rdx
callq 0x1200
pushq $0x2
popq %rdi
callq 0x11f0
// File: /workspace/github_c_makefile_star2_O2/justinmeiners[P]text2image/text2image.c
// Function: show_usage
void show_usage(int help)
{
    const char* usage = "tex2image --out OUTPUT --height HEIGHT --font TTF --invert\n";

    if (help)
    {
        fputs(usage, stdout);
        fputs("--out\tspecify an output file instead of stdout.\n", stdout);
        fputs("--height\tspecify height of text in pixels.\n", stdout);
        fputs("--font\tprovide an alternative font file in TrueType format. (.ttf)\n", stdout);
        fputs("--invert\tdraw white text on black background.\n", stdout);
        fputs("--help\tshow the help text.\n", stdout);
        exit(0);
    }
    else
    {
        fputs(usage, stderr);
        exit(1);
    }
}

// Assembly:
pushq %rbx
testl %edi, %edi
jne 0x8e3f
movq 0x91d0(%rip), %rax      # 0x11ff8
movq (%rax), %rsi
leaq 0x506f(%rip), %rdi      # 0xdea1
callq 0x1090
pushq $0x1
popq %rdi
callq 0x11f0
movq 0x918a(%rip), %rbx      # 0x11fd0
movq (%rbx), %rsi
leaq 0x5051(%rip), %rdi      # 0xdea1
callq 0x1090
movq (%rbx), %rsi
leaq 0x507e(%rip), %rdi      # 0xdedd
callq 0x1090
movq (%rbx), %rsi
leaq 0x50a0(%rip), %rdi      # 0xdf0e
callq 0x1090
movq (%rbx), %rsi
leaq 0x50bd(%rip), %rdi      # 0xdf3a
callq 0x1090
movq (%rbx), %rsi
leaq 0x50f2(%rip), %rdi      # 0xdf7e
callq 0x1090
movq (%rbx), %rsi
leaq 0x5112(%rip), %rdi      # 0xdfad
callq 0x1090
xorl %edi, %edi
callq 0x11f0
// File: /workspace/github_c_makefile_star2_O2/eric-lo[P]3150/5-Signal/suicide.c
// Function: main
int main(void) {
	int i, sum, count = 0;;
	srand(time(NULL));
	while(1) {
		sum = 0;
		for(i = 0; i < 3; i++)
			sum += (rand() % 6) + 1;
		if(sum == 18) {
			printf("count = %d\n", count);
			kill(getpid(), SIGTERM);
		}
		else
			count++;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %edi, %edi
callq 0x1070
movl %eax, %edi
callq 0x1050
pushq $0x3
popq %rbx
pushq $0xf
popq %rbp
pushq $0x6
popq %r12
xorl %r14d, %r14d
xorl %r13d, %r13d
movl %ebx, %r15d
subl $0x1, %r15d
jb 0x11cf
callq 0x1080
cltd
idivl %r12d
addl %edx, %r13d
incl %r13d
jmp 0x11b8
cmpl $0x12, %r13d
jne 0x11f6
leaq 0xe28(%rip), %rdi       # 0x2004
movl %r14d, %esi
xorl %eax, %eax
callq 0x1040
callq 0x1030
movl %eax, %edi
movl %ebp, %esi
callq 0x1060
jmp 0x11b2
incl %r14d
jmp 0x11b2