LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: find_node
static struct node *
find_node(const unsigned char *id, int af)
{
    struct bucket *b = find_bucket(id, af);
    struct node *n;

    if(b == NULL)
        return NULL;

    n = b->nodes;
    while(n) {
        if(id_cmp(n->id, id) == 0)
            return n;
        n = n->next;
    }
    return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3593
testq %rax, %rax
je 0x4341
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x4341
movdqu (%rbx), %xmm0
movd 0x10(%rbx), %xmm1
movdqu (%rax), %xmm2
pcmpeqb %xmm0, %xmm2
movd 0x10(%rax), %xmm3
pcmpeqb %xmm1, %xmm3
pand %xmm2, %xmm3
pmovmskb %xmm3, %ecx
cmpl $0xffff, %ecx           # imm = 0xFFFF
je 0x4343
movq 0xc0(%rax), %rax
testq %rax, %rax
jne 0x4314
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: expire_buckets
static int
expire_buckets(struct bucket *b)
{
    while(b) {
        struct node *n, *p;
        int changed = 0;

        while(b->nodes && b->nodes->pinged >= 4) {
            n = b->nodes;
            b->nodes = n->next;
            b->count--;
            changed = 1;
            free(n);
        }

        p = b->nodes;
        while(p) {
            while(p->next && p->next->pinged >= 4) {
                n = p->next;
                p->next = n->next;
                b->count--;
                changed = 1;
                free(n);
            }
            p = p->next;
        }

        if(changed)
            send_cached_ping(b);

        b = b->next;
    }
    expire_stuff_time = now.tv_sec + 120 + random() % 240;
    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x468e
movq %rdi, %rbx
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x467e
xorl %eax, %eax
cmpl $0x4, 0xb8(%r14)
jl 0x4615
movq 0xc0(%r14), %rax
movq %rax, 0x28(%rbx)
decl 0x18(%rbx)
movq %r14, %rdi
callq 0x2040
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x4676
cmpl $0x4, 0xb8(%r14)
jge 0x45e7
movl $0x1, %eax
movq 0xc0(%r14), %rcx
testq %rcx, %rcx
je 0x4672
addq $0xc0, %r14
cmpl $0x4, 0xb8(%rcx)
movq %rcx, %rdi
jl 0x465c
movq 0xc0(%rdi), %rax
movq %rax, (%r14)
decl 0x18(%rbx)
callq 0x2040
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4676
cmpl $0x4, 0xb8(%rdi)
jge 0x4634
movl $0x1, %eax
movq 0xc0(%rdi), %rcx
addq $0xc0, %rdi
movq %rdi, %r14
testq %rcx, %rcx
jne 0x4628
testl %eax, %eax
je 0x467e
movq %rbx, %rdi
callq 0x80e9
movq 0xb8(%rbx), %rbx
testq %rbx, %rbx
jne 0x45ce
movq 0x957b(%rip), %rbx      # 0xdc10
callq 0x2230
movq %rax, %rcx
movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889
imulq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
imulq $0xf0, %rdx, %rax
subq %rax, %rcx
leaq (%rbx,%rcx), %rax
addq $0x78, %rax
movq %rax, 0x95ec(%rip)      # 0xdcc0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: dht_uninit
int
dht_uninit(void)
{
    if(dht_socket < 0 && dht_socket6 < 0) {
        errno = EINVAL;
        return -1;
    }

    dht_socket = -1;
    dht_socket6 = -1;

    while(buckets) {
        struct bucket *b = buckets;
        buckets = b->next;
        while(b->nodes) {
            struct node *n = b->nodes;
            b->nodes = n->next;
            free(n);
        }
        free(b);
    }

    while(buckets6) {
        struct bucket *b = buckets6;
        buckets6 = b->next;
        while(b->nodes) {
            struct node *n = b->nodes;
            b->nodes = n->next;
            free(n);
        }
        free(b);
    }

    while(storage) {
        struct storage *st = storage;
        storage = storage->next;
        free(st->peers);
        free(st);
    }

    while(searches) {
        struct search *sr = searches;
        searches = searches->next;
        free(sr);
    }

    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x7ae1(%rip)      # 0xc1c8
jns 0x470c
cmpl $0x0, 0x7adc(%rip)      # 0xc1cc
jns 0x470c
callq 0x2060
movl $0x16, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x7ab1(%rip)      # 0xc1c8
movl %eax, 0x7aaf(%rip)      # 0xc1cc
movq 0x952c(%rip), %rbx      # 0xdc50
testq %rbx, %rbx
je 0x4766
movq 0x28(%rbx), %rdi
movq 0xb8(%rbx), %r14
testq %rdi, %rdi
je 0x474f
movq 0xc0(%rdi), %rax
movq %rax, 0x28(%rbx)
callq 0x2040
movq 0x28(%rbx), %rdi
jmp 0x4734
movq %rbx, %rdi
callq 0x2040
movq %r14, %rbx
testq %r14, %r14
jne 0x4729
movq %r14, 0x94ea(%rip)      # 0xdc50
movq 0x94eb(%rip), %rbx      # 0xdc58
testq %rbx, %rbx
je 0x47cd
movq 0x28(%rbx), %rdi
movq 0xb8(%rbx), %r14
testq %rdi, %rdi
je 0x4798
movq 0xc0(%rdi), %rax
movq %rax, 0x28(%rbx)
callq 0x2040
movq 0x28(%rbx), %rdi
jmp 0x477d
movq %rbx, %rdi
callq 0x2040
movq %r14, %rbx
testq %r14, %r14
jne 0x4772
movq %r14, 0x94a9(%rip)      # 0xdc58
jmp 0x47cd
movq 0x28(%rbx), %rax
movq %rax, 0x94a4(%rip)      # 0xdc60
movq 0x20(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2040
movq 0x948c(%rip), %rbx      # 0xdc60
testq %rbx, %rbx
jne 0x47b1
movq 0x9428(%rip), %rdi      # 0xdc08
movl $0x1, %ebx
testq %rdi, %rdi
je 0x4702
movq 0xce8(%rdi), %rax
movq %rax, 0x940c(%rip)      # 0xdc08
callq 0x2040
movq 0x9400(%rip), %rdi      # 0xdc08
jmp 0x47e5
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: is_martian
static int
is_martian(const struct sockaddr *sa)
{
    switch(sa->sa_family) {
    case AF_INET: {
        struct sockaddr_in *sin = (struct sockaddr_in*)sa;
        const unsigned char *address = (const unsigned char*)&sin->sin_addr;
        return sin->sin_port == 0 ||
            (address[0] == 0) ||
            (address[0] == 127) ||
            ((address[0] & 0xE0) == 0xE0);
    }
    case AF_INET6: {
        struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)sa;
        const unsigned char *address = (const unsigned char*)&sin6->sin6_addr;
        return sin6->sin6_port == 0 ||
            (address[0] == 0xFF) ||
            (address[0] == 0xFE && (address[1] & 0xC0) == 0x80) ||
            (memcmp(address, zeroes, 15) == 0 &&
             (address[15] == 0 || address[15] == 1)) ||
            (memcmp(address, v4prefix, 12) == 0);
    }

    default:
        return 0;
    }
}

// Assembly:
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0x5d9b
cmpl $0x2, %eax
jne 0x5de6
movb $0x1, %al
cmpw $0x0, 0x2(%rdi)
je 0x5de8
movzbl 0x4(%rdi), %ecx
testl %ecx, %ecx
je 0x5de8
cmpl $0x7f, %ecx
je 0x5de8
cmpb $-0x20, %cl
setae %al
jmp 0x5de8
movb $0x1, %al
cmpw $0x0, 0x2(%rdi)
je 0x5de8
movzbl 0x8(%rdi), %ecx
cmpl $0xff, %ecx
je 0x5de8
cmpl $0xfe, %ecx
jne 0x5dc2
movb 0x9(%rdi), %cl
andb $-0x40, %cl
negb %cl
jo 0x5de8
movq 0x8(%rdi), %rcx
orq 0xf(%rdi), %rcx
jne 0x5dd2
cmpb $0x2, 0x17(%rdi)
jb 0x5de8
movl 0x10(%rdi), %eax
movl $0xffff0000, %ecx       # imm = 0xFFFF0000
xorq %rax, %rcx
orq 0x8(%rdi), %rcx
sete %al
jmp 0x5de8
xorl %eax, %eax
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: node_blacklisted
static int
node_blacklisted(const struct sockaddr *sa, int salen)
{
    int i;

    if((unsigned)salen > sizeof(struct sockaddr_storage))
        abort();

    if(dht_blacklisted(sa, salen))
        return 1;

    for(i = 0; i < DHT_MAX_BLACKLISTED; i++) {
        if(memcmp(&blacklist[i], sa, salen) == 0)
            return 1;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x81, %esi
jae 0x5e4a
movl %esi, %r14d
movq %rdi, %rbx
callq 0x2fed
movl $0x1, %ebp
testl %eax, %eax
jne 0x5e3f
movl %r14d, %r14d
xorl %r15d, %r15d
leaq 0x7eb3(%rip), %r12      # 0xdcd0
leaq (%r12,%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2260
testl %eax, %eax
je 0x5e3f
subq $-0x80, %r15
cmpq $0x500, %r15            # imm = 0x500
jne 0x5e1d
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2050
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: debug_printable
static void
debug_printable(const unsigned char *buf, int buflen)
{
    int i;
    if(dht_debug) {
        for(i = 0; i < buflen; i++)
            putc(buf[i] >= 32 && buf[i] <= 126 ? buf[i] : '.', dht_debug);
    }
}

// Assembly:
cmpq $0x0, 0x7da9(%rip)      # 0xdc00
sete %al
testl %esi, %esi
setle %cl
orb %al, %cl
jne 0x5e9f
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
xorl %r15d, %r15d
movzbl (%rbx,%r15), %eax
leal -0x20(%rax), %ecx
cmpb $0x5f, %cl
jb 0x5e83
movl $0x2e, %eax
movzbl %al, %edi
movq 0x7d73(%rip), %rsi      # 0xdc00
callq 0x21b0
incq %r15
cmpq %r15, %r14
jne 0x5e71
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: token_bucket
static int
token_bucket(void)
{
    if(token_bucket_tokens == 0) {
        token_bucket_tokens = MIN(MAX_TOKEN_BUCKET_TOKENS,
                                  100 * (now.tv_sec - token_bucket_time));
        token_bucket_time = now.tv_sec;
    }

    if(token_bucket_tokens == 0)
        return 0;

    token_bucket_tokens--;
    return 1;
}

// Assembly:
movl 0x7e02(%rip), %eax      # 0xdca8
testl %eax, %eax
jne 0x5edb
movq 0x7d5f(%rip), %rcx      # 0xdc10
movq %rcx, %rax
subq 0x7de5(%rip), %rax      # 0xdca0
imull $0x64, %eax, %edx
cmpq $0x4, %rax
movl $0x190, %eax            # imm = 0x190
cmovll %edx, %eax
movl %eax, 0x7dd8(%rip)      # 0xdca8
movq %rcx, 0x7dc9(%rip)      # 0xdca0
testl %eax, %eax
je 0x5ee9
decl %eax
movl %eax, 0x7dc5(%rip)      # 0xdca8
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x388f(%rip), %rdi      # 0x9795
xorl %eax, %eax
callq 0x362c
testq %r14, %r14
je 0x5fb5
movzwl (%rbx), %esi
movq %r14, %rdi
callq 0x42f4
testq %rax, %rax
je 0x5f3a
movl $0x3, 0xb8(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x8002
movq 0x7cc7(%rip), %r15      # 0xdc08
testq %r15, %r15
je 0x5fb5
movl 0xce0(%r15), %eax
testl %eax, %eax
jle 0x5fac
leaq 0x30(%r15), %r12
xorl %r13d, %r13d
movdqu (%r12), %xmm0
movdqu (%r14), %xmm1
pcmpeqb %xmm0, %xmm1
movd 0x10(%r12), %xmm0
movd 0x10(%r14), %xmm2
pcmpeqb %xmm0, %xmm2
pand %xmm1, %xmm2
pmovmskb %xmm2, %ecx
cmpl $0xffff, %ecx           # imm = 0xFFFF
jne 0x5f9a
movq %r12, %rdi
movq %r15, %rsi
callq 0x36da
movl 0xce0(%r15), %eax
incq %r13
movslq %eax, %rcx
addq $0xe8, %r12
cmpq %rcx, %r13
jl 0x5f58
movq 0xce8(%r15), %r15
jmp 0x5f41
movslq 0x7cdc(%rip), %r14      # 0xdc98
movq %r14, %rax
shlq $0x7, %rax
leaq 0x7d06(%rip), %rdi      # 0xdcd0
addq %rax, %rdi
movslq %ebp, %rdx
movq %rbx, %rsi
callq 0x2200
leal 0x1(%r14), %eax
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movl %eax, 0x7c99(%rip)      # 0xdc98
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: send_pong
int
send_pong(const struct sockaddr *sa, int salen,
          const unsigned char *tid, int tid_len)
{
    char buf[512];
    int i = 0, rc;
    rc = snprintf(buf + i, 512 - i, "d1:rd2:id20:"); INC(i, rc, 512);
    COPY(buf, i, myid, 20, 512);
    rc = snprintf(buf + i, 512 - i, "e1:t%d:", tid_len); INC(i, rc, 512);
    COPY(buf, i, tid, tid_len, 512);
    ADD_V(buf, i, 512);
    rc = snprintf(buf + i, 512 - i, "1:y1:re"); INC(i, rc, 512);
    return dht_send(buf, i, 0, sa, salen);

 fail:
    errno = ENOSPC;
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movl %ecx, %r12d
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movabsq $0x3a303264693a32, %rax # imm = 0x3A303264693A32
leaq 0x20(%rsp), %rdi
movq %rax, -0x1b(%rdi)
movabsq $0x693a3264723a3164, %rax # imm = 0x693A3264723A3164
movq %rax, -0x20(%rdi)
movl 0x71a5(%rip), %eax      # 0xdc40
movl %eax, -0x4(%rdi)
movaps 0x718b(%rip), %xmm0     # 0xdc30
movups %xmm0, -0x14(%rdi)
leaq 0x2e9c(%rip), %rdx      # 0x994c
movl $0x1e0, %esi            # imm = 0x1E0
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x6b3a
cmpl $0x1e0, %eax            # imm = 0x1E0
ja 0x6b3a
addl $0x20, %eax
leal (%rax,%r12), %ebp
cmpl $0x200, %ebp            # imm = 0x200
jg 0x6b3a
movl %eax, %eax
leaq (%rsp,%rax), %rdi
movl %r12d, %edx
movq %r15, %rsi
callq 0x2200
cmpb $0x1, 0x718e(%rip)      # 0xdc7c
jne 0x6b12
cmpl $0x1f7, %ebp            # imm = 0x1F7
ja 0x6b3a
movl %ebp, %eax
addl $0x9, %ebp
movb 0x7175(%rip), %cl       # 0xdc78
movb %cl, 0x8(%rsp,%rax)
movq 0x7162(%rip), %rcx      # 0xdc70
movq %rcx, (%rsp,%rax)
movl %ebp, %eax
leaq (%rsp,%rax), %rdi
movl $0x200, %esi            # imm = 0x200
subl %ebp, %esi
leaq 0x2e7f(%rip), %rdx      # 0x99a5
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x6b3a
addl %ebp, %eax
cmpl $0x200, %eax            # imm = 0x200
jle 0x6b55
callq 0x2060
movl $0x1c, (%rax)
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %esi
movq %rsp, %rdi
xorl %edx, %edx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x8043
jmp 0x6b45
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: send_error
static int
send_error(const struct sockaddr *sa, int salen,
           unsigned char *tid, int tid_len,
           int code, const char *message)
{
    char buf[512];
    int i = 0, rc, message_len;

    message_len = strlen(message);
    rc = snprintf(buf + i, 512 - i, "d1:eli%de%d:", code, message_len);
    INC(i, rc, 512);
    COPY(buf, i, message, message_len, 512);
    rc = snprintf(buf + i, 512 - i, "e1:t%d:", tid_len); INC(i, rc, 512);
    COPY(buf, i, tid, tid_len, 512);
    ADD_V(buf, i, 512);
    rc = snprintf(buf + i, 512 - i, "1:y1:ee"); INC(i, rc, 512);
    return dht_send(buf, i, 0, sa, salen);

 fail:
    errno = ENOSPC;
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %r8, %r13
movl %ecx, %r12d
movq %rdx, %r15
movl %esi, 0xc(%rsp)
movq %rdi, %r14
movq %r8, %rdi
callq 0x20f0
movq %rax, %rbp
leaq 0x2832(%rip), %rdx      # 0x99e0
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movl $0xcb, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x2110
cmpl $0x201, %eax            # imm = 0x201
setae %cl
testl %ebp, %ebp
sets %dl
orb %cl, %dl
jne 0x72b2
leal (%rax,%rbp), %ebx
cmpl $0x200, %ebx            # imm = 0x200
ja 0x72b2
movl %eax, %eax
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movq %r13, %rsi
movq %rbp, %rdx
callq 0x2200
movl %ebx, %eax
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
movl $0x200, %esi            # imm = 0x200
subl %ebx, %esi
leaq 0x272e(%rip), %rdx      # 0x994c
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x72b2
addl %ebx, %eax
cmpl $0x200, %eax            # imm = 0x200
ja 0x72b2
leal (%rax,%r12), %ebp
cmpl $0x200, %ebp            # imm = 0x200
jg 0x72b2
movl %eax, %eax
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
movl %r12d, %edx
movq %r15, %rsi
callq 0x2200
cmpb $0x1, 0x6a1b(%rip)      # 0xdc7c
jne 0x7286
cmpl $0x1f7, %ebp            # imm = 0x1F7
ja 0x72b2
movl %ebp, %eax
addl $0x9, %ebp
movb 0x6a02(%rip), %cl       # 0xdc78
movb %cl, 0x18(%rsp,%rax)
movq 0x69ef(%rip), %rcx      # 0xdc70
movq %rcx, 0x10(%rsp,%rax)
movl %ebp, %eax
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
movl $0x200, %esi            # imm = 0x200
subl %ebp, %esi
leaq 0x274f(%rip), %rdx      # 0x99ed
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x72b2
addl %ebp, %eax
cmpl $0x200, %eax            # imm = 0x200
jle 0x72cf
callq 0x2060
movl $0x1c, (%rax)
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %esi
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
movq %r14, %rcx
movl 0xc(%rsp), %r8d
callq 0x8043
jmp 0x72bd
// File: /workspace/github_c_makefile_star2_O3/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 %rax
movzwl (%rdi), %eax
cmpl $0x2, %eax
je 0x7303
cmpl $0xa, %eax
jne 0x7356
movl $0x10, %r9d
movl $0x8, %r8d
jmp 0x730f
movl $0x4, %r9d
movl $0x4, %r8d
movzwl 0x2(%rdi), %eax
rolw $0x8, %ax
addq %rdi, %r8
leaq 0x6(%rsp), %r10
movw %ax, (%r10)
testl %esi, %esi
leaq 0x6984(%rip), %rcx      # 0xdcb0
leaq 0x6995(%rip), %rax      # 0xdcc8
cmoveq %rcx, %rax
movq %rdx, %rdi
movl $0x8, %esi
movq %rax, %rdx
movl $0x8, %ecx
pushq $0x2
pushq %r10
callq 0x2ff0
addq $0x10, %rsp
popq %rax
retq
callq 0x2050
// File: /workspace/github_c_makefile_star2_O3/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:
xorl %eax, %eax
cmpl $0x8, %esi
jne 0x73bb
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %rdx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x72e7
movq (%r15), %rax
cmpq (%rbx), %rax
je 0x73ad
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0x72e7
movq (%r15), %rcx
xorl %eax, %eax
cmpq (%rbx), %rcx
sete %al
jmp 0x73b2
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: send_peer_announced
static int
send_peer_announced(const struct sockaddr *sa, int salen,
                    unsigned char *tid, int tid_len)
{
    char buf[512];
    int i = 0, rc;

    rc = snprintf(buf + i, 512 - i, "d1:rd2:id20:"); INC(i, rc, 512);
    COPY(buf, i, myid, 20, 512);
    rc = snprintf(buf + i, 512 - i, "e1:t%d:", tid_len);
    INC(i, rc, 512);
    COPY(buf, i, tid, tid_len, 512);
    ADD_V(buf, i, 512);
    rc = snprintf(buf + i, 512 - i, "1:y1:re"); INC(i, rc, 512);
    return dht_send(buf, i, 0, sa, salen);

 fail:
    errno = ENOSPC;
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movl %ecx, %r12d
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movabsq $0x3a303264693a32, %rax # imm = 0x3A303264693A32
leaq 0x20(%rsp), %rdi
movq %rax, -0x1b(%rdi)
movabsq $0x693a3264723a3164, %rax # imm = 0x693A3264723A3164
movq %rax, -0x20(%rdi)
movl 0x666d(%rip), %eax      # 0xdc40
movl %eax, -0x4(%rdi)
movaps 0x6653(%rip), %xmm0     # 0xdc30
movups %xmm0, -0x14(%rdi)
leaq 0x2364(%rip), %rdx      # 0x994c
movl $0x1e0, %esi            # imm = 0x1E0
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x7672
cmpl $0x1e0, %eax            # imm = 0x1E0
ja 0x7672
addl $0x20, %eax
leal (%rax,%r12), %ebp
cmpl $0x200, %ebp            # imm = 0x200
jg 0x7672
movl %eax, %eax
leaq (%rsp,%rax), %rdi
movl %r12d, %edx
movq %r15, %rsi
callq 0x2200
cmpb $0x1, 0x6656(%rip)      # 0xdc7c
jne 0x764a
cmpl $0x1f7, %ebp            # imm = 0x1F7
ja 0x7672
movl %ebp, %eax
addl $0x9, %ebp
movb 0x663d(%rip), %cl       # 0xdc78
movb %cl, 0x8(%rsp,%rax)
movq 0x662a(%rip), %rcx      # 0xdc70
movq %rcx, (%rsp,%rax)
movl %ebp, %eax
leaq (%rsp,%rax), %rdi
movl $0x200, %esi            # imm = 0x200
subl %ebp, %esi
leaq 0x2347(%rip), %rdx      # 0x99a5
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x7672
addl %ebp, %eax
cmpl $0x200, %eax            # imm = 0x200
jle 0x768d
callq 0x2060
movl $0x1c, (%rax)
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %esi
movq %rsp, %rdi
xorl %edx, %edx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x8043
jmp 0x767d
// File: /workspace/github_c_makefile_star2_O3/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 %rax
movzwl (%rsi), %eax
orl $0x8, %eax
cmpl $0xa, %eax
jne 0x7eba
xorl %ecx, %ecx
callq 0x600e
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x7eca
callq 0x2060
movl $0x61, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]dht/dht.c
// Function: send_ping
int
send_ping(const struct sockaddr *sa, int salen,
          const unsigned char *tid, int tid_len)
{
    char buf[512];
    int i = 0, rc;
    rc = snprintf(buf + i, 512 - i, "d1:ad2:id20:"); INC(i, rc, 512);
    COPY(buf, i, myid, 20, 512);
    rc = snprintf(buf + i, 512 - i, "e1:q4:ping1:t%d:", tid_len);
    INC(i, rc, 512);
    COPY(buf, i, tid, tid_len, 512);
    ADD_V(buf, i, 512);
    rc = snprintf(buf + i, 512 - i, "1:y1:qe"); INC(i, rc, 512);
    return dht_send(buf, i, 0, sa, salen);

 fail:
    errno = ENOSPC;
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movabsq $0x3a303264693a32, %rax # imm = 0x3A303264693A32
leaq 0x20(%rsp), %rdi
movq %rax, -0x1b(%rdi)
movabsq $0x693a3264613a3164, %rax # imm = 0x693A3264613A3164
movq %rax, -0x20(%rdi)
movl 0x5d04(%rip), %eax      # 0xdc40
movl %eax, -0x4(%rdi)
movaps 0x5cea(%rip), %xmm0     # 0xdc30
movups %xmm0, -0x14(%rdi)
leaq 0x1a36(%rip), %rdx      # 0x9987
movl $0x1e0, %esi            # imm = 0x1E0
movl $0x4, %ecx
xorl %eax, %eax
callq 0x2110
cmpl $0x1e0, %eax            # imm = 0x1E0
ja 0x7fd0
cmpl $0x1dc, %eax            # imm = 0x1DC
ja 0x7fd0
leal 0x24(%rax), %ebp
movl %eax, %ecx
movl (%r15), %edx
movl %edx, 0x20(%rsp,%rcx)
cmpb $0x1, 0x5cf9(%rip)      # 0xdc7c
jne 0x7fa8
cmpl $0x1d3, %eax            # imm = 0x1D3
ja 0x7fd0
movl %ebp, %ecx
addl $0x2d, %eax
movb 0x5ce1(%rip), %dl       # 0xdc78
movb %dl, 0x8(%rsp,%rcx)
movq 0x5cce(%rip), %rdx      # 0xdc70
movq %rdx, (%rsp,%rcx)
movl %eax, %ebp
movl %ebp, %eax
leaq (%rsp,%rax), %rdi
movl $0x200, %esi            # imm = 0x200
subl %ebp, %esi
leaq 0x170c(%rip), %rdx      # 0x96c8
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x7fd0
addl %ebp, %eax
cmpl $0x200, %eax            # imm = 0x200
jbe 0x7fee
callq 0x2060
movl $0x1c, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %esi
movq %rsp, %rdi
xorl %edx, %edx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x8043
jmp 0x7fe0
// File: /workspace/github_c_makefile_star2_O3/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:
movl 0xb8(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0xb8(%rdi)
movq 0x5bf8(%rip), %rcx      # 0xdc10
movq %rcx, 0xb0(%rdi)
cmpl $0x2, %eax
jl 0x8042
testq %rsi, %rsi
jne 0x803a
pushq %rax
movzwl 0x18(%rdi), %esi
callq 0x3593
movq %rax, %rsi
addq $0x8, %rsp
movq %rsi, %rdi
jmp 0x80e9
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %r8d, %r8d
je 0x80e4
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rdi
movl %r8d, %esi
callq 0x5dec
testl %eax, %eax
je 0x808c
leaq 0x1658(%rip), %rdi      # 0x96d0
xorl %eax, %eax
callq 0x362c
callq 0x2060
movl $0x1, (%rax)
jmp 0x80d6
movzwl (%r14), %eax
cmpl $0x2, %eax
je 0x80a3
cmpl $0xa, %eax
jne 0x80cb
leaq 0x412b(%rip), %rax      # 0xc1cc
jmp 0x80aa
leaq 0x411e(%rip), %rax      # 0xc1c8
movl (%rax), %edi
testl %edi, %edi
js 0x80cb
movq %r12, %rsi
movl %r15d, %edx
movl %ebp, %ecx
movq %r14, %r8
movl %ebx, %r9d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2fe5
callq 0x2060
movl $0x61, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2050
// File: /workspace/github_c_makefile_star2_O3/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:
cmpw $0x0, 0x30(%rdi)
je 0x8139
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
leaq 0x15f7(%rip), %rdi      # 0x96f9
xorl %eax, %eax
callq 0x362c
leaq 0x4(%rsp), %rdx
movl $0x6e70, (%rdx)         # imm = 0x6E70
movl 0xb0(%rbx), %esi
movq %r14, %rdi
callq 0x7f00
movw $0x0, 0x30(%rbx)
movl $0x0, 0xb0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x5abf(%rip), %r12      # 0xdc08
testq %r12, %r12
je 0x81a6
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movzwl (%r14), %eax
cmpl %eax, 0x4(%r12)
jne 0x8199
cmpl $0xd, 0xce0(%r12)
jg 0x8199
movl $0x0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x65de
testq %rax, %rax
je 0x8199
movq %r12, %rdi
movq %rax, %rsi
callq 0x6809
movq 0xce8(%r12), %r12
testq %r12, %r12
jne 0x8156
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
cmpl $0x0, 0x18(%rdi)
je 0x83cc
pushq %rbx
movq %rdi, %rbx
callq 0x2230
movslq 0x18(%rbx), %rcx
cqto
idivq %rcx
movq 0x28(%rbx), %rax
testq %rdx, %rdx
setg %cl
testq %rax, %rax
setne %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0x83ca
movq 0xc0(%rax), %rax
cmpl $0x2, %edx
jb 0x83ca
decl %edx
testq %rax, %rax
jne 0x83b7
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq 0x28(%rcx), %r12
testq %r12, %r12
je 0x874a
movq %rdx, %r14
movq %rdi, %r15
cmpl $0x2, 0xb8(%r12)
jg 0x8739
movq 0x5664(%rip), %rax      # 0xdc10
leaq -0x1c20(%rax), %rcx
cmpq %rcx, 0xa8(%r12)
jl 0x8739
addq $-0x384, %rax           # imm = 0xFC7C
cmpq %rax, 0xa0(%r12)
jl 0x8739
movzwl 0x18(%r12), %eax
movl $0x1a, %ebp
cmpl $0x2, %eax
je 0x85f3
cmpl $0xa, %eax
jne 0x875b
movl $0x26, %ebp
testl %ebx, %ebx
jle 0x8684
movl %ebp, %ecx
movl %ebx, %edx
movdqu (%r12), %xmm0
movd 0x10(%r12), %xmm1
movq %r15, %rsi
xorl %r13d, %r13d
movq %r13, %rdi
imulq %rcx, %rdi
movdqu (%r15,%rdi), %xmm2
pcmpeqb %xmm0, %xmm2
movd 0x10(%r15,%rdi), %xmm3
pcmpeqb %xmm1, %xmm3
pand %xmm2, %xmm3
pmovmskb %xmm3, %edi
cmpl $0xffff, %edi           # imm = 0xFFFF
je 0x8739
xorl %edi, %edi
movb (%r12,%rdi), %r8b
movb (%rsi,%rdi), %r9b
cmpb %r9b, %r8b
jne 0x865c
incq %rdi
cmpq $0x14, %rdi
jne 0x8644
jmp 0x866b
movb (%r14,%rdi), %dil
xorb %dil, %r8b
xorb %dil, %r9b
cmpb %r9b, %r8b
jb 0x8679
incq %r13
addq %rcx, %rsi
cmpq %rdx, %r13
jne 0x8612
movl %ebx, %r13d
cmpl $0x8, %r13d
jne 0x8687
jmp 0x8739
xorl %r13d, %r13d
xorl %ecx, %ecx
cmpl $0x8, %ebx
setl %cl
movl %ebx, %edx
addl %ecx, %ebx
addl %edx, %ecx
decl %ecx
cmpl %ecx, %r13d
jge 0x86c7
leal 0x1(%r13), %edi
imull %ebp, %edi
addq %r15, %rdi
movl %r13d, %esi
imull %ebp, %esi
addq %r15, %rsi
movl %r13d, %eax
notl %eax
addl %ebx, %eax
imull %ebp, %eax
movslq %eax, %rdx
callq 0x2290
movzwl 0x18(%r12), %eax
cmpw $0xa, %ax
je 0x8707
movzwl %ax, %eax
cmpl $0x2, %eax
jne 0x875b
movl %r13d, %eax
movl %ebp, %ecx
imulq %rax, %rcx
movl 0x10(%r12), %edx
leaq (%r15,%rcx), %rax
addq $0x18, %rax
movl %edx, -0x8(%rax)
movdqu (%r12), %xmm0
movdqu %xmm0, -0x18(%rax)
movl 0x1c(%r12), %ecx
movl %ecx, -0x4(%rax)
jmp 0x8730
imull %ebp, %r13d
movl 0x10(%r12), %ecx
leaq (%r15,%r13), %rax
addq $0x24, %rax
movl %ecx, -0x14(%rax)
movups (%r12), %xmm0
movups %xmm0, -0x24(%rax)
movdqu 0x20(%r12), %xmm0
movdqu %xmm0, -0x10(%rax)
movzwl 0x1a(%r12), %ecx
movw %cx, (%rax)
movq 0xc0(%r12), %r12
testq %r12, %r12
jne 0x8596
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2050
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq (%rsi), %r13
xorl %r15d, %r15d
cmpb $0x0, (%r13)
je 0x1236
movl %edi, -0x3c(%rbp)
callq 0x10b0
movq %rax, -0x38(%rbp)
xorl %ebx, %ebx
movq -0x38(%rbp), %rax
movq (%rax), %rax
movsbq (%r13,%rbx), %r12
testb $0xc, 0x1(%rax,%r12,2)
je 0x1220
callq 0x10a0
movq (%rax), %rax
movb (%rax,%r12,4), %al
movslq %r15d, %rcx
incl %r15d
movq -0x30(%rbp), %rdx
movb %al, (%rdx,%rcx)
movq (%r14), %r13
incq %rbx
movq %r13, %rdi
callq 0x1040
cmpq %rbx, %rax
ja 0x11ef
movslq %r15d, %r15
movl -0x3c(%rbp), %edi
movq -0x30(%rbp), %rax
movb $0x0, (%rax,%r15)
cmpl $0x2, %edi
jl 0x12ac
movl %edi, %eax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
leaq 0xff(%rax), %r13
movl $0x1, %r12d
movq (%r14,%r12,8), %r15
cmpb $0x0, (%r15)
je 0x1288
xorl %ebx, %ebx
movb (%r15,%rbx), %al
movb %al, (%r13,%rbx)
incq %rbx
movq (%r14,%r12,8), %r15
movq %r15, %rdi
callq 0x1040
cmpq %rbx, %rax
ja 0x1267
movl %ebx, %eax
jmp 0x128a
xorl %eax, %eax
movq %r12, %rcx
shlq $0x8, %rcx
subq %r12, %rcx
addq -0x30(%rbp), %rcx
movb $0x0, (%rax,%rcx)
incq %r12
addq $0xff, %r13
cmpq -0x38(%rbp), %r12
jne 0x125b
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jne 0x12e1
movq 0x2d09(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x133b
jmp 0x1320
movq %rsi, %rbx
movl %edi, %r12d
movl $0x1, %r13d
leaq 0xd10(%rip), %r14       # 0x2004
movq (%rbx,%r13,8), %rdi
movq %r14, %rsi
callq 0x1070
testq %rax, %rax
je 0x1331
movq %rax, %r15
movq %rax, %rdi
callq 0x133b
movq %r15, %rdi
callq 0x1030
incq %r13
cmpl %r13d, %r12d
jne 0x12f4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0xcad(%rip), %rdi       # 0x2006
leaq 0xca4(%rip), %rsi       # 0x2004
callq 0x1070
testq %rax, %rax
je 0x13f1
movq %rax, %r14
leaq -0x230(%rbp), %rdi
movl $0x202, %esi            # imm = 0x202
movq %rbx, %rdx
callq 0x1060
testq %rax, %rax
je 0x13df
xorl %r13d, %r13d
movq 0x2c44(%rip), %r12      # 0x3fd8
leaq -0x230(%rbp), %r15
cmpl $0x18, %r13d
jne 0x13b6
movq %r14, %rdi
callq 0x13fb
testl %eax, %eax
je 0x13df
movl $0x18, %r13d
subl %eax, %r13d
movq (%r12), %rsi
movq %r15, %rdi
callq 0x1050
cmpl $-0x1, %eax
je 0x13f1
incl %r13d
movq %r15, %rdi
movl $0x202, %esi            # imm = 0x202
movq %rbx, %rdx
callq 0x1060
testq %rax, %rax
jne 0x139b
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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:
xorl %eax, %eax
movsd 0xe02(%rip), %xmm1      # 0x2008
ucomisd %xmm0, %xmm1
ja 0x122b
ucomisd 0xdfc(%rip), %xmm0      # 0x2010
ja 0x122b
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
movl $0x1, %eax
ucomisd %xmm0, %xmm1
jne 0x122c
jp 0x122c
retq
pushq %rax
cvttsd2si %xmm0, %edx
movq 0x2dc0(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xde6(%rip), %rsi       # 0x2028
movb $0x1, %al
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movss %xmm3, 0xc(%rsp)
movaps %xmm2, 0x20(%rsp)
movss %xmm1, 0x8(%rsp)
movaps %xmm0, 0x10(%rsp)
movss 0x39e7(%rip), %xmm1     # 0x913c
movss 0x39e3(%rip), %xmm0     # 0x9140
xorl %ebp, %ebp
movss %xmm1, 0x4(%rsp)
movaps %xmm0, %xmm1
mulss 0x20(%rsp), %xmm1
addss 0x10(%rsp), %xmm1
movss %xmm1, %xmm2            # xmm2 = xmm1[0],xmm2[1,2,3]
movaps %xmm0, %xmm1
movss %xmm0, (%rsp)
mulss 0xc(%rsp), %xmm1
addss 0x8(%rsp), %xmm1
movaps %xmm2, 0x30(%rsp)
movaps %xmm2, %xmm0
movq %rbx, %rdi
callq 0x7eb5
testl %eax, %eax
je 0x57b1
movss 0x4(%rsp), %xmm1
movss (%rsp), %xmm0
subss %xmm1, %xmm0
jmp 0x57c4
movss (%rsp), %xmm0
testl %ebp, %ebp
movss 0x4(%rsp), %xmm1
je 0x57da
addss %xmm1, %xmm0
mulss 0x3970(%rip), %xmm1     # 0x913c
decl %ebp
cmpl $-0x7, %ebp
movaps 0x30(%rsp), %xmm2
jne 0x575f
jmp 0x57e2
movss 0x394a(%rip), %xmm0     # 0x912c
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3185(%rip), %rsi      # 0x9ec0
movq %r14, %rdx
xorl %eax, %eax
callq 0x1150
leaq 0x29d1(%rip), %rsi      # 0x971d
movq %r14, %rdi
callq 0x11a0
testq %rax, %rax
je 0x6df0
movq %rax, %r14
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rax, %rdx
callq 0x1130
testq %rax, %rax
je 0x6de8
movq %rsp, %r15
leaq 0x3154(%rip), %r12      # 0x9ed3
movq %r15, %rdi
callq 0x10d0
cmpq $0x3, %rax
jb 0x6dd3
movb (%rsp), %al
cmpb $0x23, %al
je 0x6dd3
cmpb $0x20, %al
je 0x6dd3
cmpb $0x9, %al
je 0x6dd3
movq %r15, %rdi
movl $0x23, %esi
callq 0x10e0
testq %rax, %rax
jne 0x6dc0
movq %r15, %rdi
movl $0xa, %esi
callq 0x10e0
testq %rax, %rax
je 0x6dc3
movb $0x0, (%rax)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1150
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x1130
testq %rax, %rax
jne 0x6d7f
movq %r14, %rdi
callq 0x10c0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/ksw2/kalloc.c
// Function: km_destroy
void km_destroy(void *_km)
{
	kmem_t *km = (kmem_t*)_km;
	allocated_t *p, *q;
	if (km == 0) return;
	p = &km->list_head;
	do {
		q = p->next;
		free(p->ptr);
		if (p != &km->list_head) free(p);
		p = q;
	} while (p && p->next);
	if (p != &km->list_head) free(p);
	free(km);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1fb9b6
movq %rdi, %rbx
leaq 0x18(%rdi), %r12
movq 0x18(%rdi), %rax
movq %r12, %r15
movq %rax, %r14
movq 0x8(%r15), %rdi
callq 0x19e120
cmpq %r12, %r15
je 0x1fb99f
movq %r15, %rdi
callq 0x19e120
testq %r14, %r14
je 0x1fb9c2
movq (%r14), %rax
movq %r14, %r15
testq %rax, %rax
jne 0x1fb986
cmpq %r12, %r14
jne 0x1fb9c5
jmp 0x1fb9cd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r14d, %r14d
movq %r14, %rdi
callq 0x19e120
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x19e120
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/ksw2/kalloc.c
// Function: krealloc
void *krealloc(void *_km, void *ap, size_t n_bytes)
{
	kmem_t *km = (kmem_t*)_km;
	size_t n_units, *p, *q;

	if (n_bytes == 0) {
		kfree(km, ap); return 0;
	}
	if (km == 0) return realloc(ap, n_bytes);
	if (!ap) return kmalloc(km, n_bytes);
	n_units = 1 + (n_bytes + sizeof(size_t) - 1) / sizeof(size_t);
	p = (size_t*)ap - 1;
	if (*p >= n_units) return ap; /* TODO: this prevents shrinking */
	q = (size_t*)kmalloc(km, n_bytes);
	memcpy(q, ap, (*p - 1) * sizeof(size_t));
	kfree(km, ap);
	return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x1fbafe
testq %r14, %r14
je 0x1fbb14
testq %rbx, %rbx
je 0x1fbb24
leaq 0x7(%rdx), %rax
shrq $0x3, %rax
cmpq %rax, -0x8(%rbx)
ja 0x1fbb0b
movq %r14, %rdi
movq %rdx, %rsi
callq 0x1fbb34
movq %rax, %r15
movq -0x8(%rbx), %rax
leaq -0x8(,%rax,8), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x19e0c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1fb9e0
movq %r15, %rbx
jmp 0x1fbb0b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1fb9e0
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %rdx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x19e1e0
movq %r14, %rdi
movq %rdx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1fbb34
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/ksw2/kalloc.c
// Function: kmalloc
void *kmalloc(void *_km, size_t n_bytes)
{
	kmem_t *km = (kmem_t*)_km;
	size_t n_units, *p, *q;

	if (n_bytes == 0) return 0;
	if (km == 0) return malloc(n_bytes);
	/* "n_units" means the number of units. The size of one unit equals to sizeof(kheader_t).
	 * "1" is the kheader_t of a block, which is always required. */
	n_units = 1 + (n_bytes + sizeof(size_t) - 1) / sizeof(size_t);
	if (n_units&1) ++n_units; /* make n_units an even number, or it will segfault if only one unit remains */

	if (!(q = km->loop_head)) { /* the first time when kmalloc() is called, intialization */
		km->base[1] = (size_t)(km->loop_head = q = km->base); *q = 0;
	}
	for (p = PTR(q);; q = p, p = PTR(p)) { /* search for a suitable block */
		if (*p >= n_units) { /* p->size if the size of current block. This line means the current block is large enough. */
			if (*p == n_units) q[1] = (size_t)PTR(p); /* no need to split the block */
			else { /* split the block */
				/* memory is allocated at the end of the block */
				*p -= n_units; /* reduce the size of the free block */
				p += *p; /* skip to the kheader_t of the allocated block */
				*p = n_units; /* set the size */
			}
			km->loop_head = q; /* set the end of chain */
			return p + 1; /* skip the kheader_t */
		}
		if (p == km->loop_head) { /* then ask for more "cores" */
			if ((p = morecore(km, n_units)) == 0) return 0;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1fbc59
movq %rdi, %rbx
testq %rdi, %rdi
je 0x1fbb80
addq $0x7, %rsi
movq %rsi, %r12
shrq $0x3, %r12
andl $0x8, %esi
cmpq $0x1, %rsi
adcq $0x1, %r12
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x1fbb96
movq 0x8(%rcx), %rax
movq (%rax), %rsi
cmpq %r12, %rsi
jb 0x1fbbab
jmp 0x1fbc4a
movq %rsi, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19e150
movq %rbx, 0x10(%rbx)
movq %rbx, 0x8(%rbx)
movq $0x0, (%rbx)
movq %rbx, %rcx
movq %rbx, %rax
leaq 0xfffff(%r12), %rdx
movabsq $0x7ffffffffff00000, %r13 # imm = 0x7FFFFFFFFFF00000
andq %rdx, %r13
leaq (,%r13,8), %r14
leaq 0x18(%rbx), %rdx
movq %rdx, (%rsp)
movq %rcx, %rdx
movq %rax, %rdi
cmpq %rdi, %rdx
jne 0x1fbc38
movq %r14, %rdi
callq 0x19e150
testq %rax, %rax
je 0x1fbc7e
movq %rax, %r15
movq 0x28(%rbx), %rbp
testq %rbp, %rbp
cmoveq (%rsp), %rbp
movq %rax, 0x8(%rbp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x19e0b0
movq %rax, (%rbp)
movq %rax, 0x28(%rbx)
addq %r14, 0x30(%rbx)
movq %r13, (%r15)
addq $0x8, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1fb9e0
movq 0x10(%rbx), %rdx
movq %rdx, %rdi
testq %rdx, %rdx
je 0x1fbc59
movq 0x8(%rdi), %rax
movq (%rax), %rsi
movq %rdi, %rcx
movq %rax, %rdi
cmpq %r12, %rsi
jb 0x1fbbd6
subq %r12, %rsi
jne 0x1fbc5d
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
jmp 0x1fbc67
xorl %eax, %eax
jmp 0x1fbc6f
movq %rsi, (%rax)
leaq (%rax,%rsi,8), %rax
movq %r12, (%rax)
movq %rcx, 0x10(%rbx)
addq $0x8, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19e270
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/ksw2/kalloc.c
// Function: kcalloc
void *kcalloc(void *_km, size_t count, size_t size)
{
	kmem_t *km = (kmem_t*)_km;
	void *p;
	if (size == 0 || count == 0) return 0;
	if (km == 0) return calloc(count, size);
	p = kmalloc(km, count * size);
	memset(p, 0, count * size);
	return p;
}

// Assembly:
pushq %rbx
testq %rdx, %rdx
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x1fbc9e
xorl %eax, %eax
popq %rbx
retq
movq %rdx, %rbx
testq %rdi, %rdi
je 0x1fbcc0
imulq %rsi, %rbx
movq %rbx, %rsi
callq 0x1fbb34
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x19e090
movq %rsi, %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x19e0b0
// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/ksw2/kalloc.c
// Function: km_stat
void km_stat(const void *_km)
{
	kmem_t *km = (kmem_t*)_km;
	unsigned n_blocks, n_units;
	size_t max_block = 0, *p, *q;
	float frag;

	if (km == 0 || !(p = km->loop_head)) return;
	n_blocks = n_units = 0;
	do {
		q = PTR(p);
		if (*p > max_block) max_block = *p;
		n_units += *p;
		if (p + (*p) > q && q > p)
			kerror("[kr_stat] The end of a free block enters another free block.");
		p = q;
		++n_blocks;
	} while (p != km->loop_head);
	
	--n_blocks;
	frag = 1.0/1024.0 * n_units * sizeof(size_t) / n_blocks;
	fprintf(stderr, "[kr_stat] tot=%lu, free=%lu, n_block=%u, max_block=%lu, frag_len=%.3fK\n",
			km->total_allocated, n_units * sizeof(size_t), n_blocks, max_block * sizeof(size_t), frag);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1fbcde
movq %rdi, %rdx
movq 0x10(%rdi), %rax
testq %rax, %rax
jne 0x1fbce0
popq %rax
retq
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movq %rax, %r10
xorl %edi, %edi
movq (%r10), %r9
movq 0x8(%r10), %r8
leaq (%r10,%r9,8), %r11
cmpq %r8, %r11
setbe %r11b
cmpq %r8, %r10
setae %r10b
orb %r11b, %r10b
je 0x1fbd25
addq %r9, %rdi
cmpq %rcx, %r9
cmovaq %r9, %rcx
incl %esi
movq %r8, %r10
cmpq %r8, %rax
jne 0x1fbcec
callq 0x19e29c
jmp 0x1fbcde
callq 0x19e2f4
nop