LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x5ae9(%rip), %r14      # 0x9270
cmpl $0x2, 0x10(%r14)
jge 0x385b
movl (%rbx), %edi
callq 0x21a0
leaq 0x5be4(%rip), %r15      # 0x9384
movslq (%r15), %rax
leaq 0x5bd6(%rip), %r12      # 0x9380
movslq (%r12), %rsi
leaq 0x5bc3(%rip), %r13      # 0x9378
movq (%r13), %rdi
cmpl %esi, %eax
jge 0x37c9
leal 0x1(%rax), %ecx
movl %ecx, (%r15)
movq %rbx, (%rdi,%rax,8)
jmp 0x3834
shlq $0x4, %rsi
callq 0x2310
testq %rax, %rax
je 0x37ee
shll (%r12)
movq %rax, (%r13)
movslq (%r15), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%r15)
movq %rbx, (%rax,%rcx,8)
jmp 0x3834
cmpl $0x0, 0x10(%r14)
jg 0x3868
movq 0x90(%rbx), %rdi
callq 0x2030
movq 0xa8(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2030
leaq 0x5b6c(%rip), %r14      # 0x9388
leaq 0x28(%r14), %rbx
movq %rbx, %rdi
callq 0x2470
decl 0x4(%r14)
movq %rbx, %rdi
callq 0x22b0
leaq 0x5b4d(%rip), %r14      # 0x9388
leaq 0x28(%r14), %rbx
movq %rbx, %rdi
callq 0x2470
decl (%r14)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x22b0
movq %rbx, %rdi
callq 0x24b0
jmp 0x3792
callq 0x24cd
jmp 0x37f5
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x3976
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq %r14, %rdi
callq 0x2470
movq (%rbx), %r15
testq %r15, %r15
jne 0x3945
leaq 0x40(%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2110
movq (%rbx), %r15
testq %r15, %r15
je 0x3932
movq 0xe0(%r15), %rax
movq %rax, (%rbx)
testq %rax, %rax
jne 0x395c
movq $0x0, 0x8(%rbx)
decl 0x10(%rbx)
movq %r14, %rdi
callq 0x22b0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x20e6(%rip), %rdi      # 0x5a63
leaq 0x20ea(%rip), %rsi      # 0x5a6e
leaq 0x20f6(%rip), %rcx      # 0x5a81
movl $0x1f, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/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 0x2470
movq (%r15), %r14
testq %r14, %r14
je 0x39cc
movq 0xe0(%r14), %rax
movq %rax, (%r15)
testq %rax, %rax
jne 0x39c8
movq $0x0, 0x8(%r15)
decl 0x10(%r15)
movq %rbx, %rdi
callq 0x22b0
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3a91
movl %esi, %ebp
movq %rdi, %rbx
movswl 0x88(%rdi), %ecx
movl $0x1, %eax
cmpl %esi, %ecx
je 0x3a86
leaq 0x8(%rbx), %r14
movq 0x48(%rbx), %r15
testw %cx, %cx
je 0x3a43
movq %r14, %rdi
callq 0x2150
cmpl $-0x1, %eax
je 0x3a84
movl (%rbx), %esi
movswl %bp, %ebp
leaq 0x61(%rip), %rcx        # 0x3ab0
movq %r14, %rdi
movl %ebp, %edx
movq %rbx, %r8
callq 0x2360
movq %r15, %rdi
movq %r14, %rsi
callq 0x2060
movw %bp, 0x88(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x2230
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
setne %al
jmp 0x3a86
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x201c(%rip), %rdi      # 0x5ab4
leaq 0x201f(%rip), %rsi      # 0x5abe
leaq 0x2022(%rip), %rcx      # 0x5ac8
movl $0x11, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/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 0x3aea
movq %rdx, %rbx
movw %si, 0x8a(%rdx)
cmpl %edi, (%rdx)
jne 0x3acd
movq %rbx, %rdi
popq %rbx
jmp 0x3d5e
leaq 0x579c(%rip), %rax      # 0x9270
cmpl $0x0, 0x10(%rax)
jg 0x3ae3
movq %rbx, %rdi
popq %rbx
jmp 0x376b
callq 0x24e9
jmp 0x3ada
leaq 0x1fc3(%rip), %rdi      # 0x5ab4
leaq 0x1fc6(%rip), %rsi      # 0x5abe
leaq 0x20e3(%rip), %rcx      # 0x5be2
movl $0xe9, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/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 0x1fd2(%rip), %rsi      # 0x5aec
movq %r14, %rdi
callq 0x2220
testl %eax, %eax
je 0x3b92
leaq 0x1fc4(%rip), %rsi      # 0x5af1
movq %r14, %rdi
callq 0x2220
testl %eax, %eax
je 0x3bc0
leaq 0x1dd3(%rip), %rsi      # 0x5917
movq %r14, %rdi
callq 0x2220
testl %eax, %eax
je 0x3b9b
leaq 0x8(%rbx), %rdi
callq 0x2150
cmpl $-0x1, %eax
je 0x3ba4
leaq 0xd0(%rbx), %rdi
xorl %esi, %esi
callq 0x2170
movw $0x0, 0x88(%rbx)
movq %r14, 0xc8(%rbx)
leaq 0x570d(%rip), %rdi      # 0x9290
movq %rbx, %rsi
callq 0x38aa
movl $0x1, %eax
jmp 0x3bb8
movl $0x3, 0x4(%rbx)
jmp 0x3bb3
leaq 0x1f54(%rip), %rsi      # 0x5af6
jmp 0x3bab
leaq 0x1f59(%rip), %rsi      # 0x5b04
movq %rbx, %rdi
callq 0x4214
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
callq 0x2400
// File: /workspace/github_c_makefile_star2_O3/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 0x3c3a
movq %rdi, %rbx
movq 0x98(%rdi), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
testq %rax, %rax
je 0x3c3a
leaq 0x1(%rax), %r15
movq %rax, %rcx
subq %r14, %rcx
cmpq $0x2, %rcx
jl 0x3c10
leaq -0x1(%rax), %rcx
cmpb $0xd, -0x1(%rax)
cmoveq %rcx, %rax
movb $0x0, (%rax)
movq 0x98(%rbx), %rsi
movq %rbx, %rdi
callq 0x3b09
movl 0x98(%rbx), %ecx
subl %r15d, %ecx
addl %ecx, 0xa4(%rbx)
movq %r15, 0x98(%rbx)
jmp 0x3c3c
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
movq %rdi, %rbx
movq 0x90(%rdi), %rax
movq 0x98(%rdi), %rsi
cmpq %rax, %rsi
je 0x3c7e
movslq 0xa4(%rbx), %rdx
testq %rdx, %rdx
je 0x3c77
movq %rax, %rdi
callq 0x2340
movq 0x90(%rbx), %rax
movq %rax, 0x98(%rbx)
xorl %ebp, %ebp
movl 0xa0(%rbx), %r14d
movl 0xa4(%rbx), %ecx
cmpl %r14d, %ecx
jl 0x3cca
movslq %r14d, %rsi
addq %rsi, %rsi
movq %rax, %rdi
callq 0x2310
testq %rax, %rax
je 0x3d08
movq %rax, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movl 0xa0(%rbx), %r14d
movl 0xa4(%rbx), %ecx
addl %r14d, %r14d
movl %r14d, 0xa0(%rbx)
subl %ecx, %r14d
movl (%rbx), %edi
movslq %ecx, %rsi
addq %rax, %rsi
movslq %r14d, %rdx
callq 0x21d0
testl %eax, %eax
jle 0x3cf3
addl %eax, 0xa4(%rbx)
movl $0x1, %ebp
cmpl %eax, %r14d
je 0x3cfc
jmp 0x3d50
cmpl $-0x1, %eax
je 0x3d3a
testl %eax, %eax
je 0x3d44
movq 0x90(%rbx), %rax
jmp 0x3c80
leaq 0x5561(%rip), %rax      # 0x9270
cmpl $0x0, 0x10(%rax)
jg 0x3d57
movl $0x0, 0xa4(%rbx)
leaq 0x1e18(%rip), %rsi      # 0x5b3e
movq %rbx, %rdi
callq 0x4214
movl $0x3, 0xc0(%rbx)
jmp 0x3d4b
callq 0x2040
cmpl $0xb, (%rax)
je 0x3d50
movl $0x3, 0x4(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2505
jmp 0x3d15
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rax
leaq 0x53f4(%rip), %rax      # 0x9370
cmpl %edi, (%rax)
jne 0x3fdc
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
callq 0x21d0
cmpq $0x1, %rax
je 0x3fa2
leaq 0x52d4(%rip), %rax      # 0x9270
cmpl $0x0, 0x10(%rax)
jg 0x3feb
leaq 0x5357(%rip), %rdi      # 0x9300
callq 0x3995
testq %rax, %rax
je 0x3fe9
movq 0xa8(%rax), %rcx
movq %rcx, 0xb0(%rax)
movl $0x2, 0x4(%rax)
movl $0x1, 0xc0(%rax)
movq %rax, %rdi
callq 0x3d5e
jmp 0x3fe9
leaq 0x528d(%rip), %rax      # 0x9270
cmpl $0x0, 0x10(%rax)
jg 0x3ff2
popq %rax
retq
callq 0x25c5
jmp 0x3fa2
callq 0x25a9
jmp 0x3fe9
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x28, %rsp
movl %edi, %r14d
movq $0x0, 0x10(%rsp)
movl $0x1, 0xc(%rsp)
callq 0x3ff9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x415a
movl %eax, %ebp
leaq 0xc(%rsp), %r15
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movq %r15, %rcx
movl $0x4, %r8d
callq 0x20d0
movl %ebp, %edi
movl $0x1, %esi
movl $0x9, %edx
movq %r15, %rcx
movl $0x4, %r8d
callq 0x20d0
leaq 0x10(%rsp), %rcx
movl %ebp, %edi
movl $0x1, %esi
movl $0xd, %edx
movl $0x8, %r8d
callq 0x20d0
movl %ebp, %edi
movl $0x6, %esi
movl $0x1, %edx
movq %r15, %rcx
movl $0x4, %r8d
callq 0x20d0
leaq 0x18(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movw $0x2, (%rsi)
rolw $0x8, %r14w
movw %r14w, 0x2(%rsi)
leaq 0x5140(%rip), %rax      # 0x9270
movl 0x8(%rax), %eax
movl %eax, 0x4(%rsi)
movl %ebp, %edi
movl $0x10, %edx
callq 0x2320
cmpl $-0x1, %eax
je 0x4167
movl %ebp, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x22f0
cmpl $-0x1, %eax
je 0x4170
movl %ebp, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1afb(%rip), %rdi      # 0x5c69
jmp 0x4177
leaq 0x1af9(%rip), %rdi      # 0x5c70
callq 0x2390
movl %ebp, %edi
callq 0x21a0
jmp 0x415a
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x41b0
movb (%rdi), %cl
testb %cl, %cl
je 0x41b0
incq %rdi
xorl %eax, %eax
imulq $0x4e44cb31, %rax, %rdx # imm = 0x4E44CB31
movsbq %cl, %rax
addq %rdx, %rax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x4198
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1aa3(%rip), %rsi      # 0x5c79
cmovleq %rbx, %rsi
movq 0xa8(%r14), %rdi
movl $0x23, %ebp
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_O3/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 0x41b3
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_O3/desion[P]terminal/src/util.c
// Function: bigger_prime
static int isprime(int m) {
    if (m < 1)
        return 0;
    int i;
    for (i = 2; i < m; i++) {
        if (m % i == 0) {
            return 0;
        }
    }
    return 1;
}

// Assembly:
testl %edi, %edi
jle 0x425e
cmpl $0x3, %edi
jb 0x4262
movl $0x2, %ecx
movl %edi, %eax
xorl %edx, %edx
divl %ecx
testl %edx, %edx
je 0x425e
incl %ecx
cmpl %ecx, %edi
jne 0x424c
jmp 0x4262
incl %edi
jmp 0x423e
movl %edi, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r12d, %r12d
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x838e
movq %rax, %r14
movb $0x1, %bpl
leaq 0x245e7(%rip), %r15     # 0x2bed0
leaq (%r12,%r12,2), %r12
movq (%r15,%r12,8), %rsi
movq %r14, %rdi
callq 0x72d0
testl %eax, %eax
je 0x7912
xorl %eax, %eax
movl $0x1, %r12d
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x78e9
jmp 0x792b
leaq (%r15,%r12,8), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbx, %rdi
callq 0x856f
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
callq 0xab9b
testq %rax, %rax
je 0x79db
movq %rax, %rbx
leaq 0xb5(%rip), %rsi        # 0x7a0a
movq %rax, %rdi
xorl %edx, %edx
callq 0x8705
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x8539
movq %rbx, %rdi
movq %r14, %rsi
callq 0x87a3
movl $0x1, %r14d
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8e1a
testl %eax, %eax
jne 0x79cc
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8083
testl %eax, %eax
je 0x79bc
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x82cf
movq %rax, %r14
movq %rbx, %rdi
callq 0x1502c
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x2, %eax
jne 0x79e8
movq %rbx, %rdi
callq 0x75f0
jmp 0x7a02
callq 0x761a
movl $0x1, %r14d
jmp 0x79c4
movq 0x25601(%rip), %rcx     # 0x2cff0
movq (%rcx), %rdi
leaq 0x18640(%rip), %rsi     # 0x20039
movl %eax, %edx
xorl %eax, %eax
callq 0x7300
movl $0x1, %r14d
jmp 0x79bc
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x82cf
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8461
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8fef
movq %rbx, %rdi
callq 0xe9ac
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x8fef
leaq 0x186b2(%rip), %rsi     # 0x20110
leaq 0x18609(%rip), %rcx     # 0x2006e
movl $0x1f7, %edx            # imm = 0x1F7
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0xa5a0
testl %eax, %eax
je 0x7a8c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x9127
leal -0x1(%r14), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x8968
testl %r14d, %r14d
jle 0x7ad0
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
callq 0x85be
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r12d, %edx
callq 0x8bc7
incq %r12
cmpq %r12, %r14
jne 0x7aac
leaq 0x57(%rip), %rsi        # 0x7b2e
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8705
leaq 0x8a(%rip), %rsi        # 0x7b72
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8705
leaq 0x18571(%rip), %rsi     # 0x2006a
movl $0x3, %edx
movq %rbx, %rdi
callq 0x856f
movq %rbx, %rdi
movl $0x4, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8db9
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x1, %esi
xorl %edx, %edx
callq 0x82cf
cmpq $0x4, %rax
ja 0x7bb3
leaq (%rax,%rax,4), %rax
leaq 0x24367(%rip), %rcx     # 0x2bf00
movq 0x20(%rcx,%rax,8), %rsi
testq %rsi, %rsi
je 0x7bbe
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8705
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq (%rcx,%rax,8), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x7bb3
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0xa5a0
testl %eax, %eax
je 0x7bad
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9127
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x58a(%rip), %rsi       # 0x22c8
callq 0x1140
testq %rax, %rax
je 0x1db9
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
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 0x1dd8
movq %r15, %rdi
callq 0x1100
testq %rax, %rax
je 0x1df7
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x1060
cmpq %rax, %r15
je 0x1e16
testq %rbx, %rbx
je 0x1e35
movl %r15d, (%rbx)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x50b(%rip), %rdi       # 0x22cb
leaq 0x3a9(%rip), %rsi       # 0x2170
leaq 0x515(%rip), %rcx       # 0x22e3
movl $0xb4, %edx
callq 0x10b0
leaq 0x522(%rip), %rdi       # 0x2301
leaq 0x38a(%rip), %rsi       # 0x2170
leaq 0x4f6(%rip), %rcx       # 0x22e3
movl $0xb9, %edx
callq 0x10b0
leaq 0x506(%rip), %rdi       # 0x2304
leaq 0x36b(%rip), %rsi       # 0x2170
leaq 0x4d7(%rip), %rcx       # 0x22e3
movl $0xbb, %edx
callq 0x10b0
leaq 0x500(%rip), %rdi       # 0x231d
leaq 0x34c(%rip), %rsi       # 0x2170
leaq 0x4b8(%rip), %rcx       # 0x22e3
movl $0xbc, %edx
callq 0x10b0
leaq 0x4fe(%rip), %rdi       # 0x233a
leaq 0x32d(%rip), %rsi       # 0x2170
leaq 0x499(%rip), %rcx       # 0x22e3
movl $0xbe, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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 0x3457(%rip), %rdi      # 0x52b8
movl 0x4(%rdi), %r14d
addl $0x1c, %r14d
movq %r14, %rsi
callq 0x1130
movq %rax, 0x3440(%rip)      # 0x52b8
testq %rax, %rax
je 0x1ebc
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 0x340f(%rip), %rax      # 0x52b8
movl %r14d, 0x4(%rax)
addl $0x1c, 0x8(%rax)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x635(%rip), %rdi       # 0x24f8
leaq 0x2a6(%rip), %rsi       # 0x2170
leaq 0x6f3(%rip), %rcx       # 0x25c4
movl $0x133, %edx            # imm = 0x133
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/justinmeiners[P]text2image/./stb_truetype.h
// Function: stbtt_PackFontRangesPackRects
static void stbrp_pack_rects(stbrp_context *con, stbrp_rect *rects, int num_rects)
{
   int i;
   for (i=0; i < num_rects; ++i) {
      if (con->x + rects[i].w > con->width) {
         con->x = 0;
         con->y = con->bottom_y;
      }
      if (con->y + rects[i].h > con->height)
         break;
      rects[i].x = con->x;
      rects[i].y = con->y;
      rects[i].was_packed = 1;
      con->x += rects[i].w;
      if (con->y + rects[i].h > con->bottom_y)
         con->bottom_y = con->y + rects[i].h;
   }
   for (   ; i < num_rects; ++i)
      rects[i].was_packed = 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testl %edx, %edx
jle 0x70a0
movq 0x8(%rdi), %rcx
movl (%rcx), %edi
movl 0x4(%rcx), %r8d
movl 0x8(%rcx), %ebx
movl 0xc(%rcx), %r10d
movl %edx, %r9d
leaq 0x14(%rsi), %r11
xorl %eax, %eax
movl %ebx, %r14d
movl -0x8(%r11), %ebx
leal (%rbx,%r14), %ebp
cmpl %edi, %ebp
jle 0x7066
movl $0x0, 0x8(%rcx)
movl 0x10(%rcx), %r10d
movl %r10d, 0xc(%rcx)
xorl %r14d, %r14d
movl -0x4(%r11), %ebp
addl %r10d, %ebp
cmpl %r8d, %ebp
jg 0x70a2
movl %r14d, -0x14(%r11)
movl %r10d, -0x10(%r11)
movl $0x1, (%r11)
addl %r14d, %ebx
movl %ebx, 0x8(%rcx)
cmpl 0x10(%rcx), %ebp
jle 0x708f
movl %ebp, 0x10(%rcx)
incq %rax
addq $0x18, %r11
cmpq %rax, %r9
jne 0x7045
jmp 0x71b2
xorl %eax, %eax
cmpl %edx, %eax
jge 0x71b2
movl %eax, %ecx
movl %edx, %edx
subq %rcx, %rdx
leaq 0x3(%rdx), %rax
andq $-0x4, %rax
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,8), %rcx
addq $0x5c, %rcx
xorl %edx, %edx
movdqa 0x7a44(%rip), %xmm1     # 0xeb20
movdqa 0x7a4c(%rip), %xmm2     # 0xeb30
movdqa 0x79e4(%rip), %xmm3     # 0xead0
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x713e
movl $0x0, -0x48(%rcx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x7154
movl $0x0, -0x30(%rcx)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %esi
testb $0x1, %sil
je 0x7190
movl $0x0, -0x18(%rcx)
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x71a1
movl $0x0, (%rcx)
addq $0x4, %rdx
addq $0x60, %rcx
cmpq %rdx, %rax
jne 0x70f4
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x56fa(%rip), %rdi      # 0xee9e
leaq 0x5703(%rip), %rsi      # 0xeeae
callq 0x11b0
testq %rax, %rax
je 0x9812
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
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 0x981a
movq %rax, %r15
movl $0x1, %edx
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 %r14, %rdi
callq 0x1265
callq 0x1240
// File: /workspace/github_c_makefile_star2_O3/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 0x9844
movq 0x97cd(%rip), %rax      # 0x12ff8
movq (%rax), %rsi
leaq 0x56b4(%rip), %rdi      # 0xeee9
callq 0x1090
movl $0x1, %edi
callq 0x11f0
movq 0x9785(%rip), %rbx      # 0x12fd0
movq (%rbx), %rsi
leaq 0x5694(%rip), %rdi      # 0xeee9
callq 0x1090
movq (%rbx), %rsi
leaq 0x56c1(%rip), %rdi      # 0xef25
callq 0x1090
movq (%rbx), %rsi
leaq 0x56e3(%rip), %rdi      # 0xef56
callq 0x1090
movq (%rbx), %rsi
leaq 0x5700(%rip), %rdi      # 0xef82
callq 0x1090
movq (%rbx), %rsi
leaq 0x5735(%rip), %rdi      # 0xefc6
callq 0x1090
movq (%rbx), %rsi
leaq 0x5755(%rip), %rdi      # 0xeff5
callq 0x1090
xorl %edi, %edi
callq 0x11f0
// File: /workspace/github_c_makefile_star2_O3/zpole[P]IICV/src/generic-driver.h
// Function: vl_file_meta_parse
static int
vl_file_meta_parse (VlFileMeta * self, char const * optarg)
{
  vl_size q ;
  self->active = 1 ;

  if (optarg) {
    int protocol ;
    char const * arg = vl_string_parse_protocol (optarg, &protocol) ;

    /* parse the (optional) protocol part */
    switch (protocol) {
    case VL_PROT_UNKNOWN :
      return VL_ERR_BAD_ARG  ;

    case VL_PROT_ASCII  :
    case VL_PROT_BINARY :
      self->protocol = protocol ;
      break ;

    case VL_PROT_NONE :
      break ;
    }

    if (vl_string_length (arg) > 0) {
      q = vl_string_copy
        (self->pattern, sizeof (self->pattern), arg) ;

      if (q >= sizeof(self->pattern)) {
        return VL_ERR_OVERFLOW ;
      }
    }

  }
  return VL_ERR_OK ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, (%rdi)
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x245a
movq %rdi, %r14
leaq 0x4(%rsp), %r12
movq %rsi, %rdi
movq %r12, %rsi
callq 0x11a0
movq %rax, %r15
movl (%r12), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x2420
movl %eax, 0x404(%r14)
jmp 0x242a
movl $0x3, %ecx
cmpl $-0x1, %eax
je 0x2458
movq %r15, %rdi
callq 0x10f0
testq %rax, %rax
je 0x245a
addq $0x4, %r14
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
movq %r15, %rdx
callq 0x1200
movl $0x1, %ecx
cmpq $0x400, %rax            # imm = 0x400
jb 0x245a
movl %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/zpole[P]IICV/src/generic-driver.h
// Function: vl_file_meta_open
static int
vl_file_meta_open (VlFileMeta * self, char const * basename, char const * mode)
{
  vl_size q ;

  if (! self->active) {
    return VL_ERR_OK ;
  }

  q = vl_string_replace_wildcard (self->name,
                                  sizeof(self->name),
                                  self -> pattern,
                                  '%', '\0',
                                  basename) ;

  if (q >= sizeof(self->name)) {
    return vl_set_last_error (VL_ERR_OVERFLOW, NULL) ;
  }

  if (self->active) {
    self->file = fopen (self->name, mode) ;
    if (! self->file) {
      return vl_set_last_error(VL_ERR_IO, NULL) ;
    }
  }
  return 0 ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, (%rdi)
je 0x24d4
movq %rsi, %r9
movq %rdi, %rbx
leaq 0x408(%rdi), %r14
leaq 0x4(%rdi), %rdx
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
movl $0x25, %ecx
xorl %r8d, %r8d
callq 0x1190
movl $0x1, %edi
cmpq $0x3ff, %rax            # imm = 0x3FF
jbe 0x24b4
xorl %esi, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1050
cmpl $0x0, (%rbx)
je 0x24d4
leaq 0x29f0(%rip), %rsi      # 0x4eb0
movq %r14, %rdi
callq 0x11c0
movq %rax, 0x808(%rbx)
testq %rax, %rax
je 0x24de
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x4, %edi
jmp 0x24a4
// File: /workspace/github_c_makefile_star2_O3/liuhaotian[P]xmppsh/xmppsh.c
// Function: version_handler
int version_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata)
{
	xmpp_stanza_t *reply, *query, *name, *version, *text;
	char *ns;
	xmpp_ctx_t *ctx = (xmpp_ctx_t*)userdata;
	printf("Received version request from %s\n", xmpp_stanza_get_attribute(stanza, "from"));
	
	reply = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(reply, "iq");
	xmpp_stanza_set_type(reply, "result");
	xmpp_stanza_set_id(reply, xmpp_stanza_get_id(stanza));
	xmpp_stanza_set_attribute(reply, "to", xmpp_stanza_get_attribute(stanza, "from"));
	
	query = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(query, "query");
    ns = xmpp_stanza_get_ns(xmpp_stanza_get_children(stanza));
    if (ns) {
        xmpp_stanza_set_ns(query, ns);
    }

	name = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(name, "name");
	xmpp_stanza_add_child(query, name);
	
	text = xmpp_stanza_new(ctx);
	xmpp_stanza_set_text(text, "XMPPsh");
	xmpp_stanza_add_child(name, text);
	
	version = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(version, "version");
	xmpp_stanza_add_child(query, version);
	
	text = xmpp_stanza_new(ctx);
	xmpp_stanza_set_text(text, "1.0");
	xmpp_stanza_add_child(version, text);
	
	xmpp_stanza_add_child(reply, query);

	xmpp_send(conn, reply);
	xmpp_stanza_release(reply);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0xacd3(%rip), %r12      # 0xd33a
movq %rsi, %rdi
movq %r12, %rsi
callq 0xbd6c
leaq 0xa98b(%rip), %rdi      # 0xd004
movq %rax, %rsi
xorl %eax, %eax
callq 0x2030
movq %r15, %rdi
callq 0xb40c
movq %rax, %r14
leaq 0xa991(%rip), %rsi      # 0xd026
movq %rax, %rdi
callq 0xb932
leaq 0xa985(%rip), %rsi      # 0xd029
movq %r14, %rdi
callq 0xbd5d
movq %r13, %rdi
callq 0xbb79
movq %r14, %rdi
movq %rax, %rsi
callq 0xbd4e
movq %r13, %rdi
movq %r12, %rsi
callq 0xbd6c
leaq 0xa95f(%rip), %rsi      # 0xd030
movq %r14, %rdi
movq %rax, %rdx
callq 0xba1c
movq %r15, %rdi
callq 0xb40c
movq %rax, %r12
leaq 0xa945(%rip), %rsi      # 0xd033
movq %rax, %rdi
callq 0xb932
movq %r13, %rdi
callq 0xbc72
movq %rax, %rdi
callq 0xbb97
testq %rax, %rax
je 0x2716
movq %r12, %rdi
movq %rax, %rsi
callq 0xba89
movq %r15, %rdi
callq 0xb40c
movq %rax, %r13
leaq 0xaded(%rip), %rsi      # 0xd515
movq %rax, %rdi
callq 0xb932
movq %r12, %rdi
movq %r13, %rsi
callq 0xba98
movq %r15, %rdi
callq 0xb40c
movq %rax, %rbp
leaq 0xa8ec(%rip), %rsi      # 0xd039
movq %rax, %rdi
callq 0xbac4
movq %r13, %rdi
movq %rbp, %rsi
callq 0xba98
movq %r15, %rdi
callq 0xb40c
movq %rax, %r13
leaq 0xacbe(%rip), %rsi      # 0xd430
movq %rax, %rdi
callq 0xb932
movq %r12, %rdi
movq %r13, %rsi
callq 0xba98
movq %r15, %rdi
callq 0xb40c
movq %rax, %r15
leaq 0xa8a9(%rip), %rsi      # 0xd040
movq %rax, %rdi
callq 0xbac4
movq %r13, %rdi
movq %r15, %rsi
callq 0xba98
movq %r14, %rdi
movq %r12, %rsi
callq 0xba98
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5145
movq %r14, %rdi
callq 0xb5a8
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/liuhaotian[P]xmppsh/xmppsh.c
// Function: ping_handler
int ping_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata)
{
	//printf("get the ping\n");
	xmpp_stanza_t *reply;
	xmpp_ctx_t *ctx = (xmpp_ctx_t*)userdata;

	reply = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(reply, "iq");
	xmpp_stanza_set_type(reply, "result");
	xmpp_stanza_set_id(reply, xmpp_stanza_get_id(stanza));
	xmpp_stanza_set_attribute(reply, "to", xmpp_stanza_get_attribute(stanza, "from"));

	xmpp_send(conn, reply);
	xmpp_stanza_release(reply);
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0xb40c
movq %rax, %r14
leaq 0xa82d(%rip), %rsi      # 0xd026
movq %rax, %rdi
callq 0xb932
leaq 0xa821(%rip), %rsi      # 0xd029
movq %r14, %rdi
callq 0xbd5d
movq %r15, %rdi
callq 0xbb79
movq %r14, %rdi
movq %rax, %rsi
callq 0xbd4e
leaq 0xab10(%rip), %rsi      # 0xd33a
movq %r15, %rdi
callq 0xbd6c
leaq 0xa7f7(%rip), %rsi      # 0xd030
movq %r14, %rdi
movq %rax, %rdx
callq 0xba1c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5145
movq %r14, %rdi
callq 0xb5a8
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: auth_handle_open
void auth_handle_open(xmpp_conn_t * const conn)
{
    /* reset all timed handlers */
    handler_reset_timed(conn, 0);

    /* setup handler for stream:error */
    handler_add(conn, _handle_error,
		NULL, "stream:error", NULL, NULL);

    /* setup handlers for incoming <stream:features> */
    handler_add(conn, _handle_features,
		NULL, "stream:features", NULL, NULL);
    handler_add_timed(conn, _handle_missing_features,
		      FEATURES_TIMEOUT, NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x5fe7
leaq 0x4c(%rip), %rsi        # 0x2f5a
leaq 0xa35a(%rip), %rcx      # 0xd26f
movq %rbx, %rdi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x648b
leaq 0x4e3(%rip), %rsi       # 0x340f
leaq 0xa349(%rip), %rcx      # 0xd27c
movq %rbx, %rdi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x648b
leaq 0x634(%rip), %rsi       # 0x357e
movl $0x3a98, %edx           # imm = 0x3A98
movq %rbx, %rdi
xorl %ecx, %ecx
popq %rbx
jmp 0x6202
// File: /workspace/github_c_makefile_star2_O3/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_features
static int _handle_features(xmpp_conn_t * const conn,
			    xmpp_stanza_t * const stanza,
			    void * const userdata)
{
    xmpp_stanza_t *child, *mech;
    char *text;

    /* remove the handler that detects missing stream:features */
    xmpp_timed_handler_delete(conn, _handle_missing_features);

    /* check for TLS */
    if (!conn->secured) {
        child = xmpp_stanza_get_child_by_name(stanza, "starttls");
        if (child && (strcmp(xmpp_stanza_get_ns(child), XMPP_NS_TLS) == 0))
            conn->tls_support = 1;
    }

    /* check for SASL */
    child = xmpp_stanza_get_child_by_name(stanza, "mechanisms");
    if (child && (strcmp(xmpp_stanza_get_ns(child), XMPP_NS_SASL) == 0)) {
	for (mech = xmpp_stanza_get_children(child); mech; 
	     mech = xmpp_stanza_get_next(mech)) {
	    if (strcmp(xmpp_stanza_get_name(mech), "mechanism") == 0) {
		text = xmpp_stanza_get_text(mech);
		if (strcasecmp(text, "PLAIN") == 0)
		    conn->sasl_support |= SASL_MASK_PLAIN;
		else if (strcasecmp(text, "DIGEST-MD5") == 0)
		    conn->sasl_support |= SASL_MASK_DIGESTMD5;
		else if (strcasecmp(text, "ANONYMOUS") == 0)
		    conn->sasl_support |= SASL_MASK_ANONYMOUS;

		xmpp_free(conn->ctx, text);
	    }
	}
    }

    _auth(conn);
 
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x157(%rip), %rsi       # 0x357e
callq 0x5f99
cmpl $0x0, 0x4c(%rbx)
je 0x353b
leaq 0xa038(%rip), %rsi      # 0xd475
movq %r14, %rdi
callq 0xbbd3
testq %rax, %rax
je 0x3522
movq %rax, %r14
movq %rax, %rdi
callq 0xbb97
leaq 0xa020(%rip), %rsi      # 0xd480
movq %rax, %rdi
callq 0x22e0
testl %eax, %eax
jne 0x3522
movq %r14, %rdi
callq 0xbc72
testq %rax, %rax
je 0x3522
movq %rax, %r14
leaq 0xa016(%rip), %r15      # 0xd4a1
leaq 0xa019(%rip), %r12      # 0xd4ab
leaq 0xa018(%rip), %r13      # 0xd4b1
movq %r14, %rdi
callq 0xb97a
movq %rax, %rdi
movq %r15, %rsi
callq 0x22e0
testl %eax, %eax
jne 0x350e
movq %r14, %rdi
callq 0xbc7c
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0x22d0
testl %eax, %eax
je 0x34f3
movq %rbp, %rdi
movq %r13, %rsi
callq 0x22d0
testl %eax, %eax
je 0x34fa
movq %rbp, %rdi
leaq 0x9fd9(%rip), %rsi      # 0xd4bc
callq 0x22d0
testl %eax, %eax
jne 0x3502
movl $0x4, %eax
jmp 0x34ff
movl $0x1, %eax
jmp 0x34ff
movl $0x2, %eax
orl %eax, 0x48(%rbx)
movq 0x8(%rbx), %rdi
movq %rbp, %rsi
callq 0x5263
movq %r14, %rdi
callq 0xbc77
movq %rax, %r14
testq %rax, %rax
jne 0x3499
movq %rbx, %rdi
callq 0x35a7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9f0a(%rip), %rsi      # 0xd44c
movq %r14, %rdi
callq 0xbbd3
testq %rax, %rax
je 0x3436
movq %rax, %rdi
callq 0xbb97
leaq 0x9ef3(%rip), %rsi      # 0xd455
movq %rax, %rdi
callq 0x22e0
testl %eax, %eax
jne 0x3436
movl $0x1, 0x40(%rbx)
jmp 0x3436
// File: /workspace/github_c_makefile_star2_O3/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_proceedtls_default
static int _handle_proceedtls_default(xmpp_conn_t * const conn,
			      xmpp_stanza_t * const stanza,
			      void * const userdata)
{
    char *name;
    name = xmpp_stanza_get_name(stanza);
    xmpp_debug(conn->ctx, "xmpp", 
	"handle proceedtls called for %s", name);

    if (strcmp(name, "proceed") == 0) {
        xmpp_debug(conn->ctx, "xmpp", "proceeding with TLS");

	conn->tls = tls_new(conn->ctx, conn->sock);

	if (!tls_start(conn->tls))
	{
	    xmpp_debug(conn->ctx, "xmpp", "Couldn't start TLS! error %d", tls_error(conn->tls));
	    tls_free(conn->tls);
	    conn->tls = NULL;
	    conn->tls_failed = 1;
	
	    /* failed tls spoils the connection, so disconnect */
	    xmpp_disconnect(conn);
	}
	else
	{
            conn->secured = 1;
            conn_prepare_reset(conn, auth_handle_open);

	    conn_open_stream(conn);
	}
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xb97a
movq %rax, %r14
movq 0x8(%rbx), %rdi
leaq 0x9532(%rip), %rsi      # 0xd049
leaq 0x9a2a(%rip), %rdx      # 0xd548
movq %rax, %rcx
xorl %eax, %eax
callq 0x5516
leaq 0x9a39(%rip), %rsi      # 0xd568
movq %r14, %rdi
callq 0x22e0
testl %eax, %eax
jne 0x3bdb
movq 0x8(%rbx), %rdi
leaq 0x94ff(%rip), %rsi      # 0xd049
leaq 0x9a1f(%rip), %rdx      # 0xd570
xorl %eax, %eax
callq 0x5516
movq 0x8(%rbx), %rdi
movl 0x30(%rbx), %esi
callq 0xbe78
movq %rax, 0x38(%rbx)
movq %rax, %rdi
callq 0xbf48
testl %eax, %eax
je 0x3b94
movl $0x1, 0x4c(%rbx)
leaq -0xc86(%rip), %rsi      # 0x2efc
movq %rbx, %rdi
callq 0x49ac
movq %rbx, %rdi
callq 0x51ab
jmp 0x3bdb
movq 0x8(%rbx), %r14
movq 0x38(%rbx), %rdi
callq 0xbe74
leaq 0x94a1(%rip), %rsi      # 0xd049
leaq 0x99d5(%rip), %rdx      # 0xd584
movq %r14, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x5516
movq 0x38(%rbx), %rdi
callq 0xbf20
movq $0x0, 0x38(%rbx)
movl $0x1, 0x44(%rbx)
movq %rbx, %rdi
callq 0x4edd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: make_sasl_auth
static xmpp_stanza_t *_make_sasl_auth(xmpp_conn_t * const conn,
				 const char * const mechanism)
{
    xmpp_stanza_t *auth;

    /* build auth stanza */
    auth = xmpp_stanza_new(conn->ctx);
    if (auth) {
	xmpp_stanza_set_name(auth, "auth");
	xmpp_stanza_set_ns(auth, XMPP_NS_SASL);
	xmpp_stanza_set_attribute(auth, "mechanism", mechanism);
    }
    
    return auth;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0xb40c
movq %rax, %r14
testq %rax, %rax
je 0x3c29
leaq 0x990c(%rip), %rsi      # 0xd50c
movq %r14, %rdi
callq 0xb932
leaq 0x9871(%rip), %rsi      # 0xd480
movq %r14, %rdi
callq 0xba89
leaq 0x9883(%rip), %rsi      # 0xd4a1
movq %r14, %rdi
movq %rbx, %rdx
callq 0xba1c
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq