LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: blacklist_node
static void
blacklist_node(const unsigned char *id, const struct sockaddr *sa, int salen)
{
    int i;

    debugf("Blacklisting broken node.\n");

    if(id) {
        struct node *n;
        struct search *sr;
        /* Make the node easy to discard. */
        n = find_node(id, sa->sa_family);
        if(n) {
            n->pinged = 3;
            pinged(n, NULL);
        }
        /* Discard it from any searches in progress. */
        sr = searches;
        while(sr) {
            for(i = 0; i < sr->numnodes; i++)
                if(id_cmp(sr->nodes[i].id, id) == 0)
                    flush_search_node(&sr->nodes[i], sr);
            sr = sr->next;
        }
    }
    /* And make sure we don't hear from it again. */
    memcpy(&blacklist[next_blacklisted], sa, salen);
    next_blacklisted = (next_blacklisted + 1) % DHT_MAX_BLACKLISTED;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x54bd(%rip), %rdi      # 0xc7a7
movb $0x0, %al
callq 0x3aa0
cmpq $0x0, -0x8(%rbp)
je 0x73bd
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzwl (%rax), %esi
callq 0x4cb0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7332
movq -0x20(%rbp), %rax
movl $0x3, 0xb8(%rax)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa090
movq 0x98cf(%rip), %rax      # 0x10c08
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x73bb
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0xce0(%rcx), %eax
jge 0x73aa
movq -0x28(%rbp), %rdi
addq $0x30, %rdi
movslq -0x18(%rbp), %rax
imulq $0xe8, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x3b70
cmpl $0x0, %eax
jne 0x739d
movq -0x28(%rbp), %rdi
addq $0x30, %rdi
movslq -0x18(%rbp), %rax
imulq $0xe8, %rax, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0x3ba0
jmp 0x739f
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x734b
movq -0x28(%rbp), %rax
movq 0xce8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x733d
jmp 0x73bd
movslq 0x98d4(%rip), %rax      # 0x10c98
leaq 0x9905(%rip), %rdi      # 0x10cd0
shlq $0x7, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x2200
movl 0x98b3(%rip), %eax      # 0x10c98
addl $0x1, %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %edx, 0x98a2(%rip)      # 0x10c98
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: tid_match
static int
tid_match(const unsigned char *tid, const char *prefix,
          unsigned short *seqno_return)
{
    if(tid[0] == (prefix[0] & 0xFF) && tid[1] == (prefix[1] & 0xFF)) {
        if(seqno_return)
            memcpy(seqno_return, tid + 2, 2);
        return 1;
    } else
        return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
andl $0xff, %ecx
cmpl %ecx, %eax
jne 0x7461
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x18(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
andl $0xff, %ecx
cmpl %ecx, %eax
jne 0x7461
cmpq $0x0, -0x20(%rbp)
je 0x7458
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movw 0x2(%rcx), %cx
movw %cx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7468
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: find_search
static struct search *
find_search(unsigned short tid, int af)
{
    struct search *sr = searches;
    while(sr) {
        if(sr->tid == tid && sr->af == af)
            return sr;
        sr = sr->next;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %di, %ax
movw %ax, -0xa(%rbp)
movl %esi, -0x10(%rbp)
movq 0x9213(%rip), %rax      # 0x10c08
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7a36
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movzwl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jne 0x7a25
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x10(%rbp), %eax
jne 0x7a25
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7a3e
movq -0x18(%rbp), %rax
movq 0xce8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x79f9
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: make_token
static void
make_token(const struct sockaddr *sa, int old, unsigned char *token_return)
{
    void *ip;
    int iplen;
    unsigned short port;

    if(sa->sa_family == AF_INET) {
        struct sockaddr_in *sin = (struct sockaddr_in*)sa;
        ip = &sin->sin_addr;
        iplen = 4;
        port = htons(sin->sin_port);
    } else if(sa->sa_family == AF_INET6) {
        struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)sa;
        ip = &sin6->sin6_addr;
        iplen = 16;
        port = htons(sin6->sin6_port);
    } else {
        abort();
    }

    dht_hash(token_return, TOKEN_SIZE,
             old ? oldsecret : secret, sizeof(secret),
             ip, iplen, (unsigned char*)&port, 2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x86ed
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movl $0x4, -0x24(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x2100
movw %ax, -0x26(%rbp)
jmp 0x872e
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
cmpl $0xa, %eax
jne 0x8727
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl $0x10, -0x24(%rbp)
movq -0x38(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x2100
movw %ax, -0x26(%rbp)
jmp 0x872c
callq 0x2050
jmp 0x872e
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %ecx
leaq 0x8570(%rip), %rdx      # 0x10cac
leaq 0x8585(%rip), %rax      # 0x10cc8
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movq -0x20(%rbp), %r8
movl -0x24(%rbp), %r9d
movl $0x8, %ecx
leaq -0x26(%rbp), %rax
movl %ecx, %esi
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x3300
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: token_match
static int
token_match(const unsigned char *token, int token_len,
            const struct sockaddr *sa)
{
    unsigned char t[TOKEN_SIZE];
    if(token_len != TOKEN_SIZE)
        return 0;
    make_token(sa, 0, t);
    if(memcmp(t, token, TOKEN_SIZE) == 0)
        return 1;
    make_token(sa, 1, t);
    if(memcmp(t, token, TOKEN_SIZE) == 0)
        return 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpl $0x8, -0x14(%rbp)
je 0x87a2
movl $0x0, -0x4(%rbp)
jmp 0x8814
movq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rdx
xorl %esi, %esi
callq 0x86a0
leaq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq (%rax), %rax
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x87d6
movl $0x1, -0x4(%rbp)
jmp 0x8814
movq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rdx
movl $0x1, %esi
callq 0x86a0
leaq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq (%rax), %rax
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x880d
movl $0x1, -0x4(%rbp)
jmp 0x8814
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: expire_searches
static void
expire_searches(dht_callback_t *callback, void *closure)
{
    struct search *sr = searches, *previous = NULL;

    while(sr) {
        struct search *next = sr->next;
        if(sr->step_time < now.tv_sec - DHT_SEARCH_EXPIRE_TIME) {
            if(previous)
                previous->next = next;
            else
                searches = next;
            numsearches--;
            if (!sr->done) {
                if(callback)
                    (*callback)(closure,
                                sr->af == AF_INET ?
                                DHT_EVENT_SEARCH_DONE : DHT_EVENT_SEARCH_DONE6,
                                sr->id, NULL, 0);
            }
            free(sr);
        } else {
            previous = sr;
        }
        sr = next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x7ca1(%rip), %rax      # 0x10c08
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9042
movq -0x18(%rbp), %rax
movq 0xce8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x7c74(%rip), %rcx      # 0x10c10
subq $0xe88, %rcx            # imm = 0xE88
cmpq %rcx, %rax
jge 0x902d
cmpq $0x0, -0x20(%rbp)
je 0x8fc4
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xce8(%rax)
jmp 0x8fcf
movq -0x28(%rbp), %rax
movq %rax, 0x7c39(%rip)      # 0x10c08
movl 0x7c93(%rip), %eax      # 0x10c68
addl $-0x1, %eax
movl %eax, 0x7c8a(%rip)      # 0x10c68
movq -0x18(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x9022
cmpq $0x0, -0x8(%rbp)
je 0x9020
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %edx
movl $0x4, %esi
movl $0x3, %ecx
cmpl $0x2, %edx
cmovel %ecx, %esi
movq -0x18(%rbp), %rdx
addq $0x10, %rdx
xorl %ecx, %ecx
movl %ecx, %r8d
movq %r8, %rcx
callq *%rax
jmp 0x9022
movq -0x18(%rbp), %rdi
callq 0x2040
jmp 0x9035
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x8f73
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: dht_insert_node
int
dht_insert_node(const unsigned char *id, struct sockaddr *sa, int salen)
{
    struct node *n;

    if(sa->sa_family != AF_INET && sa->sa_family != AF_INET6) {
        errno = EAFNOSUPPORT;
        return -1;
    }

    n = new_node(id, sa, salen, 0);
    return !!n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
je 0x98ff
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
cmpl $0xa, %eax
je 0x98ff
callq 0x2060
movl $0x61, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9929
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
xorl %ecx, %ecx
callq 0x7470
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: pinged
static void
pinged(struct node *n, struct bucket *b)
{
    n->pinged++;
    n->pinged_time = now.tv_sec;
    if(n->pinged >= 3)
        send_cached_ping(b ? b : find_bucket(n->id, n->ss.ss_family));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0xb8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xb8(%rax)
movq 0x6b56(%rip), %rcx      # 0x10c10
movq -0x8(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x8(%rbp), %rax
cmpl $0x3, 0xb8(%rax)
jl 0xa101
cmpq $0x0, -0x10(%rbp)
je 0xa0e3
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xa0f8
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0x18(%rax), %esi
callq 0x39a0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa1f0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: dht_send
static int
dht_send(const void *buf, size_t len, int flags,
         const struct sockaddr *sa, int salen)
{
    int s;

    if(salen == 0)
        abort();

    if(node_blacklisted(sa, salen)) {
        debugf("Attempting to send to blacklisted node.\n");
        errno = EPERM;
        return -1;
    }

    if(sa->sa_family == AF_INET)
        s = dht_socket;
    else if(sa->sa_family == AF_INET6)
        s = dht_socket6;
    else
        s = -1;

    if(s < 0) {
        errno = EAFNOSUPPORT;
        return -1;
    }

    return dht_sendto(s, buf, len, flags, sa, salen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xa136
callq 0x2050
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x6640
cmpl $0x0, %eax
je 0xa169
leaq 0x2594(%rip), %rdi      # 0xc6e2
movb $0x0, %al
callq 0x3aa0
callq 0x2060
movl $0x1, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa1da
movq -0x28(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0xa180
movl 0x504d(%rip), %eax      # 0xf1c8
movl %eax, -0x30(%rbp)
jmp 0xa1a0
movq -0x28(%rbp), %rax
movzwl (%rax), %eax
cmpl $0xa, %eax
jne 0xa197
movl 0x503a(%rip), %eax      # 0xf1cc
movl %eax, -0x30(%rbp)
jmp 0xa19e
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
jmp 0xa1a0
cmpl $0x0, -0x30(%rbp)
jge 0xa1ba
callq 0x2060
movl $0x61, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa1da
movl -0x30(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0x32a0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: send_cached_ping
static int
send_cached_ping(struct bucket *b)
{
    unsigned char tid[4];
    int rc;
    /* We set family to 0 when there's no cached node. */
    if(b->cached.ss_family == 0)
        return 0;

    debugf("Sending ping to cached node.\n");
    make_tid(tid, "pn", 0);
    rc = send_ping((struct sockaddr*)&b->cached, b->cachedlen, tid, 4);
    b->cached.ss_family = 0;
    b->cachedlen = 0;
    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x30(%rax), %eax
cmpl $0x0, %eax
jne 0xa212
movl $0x0, -0x4(%rbp)
jmp 0xa273
leaq 0x24f2(%rip), %rdi      # 0xc70b
movb $0x0, %al
callq 0x3aa0
leaq -0x14(%rbp), %rdi
leaq 0x21bc(%rip), %rsi      # 0xc3e7
xorl %edx, %edx
callq 0x9990
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rax
movl 0xb0(%rax), %esi
leaq -0x14(%rbp), %rdx
movl $0x4, %ecx
callq 0x99e0
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movw $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xb0(%rax)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: add_search_node
static void
add_search_node(const unsigned char *id, const struct sockaddr *sa, int salen)
{
    struct search *sr;
    for(sr = searches; sr; sr = sr->next) {
        if(sr->af == sa->sa_family && sr->numnodes < SEARCH_NODES) {
            struct search_node *n =
                insert_search_node(id, sa, salen, sr, 0, NULL, 0);
            if(n)
                search_send_get_peers(sr, n);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq 0x696e(%rip), %rax      # 0x10c08
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xa314
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jne 0xa301
movq -0x20(%rbp), %rax
cmpl $0xe, 0xce0(%rax)
jge 0xa301
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x0, (%rsp)
callq 0x7a50
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xa2ff
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x7cd0
jmp 0xa301
jmp 0xa303
movq -0x20(%rbp), %rax
movq 0xce8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xa29e
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: split_bucket
static int
split_bucket(struct bucket *b)
{
    int rc;
    struct node *nodes = NULL;
    struct node *n = NULL;

    debugf("Splitting.\n");
    rc = split_bucket_helper(b, &nodes);
    if(rc < 0) {
        debugf("Couldn't split bucket");
        return -1;
    }

    while(n != NULL || nodes != NULL) {
        struct bucket *split = NULL;
        if(n == NULL) {
            n = nodes;
            nodes = nodes->next;
            n->next = NULL;
        }
        rc = insert_node(n, &split);
        if(rc < 0) {
            debugf("Couldn't insert node.\n");
            free(n);
            n = NULL;
        } else if(rc > 0) {
            n = NULL;
        } else if(!in_bucket(myid, split)) {
            free(n);
            n = NULL;
        } else {
            struct node *insert = NULL;
            debugf("Splitting (recursive).\n");
            rc = split_bucket_helper(split, &insert);
            if(rc < 0) {
                debugf("Couldn't split bucket.\n");
                free(n);
                n = NULL;
            } else {
                nodes = append_nodes(nodes, insert);
            }
        }
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
leaq 0x249e(%rip), %rdi      # 0xc7e1
movb $0x0, %al
callq 0x3aa0
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xa4d0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0xa37a
leaq 0x2486(%rip), %rdi      # 0xc7ed
movb $0x0, %al
callq 0x3aa0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa4b9
jmp 0xa37c
movb $0x1, %al
cmpq $0x0, -0x28(%rbp)
movb %al, -0x39(%rbp)
jne 0xa393
cmpq $0x0, -0x20(%rbp)
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0xa39f
jmp 0xa4b2
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xa3d4
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa690
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0xa40e
leaq 0x2412(%rip), %rdi      # 0xc803
movb $0x0, %al
callq 0x3aa0
movq -0x28(%rbp), %rdi
callq 0x2040
movq $0x0, -0x28(%rbp)
jmp 0xa4ad
cmpl $0x0, -0x14(%rbp)
jle 0xa421
movq $0x0, -0x28(%rbp)
jmp 0xa4ab
movq -0x30(%rbp), %rsi
leaq 0x6804(%rip), %rdi      # 0x10c30
callq 0x9840
cmpl $0x0, %eax
jne 0xa449
movq -0x28(%rbp), %rdi
callq 0x2040
movq $0x0, -0x28(%rbp)
jmp 0xa4a9
movq $0x0, -0x38(%rbp)
leaq 0x23c2(%rip), %rdi      # 0xc81a
movb $0x0, %al
callq 0x3aa0
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa4d0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0xa496
leaq 0x23b6(%rip), %rdi      # 0xc832
movb $0x0, %al
callq 0x3aa0
movq -0x28(%rbp), %rdi
callq 0x2040
movq $0x0, -0x28(%rbp)
jmp 0xa4a7
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xa730
movq %rax, -0x20(%rbp)
jmp 0xa4a9
jmp 0xa4ab
jmp 0xa4ad
jmp 0xa37c
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: insert_node
static int
insert_node(struct node *node, struct bucket **split_return)
{
    struct bucket *b = find_bucket(node->id, node->ss.ss_family);

    if(b == NULL)
        return -1;

    if(b->count >= b->max_count) {
        *split_return = b;
        return 0;
    }
    node->next = b->nodes;
    b->nodes = node;
    b->count++;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movzwl 0x18(%rax), %esi
callq 0x39a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xa6c5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa71c
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jl 0xa6e9
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xa71c
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: append_nodes
static struct node *
append_nodes(struct node *n1, struct node *n2)
{
    struct node *n;

    if(n1 == NULL)
        return n2;

    if(n2 == NULL)
        return n1;

    n = n1;
    while(n->next != NULL)
        n = n->next;

    n->next = n2;
    return n1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa74d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa79c
cmpq $0x0, -0x18(%rbp)
jne 0xa75e
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa79c
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0xa785
movq -0x20(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xa766
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: bucket_middle
static int
bucket_middle(struct bucket *b, unsigned char *id_return)
{
    int bit1 = lowbit(b->first);
    int bit2 = b->next ? lowbit(b->next->first) : -1;
    int bit = MAX(bit1, bit2) + 1;

    if(bit >= 160)
        return -1;

    memcpy(id_return, b->first, 20);
    id_return[bit / 8] |= (0x80 >> (bit % 8));
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x4, %rdi
callq 0xa8a0
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0xa7f7
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rdi
addq $0x4, %rdi
callq 0xa8a0
movl %eax, -0x28(%rbp)
jmp 0xa801
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x28(%rbp)
jmp 0xa801
movl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jl 0xa817
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0xa81d
movl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0xa0, -0x24(%rbp)
jl 0xa838
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa895
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x4(%rcx), %rdx
movq %rdx, (%rax)
movq 0xc(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x14(%rcx), %ecx
movl %ecx, 0x10(%rax)
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %edx, %ecx
movl $0x80, %esi
sarl %cl, %esi
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: lowbit
static int
lowbit(const unsigned char *id)
{
    int i, j;
    for(i = 19; i >= 0; i--)
        if(id[i] != 0)
            break;

    if(i < 0)
        return -1;

    for(j = 7; j >= 0; j--)
        if((id[i] & (0x80 >> j)) != 0)
            break;

    return 8 * i + j;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x13, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xa8d5
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0xa8c8
jmp 0xa8d5
jmp 0xa8ca
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xa8af
cmpl $0x0, -0x14(%rbp)
jge 0xa8e4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa92b
movl $0x7, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0xa91f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl -0x18(%rbp), %ecx
movl $0x80, %edx
sarl %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xa912
jmp 0xa91f
jmp 0xa914
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xa8eb
movl -0x14(%rbp), %eax
shll $0x3, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: xorcmp
static int
xorcmp(const unsigned char *id1, const unsigned char *id2,
       const unsigned char *ref)
{
    int i;
    for(i = 0; i < 20; i++) {
        unsigned char xor1, xor2;
        if(id1[i] == id2[i])
            continue;
        xor1 = id1[i] ^ ref[i];
        xor2 = id2[i] ^ ref[i];
        if(xor1 < xor2)
            return -1;
        else
            return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x14, -0x24(%rbp)
jge 0xa9d5
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0xa96f
jmp 0xa9c7
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movb %al, -0x25(%rbp)
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movb %al, -0x26(%rbp)
movzbl -0x25(%rbp), %eax
movzbl -0x26(%rbp), %ecx
cmpl %ecx, %eax
jge 0xa9be
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa9dc
movl $0x1, -0x4(%rbp)
jmp 0xa9dc
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa947
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: bucket_random
static int
bucket_random(struct bucket *b, unsigned char *id_return)
{
    int bit1 = lowbit(b->first);
    int bit2 = b->next ? lowbit(b->next->first) : -1;
    int bit = MAX(bit1, bit2) + 1;
    int i;

    if(bit >= 160) {
        memcpy(id_return, b->first, 20);
        return 1;
    }

    memcpy(id_return, b->first, bit / 8);
    id_return[bit / 8] = b->first[bit / 8] & (0xFF00 >> (bit % 8));
    id_return[bit / 8] |= random() & 0xFF >> (bit % 8);
    for(i = bit / 8 + 1; i < 20; i++)
        id_return[i] = random() & 0xFF;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x4, %rdi
callq 0xa8a0
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0xae37
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rdi
addq $0x4, %rdi
callq 0xa8a0
movl %eax, -0x2c(%rbp)
jmp 0xae41
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x2c(%rbp)
jmp 0xae41
movl -0x2c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jl 0xae57
movl -0x1c(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0xae5d
movl -0x20(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0xa0, -0x24(%rbp)
jl 0xae98
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x4(%rcx), %rdx
movq %rdx, (%rax)
movq 0xc(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x14(%rcx), %ecx
movl %ecx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xafa3
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movslq %eax, %rdx
callq 0x2200
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x50(%rbp), %rax
movslq %ecx, %rcx
movzbl 0x4(%rax,%rcx), %eax
movl %eax, -0x48(%rbp)
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl -0x48(%rbp), %eax
movl %edx, %ecx
movl $0xff00, %edx           # imm = 0xFF00
sarl %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
movb %al, -0x41(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movb -0x41(%rbp), %dl
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
callq 0x2230
movq %rax, %rsi
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %edx, %ecx
movl $0xff, %eax
sarl %cl, %eax
cltq
andq %rax, %rsi
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orq %rsi, %rdx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
addl $0x1, %eax
movl %eax, -0x28(%rbp)
cmpl $0x14, -0x28(%rbp)
jge 0xaf9c
callq 0x2230
andq $0xff, %rax
movb %al, %dl
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xaf73
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: random_node
static struct node *
random_node(struct bucket *b)
{
    struct node *n;
    int nn;

    if(b->count == 0)
        return NULL;

    nn = random() % b->count;
    n = b->nodes;
    while(nn > 0 && n) {
        n = n->next;
        nn--;
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xafd0
movq $0x0, -0x8(%rbp)
jmp 0xb034
callq 0x2230
movq -0x10(%rbp), %rcx
movslq 0x18(%rcx), %rcx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
jle 0xb009
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0xb012
jmp 0xb02c
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xaff3
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: buffer_closest_nodes
static int
buffer_closest_nodes(unsigned char *nodes, int numnodes,
                     const unsigned char *id, struct bucket *b)
{
    struct node *n = b->nodes;
    while(n) {
        if(node_good(n))
            numnodes = insert_closest_node(nodes, numnodes, id, n);
        n = n->next;
    }
    return numnodes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xb4a0
movq -0x28(%rbp), %rdi
callq 0x4330
cmpl $0x0, %eax
je 0xb48f
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0xbc70
movl %eax, -0xc(%rbp)
movq -0x28(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xb463
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zhoudian64[P]OS2-exp/io.c
// Function: main
int main() {
// 申请20字节内存
	char* helloString = malloc(20*sizeof(char));
// 字符串常量
	char* src = "hello, glibc.\n";
// 将src指向的内存拷贝至helloString
	strcpy(helloString, src);

// 打开文件hello.txt, 没有责创建｜可读可写｜有则从零开始, rw_rw_r
	int fd_hello = open("hello.txt", O_CREAT | O_RDWR | O_TRUNC, 0664);
// 向文件fd_hello 写入helloString
	write(fd_hello, helloString, 20*sizeof(char));
// 关闭文件
	close(fd_hello);
// 清理申请的内存
	free(helloString);
	
	char* byeString = malloc(20*sizeof(char));
// 只读
	int fd_bye = open("bye.txt", O_RDONLY);
	read(fd_bye, byeString, 20*sizeof(char));
	printf("bye.txt: %s", byeString);
	close(fd_bye);
	free(byeString);

	char glibc2clang[5] = "clang";
	fd_bye = open("bye.txt", O_WRONLY);
// 在fd_bye原有的位置+5offset
	lseek(fd_bye, 5, SEEK_SET);
	write(fd_bye, glibc2clang, 5*sizeof(char));	
	close(fd_bye);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl $0x14, %edi
callq 0x10a0
movq %rax, -0x10(%rbp)
leaq 0xe20(%rip), %rax       # 0x2004
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1040
leaq 0xe17(%rip), %rdi       # 0x2013
movl $0x242, %esi            # imm = 0x242
movl $0x1b4, %edx            # imm = 0x1B4
movb $0x0, %al
callq 0x10b0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movl $0x14, %edx
callq 0x1050
movl -0x1c(%rbp), %edi
callq 0x1080
movq -0x10(%rbp), %rdi
callq 0x1030
movl $0x14, %edi
callq 0x10a0
movq %rax, -0x28(%rbp)
leaq 0xdd6(%rip), %rdi       # 0x201d
xorl %esi, %esi
movb $0x0, %al
callq 0x10b0
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edi
movq -0x28(%rbp), %rsi
movl $0x14, %edx
callq 0x1090
movq -0x28(%rbp), %rsi
leaq 0xdb6(%rip), %rdi       # 0x2025
movb $0x0, %al
callq 0x1060
movl -0x2c(%rbp), %edi
callq 0x1080
movq -0x28(%rbp), %rdi
callq 0x1030
movl 0xda4(%rip), %eax       # 0x2031
movl %eax, -0x31(%rbp)
movb 0xd9f(%rip), %al        # 0x2035
movb %al, -0x2d(%rbp)
leaq 0xd7d(%rip), %rdi       # 0x201d
movl $0x1, %esi
movb $0x0, %al
callq 0x10b0
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edi
movl $0x5, %esi
xorl %edx, %edx
callq 0x1070
movl -0x2c(%rbp), %edi
leaq -0x31(%rbp), %rsi
movl $0x5, %edx
callq 0x1050
movl -0x2c(%rbp), %edi
callq 0x1080
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/CSerxzm[P]WindowstoLinuxInterface/src/../include/line.h
// Function: predealLine
int predealLine(int argc, char* argv[], char (*lines)[255]){
    int real_len=0;
    for(int j=0;j<strlen(argv[0]);j++){
        if(isalpha(argv[0][j])||isdigit(argv[0][j]))
            lines[0][real_len++]=tolower(argv[0][j]);
    }
    lines[0][real_len]='\0';
    for(int i=1;i<argc;i++){
        //printf("%s ", argv[i]);
        real_len=0;
        for(int j=0;j<strlen(argv[i]);j++){
            lines[i][real_len++]=argv[i][j];
        }
        lines[i][real_len]='\0';
        //printf("%s ", lines[i]);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movslq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1040
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x1290
callq 0x10b0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movslq -0x20(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x1255
callq 0x10b0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movslq -0x20(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1280
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x1070
movb %al, %dl
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x1c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x1282
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x11e1
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x134b
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x1323
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xff, %rcx, %rcx
addq %rcx, %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x1c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x12bd
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xff, %rcx, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x12a3
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/CSerxzm[P]WindowstoLinuxInterface/src/MORE.c
// Function: main
int main(int ac, char *av[])  { 
    FILE *fp;  
    if(ac==1)  
      do_more(stdin);  
    else  {  
        while(--ac)  
          if( (fp = fopen(* ++av, "r")) != NULL)  {  
              do_more(fp);  
              fclose(fp);  
          }  
          else  
            exit(1);  
    }  
    return 0;  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x138d
movq 0x2c5d(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x13f0
jmp 0x13e8
jmp 0x138f
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, %eax
je 0x13e6
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rdi
leaq 0xc4d(%rip), %rsi       # 0x2004
callq 0x1080
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x13da
movq -0x18(%rbp), %rdi
callq 0x13f0
movq -0x18(%rbp), %rdi
callq 0x1030
jmp 0x13e4
movl $0x1, %edi
callq 0x1090
jmp 0x138f
jmp 0x13e8
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/CSerxzm[P]WindowstoLinuxInterface/src/MORE.c
// Function: do_more
void do_more(FILE *fp)  {  
    char line[LINELEN];  
    int reply;  
    int number_line = 0;  
    FILE *fp_tty;  
    fp_tty = fopen("/dev/tty", "r");
    if(fp_tty == NULL)  
      exit(1);  
    while(fgets(line, LINELEN, fp) != NULL)  {  
        if(number_line == PAGELEN)  {  
            reply = see_more(fp_tty);  
            if(reply == 0)   
              break;  
            number_line -= reply;  
        }  
        if( fputs(line, stdout) == EOF)  
          exit(1);  
        number_line ++;  
    }  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x8(%rbp)
movl $0x0, -0x218(%rbp)
leaq 0xbf6(%rip), %rdi       # 0x2006
leaq 0xbed(%rip), %rsi       # 0x2004
callq 0x1080
movq %rax, -0x220(%rbp)
cmpq $0x0, -0x220(%rbp)
jne 0x1437
movl $0x1, %edi
callq 0x1090
jmp 0x1439
leaq -0x210(%rbp), %rdi
movq -0x8(%rbp), %rdx
movl $0x202, %esi            # imm = 0x202
callq 0x1060
cmpq $0x0, %rax
je 0x14c7
cmpl $0x18, -0x218(%rbp)
jne 0x148e
movq -0x220(%rbp), %rdi
callq 0x14d0
movl %eax, -0x214(%rbp)
cmpl $0x0, -0x214(%rbp)
jne 0x147a
jmp 0x14c7
movl -0x214(%rbp), %ecx
movl -0x218(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x218(%rbp)
leaq -0x210(%rbp), %rdi
movq 0x2b3c(%rip), %rax      # 0x3fd8
movq (%rax), %rsi
callq 0x1050
cmpl $-0x1, %eax
jne 0x14b3
movl $0x1, %edi
callq 0x1090
movl -0x218(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x218(%rbp)
jmp 0x1439
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/CSerxzm[P]WindowstoLinuxInterface/src/MORE.c
// Function: see_more
int see_more(FILE *cmd)  {  
    int c;    
    while( (c = getc(cmd)) != EOF ) {  
        if(c == 'q')  
          return 0;  
        if(c == ' ')  
          return PAGELEN; 
        if(c == '\n')  
          return 1;
    }  
    return 0;  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10a0
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x151c
cmpl $0x71, -0x14(%rbp)
jne 0x14fc
movl $0x0, -0x4(%rbp)
jmp 0x1523
cmpl $0x20, -0x14(%rbp)
jne 0x150b
movl $0x18, -0x4(%rbp)
jmp 0x1523
cmpl $0xa, -0x14(%rbp)
jne 0x151a
movl $0x1, -0x4(%rbp)
jmp 0x1523
jmp 0x14dc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mulle-nat[P]long-long-double-trouble/int.c
// Function: fits_int
int   fits_int( double value)
{
   int  i_val;
   int  fits;

   if( value < (double) INT_MIN || value > (double) INT_MAX)
      return( 0);

   i_val = (int) value;
   fits  = (double) i_val == value;
   if( ! fits)
      fprintf( stderr, "Mismatch %f with %d\n", value, i_val);

   return( fits);
}

// Assembly:
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
movsd 0xe96(%rip), %xmm0      # 0x2008
ucomisd 0x8(%rsp), %xmm0
ja 0x118e
movsd 0x8(%rsp), %xmm0
movsd 0xe88(%rip), %xmm1      # 0x2010
ucomisd %xmm1, %xmm0
jbe 0x1198
movl $0x0, 0x14(%rsp)
jmp 0x11ed
cvttsd2si 0x8(%rsp), %eax
movl %eax, 0x4(%rsp)
cvtsi2sdl 0x4(%rsp), %xmm0
ucomisd 0x8(%rsp), %xmm0
sete %al
setnp %cl
andb %cl, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jne 0x11e6
movq 0x2e2d(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
movl 0x4(%rsp), %edx
leaq 0xe49(%rip), %rsi       # 0x2028
movb $0x1, %al
callq 0x1040
movl (%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mulle-nat[P]long-long-double-trouble/int.c
// Function: main
int   main( int argc, char *argv[])
{
   double  value;

   fprintf( stderr, "int (%d bytes): %d - %d\n", (int) sizeof( int), INT_MIN, INT_MAX);
   fprintf( stderr, "double (%d bytes): %g - %g\n", (int) sizeof( double), DBL_MIN, DBL_MAX);

   assert( (double) INT_MAX <= DBL_MAX);

   // keep my code optimiza
   if( argc == 1)
      value = (double) INT_MAX;
   else
      value = (double) (INT_MAX - atoi( argv[ 1]));

   if( fits_int( value))
      printf( "FITS\n");
   else
      printf( "NOPE\n");
   return( 0);
}

// Assembly:
subq $0x18, %rsp
movl $0x0, 0x14(%rsp)
movl %edi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x2ddc(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xe17(%rip), %rsi       # 0x203d
movl $0x4, %edx
movl $0x80000000, %ecx       # imm = 0x80000000
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movb $0x0, %al
callq 0x1040
movq 0x2db4(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xe08(%rip), %rsi       # 0x2056
movl $0x8, %edx
movsd 0xdbd(%rip), %xmm0      # 0x2018
movsd 0xdbd(%rip), %xmm1      # 0x2020
movb $0x2, %al
callq 0x1040
cmpl $0x1, 0x10(%rsp)
jne 0x1280
movsd 0xd97(%rip), %xmm0      # 0x2010
movsd %xmm0, (%rsp)
jmp 0x12a0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1050
movl %eax, %ecx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
callq 0x1160
cmpl $0x0, %eax
je 0x12bf
leaq 0xdbc(%rip), %rdi       # 0x2072
movb $0x0, %al
callq 0x1030
jmp 0x12cd
leaq 0xdb2(%rip), %rdi       # 0x2078
movb $0x0, %al
callq 0x1030
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/radforddc[P]icpc_siggen/icpc_fieldgen_opt.c
// Function: dist_from_contact
float dist_from_contact(cyl_pt pt, cyl_pt delta, MJD_Siggen_Setup *setup) {
  float  factor = 1, d = 0.5;
  cyl_pt test;
  int    n;

  for (n=0; n<7; n++) {  // 7 steps => 1/128 precision
    test.r = pt.r + factor * delta.r;
    test.z = pt.z + factor * delta.z;
    if (outside_detector_cyl(test, setup)) {
      factor -= d;
    } else {
      if (n == 0) return -1.0;
      factor += d;
    } 
    d /= 2.0;
  }
  return factor;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movlpd %xmm0, -0x20(%rbp)
movss %xmm1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movlpd %xmm2, -0x3c(%rbp)
movss %xmm3, -0x34(%rbp)
movq -0x3c(%rbp), %rax
movq %rax, -0x2c(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x24(%rbp)
movq %rdi, -0x48(%rbp)
movss 0x68fc(%rip), %xmm0     # 0xd130
movss %xmm0, -0x4c(%rbp)
movss 0x68d7(%rip), %xmm0     # 0xd118
movss %xmm0, -0x50(%rbp)
movl $0x0, -0x60(%rbp)
cmpl $0x7, -0x60(%rbp)
jge 0x691a
movss -0x10(%rbp), %xmm1
movss -0x4c(%rbp), %xmm0
movss -0x2c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x8(%rbp), %xmm1
movss -0x4c(%rbp), %xmm0
movss -0x24(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
movq -0x48(%rbp), %rdi
movl -0x54(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x5c(%rbp), %rax
movq %rax, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movss -0x68(%rbp), %xmm1
callq 0xbd00
cmpl $0x0, %eax
je 0x68ca
movss -0x50(%rbp), %xmm1
movss -0x4c(%rbp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
jmp 0x68ee
cmpl $0x0, -0x60(%rbp)
jne 0x68df
movss 0x685c(%rip), %xmm0     # 0xd134
movss %xmm0, -0x4(%rbp)
jmp 0x6924
movss -0x50(%rbp), %xmm0
addss -0x4c(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x50(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x6749(%rip), %xmm1     # 0xd048
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x50(%rbp)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x684d
movss -0x4c(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
addq $0x70, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/radforddc[P]icpc_siggen/icpc_fieldgen_opt.c
// Function: report_config
int report_config(FILE *fp_out, char *config_file_name) {
  char  *c, line[256];
  FILE  *file;

  fprintf(fp_out, "# Config file: %s\n", config_file_name);
  if (!(file = fopen(config_file_name, "r"))) return 1;

  while (fgets(line, sizeof(line), file)) {
    if (strlen(line) < 3 || *line == ' ' || *line == '\t' || *line == '#') continue;
    if ((c = strchr(line, '#')) || (c = strchr(line, '\n'))) *c = '\0';
    fprintf(fp_out, "# %s\n", line);
  }
  fclose(file);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x411c(%rip), %rsi      # 0xdf2e
movb $0x0, %al
callq 0x1130
movq -0x18(%rbp), %rdi
leaq 0x3839(%rip), %rsi      # 0xd65d
callq 0x1180
movq %rax, -0x128(%rbp)
cmpq $0x0, %rax
jne 0x9e42
movl $0x1, -0x4(%rbp)
jmp 0x9f0c
jmp 0x9e44
leaq -0x120(%rbp), %rdi
movq -0x128(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x1110
cmpq $0x0, %rax
je 0x9ef9
leaq -0x120(%rbp), %rdi
callq 0x10c0
cmpq $0x3, %rax
jb 0x9e9c
movsbl -0x120(%rbp), %eax
cmpl $0x20, %eax
je 0x9e9c
movsbl -0x120(%rbp), %eax
cmpl $0x9, %eax
je 0x9e9c
movsbl -0x120(%rbp), %eax
cmpl $0x23, %eax
jne 0x9e9e
jmp 0x9e44
leaq -0x120(%rbp), %rdi
movl $0x23, %esi
callq 0x10d0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9ed4
leaq -0x120(%rbp), %rdi
movl $0xa, %esi
callq 0x10d0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x9edb
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rdi
leaq -0x120(%rbp), %rdx
leaq 0x4054(%rip), %rsi      # 0xdf41
movb $0x0, %al
callq 0x1130
jmp 0x9e44
movq -0x128(%rbp), %rdi
callq 0x10b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/eric-lo[P]3150/3-ProcessUser/envp.c
// Function: main
int main(int argc, char **argv, char **envp) {
	int i;
	for(i = 0; envp[i]; i++)
		printf("%s\n", envp[i]);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1195
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xe81(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1030
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1161
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq