LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/send.c
// Function: buffer_network_state
int
buffer_network_state(const struct sockaddr_in6 *sin6,
                     struct interface *interface)
{
    unsigned char h[8];
    int rc;
    rc = network_hash(h);
    if(rc < 0)
        return -1;
    debugf("-> NETWORK-STATE %s%s\n",
           format_64(h), interface ? " (multicast)" : "");
    buffer_tlv(4, h, 8, sin6, interface);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5410
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x5a8b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5af6
jmp 0x5a8d
leaq 0x107d4(%rip), %rax     # 0x16268
cmpl $0x2, (%rax)
jl 0x5ad2
leaq -0x20(%rbp), %rdi
callq 0xfcd0
movq %rax, %rdx
movq -0x18(%rbp), %rsi
leaq 0xcf36(%rip), %rcx      # 0x129e6
leaq 0xccbc(%rip), %rax      # 0x12773
cmpq $0x0, %rsi
cmovneq %rax, %rcx
movl $0x2, %edi
leaq 0xcc91(%rip), %rsi      # 0x1275c
movb $0x0, %al
callq 0xfda0
jmp 0x5ad4
leaq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
movl $0x4, %edi
movl $0x8, %edx
callq 0x5790
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/receive.c
// Function: parse_pref
static void
parse_pref(struct in6_addr *a, const unsigned char *p, int plen)
{
    unsigned char b[16];
    memset(b, 0, 16);
    memcpy(b, p, plen / 8);
    if(plen % 8 != 0)
        b[plen / 8] = (p[plen / 8] & ((0xFF << (8 - (plen % 8))) & 0xFF));
    memcpy(a, b, 16);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2170
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movslq %eax, %rdx
callq 0x2230
movl -0x14(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x82ea
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
movl -0x14(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl -0x34(%rbp), %eax
movl $0x8, %ecx
subl %edx, %ecx
movl $0xff, %edx
shll %cl, %edx
movl %edx, %ecx
andl $0xff, %ecx
andl %ecx, %eax
movb %al, %cl
movl -0x14(%rbp), %eax
movl $0x8, %esi
cltd
idivl %esi
cltq
movb %cl, -0x30(%rbp,%rax)
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/ra.c
// Function: ra_retract
void
ra_retract(const struct prefix *prefix)
{
    int i;
    for(i = 0; i < numinterfaces; i++) {
        if(interfaces[i].ifindex > 0) {
            struct prefix_list *pl =
                prefix_list_cons_prefix(interfaces[i].retractions, prefix);
            if(pl)
                interfaces[i].retractions = pl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0xd7e3(%rip), %rcx      # 0x162b0
cmpl (%rcx), %eax
jge 0x8b4e
movslq -0xc(%rbp), %rcx
leaq 0xd7e4(%rip), %rax      # 0x162c0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jle 0x8b3e
movslq -0xc(%rbp), %rcx
leaq 0xd7c9(%rip), %rax      # 0x162c0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movq 0x90(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0xc300
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8b3c
movq -0x18(%rbp), %rcx
movslq -0xc(%rbp), %rdx
leaq 0xd795(%rip), %rax      # 0x162c0
imulq $0x98, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x90(%rax)
jmp 0x8b3e
jmp 0x8b40
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8ac3
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/ra.c
// Function: schedule_ra
void
schedule_ra(struct interface *interface, int soon, int override)
{
    int a, b;

    if(interface == NULL) {
        int i;
        for(i = 0; i < numinterfaces; i++) {
            if(interfaces[i].ifindex > 0)
                schedule_ra(&interfaces[i], soon, override);
        }
        return;
    }

    if(soon) {
        a = 0;
        b = MAX_RA_DELAY_TIME;
    } else {
        a = MIN_RTR_ADV_INTERVAL;
        b = MAX_RTR_ADV_INTERVAL;
    }

    if(!override && interface->ra_timeout.tv_sec > 0 &&
       ts_minus_msec(&interface->ra_timeout, &now) < b)
        return;

    ts_add_msec(&interface->ra_timeout, &now, a);
    ts_add_random(&interface->ra_timeout, &interface->ra_timeout, b - a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x8bdb
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
leaq 0xd726(%rip), %rcx      # 0x162b0
cmpl (%rcx), %eax
jge 0x8bd6
movslq -0x1c(%rbp), %rcx
leaq 0xd727(%rip), %rax      # 0x162c0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jle 0x8bc9
movslq -0x1c(%rbp), %rax
leaq 0xd70c(%rip), %rdi      # 0x162c0
imulq $0x98, %rax, %rax
addq %rax, %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x8b60
jmp 0x8bcb
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8b80
jmp 0x8c5d
cmpl $0x0, -0xc(%rbp)
je 0x8bf1
movl $0x0, -0x14(%rbp)
movl $0x1f4, -0x18(%rbp)     # imm = 0x1F4
jmp 0x8bff
movl $0x30570, -0x14(%rbp)   # imm = 0x30570
movl $0x927c0, -0x18(%rbp)   # imm = 0x927C0
cmpl $0x0, -0x10(%rbp)
jne 0x8c2b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jle 0x8c2b
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
leaq 0xd661(%rip), %rsi      # 0x16280
callq 0xfa70
cmpl -0x18(%rbp), %eax
jge 0x8c2b
jmp 0x8c5d
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
movl -0x14(%rbp), %edx
leaq 0xd643(%rip), %rsi      # 0x16280
callq 0xfac0
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
movq -0x8(%rbp), %rsi
addq $0x70, %rsi
movl -0x18(%rbp), %edx
subl -0x14(%rbp), %edx
callq 0xfba0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/ra.c
// Function: ra_setup
int
ra_setup()
{
    int rc;
    rc = setup_ra_socket();
    if(rc < 0) {
        perror("setup_ra_socket");
        return rc;
    }
    schedule_ra(NULL, 1, 1);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x8830
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x8c9a
leaq 0xa153(%rip), %rdi      # 0x12de0
callq 0x2300
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8cb1
xorl %eax, %eax
movl %eax, %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x8b60
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/ra.c
// Function: ra_cleanup
void
ra_cleanup()
{
    if(ra_socket >= 0) {
        if(is_a_router()) {
            debugf("Retracting RA.\n");
            send_multicast_ra(NULL, -1);
        }
        close(ra_socket);
    }
    ra_socket = -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0xd531(%rip)      # 0x161fc
jl 0x8d13
callq 0x2700
cmpl $0x0, %eax
je 0x8d08
jmp 0x8cd9
leaq 0xd588(%rip), %rax      # 0x16268
cmpl $0x2, (%rax)
jl 0x8cf8
movl $0x2, %edi
leaq 0xa0ff(%rip), %rsi      # 0x12df0
movb $0x0, %al
callq 0xfda0
jmp 0x8cfa
xorl %eax, %eax
movl %eax, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8d20
movl 0xd4ee(%rip), %edi      # 0x161fc
callq 0x21a0
movl $0xffffffff, 0xd4df(%rip) # imm = 0xFFFFFFFF
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/ra.c
// Function: send_multicast_ra
static int
send_multicast_ra(struct interface *interface, int router)
{
    const unsigned char all_nodes[16] =
        {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
    struct sockaddr_in6 to;
    int rc;

    if(interface == NULL) {
        int i;
        for(i = 0; i < numinterfaces; i++) {
            if(interfaces[i].ifindex > 0)
                send_multicast_ra(&interfaces[i], router);
        }
        return 1;
    }

    if(ts_minus_msec(&now, &interface->last_ra_sent) < MIN_DELAY_BETWEEN_RAS)
        return 0;

    memset(&to, 0, sizeof(to));
    to.sin6_family = AF_INET6;
    memcpy(&to.sin6_addr, all_nodes, 16);
    to.sin6_scope_id = interface->ifindex;
    rc = send_ra(interface, &to, router);
    interface->last_ra_sent = now;
    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq 0xa09a(%rip), %rax      # 0x12dd0
movq %rax, -0x30(%rbp)
movq 0xa097(%rip), %rax      # 0x12dd8
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8db2
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
leaq 0xd553(%rip), %rcx      # 0x162b0
cmpl (%rcx), %eax
jge 0x8da6
movslq -0x54(%rbp), %rcx
leaq 0xd554(%rip), %rax      # 0x162c0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jle 0x8d99
movslq -0x54(%rbp), %rax
leaq 0xd539(%rip), %rdi      # 0x162c0
imulq $0x98, %rax, %rax
addq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x8d20
jmp 0x8d9b
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x8d53
movl $0x1, -0x4(%rbp)
jmp 0x8e42
movq -0x10(%rbp), %rsi
addq $0x80, %rsi
leaq 0xd4bc(%rip), %rdi      # 0x16280
callq 0xfa70
cmpl $0xbb8, %eax            # imm = 0xBB8
jge 0x8dd9
movl $0x0, -0x4(%rbp)
jmp 0x8e42
leaq -0x4c(%rbp), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x2170
movw $0xa, -0x4c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x44(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq -0x4c(%rbp), %rsi
callq 0x8f90
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rax
leaq 0xd459(%rip), %rcx      # 0x16280
movq (%rcx), %rdx
movq %rdx, 0x80(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x88(%rax)
movl -0x50(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/ra.c
// Function: router_advertisement
int
router_advertisement(int doread)
{
    int i, rc;

    if(doread) {
        rc = recv_rs();
        if(rc < 0 && errno != EAGAIN) {
            perror("recv(RA)");
        }
    }

    for(i = 0; i < numinterfaces; i++) {
        struct interface *interface = &interfaces[i];
        if(interface->ifindex <= 0)
            continue;

        if(ts_compare(&now, &interface->ra_timeout) >= 0) {
            int r = kernel_router();
            if(r > 0 || interface->retractions) {
                rc = send_multicast_ra(interface, r);
                if(rc < 0)
                    perror("send_ra");
            }
            schedule_ra(interface, 0, 1);
        }
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x8ec7
callq 0x97b0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x8ec5
callq 0x2050
cmpl $0xb, (%rax)
je 0x8ec5
leaq 0x9f40(%rip), %rdi      # 0x12e00
callq 0x2300
jmp 0x8ec7
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
leaq 0xd3d8(%rip), %rcx      # 0x162b0
cmpl (%rcx), %eax
jge 0x8f7f
movslq -0x8(%rbp), %rcx
leaq 0xd3d5(%rip), %rax      # 0x162c0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jg 0x8f05
jmp 0x8f71
movq -0x18(%rbp), %rsi
addq $0x70, %rsi
leaq 0xd36c(%rip), %rdi      # 0x16280
callq 0xf900
cmpl $0x0, %eax
jl 0x8f6f
movb $0x0, %al
callq 0xf780
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jg 0x8f3c
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x8f5f
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x8d20
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x8f5d
leaq 0x9eb1(%rip), %rdi      # 0x12e09
callq 0x2300
jmp 0x8f5f
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x8b60
jmp 0x8f71
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x8ece
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/dhcpv4.c
// Function: flush_lease
void
flush_lease(struct lease *lease)
{
    int i = lease - leases;

    assert(i >= 0 && i < numleases);

    if(i < numleases - 1)
        leases[i] = leases[numleases - 1];
    MEM_UNDEFINED(leases + numleases - 1, sizeof(struct lease));
    numleases--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10a41(%rip), %rcx     # 0x1a498
subq %rcx, %rax
movl $0x30, %ecx
cqto
idivq %rcx
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x9a7a
movl -0xc(%rbp), %eax
cmpl 0x10a2a(%rip), %eax     # 0x1a4a0
jge 0x9a7a
jmp 0x9a99
leaq 0x945f(%rip), %rdi      # 0x12ee0
leaq 0x9470(%rip), %rsi      # 0x12ef8
movl $0x47, %edx
leaq 0x946d(%rip), %rcx      # 0x12f01
callq 0x2150
movl -0xc(%rbp), %eax
movl 0x109fe(%rip), %ecx     # 0x1a4a0
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x9ade
movq 0x109e8(%rip), %rdi     # 0x1a498
movslq -0xc(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movq 0x109d6(%rip), %rsi     # 0x1a498
movl 0x109d8(%rip), %eax     # 0x1a4a0
subl $0x1, %eax
cltq
imulq $0x30, %rax, %rax
addq %rax, %rsi
movl $0x30, %edx
callq 0x2230
jmp 0x9ae0
jmp 0x9ae2
movl 0x109b8(%rip), %eax     # 0x1a4a0
addl $-0x1, %eax
movl %eax, 0x109af(%rip)     # 0x1a4a0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/dhcpv4.c
// Function: find_lease
struct lease *
find_lease(const unsigned char *ip, int create)
{
    int i;
    for(i = 0; i < numleases; i++)
        if(memcmp(leases[i].ip, ip, 4) == 0)
            return &leases[i];

    if(create) {
        if(numleases >= maxleases) {
            struct lease *nl =
                realloc(leases, (numleases * 2 + 2) * sizeof(struct lease));
            if(nl) {
                leases = nl;
                maxleases = numleases * 2 + 2;
            }
        }
        memset(&leases[numleases], 0, sizeof(struct lease));
        memcpy(leases[numleases].ip, ip, 4);
        return &leases[numleases++];
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x10981(%rip), %eax     # 0x1a4a0
jge 0x9b70
movq 0x10970(%rip), %rax     # 0x1a498
movslq -0x18(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl (%rax), %eax
subl %ecx, %eax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9b63
movq 0x10949(%rip), %rax     # 0x1a498
movslq -0x18(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x9c3c
jmp 0x9b65
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9b16
cmpl $0x0, -0x14(%rbp)
je 0x9c34
movl 0x10920(%rip), %eax     # 0x1a4a0
cmpl 0x1091e(%rip), %eax     # 0x1a4a4
jl 0x9bce
movq 0x10909(%rip), %rdi     # 0x1a498
movl 0x1090b(%rip), %eax     # 0x1a4a0
shll %eax
addl $0x2, %eax
cltq
imulq $0x30, %rax, %rsi
callq 0x2290
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x9bcc
movq -0x20(%rbp), %rax
movq %rax, 0x108dd(%rip)     # 0x1a498
movl 0x108df(%rip), %eax     # 0x1a4a0
shll %eax
addl $0x2, %eax
movl %eax, 0x108d8(%rip)     # 0x1a4a4
jmp 0x9bce
movq 0x108c3(%rip), %rdi     # 0x1a498
movslq 0x108c4(%rip), %rax     # 0x1a4a0
imulq $0x30, %rax, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x2170
movq 0x108a2(%rip), %rax     # 0x1a498
movslq 0x108a3(%rip), %rcx     # 0x1a4a0
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
movq 0x10885(%rip), %rax     # 0x1a498
movl 0x10887(%rip), %ecx     # 0x1a4a0
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x1087c(%rip)     # 0x1a4a0
movslq %ecx, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x9c3c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/dhcpv4.c
// Function: interface_dhcpv4
int
interface_dhcpv4(struct interface *interface)
{
    int i, prio;

    if(interface->type == INTERFACE_MESH)
        return 0;

    prio = interface_dhcpv4_prio(interface);
    if(prio == 0)
        return 0;

    for(i = 0; i < numneighs; i++) {
        if(neighs[i].interface == interface) {
            struct node *node = find_node(neighs[i].id, 0);
            unsigned char capa[2];
            capa[0] = 0;
            capa[1] = interface_dhcpv4_prio(interface) & 0x0F;
            if(node == NULL)
                continue;
            if((node->capabilities[1] & 0x0F) > prio) {
                return 0;
            } else if((node->capabilities[1] & 0x0F) == prio) {
                if(memcmp(node->capabilities, capa, 2) > 0) {
                    return 0;
                } else if(memcmp(node->capabilities, capa, 2) == 0) {
                    if(memcmp(node->id, myid, 4) > 0)
                        return 0;
                }
            }
        }
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x3, 0xc(%rax)
jne 0x9cb2
movl $0x0, -0x4(%rbp)
jmp 0x9e00
movq -0x10(%rbp), %rdi
callq 0x9c50
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x9cd0
movl $0x0, -0x4(%rbp)
jmp 0x9e00
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
leaq 0xc5d7(%rip), %rcx      # 0x162b8
cmpl (%rcx), %eax
jge 0x9df9
movslq -0x14(%rbp), %rcx
leaq 0xd1ac(%rip), %rax      # 0x16ea0
shlq $0x6, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x9de9
movslq -0x14(%rbp), %rax
leaq 0xd18d(%rip), %rdi      # 0x16ea0
shlq $0x6, %rax
addq %rax, %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0x4c80
movq %rax, -0x20(%rbp)
movb $0x0, -0x22(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9c50
andl $0xf, %eax
movb %al, -0x21(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x9d48
jmp 0x9deb
movq -0x20(%rbp), %rax
movzbl 0x39(%rax), %eax
andl $0xf, %eax
cmpl -0x18(%rbp), %eax
jle 0x9d64
movl $0x0, -0x4(%rbp)
jmp 0x9e00
movq -0x20(%rbp), %rax
movzbl 0x39(%rax), %eax
andl $0xf, %eax
cmpl -0x18(%rbp), %eax
jne 0x9de5
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
leaq -0x22(%rbp), %rsi
movl $0x2, %edx
callq 0x21c0
cmpl $0x0, %eax
jle 0x9d98
movl $0x0, -0x4(%rbp)
jmp 0x9e00
movq -0x20(%rbp), %rax
addq $0x38, %rax
leaq -0x22(%rbp), %rcx
movw (%rcx), %cx
movw (%rax), %ax
subw %cx, %ax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9de1
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
leaq 0xc4c9(%rip), %rsi      # 0x16290
movl $0x4, %edx
callq 0x21c0
cmpl $0x0, %eax
jle 0x9ddf
movl $0x0, -0x4(%rbp)
jmp 0x9e00
jmp 0x9de1
jmp 0x9de3
jmp 0x9de5
jmp 0x9de7
jmp 0x9de9
jmp 0x9deb
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9cd7
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/dhcpv4.c
// Function: setup_dhcpv4_socket
int
setup_dhcpv4_socket()
{
    int s, rc, one = 1;
    struct sockaddr_in sin;

    if(dhcpv4_socket >= 0) {
        close(dhcpv4_socket);
        dhcpv4_socket = -1;
    }

    s = socket(PF_INET, SOCK_DGRAM, 0);
    if(s < 0)
        return -1;

    rc = setsockopt(s, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one));
    if(rc < 0)
        goto fail;

    rc = setsockopt(s, IPPROTO_IP, IP_PKTINFO, &one, sizeof(one));
    if(rc < 0)
        goto fail;

    rc = fcntl(s, F_GETFD, 0);
    if(rc < 0)
        goto fail;

    rc = fcntl(s, F_SETFD, rc | FD_CLOEXEC);
    if(rc < 0)
        goto fail;

    rc = fcntl(s, F_GETFL, 0);
    if(rc < 0)
        goto fail;

    rc = fcntl(s, F_SETFL, (rc | O_NONBLOCK));
    if(rc < 0)
        goto fail;

    memset(&sin, 0, sizeof(sin));
    sin.sin_family = AF_INET;
    sin.sin_port = htons(67);

    rc = bind(s, (struct sockaddr*)&sin, sizeof(sin));
    if(rc < 0)
        goto fail;

    dhcpv4_socket = s;
    return s;

fail:
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x1, -0x10(%rbp)
cmpl $0x0, 0xc3da(%rip)      # 0x16200
jl 0x9e3d
movl 0xc3d2(%rip), %edi      # 0x16200
callq 0x21a0
movl $0xffffffff, 0xc3c3(%rip) # imm = 0xFFFFFFFF
movl $0x2, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x23b0
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x9e60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9f8a
movl -0x8(%rbp), %edi
movl $0x1, %esi
movl $0x6, %edx
leaq -0x10(%rbp), %rcx
movl $0x4, %r8d
callq 0x2090
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x9e8a
jmp 0x9f83
movl -0x8(%rbp), %edi
xorl %esi, %esi
movl $0x8, %edx
leaq -0x10(%rbp), %rcx
movl $0x4, %r8d
callq 0x2090
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x9eb1
jmp 0x9f83
movl -0x8(%rbp), %edi
movl $0x1, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x20a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x9ed0
jmp 0x9f83
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %edx
orl $0x1, %edx
movl $0x2, %esi
movb $0x0, %al
callq 0x20a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x9ef3
jmp 0x9f83
movl -0x8(%rbp), %edi
movl $0x3, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x20a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x9f0f
jmp 0x9f83
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %edx
orl $0x800, %edx            # imm = 0x800
movl $0x4, %esi
movb $0x0, %al
callq 0x20a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x9f32
jmp 0x9f83
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2170
movw $0x2, -0x20(%rbp)
movl $0x43, %edi
callq 0x2100
movw %ax, -0x1e(%rbp)
movl -0x8(%rbp), %edi
leaq -0x20(%rbp), %rsi
movl $0x10, %edx
callq 0x22c0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x9f72
jmp 0x9f83
movl -0x8(%rbp), %eax
movl %eax, 0xc285(%rip)      # 0x16200
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x9f8a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/dhcpv4.c
// Function: user_class_match
static int
user_class_match(const unsigned char *uc, int uclen, const char *s)
{
    int slen = strlen(s);
    int i;

    i = 0;
    while(i + slen + 1 < uclen) {
        int clen = uc[i];
        if(clen == slen && memcmp(uc + i + 1, s, slen) == 0)
            return 1;
        i += clen + 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20d0
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
addl -0x24(%rbp), %eax
addl $0x1, %eax
cmpl -0x14(%rbp), %eax
jge 0xb173
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0xb165
movq -0x10(%rbp), %rdi
movslq -0x28(%rbp), %rax
addq %rax, %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0x21c0
cmpl $0x0, %eax
jne 0xb165
movl $0x1, -0x4(%rbp)
jmp 0xb17a
movl -0x2c(%rbp), %eax
addl $0x1, %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0xb116
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/dhcpv4.c
// Function: find_matching_lease
static struct lease *
find_matching_lease(const unsigned char *cid, int cidlen,
                    const unsigned char *chaddr, struct prefix_list *pl)
{
    int i;

    for(i = 0; i < numleases; i++) {
        if(lease_match(cid, cidlen, chaddr, &leases[i]) &&
           (pl == NULL || prefix_list_within_v4(leases[i].ip, pl)))
            return &leases[i];
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0xf2e9(%rip), %eax      # 0x1a4a0
jge 0xb22c
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq 0xf2cd(%rip), %rcx      # 0x1a498
movslq -0x2c(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rcx
callq 0xb270
cmpl $0x0, %eax
je 0xb21f
cmpq $0x0, -0x28(%rbp)
je 0xb207
movq 0xf2aa(%rip), %rdi      # 0x1a498
movslq -0x2c(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0xc980
cmpl $0x0, %eax
je 0xb21f
movq 0xf28a(%rip), %rax      # 0x1a498
movslq -0x2c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xb234
jmp 0xb221
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xb1ae
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/dhcpv4.c
// Function: lease_match
static int
lease_match(const unsigned char *cid, int cidlen,
            const unsigned char *chaddr, const struct lease *lease)
{
    if(cidlen > 0 || lease->cidlen > 0)
        return lease->cidlen == cidlen && memcmp(lease->cid, cid, cidlen) == 0;
    else
        return memcmp(chaddr, lease->chaddr, 16) == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0xb297
movq -0x28(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jle 0xb2d3
movq -0x28(%rbp), %rax
movl 0x20(%rax), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x29(%rbp)
jne 0xb2c6
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x21c0
cmpl $0x0, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0xb306
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
addq $0x8, %rcx
movups (%rcx), %xmm1
movups (%rax), %xmm0
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/dhcpv4.c
// Function: generate_v4
static int
generate_v4(unsigned char *ip_return, unsigned char *mask_return,
            const struct prefix_list *pl)
{
    int i, j, rc;

    for(i = 0; i < 2; i++) {
        for(j = 0; j < 20; j++) {
            unsigned char ip[4];
            struct lease *lease;
            rc = generate_random_v4(ip, pl);
            if(rc < 0)
                return -1;
            lease = find_lease(ip, 0);
            if(!lease || (i > 0 && lease->end < now.tv_sec)) {
                int plen;
                unsigned char mask[4];
                unsigned int addr;
                plen = compute_netmask(mask, ip, pl);
                if(plen < 0 || plen > 30)
                    continue;
                /* Check that we are not in the first quarter. */
                DO_NTOHL(addr, ip);
                if((addr & (3 << (30 - plen))) == 0)
                    continue;
                memcpy(ip_return, ip, 4);
                memcpy(mask_return, mask, 4);
                return 1;
            }
        }
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x2, -0x24(%rbp)
jge 0xb429
movl $0x0, -0x28(%rbp)
cmpl $0x14, -0x28(%rbp)
jge 0xb419
leaq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xd070
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0xb368
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb430
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x9b00
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xb39c
cmpl $0x0, -0x24(%rbp)
jle 0xb409
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
leaq 0xaee9(%rip), %rcx      # 0x16280
cmpq (%rcx), %rax
jge 0xb409
leaq -0x40(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xb440
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0xb3bc
cmpl $0x1e, -0x3c(%rbp)
jle 0xb3be
jmp 0xb40b
jmp 0xb3c0
movl -0x30(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %edi
callq 0x2350
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl $0x1e, %ecx
subl -0x3c(%rbp), %ecx
movl $0x3, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xb3ee
jmp 0xb40b
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xb430
jmp 0xb40b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xb33c
jmp 0xb41b
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb32b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/dhcpv4.c
// Function: compute_netmask
static int
compute_netmask(unsigned char *mask,
                const unsigned char *ip, const struct prefix_list *pl)
{
    int i;
    unsigned int m;

    if(pl == NULL)
        return -1;

    for(i = 0; i < pl->numprefixes; i++) {
        if(prefix_within_v4(ip, &pl->prefixes[i])) {
            int plen;
            assert(pl->prefixes[i].plen >= 96);
            plen = pl->prefixes[i].plen - 96;
            m = 0xFFFFFFFFu << (32 - plen);
            DO_HTONL(mask, m);
            return plen;
        }
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xb467
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb542
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jge 0xb53b
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movslq -0x24(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rsi
callq 0xc850
cmpl $0x0, %eax
je 0xb52b
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movzbl 0x10(%rax), %eax
cmpl $0x60, %eax
jl 0xb4c2
jmp 0xb4e1
leaq 0x7b00(%rip), %rdi      # 0x12fc9
leaq 0x7a28(%rip), %rsi      # 0x12ef8
movl $0x229, %edx            # imm = 0x229
leaq 0x7b08(%rip), %rcx      # 0x12fe4
callq 0x2150
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movzbl 0x10(%rax), %eax
subl $0x60, %eax
movl %eax, -0x2c(%rbp)
movl $0x20, %ecx
subl -0x2c(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
callq 0x2160
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb542
jmp 0xb52d
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb46e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: format_address
char *
format_address(const struct in6_addr *a, char *buf, int buflen)
{
    char *ptr;

    if(IN6_IS_ADDR_V4MAPPED(a))
        ptr = (char*)inet_ntop(AF_INET, (char*)a + 12, buf, buflen);
    else
        ptr = (char*)inet_ntop(AF_INET6, a, buf, buflen);

    if(ptr == NULL)
        snprintf(buf, buflen, "%s", strerror(errno));
    buf[buflen - 1] = '\0';
    return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x2d(%rbp)
jne 0xbcf9
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x4(%rcx)
movb %al, -0x2d(%rbp)
jne 0xbcf9
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x2160
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0xbd29
movq -0x8(%rbp), %rsi
addq $0xc, %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
movl $0x2, %edi
callq 0x2030
movq %rax, -0x20(%rbp)
jmp 0xbd42
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
movl $0xa, %edi
callq 0x2030
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xbd7e
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x2050
movl (%rax), %edi
callq 0x2370
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rcx
leaq 0x71c2(%rip), %rdx      # 0x12f39
movb $0x0, %al
callq 0x2140
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: format_prefix_raw
char *
format_prefix_raw(const struct in6_addr *a, int plen, char *buf, int buflen)
{
    char *ptr;
    int len;
    int v4 = plen > 96 && IN6_IS_ADDR_V4MAPPED(a);

    if(v4)
        ptr = (char*)inet_ntop(AF_INET, (char*)a + 12,
                               buf, buflen);
    else
        ptr = (char*)inet_ntop(AF_INET6, a, buf, buflen);

    if(ptr == NULL)
        snprintf(buf, buflen, "%s", strerror(errno));
    buf[buflen - 1] = '\0';

    len = strlen(buf);
    snprintf(buf + len, buflen - len, "/%d", v4 ? plen - 96 : plen);
    buf[buflen - 1] = '\0';

    return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
xorl %eax, %eax
cmpl $0x60, -0xc(%rbp)
movb %al, -0x3d(%rbp)
jle 0xbe1c
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x3e(%rbp)
jne 0xbe07
movq -0x38(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x4(%rcx)
movb %al, -0x3e(%rbp)
jne 0xbe07
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x44(%rbp)
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x2160
movl %eax, %ecx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x3e(%rbp)
movb -0x3e(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
setne %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0xbe4c
movq -0x8(%rbp), %rsi
addq $0xc, %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl $0x2, %edi
callq 0x2030
movq %rax, -0x28(%rbp)
jmp 0xbe65
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl $0xa, %edi
callq 0x2030
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xbea1
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0x2050
movl (%rax), %edi
callq 0x2370
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %rax, %rcx
leaq 0x709f(%rip), %rdx      # 0x12f39
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rdi
callq 0x20d0
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movl -0x1c(%rbp), %eax
subl -0x2c(%rbp), %eax
cltq
movq %rax, -0x60(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0xbeea
movl -0xc(%rbp), %eax
subl $0x60, %eax
movl %eax, -0x6c(%rbp)
jmp 0xbef0
movl -0xc(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %rdi
movl -0x6c(%rbp), %ecx
leaq 0x7163(%rip), %rdx      # 0x13065
movb $0x0, %al
callq 0x2140
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: debug_prefix_list
void
debug_prefix_list(const struct prefix_list *pl)
{
    int i;

    if(debug_level < 2 || !pl)
        return;

    for(i = 0; i < pl->numprefixes; i++) {
        debug_prefix(&pl->prefixes[i]);
        if(i < pl->numprefixes - 1)
            debugf(" ");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xa1f5(%rip), %rax      # 0x16268
cmpl $0x2, (%rax)
jl 0xc07f
cmpq $0x0, -0x8(%rbp)
jne 0xc081
jmp 0xc0f2
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movswl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jge 0xc0f2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rdi
callq 0xc010
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movswl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xc0e5
jmp 0xc0c2
leaq 0xa19f(%rip), %rax      # 0x16268
cmpl $0x2, (%rax)
jl 0xc0e1
movl $0x2, %edi
leaq 0x6cce(%rip), %rsi      # 0x12da8
movb $0x0, %al
callq 0xfda0
jmp 0xc0e3
jmp 0xc0e5
jmp 0xc0e7
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xc088
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: destroy_prefix_list
void
destroy_prefix_list(struct prefix_list *pl)
{
    if(pl == NULL)
        return;
    free(pl->prefixes);
    free(pl);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xc2e5
jmp 0xc2fa
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: prefix_list_cons_prefix
struct prefix_list *
prefix_list_cons_prefix(struct prefix_list *pl, const struct prefix *p)
{
    if(pl == NULL)
        pl = create_prefix_list();
    if(pl == NULL)
        return NULL;
    if(pl->numprefixes >= pl->maxprefixes) {
        struct prefix *n =
            realloc(pl->prefixes,
                    (pl->maxprefixes * 2 + 2) * sizeof(struct prefix));
        if(n == NULL)
            return NULL;
        pl->prefixes = n;
        pl->maxprefixes = pl->maxprefixes * 2 + 2;
    }
    pl->prefixes[pl->numprefixes++] = *p;
    return pl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xc320
callq 0xc2b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xc334
movq $0x0, -0x8(%rbp)
jmp 0xc3ec
movq -0x10(%rbp), %rax
movswl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movswl 0xa(%rcx), %ecx
cmpl %ecx, %eax
jl 0xc39f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movswl 0xa(%rax), %eax
shll %eax
addl $0x2, %eax
cltq
imulq $0x1c, %rax, %rsi
callq 0x2290
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xc37c
movq $0x0, -0x8(%rbp)
jmp 0xc3ec
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movswl 0xa(%rax), %eax
shll %eax
addl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
movw 0x8(%rdx), %cx
movw %cx, %si
addw $0x1, %si
movw %si, 0x8(%rdx)
movswq %cx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movl 0x18(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: prefix_list_cons
struct prefix_list *
prefix_list_cons(struct prefix_list *pl,
                 const struct in6_addr *a, int plen,
                 const unsigned char *id, unsigned int eid, int prio)
{
    struct prefix p;

    p.p = *a;
    p.plen = plen;
    if(id)
        memcpy(p.id, id, 4);
    else
        memset(p.id, 0, 4);
    p.eid = eid;
    p.prio = prio;
    return prefix_list_cons_prefix(pl, &p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x44(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x3c(%rbp)
movl -0x14(%rbp), %eax
movb %al, -0x34(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xc44a
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
jmp 0xc45e
leaq -0x44(%rbp), %rdi
addq $0x14, %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x2170
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
movw %ax, -0x32(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0xc300
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: prefix_list_remove
struct prefix_list *
prefix_list_remove(struct prefix_list *pl, int i)
{
    assert(i >= 0 && i < pl->numprefixes);
    memmove(pl->prefixes + i, pl->prefixes + i + 1,
            sizeof(struct prefix) * (pl->numprefixes - i - 1));
    pl->numprefixes--;
    MEM_UNDEFINED(pl->prefixes + pl->numprefixes,
                  sizeof(struct prefix));
    return pl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0xc4a6
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movswl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jge 0xc4a6
jmp 0xc4c5
leaq 0x6bc4(%rip), %rdi      # 0x13071
leaq 0x6bdb(%rip), %rsi      # 0x1308f
movl $0xe3, %edx
leaq 0x6bd8(%rip), %rcx      # 0x13098
callq 0x2150
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movslq -0xc(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rsi
addq $0x1c, %rsi
movq -0x8(%rbp), %rax
movswl 0x8(%rax), %eax
subl -0xc(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x1c, %rax, %rdx
callq 0x22d0
movq -0x8(%rbp), %rax
movw 0x8(%rax), %cx
addw $-0x1, %cx
movw %cx, 0x8(%rax)
jmp 0xc518
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: prefix_list_append
struct prefix_list*
prefix_list_append(struct prefix_list *p1, struct prefix_list *p2)
{
    int i;

    if(p1 == NULL)
        return p2;

    for(i = 0; i < p2->numprefixes; i++) {
        struct prefix_list *pl = prefix_list_cons_prefix(p1, &p2->prefixes[i]);
        if(pl == NULL)
            return NULL;
    }
    destroy_prefix_list(p2);
    return p1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xc551
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc5b5
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jge 0xc5a4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rsi
callq 0xc300
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xc597
movq $0x0, -0x8(%rbp)
jmp 0xc5b5
jmp 0xc599
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xc558
movq -0x18(%rbp), %rdi
callq 0xc2d0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: prefix_list_member
int
prefix_list_member(const struct prefix *p, const struct prefix_list *pl)
{
    int i;
    if(pl == NULL)
        return 0;

    for(i = 0; i < pl->numprefixes; i++) {
        struct prefix *q = &pl->prefixes[i];
        if(prefix_eq(p, q))
            return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xc640
movl $0x0, -0x4(%rbp)
jmp 0xc69b
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jge 0xc694
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5c0
cmpl $0x0, %eax
je 0xc687
movl $0x1, -0x4(%rbp)
jmp 0xc69b
jmp 0xc689
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xc647
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: prefix_takes_precedence
int
prefix_takes_precedence(const struct prefix *p, const struct prefix *q)
{
    if(p->prio > q->prio)
        return 1;
    if(p->prio == q->prio && memcmp(p->id, q->id, 4) > 0)
        return 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
movq -0x18(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jle 0xc6dd
movl $0x1, -0x4(%rbp)
jmp 0xc720
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
movq -0x18(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jne 0xc719
movq -0x10(%rbp), %rdi
addq $0x14, %rdi
movq -0x18(%rbp), %rsi
addq $0x14, %rsi
movl $0x4, %edx
callq 0x21c0
cmpl $0x0, %eax
jle 0xc719
movl $0x1, -0x4(%rbp)
jmp 0xc720
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: prefix_within
int
prefix_within(const struct prefix *p, const struct prefix *q)
{
    unsigned char pp[16], qq[16];

    if(p->plen < q->plen)
        return 0;

    memcpy(pp, &p->p, 16);
    memcpy(qq, &q->p, 16);

    if(memcmp(pp, qq, q->plen / 8) != 0)
        return 0;

    if(q->plen % 8 == 0) {
        return 1;
    } else {
        int i = q->plen / 8 + 1;
        unsigned char mask = (0xFF << (q->plen % 8)) & 0xFF;
        if((pp[i] & mask) == (qq[i] & mask)) {
            return 1;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jge 0xc760
movl $0x0, -0x4(%rbp)
jmp 0xc840
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movslq %eax, %rdx
callq 0x21c0
cmpl $0x0, %eax
je 0xc7b7
movl $0x0, -0x4(%rbp)
jmp 0xc840
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0xc7d5
movl $0x1, -0x4(%rbp)
jmp 0xc840
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %eax
movl $0x8, %ecx
cltd
idivl %ecx
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %edx, %ecx
movl $0xff, %eax
shll %cl, %eax
andl $0xff, %eax
movb %al, -0x45(%rbp)
movslq -0x44(%rbp), %rax
movzbl -0x30(%rbp,%rax), %eax
movzbl -0x45(%rbp), %ecx
andl %ecx, %eax
movslq -0x44(%rbp), %rcx
movzbl -0x40(%rbp,%rcx), %ecx
movzbl -0x45(%rbp), %edx
andl %edx, %ecx
cmpl %ecx, %eax
jne 0xc837
movl $0x1, -0x4(%rbp)
jmp 0xc840
jmp 0xc839
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/prefix.c
// Function: prefix_within_v4
int
prefix_within_v4(const unsigned char *p4, const struct prefix *q)
{
    struct prefix p;
    memset(&p, 0, sizeof(p));
    memcpy(&p.p, v4prefix, 12);
    memcpy((char*)&p.p + 12, p4, 4);
    p.plen = 128;

    return prefix_within(&p, q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x2170
movq 0x6a99(%rip), %rax      # 0x13310
movq %rax, -0x2c(%rbp)
movl 0x6a97(%rip), %eax      # 0x13318
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movb $-0x80, -0x1c(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x2c(%rbp), %rdi
callq 0xc730
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)