LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/prefix.c
// Function: flush_assigned
void
flush_assigned(struct interface *interface, struct assigned_prefix *ap)
{
    int n = ap - interface->assigned;
    assert(n >= 0 && n < interface->numassigned);

    destroy_assigned(interface, ap);
    if(n < interface->numassigned - 1)
        interface->assigned[n] =
            interface->assigned[interface->numassigned - 1];
    interface->numassigned--;

    if(interface->numassigned == 0) {
        free(interface->assigned);
        interface->assigned = NULL;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
subq 0x60(%rdi), %rax
sarq $0x4, %rax
movabsq $0x6db6db6db6db6db7, %r14 # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %r14
testl %r14d, %r14d
js 0xa461
movq %rdi, %rbx
cmpl %r14d, 0x68(%rdi)
jle 0xa461
movq %rbx, %rdi
callq 0xa21f
movl 0x68(%rbx), %ecx
leal -0x1(%rcx), %eax
cmpl %r14d, %eax
jle 0xa441
movq 0x60(%rbx), %rcx
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
imulq $0x70, %r14, %rdi
addq %rcx, %rdi
movl %eax, %eax
imulq $0x70, %rax, %rsi
addq %rcx, %rsi
movl $0xe, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl 0x68(%rbx), %ecx
decl %ecx
movl %ecx, 0x68(%rbx)
jne 0xa459
movq 0x60(%rbx), %rdi
callq 0x2040
movq $0x0, 0x60(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3c27(%rip), %rdi      # 0xe08f
leaq 0x3ac4(%rip), %rsi      # 0xdf33
leaq 0x3c3e(%rip), %rcx      # 0xe0b4
movl $0x326, %edx            # imm = 0x326
callq 0x2150
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/prefix.c
// Function: prefix_assignment_cleanup
void
prefix_assignment_cleanup()
{
    int i;
    for(i = 0; i < numinterfaces; i++) {
        while(interfaces[i].numassigned > 0)
            flush_assigned(&interfaces[i], &interfaces[i].assigned[0]);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x865b(%rip), %r14      # 0x132a0
movl (%r14), %eax
testl %eax, %eax
jle 0xac88
xorl %r15d, %r15d
leaq 0x865a(%rip), %r12      # 0x132b0
imulq $0x98, %r15, %rbx
cmpl $0x0, 0x68(%r12,%rbx)
jle 0xac7d
addq %r12, %rbx
movq 0x60(%rbx), %rsi
movq %rbx, %rdi
callq 0xa3dd
cmpl $0x0, 0x68(%rbx)
jg 0xac68
movl (%r14), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0xac56
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/local.c
// Function: run_local_script
int
run_local_script(int up)
{
    pid_t pid;
    if(local_script == NULL || local_script[0] == '\0')
        return 0;

    debugf("Calling local configuration script (%d).\n", up);

    pid = fork();
    if(pid < 0)
        return pid;

    if(pid == 0) {
        char buf[20];
        snprintf(buf, 20, "%d", debug_level);
        setenv("HNCP_DEBUG_LEVEL", buf, 1);
        if(up) {
            struct prefix_list *pl;
            pl = all_dhcp_data(0, 1, 0);
            set_config_var("HNCP_IPv4_NAMESERVERS", pl, 1);
            destroy_prefix_list(pl);
            pl = all_dhcp_data(0, 0, 1);
            set_config_var("HNCP_IPv6_NAMESERVERS", pl, 0);
            destroy_prefix_list(pl);
            pl = all_dhcp_data(1, 1, 0);
            set_config_var("HNCP_IPv4_NTP_SERVERS", pl, 1);
            destroy_prefix_list(pl);
            pl = all_dhcp_data(1, 0, 1);
            set_config_var("HNCP_IPv6_NTP_SERVERS", pl, 0);
            destroy_prefix_list(pl);
        }
        execl(local_script, local_script, up ? "up" : "down" , NULL);
        perror("exec(local_script)");
        exit(42);
    } else {
        int status;
    again:
        pid = waitpid(pid, &status, 0);
        if(pid < 0) {
            if(errno == EINTR)
                goto again;
            perror("wait");
            return -1;
        } else if(!WIFEXITED(status)) {
            fprintf(stderr, "Configuration script died violently (%d)\n",
                    status);
            return 0;
        } else if(WEXITSTATUS(status) != 0) {
            fprintf(stderr, "Configuration script erred out %d\n",
                    WEXITSTATUS(status));
            return 0;
        }
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq 0xc7f5(%rip), %rax      # 0x17498
xorl %ebx, %ebx
testq %rax, %rax
je 0xad18
cmpb $0x0, (%rax)
je 0xad18
movl %edi, %ebp
leaq 0x85a0(%rip), %rax      # 0x13258
cmpl $0x2, (%rax)
jge 0xad23
callq 0x2380
movl %eax, %ebx
testl %eax, %eax
js 0xad18
je 0xad69
movq %rsp, %r14
movl %ebx, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x22c0
testl %eax, %eax
jns 0xad00
movl %eax, %ebx
callq 0x2060
cmpl $0x4, (%rax)
je 0xacd1
leaq 0x3553(%rip), %rdi      # 0xe247
callq 0x22e0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xad18
movl (%rsp), %edx
testb $0x7f, %dl
jne 0xad3a
shrl $0x8, %edx
movl $0x1, %ebx
andl $0xff, %edx
jne 0xad4d
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x346f(%rip), %rsi      # 0xe199
movl $0x2, %edi
movl %ebp, %edx
xorl %eax, %eax
callq 0x30a8
jmp 0xacbd
movq 0x82b7(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x3501(%rip), %rsi      # 0xe24c
jmp 0xad5e
movq 0x82a4(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x3518(%rip), %rsi      # 0xe276
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x21d0
jmp 0xad18
movq %rsp, %rdi
movl %ebp, %esi
callq 0x2f96
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/local.c
// Function: set_config_var
static int
set_config_var(const char *name, const struct prefix_list *pl, int v4)
{
    char buf[(INET6_ADDRSTRLEN + 1) * 20];

    if(pl && pl->prefixes > 0) {
        int i;
        buf[0] = '\0';
        for(i = 0; i < pl->numprefixes; i++) {
            char a[INET6_ADDRSTRLEN];
            if(v4)
                inet_ntop(AF_INET, (char*)&pl->prefixes[i].p + 12,
                          a, sizeof(a));
            else
                inet_ntop(AF_INET6, &pl->prefixes[i].p, a, sizeof(a));
            if(i > 0)
                strncat(buf, " ", sizeof(buf) - strlen(a));
            strncat(buf, a, sizeof(buf) - strlen(a));
        }
        return setenv(name, buf, 1);
    }
    return 0;
}

// Assembly:
testq %rsi, %rsi
je 0xae60
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movq %rsi, %r14
cmpq $0x0, (%rsi)
je 0xae4f
movq %rdi, 0x8(%rsp)
movb $0x0, 0x40(%rsp)
cmpw $0x0, 0x8(%r14)
jle 0xae3b
movl %edx, %ebp
xorl %ebx, %ebx
leaq 0x10(%rsp), %r15
leaq 0x40(%rsp), %r12
xorl %r13d, %r13d
movq (%r14), %rsi
testl %ebp, %ebp
je 0xadd6
addq %rbx, %rsi
addq $0xc, %rsi
movl $0x2, %edi
jmp 0xadde
addq %rbx, %rsi
movl $0xa, %edi
movq %r15, %rdx
movl $0x2e, %ecx
callq 0x2030
testq %rbx, %rbx
je 0xae0f
movq %r15, %rdi
callq 0x20e0
movl $0x3ac, %edx            # imm = 0x3AC
subq %rax, %rdx
movq %r12, %rdi
leaq 0x2eca(%rip), %rsi      # 0xdcd4
callq 0x2180
movq %r15, %rdi
callq 0x20e0
movl $0x3ac, %edx            # imm = 0x3AC
subq %rax, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2180
incq %r13
movswq 0x8(%r14), %rax
addq $0x1c, %rbx
cmpq %rax, %r13
jl 0xadc1
leaq 0x40(%rsp), %rsi
movq 0x8(%rsp), %rdi
movl $0x1, %edx
callq 0x20d0
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/trickle.c
// Function: trickle_init
void
trickle_init(struct trickle_state *s, int I_min, int I_max, int k)
{
    memset(s, 0, sizeof(*s));
    s->I_min = I_min;
    s->I_max = I_max;
    s->k = k;

    s->I = I_min + (random() % (I_max - I_min));
    trickle_new_interval(s);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
callq 0x2230
subl %r14d, %ebp
movslq %ebp, %rcx
cqto
idivq %rcx
addl %r14d, %edx
movl %edx, 0xc(%rbx)
xorl %ebp, %ebp
movl %ebp, 0x10(%rbx)
movl %edx, %r14d
shrl $0x1f, %r14d
addl %edx, %r14d
sarl %r14d
callq 0x2230
movl 0xc(%rbx), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
movslq %edx, %rcx
cqto
idivq %rcx
addl %r14d, %edx
movl %edx, 0x14(%rbx)
leaq 0x8397(%rip), %rax      # 0x13270
movups (%rax), %xmm0
movups %xmm0, 0x20(%rbx)
movl %ebp, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/trickle.c
// Function: trickle_trigger
int
trickle_trigger(struct trickle_state *s)
{
    if(!s->triggered) {
        struct timespec tt;
        ts_add_msec(&tt, &s->I_start, s->t);
        if(ts_compare(&now, &tt) >= 0) {
            s->triggered = 1;
            return s->c < s->k;
        }
    } else {
        struct timespec tI;
        ts_add_msec(&tI, &s->I_start, s->I);
        if(ts_compare(&now, &tI) >= 0) {
            s->I = min(2 * s->I, s->I_max);
            trickle_new_interval(s);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
cmpl $0x0, 0x18(%rdi)
je 0xb018
movl 0xc(%rbx), %edx
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xb514
leaq 0x82b9(%rip), %r15      # 0x13270
movq %r15, %rdi
movq %r12, %rsi
callq 0xb464
testl %eax, %eax
js 0xb050
movl 0x4(%rbx), %eax
movl 0xc(%rbx), %ecx
addl %ecx, %ecx
cmpl %eax, %ecx
cmovgel %eax, %ecx
movl %ecx, 0xc(%rbx)
xorl %ebp, %ebp
movl %ebp, 0x10(%rbx)
movl %ecx, %r12d
shrl $0x1f, %r12d
addl %ecx, %r12d
sarl %r12d
callq 0x2230
movl 0xc(%rbx), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
movslq %edx, %rcx
cqto
idivq %rcx
addl %r12d, %edx
movl %edx, 0x14(%rbx)
movups (%r15), %xmm0
movups %xmm0, (%r14)
movl %ebp, 0x18(%rbx)
jmp 0xb050
movl 0x14(%rbx), %edx
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xb514
leaq 0x8240(%rip), %rdi      # 0x13270
movq %r15, %rsi
callq 0xb464
testl %eax, %eax
js 0xb050
movl $0x1, 0x18(%rbx)
movl 0x10(%rbx), %ecx
xorl %eax, %eax
cmpl 0x8(%rbx), %ecx
setl %al
jmp 0xb052
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/trickle.c
// Function: trickle_reset
void
trickle_reset(struct trickle_state *s, int consistent)
{
    if(consistent) {
        s->c++;
    } else if(s->I > s->I_min) {
        s->I = s->I_min;
        trickle_new_interval(s);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0xb06f
incl 0x10(%rbx)
jmp 0xb0bb
movl (%rbx), %eax
cmpl %eax, 0xc(%rbx)
jle 0xb0bb
movl %eax, 0xc(%rbx)
xorl %ebp, %ebp
movl %ebp, 0x10(%rbx)
movl %eax, %r14d
shrl $0x1f, %r14d
addl %eax, %r14d
sarl %r14d
callq 0x2230
movl 0xc(%rbx), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
movslq %edx, %rcx
cqto
idivq %rcx
addl %r14d, %edx
movl %edx, 0x14(%rbx)
leaq 0x81bf(%rip), %rax      # 0x13270
movups (%rax), %xmm0
movups %xmm0, 0x20(%rbx)
movl %ebp, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/kernel.c
// Function: kernel_address
int
kernel_address(int ifindex, const char *ifname,
               const struct in6_addr *address, int plen,
               int add)
{
    char b[INET6_ADDRSTRLEN];
    char c[INET6_ADDRSTRLEN + 80];
    int rc;

    if(memcmp(address, v4prefix, 12) == 0) {
        inet_ntop(AF_INET, (char*)address + 12, b, sizeof(b));
        plen -= 96;
    } else {
        inet_ntop(AF_INET6, address, b, sizeof(b));
    }

    rc = snprintf(c, sizeof(c), "ip addr %s %s/%d dev %s",
                  add ? "add" : "del", b, plen, ifname);
    if(rc < 1 || rc >= sizeof(c)) {
        errno = ENOSPC;
        return -1;
    }

    rc = system(c);
    if(rc >= 0 && WIFEXITED(rc) && WEXITSTATUS(rc) == 0)
        return 1;

    return -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movl %r8d, %ebp
movl %ecx, %ebx
movq %rsi, %r14
movl 0x8(%rdx), %eax
movl $0xffff0000, %ecx       # imm = 0xFFFF0000
xorq %rax, %rcx
orq (%rdx), %rcx
je 0xb0ff
leaq 0x10(%rsp), %rax
movl $0xa, %edi
movq %rdx, %rsi
movq %rax, %rdx
movl $0x2e, %ecx
callq 0x2030
jmp 0xb120
addq $0xc, %rdx
leaq 0x10(%rsp), %rax
movl $0x2, %edi
movq %rdx, %rsi
movq %rax, %rdx
movl $0x2e, %ecx
callq 0x2030
addl $-0x60, %ebx
testl %ebp, %ebp
leaq 0x31a3(%rip), %rax      # 0xe2cc
leaq 0x3198(%rip), %rcx      # 0xe2c8
cmoveq %rax, %rcx
movq %r14, (%rsp)
leaq 0x3171(%rip), %rdx      # 0xe2b0
xorl %ebp, %ebp
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %r8
movl $0x7e, %esi
movl %ebx, %r9d
xorl %eax, %eax
callq 0x2140
addl $-0x7e, %eax
cmpl $-0x7e, %eax
ja 0xb174
callq 0x2060
movl $0x1c, (%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xb18a
leaq 0x40(%rsp), %rdi
callq 0x2100
andl $0x8000ff7f, %eax       # imm = 0x8000FF7F
negl %eax
sbbl %ebp, %ebp
orl $0x1, %ebp
movl %ebp, %eax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/kernel.c
// Function: kernel_router
int
kernel_router()
{
    char buf[100];
    int fd, rc;
    int router;

    fd = open("/proc/sys/net/ipv6/conf/all/forwarding", O_RDONLY);
    if(fd < 0)
        return -1;

    rc = read(fd, buf, 99);
    if(rc < 0) {
        close(fd);
        return -1;
    }
    close(fd);

    buf[rc] = '\0';

    router = atoi(buf);

    if(!router)
        return 0;

    rc = system("ip -6 route show | grep -q '^default '");
    return WIFEXITED(rc) && WEXITSTATUS(rc) == 1 ? 1 : 2;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
leaq 0x2fc5(%rip), %rdi      # 0xe343
xorl %esi, %esi
xorl %eax, %eax
callq 0x22d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0xb3e9
movl %eax, %ebp
movq %rsp, %rsi
movl $0x63, %edx
movl %eax, %edi
callq 0x21a0
movq %rax, %r14
movl %ebp, %edi
callq 0x2190
testl %r14d, %r14d
js 0xb3e9
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movb $0x0, (%rsp,%r14)
movq %rsp, %rdi
callq 0x2310
testl %eax, %eax
je 0xb3e7
leaq 0x2f9b(%rip), %rdi      # 0xe36a
callq 0x2100
andl $0xff7f, %eax           # imm = 0xFF7F
xorl %ebx, %ebx
cmpl $0x100, %eax            # imm = 0x100
setne %bl
incl %ebx
jmp 0xb3e9
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/util.c
// Function: read_random_bytes
int
read_random_bytes(void *buf, int len)
{
    int fd, rc;

    fd = open("/dev/urandom", O_RDONLY);
    if(fd < 0) {
        errno = ENOSYS;
        return -1;
    }

    rc = read(fd, buf, len);
    if(rc < len)
        rc = -1;

    close(fd);

    return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
leaq 0x2f8a(%rip), %rdi      # 0xe391
xorl %esi, %esi
xorl %eax, %eax
callq 0x22d0
testl %eax, %eax
js 0xb43a
movl %eax, %ebx
movslq %ebp, %r15
movl %eax, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21a0
cmpl %r15d, %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmovgel %eax, %ebp
movl %ebx, %edi
callq 0x2190
jmp 0xb44a
callq 0x2060
movl $0x26, (%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/util.c
// Function: ts_compare
int
ts_compare(const struct timespec *s1, const struct timespec *s2)
{
    if(s1->tv_sec < s2->tv_sec)
        return -1;
    else if(s1->tv_sec > s2->tv_sec)
        return 1;
    else if(s1->tv_nsec < s2->tv_nsec)
        return -1;
    else if(s1->tv_nsec > s2->tv_nsec)
        return 1;
    else
        return 0;
}

// Assembly:
movq (%rsi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rcx, (%rdi)
jl 0xb48d
movl $0x1, %eax
jg 0xb48d
movq 0x8(%rsi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rcx, 0x8(%rdi)
jl 0xb48d
setg %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/util.c
// Function: ts_min
void
ts_min(struct timespec *d, const struct timespec *s)
{
    if(s->tv_sec == 0)
        return;

    if(d->tv_sec == 0 || ts_compare(d, s) > 0) {
        *d = *s;
    }
}

// Assembly:
movq (%rsi), %rax
testq %rax, %rax
je 0xb4b5
movq (%rdi), %rcx
testq %rcx, %rcx
je 0xb4af
cmpq %rax, %rcx
jl 0xb4b5
jg 0xb4af
movq 0x8(%rdi), %rax
cmpq 0x8(%rsi), %rax
jle 0xb4b5
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/util.c
// Function: ts_minus
void
ts_minus(struct timespec *d,
         const struct timespec *s1, const struct timespec *s2)
{
    if(s1->tv_nsec >= s2->tv_nsec) {
        d->tv_nsec = s1->tv_nsec - s2->tv_nsec;
        d->tv_sec = s1->tv_sec - s2->tv_sec;
    } else {
        d->tv_nsec = s1->tv_nsec + 1000000000 - s2->tv_nsec;
        d->tv_sec = s1->tv_sec - s2->tv_sec - 1;
    }
}

// Assembly:
movq 0x8(%rsi), %rax
movq 0x8(%rdx), %rcx
cmpq %rcx, %rax
jge 0xb4d4
addq $0x3b9aca00, %rax       # imm = 0x3B9ACA00
movq (%rdx), %r8
notq %r8
addq (%rsi), %r8
jmp 0xb4da
movq (%rsi), %r8
subq (%rdx), %r8
subq %rcx, %rax
movq %rax, 0x8(%rdi)
movq %r8, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/util.c
// Function: ts_add_nsec
static void
ts_add_nsec(struct timespec *d, const struct timespec *s, long long nsecs)
{
    *d = *s;

    while(nsecs + d->tv_nsec > 1000000000) {
        d->tv_sec += 1;
        nsecs -= 1000000000LL;
    }

    while(nsecs + d->tv_nsec < 0) {
        d->tv_sec -= 1;
        nsecs += 1000000000LL;
    }

    d->tv_nsec += nsecs;
}

// Assembly:
movq %rdx, %r8
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq 0x8(%rdi), %rsi
leaq (%rsi,%rdx), %rcx
cmpq $0x3b9aca01, %rcx       # imm = 0x3B9ACA01
jl 0xb588
movq (%rdi), %r9
addq $-0x3b9aca01, %rcx      # imm = 0xC46535FF
shrq $0x9, %rcx
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
movq %rcx, %rax
mulq %rdx
shrq $0xb, %rdx
leaq (%r9,%rdx), %rax
incq %rax
imulq $-0x3b9aca00, %rdx, %rcx # imm = 0xC4653600
addq %rcx, %r8
movq $-0x3b9aca00, %rdx      # imm = 0xC4653600
addq %r8, %rdx
movq %rax, (%rdi)
leaq (%rsi,%r8), %rcx
addq $-0x3b9aca00, %rcx      # imm = 0xC4653600
movq %rdx, %r8
testq %rcx, %rcx
jns 0xb5e0
cmpq $-0x3b9ac9ff, %rcx      # imm = 0xC4653601
movq $-0x3b9aca00, %rax      # imm = 0xC4653600
cmovaeq %rcx, %rax
addq %rsi, %r8
xorl %esi, %esi
cmpq %r8, %rax
setne %sil
addq %rsi, %r8
subq %r8, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
addq %rsi, %rdx
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
notq %rdx
addq $0x3b9aca00, %rcx       # imm = 0x3B9ACA00
addq %rax, %rcx
addq %rdx, (%rdi)
movq %rcx, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/util.c
// Function: format_32
const char *
format_32(const unsigned char *data)
{
    static char buf[4][16];
    static int i = 0;
    i = (i + 1) % 4;
    snprintf(buf[i], 16, "%02x:%02x:%02x:%02x",
             data[0], data[1], data[2], data[3]);
    return buf[i];
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl 0xbe7e(%rip), %eax      # 0x174e0
incl %eax
andl $0x3, %eax
movl %eax, 0xbe73(%rip)      # 0x174e0
shll $0x4, %eax
leaq 0xbe29(%rip), %rbx      # 0x174a0
addq %rbx, %rax
movzbl (%rdi), %ecx
movzbl 0x1(%rdi), %r8d
movzbl 0x2(%rdi), %r9d
movzbl 0x3(%rdi), %edx
movl %edx, (%rsp)
leaq 0x2d1d(%rip), %rdx      # 0xe3b2
movl $0x10, %esi
movq %rax, %rdi
xorl %eax, %eax
callq 0x2140
movl 0xbe36(%rip), %eax      # 0x174e0
shlq $0x4, %rax
addq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/util.c
// Function: format_64
const char *
format_64(const unsigned char *data)
{
    static char buf[4][28];
    static int i = 0;
    i = (i + 1) % 4;
    snprintf(buf[i], 28, "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
             data[0], data[1], data[2], data[3],
             data[4], data[5], data[6], data[7]);
    return buf[i];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0xbe9b(%rip), %ecx      # 0x17560
incl %ecx
andl $0x3, %ecx
movl %ecx, 0xbe90(%rip)      # 0x17560
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
leaq 0xbe11(%rip), %rbx      # 0x174f0
addq %rbx, %rcx
addq %rcx, %rax
movzbl (%rdi), %ecx
movzbl 0x1(%rdi), %r8d
movzbl 0x2(%rdi), %r9d
movzbl 0x3(%rdi), %r10d
movzbl 0x4(%rdi), %r11d
movzbl 0x5(%rdi), %r14d
movzbl 0x6(%rdi), %r15d
movzbl 0x7(%rdi), %r12d
subq $0x8, %rsp
leaq 0x2c88(%rip), %rdx      # 0xe39e
movl $0x1c, %esi
movq %rax, %rdi
xorl %eax, %eax
pushq %r12
pushq %r15
pushq %r14
pushq %r11
pushq %r10
callq 0x2140
addq $0x30, %rsp
movl 0xbe27(%rip), %eax      # 0x17560
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rbx
addq %rcx, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/md5.c
// Function: md5_append
void
md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
{
    const md5_byte_t *p = data;
    int left = nbytes;
    int offset = (pms->count[0] >> 3) & 63;
    md5_word_t nbits = (md5_word_t)(nbytes << 3);

    if (nbytes <= 0)
	return;

    /* Update the message length. */
    pms->count[1] += nbytes >> 29;
    pms->count[0] += nbits;
    if (pms->count[0] < nbits)
	pms->count[1]++;

    /* Process an initial partial block. */
    if (offset) {
	int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);

	memcpy(pms->buf + offset, p, copy);
	if (offset + copy < 64)
	    return;
	p += copy;
	left -= copy;
	md5_process(pms, pms->buf);
    }

    /* Process full blocks. */
    for (; left >= 64; p += 64, left -= 64)
	md5_process(pms, p);

    /* Process a final partial block. */
    if (left)
	memcpy(pms->buf, p, left);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testl %edx, %edx
jle 0xb86e
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %ecx
movl %ecx, %r13d
shrl $0x3, %r13d
andl $0x3f, %r13d
movl %edx, %eax
shrl $0x1d, %eax
addl 0x4(%rdi), %eax
leal (,%r15,8), %edx
movl %eax, 0x4(%rdi)
addl %ecx, %edx
movl %edx, (%rdi)
jae 0xb7df
incl %eax
movl %eax, 0x4(%r14)
testl %r13d, %r13d
je 0xb828
leal (%r15,%r13), %eax
movl $0x40, %r12d
subl %r13d, %r12d
cmpl $0x41, %eax
cmovbl %r15d, %r12d
leaq (%r14,%r13), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2210
movl %r12d, %eax
addl %r13d, %eax
cmpl $0x40, %eax
jb 0xb86e
leaq 0x18(%r14), %rsi
addq %r12, %rbx
subl %r12d, %r15d
movq %r14, %rdi
callq 0xb878
cmpl $0x40, %r15d
jl 0xb84c
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb878
addq $0x40, %rbx
leal -0x40(%r15), %eax
cmpl $0x7f, %r15d
movl %eax, %r15d
ja 0xb82e
jmp 0xb84f
movl %r15d, %eax
testl %eax, %eax
je 0xb86e
addq $0x18, %r14
movslq %eax, %rdx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/md5.c
// Function: md5_finish
void
md5_finish(md5_state_t *pms, md5_byte_t digest[16])
{
    static const md5_byte_t pad[64] = {
	0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    };
    md5_byte_t data[8];
    int i;

    /* Save the length before padding. */
    for (i = 0; i < 8; ++i)
	data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
    /* Pad to 56 bytes mod 64. */
    md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
    /* Append the length. */
    md5_append(pms, data, 8);
    for (i = 0; i < 16; ++i)
	digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movdqa 0x23f5(%rip), %xmm0     # 0xe3e0
xorl %eax, %eax
movdqa 0x23fb(%rip), %xmm1     # 0xe3f0
movaps 0x2404(%rip), %xmm2     # 0xe400
movdqa 0x240c(%rip), %xmm3     # 0xe410
movd (%r14,%rax), %xmm4
pshufd $0x0, %xmm4, %xmm4      # xmm4 = xmm4[0,0,0,0]
movdqa %xmm0, %xmm5
pslld $0x3, %xmm5
pand %xmm1, %xmm5
pshuflw $0xfe, %xmm5, %xmm6     # xmm6 = xmm5[2,3,3,3,4,5,6,7]
movdqa %xmm4, %xmm7
psrld %xmm6, %xmm7
pshuflw $0x54, %xmm5, %xmm6     # xmm6 = xmm5[0,1,1,1,4,5,6,7]
movdqa %xmm4, %xmm8
psrld %xmm6, %xmm8
punpcklqdq %xmm7, %xmm8    # xmm8 = xmm8[0],xmm7[0]
pshufd $0xee, %xmm5, %xmm5     # xmm5 = xmm5[2,3,2,3]
pshuflw $0xfe, %xmm5, %xmm6     # xmm6 = xmm5[2,3,3,3,4,5,6,7]
movdqa %xmm4, %xmm7
psrld %xmm6, %xmm7
pshuflw $0x54, %xmm5, %xmm5     # xmm5 = xmm5[0,1,1,1,4,5,6,7]
psrld %xmm5, %xmm4
punpckhqdq %xmm7, %xmm4    # xmm4 = xmm4[1],xmm7[1]
shufps $0xcc, %xmm4, %xmm8     # xmm8 = xmm8[0,3],xmm4[0,3]
andps %xmm2, %xmm8
packuswb %xmm8, %xmm8
packuswb %xmm8, %xmm8
movd %xmm8, (%rsp,%rax)
addq $0x4, %rax
paddd %xmm3, %xmm0
cmpq $0x8, %rax
jne 0xc004
movl (%r14), %eax
shrl $0x3, %eax
movl $0x37, %edx
subl %eax, %edx
andl $0x3f, %edx
incl %edx
leaq 0x2384(%rip), %rsi      # 0xe420
movq %r14, %rdi
callq 0xb799
movq %rsp, %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0xb799
xorl %eax, %eax
xorl %edx, %edx
movl %edx, %ecx
andl $-0x4, %ecx
movl 0x8(%r14,%rcx), %esi
movl %eax, %ecx
andb $0x18, %cl
shrl %cl, %esi
movb %sil, (%rbx,%rdx)
incq %rdx
addl $0x8, %eax
cmpq $0x10, %rdx
jne 0xc0b8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/sadistech[P]nesromtool2/./src/nrt_main.c
// Function: main
int main(int argc, char **argv, char **env) {
  if (argc == 1) {
    print_usage();
    exit(EXIT_SUCCESS);
  }

  char *appname = *(argv++); argc--;
  char *subcommand= *(argv++); argc--;

  if (subcommand[0] == '\0') {
    fprintf(stderr, "Please supply a subcommand.\n");
    print_usage();
    exit(EXIT_FAILURE);
  } else if (is_subcommand(subcommand, "help", "--help", "-h", NULL)) {
    print_usage();
  } else if (is_subcommand(subcommand, "info", NULL)) {
    subcommand_info(argc - 1, argv);
  } else if (is_subcommand(subcommand, "chr", NULL)) {
    subcommand_chr(argc - 1, argv);
  } else if (is_subcommand(subcommand, "prg", NULL)) {
    subcommand_prg(argc - 1, argv);
  } else if (is_subcommand(subcommand, "title", NULL)) {
    subcommand_title(argc - 1, argv);
  } else {
    fprintf(stderr, "Unknown subcommand: %s\n", subcommand);
    print_usage();
    exit(EXIT_FAILURE);
  }

  exit(EXIT_SUCCESS);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x1, %edi
jne 0x5b6b
xorl %eax, %eax
callq 0x3b08
xorl %edi, %edi
callq 0x2300
movq %rsi, %rbx
movq 0x8(%rsi), %r14
cmpb $0x0, (%r14)
jne 0x5ba9
movq 0x5479(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x1cdf(%rip), %rdi      # 0x7868
movl $0x1c, %esi
movl $0x1, %edx
callq 0x2310
xorl %eax, %eax
callq 0x3b08
movl $0x1, %edi
callq 0x2300
movl %edi, %ebp
leaq 0x924(%rip), %rsi       # 0x64d6
leaq 0x909(%rip), %rdx       # 0x64c2
leaq 0x1cc5(%rip), %rcx      # 0x7885
movq %r14, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x463c
testb %al, %al
jne 0x5b5d
addq $0x10, %rbx
leaq 0x6fc(%rip), %rsi       # 0x62d8
movq %r14, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x463c
testb %al, %al
je 0x5bfe
addl $-0x3, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x4797
jmp 0x5b64
leaq 0xb3d(%rip), %rsi       # 0x6742
movq %r14, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x463c
testb %al, %al
je 0x5c27
addl $-0x3, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x52d3
jmp 0x5b64
leaq 0x76d(%rip), %rsi       # 0x639b
movq %r14, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x463c
testb %al, %al
je 0x5c50
addl $-0x3, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x4c41
jmp 0x5b64
leaq 0x12e4(%rip), %rsi      # 0x6f3b
movq %r14, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x463c
testb %al, %al
je 0x5c79
addl $-0x3, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x5942
jmp 0x5b64
movq 0x5378(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x1bfe(%rip), %rsi      # 0x7888
movq %r14, %rdx
xorl %eax, %eax
callq 0x21e0
jmp 0x5b98
// File: /workspace/github_c_makefile_star2_O3/WereCatf[P]Gonzales/fast-gpio.c
// Function: muxToString
char *muxToString(uint8_t port, uint8_t pin, uint8_t mux)
{
	char *returnStr=strUnknownMux;
	if(port < 1 || port > 6 || pin > 31) return strUnknownMux;
	if(mux==0) return strInputMux;
	if(mux==1) return strOutputMux;
	if(mux==5) return strUnknownMux; //Manual gives no definition for such mux
	mux-=2;
	if(mux==4) mux=3; //Skip the "missing" mux above
	uint8_t i, _pins, _port, _row;
	_port=1;
	i=0;
	while(_port != port){
		_pins=pinsWithMux[i];
		i+=_pins*2+1;
		_port++;
	}
	_pins=pinsWithMux[i];
	//printf("Debug: %d, %d\n", i, _pins);
	i++;
	while(_pins){
		if(pinsWithMux[i]==pin){
			_row=pinsWithMux[i+1];
			returnStr=muxNames[_row][mux];
			if(returnStr==NULL) returnStr=strUnknownMux;
			break;
		}
		i+=2;
		_pins--;
	}
	return returnStr;
}

// Assembly:
movq 0x3ebd(%rip), %rax      # 0x7080
leal -0x7(%rdi), %ecx
cmpb $-0x6, %cl
setb %cl
cmpb $0x20, %sil
setae %r8b
orb %cl, %r8b
je 0x31da
retq
cmpb $0x5, %dl
je 0x31d9
movzbl %dl, %ecx
cmpl $0x1, %ecx
je 0x31f3
testl %ecx, %ecx
jne 0x31fb
movq 0x3e96(%rip), %rax      # 0x7088
retq
movq 0x3e96(%rip), %rax      # 0x7090
retq
addb $-0x2, %dl
cmpb $0x4, %dl
movzbl %dl, %edx
movl $0x3, %ecx
cmovnel %edx, %ecx
cmpb $0x1, %dil
jne 0x3216
xorl %edx, %edx
jmp 0x3236
decb %dil
xorl %edx, %edx
leaq 0x47fe(%rip), %r8       # 0x7a20
movzbl %dl, %edx
movb (%rdx,%r8), %r9b
addb %r9b, %r9b
addb %r9b, %dl
incb %dl
decb %dil
jne 0x3222
movzbl %dl, %r8d
leaq 0x47df(%rip), %rdi      # 0x7a20
movb (%r8,%rdi), %r8b
testb %r8b, %r8b
je 0x31d9
incb %dl
movzbl %dl, %edx
cmpb %sil, (%rdx,%rdi)
je 0x3262
addb $0x2, %dl
decb %r8b
jne 0x324c
jmp 0x31d9
movzbl 0x1(%rdx,%rdi), %edx
shll $0x5, %edx
leaq 0x3e2f(%rip), %rsi      # 0x70a0
addq %rdx, %rsi
movzbl %cl, %ecx
movq (%rsi,%rcx,8), %rcx
testq %rcx, %rcx
cmovneq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/WereCatf[P]Gonzales/fast-gpio.c
// Function: initGpio
int initGpio()
{
	int fd = open("/dev/mem", O_RDWR|O_SYNC);
	if(fd < 0) return 1;
	// uint32_t addr = 0x01c20800 & ~(getpagesize() - 1);
	//Requires memmap to be on pagesize-boundary
	memmap=(uint8_t *)mmap(NULL, getpagesize()*2, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x01c20000);
	if(memmap == NULL) return 1;
	close(fd);

	//Set memmap to point to PIO-registers
	memmap=memmap+0x800;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x1c10(%rip), %rdi      # 0x4e9d
movl $0x101002, %esi         # imm = 0x101002
xorl %eax, %eax
callq 0x20a0
testl %eax, %eax
js 0x32ea
movl %eax, %ebx
callq 0x20c0
addl %eax, %eax
movslq %eax, %rsi
movl $0x1, %ebp
movl $0x1c20000, %r9d        # imm = 0x1C20000
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
movl %ebx, %r8d
callq 0x2060
movq %rax, 0x4801(%rip)      # 0x7ad0
testq %rax, %rax
je 0x32ef
movl %ebx, %edi
callq 0x2080
addq $0x800, 0x47ea(%rip) # imm = 0x800
xorl %ebp, %ebp
jmp 0x32ef
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/WereCatf[P]Gonzales/fast-gpio.c
// Function: writeMux
void writeMux(int port, int pin, uint8_t mux)
{
	volatile uint32_t *pioMem32, *configRegister;
	uint32_t mask;

	pioMem32=(uint32_t *)(memmap+port*0x24);
	mux &= 7;
	configRegister=pioMem32+(pin >> 3);
	mask = ~(7 << ((pin & 7) * 4));
	*configRegister &= mask;
	*configRegister |= mux << ((pin & 7) * 4);
}

// Assembly:
movslq %edi, %rax
leaq (%rax,%rax,8), %rax
shlq $0x2, %rax
addq 0x479c(%rip), %rax      # 0x7ad0
leal (,%rsi,4), %ecx
sarl $0x3, %esi
movslq %esi, %rsi
movl $0x7, %edi
shll %cl, %edi
notl %edi
andl %edi, (%rax,%rsi,4)
andl $0x7, %edx
shll %cl, %edx
orl %edx, (%rax,%rsi,4)
retq
// File: /workspace/github_c_makefile_star2_O3/WereCatf[P]Gonzales/fast-gpio.c
// Function: writePull
void writePull(int port, int pin, uint8_t value)
{
	value &= 3;
	volatile uint32_t *pioMem32, *configRegister;
	uint32_t mask;
	pioMem32=(uint32_t *)(memmap+port*0x24+0x1c); //0x1c == pull-register
	configRegister=pioMem32+(pin >> 4);
	mask = ~(3 << ((pin & 15) * 2));
	*configRegister &= mask;
	*configRegister |= value << ((pin & 15) * 2);
}

// Assembly:
movslq %edi, %rax
leaq (%rax,%rax,8), %rax
shlq $0x2, %rax
addq 0x4742(%rip), %rax      # 0x7ad0
leal (%rsi,%rsi), %ecx
sarl $0x4, %esi
movslq %esi, %rsi
movl $0x3, %edi
shll %cl, %edi
notl %edi
andl %edi, 0x1c(%rax,%rsi,4)
andl $0x3, %edx
shll %cl, %edx
orl %edx, 0x1c(%rax,%rsi,4)
retq
// File: /workspace/github_c_makefile_star2_O3/WereCatf[P]Gonzales/./include/fast-gpio.h
// Function: writePin
inline void writePin(int port, int pin, uint8_t value)
{
	value &= 1;
	volatile uint32_t *pioMem32;
	uint32_t mask;
	pioMem32=(uint32_t *)(memmap+portOffsetData[port]);
	mask = ~(1 << pin);
	*pioMem32 &= mask;
	if(value) *pioMem32 |= value << pin;
}

// Assembly:
movl %esi, %ecx
movq 0x4676(%rip), %rax      # 0x7ad0
movslq %edi, %rsi
leaq 0x465a(%rip), %rdi      # 0x7abe
movzbl (%rsi,%rdi), %esi
movl $0x1, %edi
shll %cl, %edi
movl $0xfffffffe, %r8d       # imm = 0xFFFFFFFE
roll %cl, %r8d
andl %r8d, (%rax,%rsi)
testb $0x1, %dl
je 0x3484
orl %edi, (%rax,%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/Haswell/KeccakP-1600-AVX2.cpp
// Function: KeccakP1600_ExtractAndAddBytes
void KeccakP1600_ExtractAndAddBytes(const void *state, const UINT8 *input, UINT8 *output, size_t offset, size_t length)
//***************************************************************************************
{
    UINT64      t[25];
    UINT64      *t0;
    const UINT64 *dIn = (UINT64 *)input;
    UINT64      *dOut = (UINT64 *)output;
    UINT8       *t1, *dlIn, *dlOut;
    ptrdiff_t   lane_n = length / sizeof(UINT64);
    ptrdiff_t   byte_n = length % sizeof(UINT64);
    ptrdiff_t   i;

    KeccakP1600_ExtractBytes(state, (UINT8 *)t, 0, sizeof(t));

    t0 = (UINT64 *)((UINT8 *)t + offset);

    for (i = 0; i < lane_n; i++)
        dOut[i] = dIn[i] ^ t0[i];

    if (byte_n)
    {
        t1 = (UINT8 *)(t0 + i);
        dlIn = (UINT8 *)(dIn + i);
        dlOut = (UINT8 *)(dOut + i);

        for (i = 0; i < byte_n; i++)
            dlOut[i] = dlIn[i] ^ t1[i];
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movl %r15d, %r13d
andl $0x7, %r13d
xorl %ebp, %ebp
movq %rsp, %rsi
movl $0xc8, %ecx
xorl %edx, %edx
callq 0x5060
leaq (%rsp,%r12), %rax
cmpq $0x8, %r15
jb 0x5c57
shrq $0x3, %r15
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
xorq (%r14,%rcx,8), %rdx
movq %rdx, (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x5c40
movq %r15, %rbp
testq %r13, %r13
je 0x5c7e
leaq (%rax,%rbp,8), %rax
leaq (%r14,%rbp,8), %rcx
leaq (%rbx,%rbp,8), %rdx
xorl %esi, %esi
movb (%rax,%rsi), %dil
xorb (%rcx,%rsi), %dil
movb %dil, (%rdx,%rsi)
incq %rsi
cmpq %rsi, %r13
jne 0x5c6a
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]yasuna/src/libbenly/src/string.c
// Function: mbstrlen
int mbstrlen(char* src)
{
    int         ch      = 0,
                len     = 0;

    char*       p       = src;

    gunichar*   cpoints;

    setlocale(LC_CTYPE, LOCALE);
    while (*p != '\0') {
        /* get string length */
        if ((ch = mblen(p, MB_CUR_MAX)) < 0)
            return 0;

        if (ch > 1) {
            /* get unicode code point */
            cpoints = g_utf8_to_ucs4_fast(p, sizeof(*p), NULL);

            /*
             * multi byte
             * true : hankaku kana
             * false: other
             */
            if (*cpoints >= 0xff65 && *cpoints <= 0xff9f) {
                len++;
            } else {
                len += 2;
            }
            g_free(cpoints);
        } else {
            /* ascii */
            len++;
        }
        p += ch;
    }

    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0xac8(%rip), %rsi       # 0x2020
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x10d0
cmpb $0x0, (%rbx)
je 0x15cd
movl $0xffff009b, %r15d      # imm = 0xFFFF009B
xorl %ebp, %ebp
callq 0x1060
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1040
testl %eax, %eax
js 0x15cb
movl %eax, %r14d
movl $0x1, %r12d
cmpl $0x2, %eax
jb 0x15b9
movl $0x1, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10f0
movl (%rax), %ecx
addl %r15d, %ecx
cmpl $0x3b, %ecx
movl $0x2, %r12d
sbbl $0x0, %r12d
movq %rax, %rdi
callq 0x1050
addl %r12d, %ebp
movl %r14d, %eax
cmpb $0x0, (%rbx,%rax)
leaq (%rbx,%rax), %rbx
jne 0x156e
jmp 0x15cd
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]yasuna/src/libbenly/src/string.c
// Function: strmax
int strmax(int val, char** src)
{
    int     i       = 0,
            j       = 0,
            len     = 0,
            max     = 0;

    j = val - 1;
    while (i <= j) {
        if ((len = mbstrlen(*(src + i))) > max)
            max = len;
        if ((len = mbstrlen(*(src + j))) > max)
            max = len;
        i++;
        j--;
    }

    return max;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %edi, %edi
jle 0x163c
movq %rsi, %rbx
movl %edi, %r14d
decq %r14
xorl %r15d, %r15d
xorl %ebp, %ebp
movq (%rbx,%r15,8), %rdi
callq 0x1100
cmpl %ebp, %eax
cmovgl %eax, %ebp
movq (%rbx,%r14,8), %rdi
callq 0x1100
cmpl %ebp, %eax
cmovgl %eax, %ebp
incq %r15
leaq -0x1(%r14), %rax
cmpq %r14, %r15
movq %rax, %r14
jl 0x160f
jmp 0x163e
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]yasuna/src/libbenly/src/string.c
// Function: mbstrtok
char* mbstrtok(char* str, char* delimiter)
{
    static  char*   ptr = NULL;
            char*   bdy = NULL;

    if (!str)
        str = ptr;

    if (!str)
        return NULL;

    if ((bdy = strstr(str, delimiter)) != NULL) {
        *bdy = '\0';
        ptr = bdy + strlen(delimiter);
    } else {
        ptr = NULL;
    }

    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x1984
movq 0x2724(%rip), %rbx      # 0x40a8
testq %rbx, %rbx
je 0x19b5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1110
testq %rax, %rax
je 0x19ac
movq %rax, %r15
movb $0x0, (%rax)
movq %r14, %rdi
callq 0x1070
addq %r15, %rax
jmp 0x19ae
xorl %eax, %eax
movq %rax, 0x26f3(%rip)      # 0x40a8
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]yasuna/src/libbenly/src/string.c
// Function: trim
int trim(char* str)
{
    int     i       = 0,
            j       = 0;

    i = strlen(str) - 1;
    while (i >= 0 && isspace(*(str + i))) {
        i--;
    }
    *(str + i + 1) = '\0';
    i = 0;
    while (isspace(*(str + i)))
        i++;

    if (i > 0) {
        j = 0;
        while (*(str + i))
            *(str + j++) = *(str + i++);
        *(str + j) = '\0';
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1070
movq %rax, %r14
movl %r14d, %r15d
decl %eax
cmpl $-0x1, %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmovll %eax, %ebp
callq 0x1120
decq %r15
decl %r14d
js 0x1a0a
movq (%rax), %rcx
movl %r15d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movsbq (%rbx,%rdx), %rdx
decq %r15
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x19e8
jmp 0x1a0d
movl %ebp, %r14d
movslq %r14d, %rcx
movb $0x0, 0x1(%rbx,%rcx)
movq (%rax), %rcx
movq $-0x1, %rax
movsbq 0x1(%rbx,%rax), %rdx
incq %rax
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x1a1f
testq %rax, %rax
je 0x1a5b
movl %eax, %ecx
movb (%rbx,%rcx), %cl
testb %cl, %cl
je 0x1a55
xorl %edx, %edx
leaq (%rbx,%rdx), %rsi
movb %cl, (%rbx,%rdx)
incq %rdx
movb 0x1(%rax,%rsi), %cl
testb %cl, %cl
jne 0x1a3f
movl %edx, %eax
jmp 0x1a57
xorl %eax, %eax
movb $0x0, (%rbx,%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]yasuna/src/libbenly/src/string.c
// Function: strcmp_lite
int strcmp_lite(const char* str1, const char* str2)
{
    if (str1 == NULL || str2 == NULL)
        return -1;

    size_t  cnt     = 0,
            len1    = 0,
            len2    = 0;

    len1 = strlen(str1);
    len2 = strlen(str2);

    while (*str1 == *str2 && *str1 != '\0' && *str2 != '\0') {
        str1++;
        str2++;
        cnt++;
    }
    if (cnt == len1 && cnt == len2)
        return 0;

    return 1;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jne 0x1ae3
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1070
movq %rax, %rbx
movq %r14, %rdi
callq 0x1070
movb (%r14), %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0x1ad0
movb (%r15), %sil
testb %sil, %sil
je 0x1ad0
cmpb %dl, %sil
jne 0x1ad0
xorl %edx, %edx
leaq 0x1(%rdx), %rcx
movb 0x1(%r14,%rdx), %sil
testb %sil, %sil
je 0x1ad0
movb 0x1(%r15,%rdx), %dil
testb %dil, %dil
je 0x1ad0
movq %rcx, %rdx
cmpb %sil, %dil
je 0x1ab0
xorq %rcx, %rbx
xorq %rcx, %rax
xorl %ecx, %ecx
orq %rbx, %rax
setne %cl
popq %rbx
popq %r14
popq %r15
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]yasuna/src/libbenly/src/string.c
// Function: strmax_with_regex
int strmax_with_regex(int val, char** src, regex_t* reg)
{
    int     i       = 0,
            j       = 0,
            len     = 0,
            max     = 0;

    j = val - 1;
    while (i <= j) {
        if ((len = mbstrlen_with_regex(*(src + i), reg)) > max)
            max = len;
        if ((len = mbstrlen_with_regex(*(src + j), reg)) > max)
            max = len;
        i++;
        j--;
    }

    return max;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %edi, %edi
jle 0x1c2d
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
decq %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
movq (%r14,%r12,8), %rdi
movq %rbx, %rsi
callq 0x10a0
cmpl %ebp, %eax
cmovgl %eax, %ebp
movq (%r14,%r15,8), %rdi
movq %rbx, %rsi
callq 0x10a0
cmpl %ebp, %eax
cmovgl %eax, %ebp
incq %r12
leaq -0x1(%r15), %rax
cmpq %r15, %r12
movq %rax, %r15
jl 0x1bfa
jmp 0x1c2f
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/perftests/http/main.c
// Function: main
int
main(int argc, char * argv[])
{
	struct http_header HH[1];
	struct http_request R;
	char * s;
	struct sock_addr ** sas;
	int done = 0;

	WARNP_INIT;

	/* Sanity-check. */
	if (argc != 3) {
		warn0("Need two arguments (host, path)");
		goto err0;
	}

	/* Construct headers. */
	HH[0].header = "Host";
	HH[0].value = argv[1];

	/* Construct request. */
	R.method = "GET";
	R.path = argv[2];
	R.nheaders = 1;
	R.headers = HH;
	R.bodylen = 0;
	R.body = NULL;

	/* Resolve target addresses. */
	if (asprintf(&s, "%s:80", argv[1]) == -1)
		goto err0;
	if ((sas = sock_resolve(s)) == NULL) {
		warnp("Cannot resolve %s", s);
		goto err1;
	}
	free(s);
	s = NULL;

	/* Send request. */
	(void)http_request(sas, &R, 1000000, donereq, &done);

	/* Wait for request to complete. */
	if (events_spin(&done)) {
		warnp("Error in event loop");
		goto err2;
	}

	/* Free address structures. */
	sock_addr_freelist(sas);

	/* Success! */
	exit(0);

err2:
	sock_addr_freelist(sas);
err1:
	free(s);
err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movl $0x0, 0xc(%rsp)
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x25ce
callq 0x7614
cmpl $0x3, %ebp
jne 0x2666
leaq 0x6a46(%rip), %rax      # 0x9024
leaq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%rbx), %rdx
movq %rdx, 0x8(%rcx)
leaq 0x6a34(%rip), %rax      # 0x9029
movq %rax, 0x10(%rsp)
movq 0x10(%rbx), %rax
movq %rax, 0x18(%rsp)
movq $0x1, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
leaq 0x6a0d(%rip), %rsi      # 0x902d
movq %rsp, %rdi
xorl %eax, %eax
callq 0x62d0
cmpl $-0x1, %eax
je 0x2730
movq (%rsp), %rdi
callq 0x6610
testq %rax, %rax
jne 0x2684
callq 0x2090
cmpl $0x0, (%rax)
movq (%rsp), %rsi
jne 0x26d4
leaq 0x69d9(%rip), %rdi      # 0x9033
xorl %eax, %eax
callq 0x77b3
jmp 0x2727
leaq 0x6997(%rip), %rdi      # 0x9004
xorl %eax, %eax
callq 0x77b3
callq 0x2090
movl $0x0, (%rax)
jmp 0x2730
movq %rax, %rbx
movq (%rsp), %rdi
callq 0x2040
movq $0x0, (%rsp)
leaq 0x9b(%rip), %rcx        # 0x273a
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %r14
movl $0xf4240, %edx          # imm = 0xF4240
movq %rbx, %rdi
movq %r14, %r8
callq 0x3c4c
movq %r14, %rdi
callq 0x2aa1
testl %eax, %eax
jne 0x26ed
movq %rbx, %rdi
callq 0x6d22
xorl %edi, %edi
callq 0x2300
movq %rax, %rbx
leaq 0x6955(%rip), %rdi      # 0x9033
xorl %eax, %eax
callq 0x7694
movl $0x0, (%rbx)
jmp 0x2727
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2707
leaq 0x6947(%rip), %rdi      # 0x9045
xorl %eax, %eax
callq 0x77b3
jmp 0x271f
movq %rax, %r14
leaq 0x6934(%rip), %rdi      # 0x9045
xorl %eax, %eax
callq 0x7694
movl $0x0, (%r14)
movq %rbx, %rdi
callq 0x6d22
movq (%rsp), %rdi
callq 0x2040
movl $0x1, %edi
callq 0x2300
// File: /workspace/github_c_makefile_star2_O3/phillbush[P]hoc/main.c
// Function: main
int
main(int argc, char *argv[])
{
	struct sigaction sa;
	FILE *fp = NULL;
	char ch;

	while ((ch = getopt(argc, argv, "")) != -1) {
		switch (ch) {
		default:
			usage();
			break;
		}
	}
	argc -= optind;
	argv += optind;

	/* assign action for SIGFPE */
	sa.sa_handler = sigfpehand;
	sa.sa_flags = 0;
	sigemptyset(&sa.sa_mask);
	if (sigaction(SIGFPE, &sa, NULL) == -1)
		err(1, "sigaction");

	/* open input file */
	if (argc) {
		if (strcmp(*argv, "-") != 0)
			if ((fp = fopen(*argv, "r")) == NULL)
				err(1, "%s", *argv);
		if (fp)
			yyin = fp;
	}

	/* initialize machine */
	init(argc, argv);

	/* parse and execute input until EOF */
	setjmp(begin);
	while (prepare(), yyparse()) {
		if (DEBUG)
			debug();
		execute(NULL);
	}

	/* cleanup machine and close input file */
	cleanup();
	if (fp)
		fclose(fp);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movl %edi, %ebx
leaq 0x6a5b(%rip), %rdx      # 0x9020
callq 0x2270
cmpb $-0x1, %al
jne 0x26b9
movq 0xb9f7(%rip), %rax      # 0xdfd0
movslq (%rax), %r15
leaq 0x104(%rip), %rax       # 0x26e7
leaq 0x8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x0, 0x80(%rdi)
callq 0x21d0
xorl %eax, %eax
movl %eax, %edx
movq %rsp, %rsi
movl $0x8, %edi
callq 0x2090
cmpl $-0x1, %eax
je 0x26be
movl %r15d, %ebp
leaq (%r14,%r15,8), %r15
cmpl %ebp, %ebx
jne 0x2627
xorl %eax, %eax
movl %eax, %r14d
jmp 0x2657
movq (%r15), %rdi
cmpb $0x2d, (%rdi)
jne 0x2635
cmpb $0x0, 0x1(%rdi)
je 0x2620
leaq 0x6d24(%rip), %rsi      # 0x9360
callq 0x2260
testq %rax, %rax
je 0x26d1
movq %rax, %r14
leaq 0xdd1c(%rip), %rcx      # 0x10370
movq %rax, (%rcx)
subl %ebp, %ebx
movl %ebx, %edi
movq %r15, %rsi
callq 0x2a1d
leaq 0xbb66(%rip), %rdi      # 0xe1d0
callq 0x21a0
callq 0x2b66
callq 0x5130
testl %eax, %eax
je 0x2697
xorl %eax, %eax
movl %eax, %ebx
movq %rbx, %rdi
callq 0x2d79
callq 0x2b66
callq 0x5130
testl %eax, %eax
jne 0x2681
callq 0x2c86
testq %r14, %r14
je 0x26a9
movq %r14, %rdi
callq 0x20e0
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2310
leaq 0x693f(%rip), %rsi      # 0x9004
xorl %eax, %eax
movl $0x1, %edi
callq 0x2220
movq (%r15), %rdx
leaq 0x6a5f(%rip), %rsi      # 0x913a
xorl %eax, %eax
movl $0x1, %edi
callq 0x2220
// File: /workspace/github_c_makefile_star2_O3/phillbush[P]hoc/error.c
// Function: yyerror
void
yyerror(const char *fmt, ...)
{
	va_list ap;

	va_start(ap, fmt);
	(void)vsnprintf(buf, sizeof buf - 1, fmt, ap);
	warnx("line %d: %s", yylineno, buf);
	va_end(ap);
	errno = 0;
	longjmp(begin, 1);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x2831
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0xba48(%rip), %rbx      # 0xe2a0
movl $0x1fff, %esi           # imm = 0x1FFF
movq %rbx, %rdi
movq %r10, %rdx
callq 0x20b0
leaq 0xb921(%rip), %rax      # 0xe190
movl (%rax), %esi
leaq 0x67c2(%rip), %rdi      # 0x903a
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2120
callq 0x2050
movl $0x0, (%rax)
leaq 0xb93c(%rip), %rdi      # 0xe1d0
movl $0x1, %esi
callq 0x2250
nop