LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/sam.c
// Function: bam_plp_init
bam_plp_t bam_plp_init(bam_plp_auto_f func, void *data)
{
	bam_plp_t iter;
	iter = (bam_plp_t)calloc(1, sizeof(struct __bam_plp_t));
	iter->mp = mp_init();
	iter->head = iter->tail = mp_alloc(iter->mp);
	iter->dummy = mp_alloc(iter->mp);
	iter->max_tid = iter->max_pos = -1;
	iter->flag_mask = BAM_PLP_MASK;
	iter->maxcnt = 8000;
	if (func) {
		iter->func = func;
		iter->data = data;
		iter->b = bam_init1();
	}
	return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x2200
movq %rax, -0x18(%rbp)
callq 0x12a90
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x113e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x113e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x2c(%rax) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x28(%rax) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movl $0x704, 0x34(%rax)      # imm = 0x704
movq -0x18(%rbp), %rax
movl $0x1f40, 0x40(%rax)     # imm = 0x1F40
cmpq $0x0, -0x8(%rbp)
je 0x113d3
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
callq 0xce60
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/sam.c
// Function: bam_plp_destroy
void bam_plp_destroy(bam_plp_t iter)
{
	mp_free(iter->mp, iter->dummy);
	mp_free(iter->mp, iter->head);
	if (iter->mp->cnt != 0)
		fprintf(stderr, "[bam_plp_destroy] memory leak: %d. Continue anyway.\n", iter->mp->cnt);
	mp_destroy(iter->mp);
	if (iter->b) bam_destroy1(iter->b);
	free(iter->plp);
	free(iter);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x114f0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x114f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, (%rax)
je 0x114a1
movq 0x5b71(%rip), %rax      # 0x16ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl (%rax), %edx
leaq 0x2288(%rip), %rsi      # 0x13722
movb $0x0, %al
callq 0x2230
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x115a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x114c5
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xce80
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/sam.c
// Function: mp_free
static inline void mp_free(mempool_t *mp, lbnode_t *p)
{
	--mp->cnt; p->next = 0; // clear lbnode_t::next here
	if (mp->n == mp->max) {
		mp->max = mp->max? mp->max<<1 : 256;
		mp->buf = (lbnode_t**)realloc(mp->buf, sizeof(lbnode_t*) * mp->max);
	}
	mp->buf[mp->n++] = p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x11577
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x1153f
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
shll %eax
movl %eax, -0x14(%rbp)
jmp 0x11549
movl $0x100, %eax            # imm = 0x100
movl %eax, -0x14(%rbp)
jmp 0x11549
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x22f0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rsi
movl 0x4(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x4(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/sam.c
// Function: mp_destroy
static void mp_destroy(mempool_t *mp)
{
	int k;
	for (k = 0; k < mp->n; ++k) {
		free(mp->buf[k]->b.data);
		free(mp->buf[k]);
	}
	free(mp->buf);
	free(mp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x115f8
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x28(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2040
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x115b3
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/sam.c
// Function: bam_plp_auto
const bam_pileup1_t *bam_plp_auto(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
{
	const bam_pileup1_t *plp;
	if (iter->func == 0 || iter->error) { *_n_plp = -1; return 0; }
	if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
	else { // no pileup line can be obtained; read alignments
		*_n_plp = 0;
		if (iter->is_eof) return 0;
		while (iter->func(iter->data, iter->b) >= 0) {
			if (bam_plp_push(iter, iter->b) < 0) {
				*_n_plp = -1;
				return 0;
			}
			if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
			// otherwise no pileup line can be returned; read the next alignment.
		}
		bam_plp_push(iter, 0);
		if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
		return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x122dd
movq -0x10(%rbp), %rax
cmpl $0x0, 0x3c(%rax)
je 0x122f4
movq -0x28(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq $0x0, -0x8(%rbp)
jmp 0x123f5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x11620
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x12320
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x123f5
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x12341
movq $0x0, -0x8(%rbp)
jmp 0x123f5
jmp 0x12343
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rsi
callq *%rax
cmpl $0x0, %eax
jl 0x123b7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x12030
cmpl $0x0, %eax
jge 0x1238c
movq -0x28(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq $0x0, -0x8(%rbp)
jmp 0x123f5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x11620
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x123b5
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x123f5
jmp 0x12343
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12030
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x11620
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x123ed
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x123f5
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/sam.c
// Function: bam_plp_reset
void bam_plp_reset(bam_plp_t iter)
{
	lbnode_t *p, *q;
	iter->max_tid = iter->max_pos = -1;
	iter->tid = iter->pos = 0;
	iter->is_eof = 0;
	for (p = iter->head; p->next;) {
		q = p->next;
		mp_free(iter->mp, p);
		p = q;
	}
	iter->head = iter->tail;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x2c(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x28(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x12480
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x114f0
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x1244f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/sam.c
// Function: bam_mplp_init
bam_mplp_t bam_mplp_init(int n, bam_plp_auto_f func, void **data)
{
	int i;
	bam_mplp_t iter;
	iter = (bam_mplp_t)calloc(1, sizeof(struct __bam_mplp_t));
	iter->pos = (uint64_t*)calloc(n, 8);
	iter->n_plp = (int*)calloc(n, sizeof(int));
	iter->plp = (const bam_pileup1_t**)calloc(n, sizeof(void*));
	iter->iter = (bam_plp_t*)calloc(n, sizeof(void*));
	iter->n = n;
	iter->min = (uint64_t)-1;
	for (i = 0; i < n; ++i) {
		iter->iter[i] = bam_plp_init(func, data[i]);
		iter->pos[i] = iter->min;
	}
	return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x2200
movq %rax, -0x28(%rbp)
movslq -0x4(%rbp), %rdi
movl $0x8, %esi
callq 0x2200
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movslq -0x4(%rbp), %rdi
movl $0x4, %esi
callq 0x2200
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movslq -0x4(%rbp), %rdi
movl $0x8, %esi
callq 0x2200
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movslq -0x4(%rbp), %rdi
movl $0x8, %esi
callq 0x2200
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x4(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq $-0x1, 0x8(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x125e9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x11310
movq %rax, %rdx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x12596
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht-example.c
// Function: set_nonblocking
static int
set_nonblocking(int fd, int nonblocking)
{
    int rc;
    rc = fcntl(fd, F_GETFL, 0);
    if(rc < 0)
        return -1;

    rc = fcntl(fd, F_SETFL,
               nonblocking ? (rc | O_NONBLOCK) : (rc & ~O_NONBLOCK));
    if(rc < 0)
        return -1;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %edi
movl $0x3, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x20d0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jge 0x3081
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x30d0
movl -0x8(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x309a
movl -0x10(%rbp), %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, -0x18(%rbp)
jmp 0x30a5
movl -0x10(%rbp), %eax
andl $0xfffff7ff, %eax       # imm = 0xFFFFF7FF
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %edi
movl -0x18(%rbp), %edx
movl $0x4, %esi
movb $0x0, %al
callq 0x20d0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jge 0x30c9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x30d0
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]dht/dht-example.c
// Function: init_signals
static void
init_signals(void)
{
    struct sigaction sa;
    sigset_t ss;

    sigemptyset(&ss);
    sa.sa_handler = sigdump;
    sa.sa_mask = ss;
    sa.sa_flags = 0;
    sigaction(SIGUSR1, &sa, NULL);

    sigemptyset(&ss);
    sa.sa_handler = sigtest;
    sa.sa_mask = ss;
    sa.sa_flags = 0;
    sigaction(SIGUSR2, &sa, NULL);

    sigemptyset(&ss);
    sa.sa_handler = sigexit;
    sa.sa_mask = ss;
    sa.sa_flags = 0;
    sigaction(SIGINT, &sa, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
leaq -0x118(%rbp), %rdi
callq 0x21d0
leaq 0x402(%rip), %rax       # 0x3500
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
leaq -0x118(%rbp), %rsi
movl $0x80, %edx
callq 0x2200
movl $0x0, -0x10(%rbp)
movl $0xa, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x20b0
leaq -0x118(%rbp), %rdi
callq 0x21d0
leaq 0x3d0(%rip), %rax       # 0x3520
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
leaq -0x118(%rbp), %rsi
movl $0x80, %edx
callq 0x2200
movl $0x0, -0x10(%rbp)
movl $0xc, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x20b0
leaq -0x118(%rbp), %rdi
callq 0x21d0
leaq 0x39e(%rip), %rax       # 0x3540
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
leaq -0x118(%rbp), %rsi
movl $0x80, %edx
callq 0x2200
movl $0x0, -0x10(%rbp)
movl $0x2, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x20b0
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht-example.c
// Function: callback
static void
callback(void *closure,
         int event,
         const unsigned char *info_hash,
         const void *data, size_t data_len)
{
    if(event == DHT_EVENT_SEARCH_DONE)
        printf("Search done.\n");
    else if(event == DHT_EVENT_SEARCH_DONE6)
        printf("IPv6 search done.\n");
    else if(event == DHT_EVENT_VALUES)
        printf("Received %d values.\n", (int)(data_len / 6));
    else if(event == DHT_EVENT_VALUES6)
        printf("Received %d IPv6 values.\n", (int)(data_len / 18));
    else
        printf("Unknown DHT event %d.\n", event);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpl $0x3, -0xc(%rbp)
jne 0x3221
leaq 0x8f84(%rip), %rdi      # 0xc19c
movb $0x0, %al
callq 0x2110
jmp 0x329a
cmpl $0x4, -0xc(%rbp)
jne 0x3237
leaq 0x8f7c(%rip), %rdi      # 0xc1aa
movb $0x0, %al
callq 0x2110
jmp 0x3298
cmpl $0x1, -0xc(%rbp)
jne 0x325d
movq -0x28(%rbp), %rax
movl $0x6, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, %esi
leaq 0x8f69(%rip), %rdi      # 0xc1bd
movb $0x0, %al
callq 0x2110
jmp 0x3296
cmpl $0x2, -0xc(%rbp)
jne 0x3283
movq -0x28(%rbp), %rax
movl $0x12, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, %esi
leaq 0x8f58(%rip), %rdi      # 0xc1d2
movb $0x0, %al
callq 0x2110
jmp 0x3294
movl -0xc(%rbp), %esi
leaq 0x8f5f(%rip), %rdi      # 0xc1ec
movb $0x0, %al
callq 0x2110
jmp 0x3296
jmp 0x3298
jmp 0x329a
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht-example.c
// Function: dht_hash
void
dht_hash(void *hash_return, int hash_size,
         const void *v1, int len1,
         const void *v2, int len2,
         const void *v3, int len3)
{
    const char *c1 = v1, *c2 = v2, *c3 = v3;
    char key[9];                /* crypt is limited to 8 characters */
    int i;

    memset(key, 0, 9);
#define CRYPT_HAPPY(c) ((c % 0x60) + 0x20)

    for(i = 0; i < 2 && i < len1; i++)
        key[i] = CRYPT_HAPPY(c1[i]);
    for(i = 0; i < 4 && i < len1; i++)
        key[2 + i] = CRYPT_HAPPY(c2[i]);
    for(i = 0; i < 2 && i < len1; i++)
        key[6 + i] = CRYPT_HAPPY(c3[i]);
    strncpy(hash_return, crypt(key, "jc"), hash_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x51(%rbp), %rdi
xorl %esi, %esi
movl $0x9, %edx
callq 0x2150
movl $0x0, -0x58(%rbp)
xorl %eax, %eax
cmpl $0x2, -0x58(%rbp)
movb %al, -0x59(%rbp)
jge 0x336b
movl -0x58(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setl %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x3374
jmp 0x33a0
movq -0x38(%rbp), %rax
movslq -0x58(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl $0x60, %ecx
cltd
idivl %ecx
addl $0x20, %edx
movb %dl, %cl
movslq -0x58(%rbp), %rax
movb %cl, -0x51(%rbp,%rax)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x3354
movl $0x0, -0x58(%rbp)
xorl %eax, %eax
cmpl $0x4, -0x58(%rbp)
movb %al, -0x5a(%rbp)
jge 0x33be
movl -0x58(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setl %al
movb %al, -0x5a(%rbp)
movb -0x5a(%rbp), %al
testb $0x1, %al
jne 0x33c7
jmp 0x33f7
movq -0x40(%rbp), %rax
movslq -0x58(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl $0x60, %ecx
cltd
idivl %ecx
addl $0x20, %edx
movb %dl, %cl
movl -0x58(%rbp), %eax
addl $0x2, %eax
cltq
movb %cl, -0x51(%rbp,%rax)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x33a7
movl $0x0, -0x58(%rbp)
xorl %eax, %eax
cmpl $0x2, -0x58(%rbp)
movb %al, -0x5b(%rbp)
jge 0x3415
movl -0x58(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setl %al
movb %al, -0x5b(%rbp)
movb -0x5b(%rbp), %al
testb $0x1, %al
jne 0x341e
jmp 0x344e
movq -0x48(%rbp), %rax
movslq -0x58(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl $0x60, %ecx
cltd
idivl %ecx
addl $0x20, %edx
movb %dl, %cl
movl -0x58(%rbp), %eax
addl $0x6, %eax
cltq
movb %cl, -0x51(%rbp,%rax)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x33fe
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x51(%rbp), %rdi
leaq 0x8d38(%rip), %rsi      # 0xc199
callq 0x2320
movq -0x68(%rbp), %rdi
movq %rax, %rsi
movslq -0xc(%rbp), %rdx
callq 0x2090
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht-example.c
// Function: dht_random_bytes
int
dht_random_bytes(void *buf, size_t size)
{
    int fd, rc, save;

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

    rc = read(fd, buf, size);

    save = errno;
    close(fd);
    errno = save;

    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x8ba9(%rip), %rdi      # 0xc040
xorl %esi, %esi
movb $0x0, %al
callq 0x22a0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x34b2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x34ed
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2180
movl %eax, -0x20(%rbp)
callq 0x2060
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %edi
callq 0x2170
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
callq 0x2060
movl -0x28(%rbp), %ecx
movl %ecx, (%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: find_bucket
static struct bucket *
find_bucket(unsigned const char *id, int af)
{
    struct bucket *b = af == AF_INET ? buckets : buckets6;

    if(b == NULL)
        return NULL;

    while(1) {
        if(b->next == NULL)
            return b;
        if(id_cmp(id, b->next->first) < 0)
            return b;
        b = b->next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x2, -0x14(%rbp)
jne 0x39c2
movq 0xd294(%rip), %rax      # 0x10c50
movq %rax, -0x28(%rbp)
jmp 0x39cd
movq 0xd28f(%rip), %rax      # 0x10c58
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x39e6
movq $0x0, -0x8(%rbp)
jmp 0x3a38
jmp 0x39e8
movq -0x20(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
jne 0x3a00
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3a38
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rsi
addq $0x4, %rsi
callq 0x3b70
cmpl $0x0, %eax
jge 0x3a27
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3a38
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x39e8
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: find_storage
static struct storage *
find_storage(const unsigned char *id)
{
    struct storage *st = storage;

    while(st) {
        if(id_cmp(id, st->id) == 0)
            break;
        st = st->next;
    }
    return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0xd1fd(%rip), %rax      # 0x10c60
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3a90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3b70
cmpl $0x0, %eax
jne 0x3a82
jmp 0x3a90
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x3a67
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: debugf
__attribute__ ((format (printf, 1, 2)))
#endif
static void
debugf(const char *format, ...)
{
    va_list args;
    va_start(args, format);
    if(dht_debug)
        vfprintf(dht_debug, format, args);
    va_end(args);
    if(dht_debug)
        fflush(dht_debug);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x3ad5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
cmpq $0x0, 0xd0d8(%rip)      # 0x10c00
je 0x3b3e
movq 0xd0cf(%rip), %rdi      # 0x10c00
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x22d0
leaq -0x20(%rbp), %rax
cmpq $0x0, 0xd0b6(%rip)      # 0x10c00
je 0x3b58
movq 0xd0ad(%rip), %rdi      # 0x10c00
callq 0x2240
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: flush_search_node
static void
flush_search_node(struct search_node *n, struct search *sr)
{
    int i = n - sr->nodes, j;
    for(j = i; j < sr->numnodes - 1; j++)
        sr->nodes[j] = sr->nodes[j + 1];
    sr->numnodes--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x30, %rcx
subq %rcx, %rax
movl $0xe8, %ecx
cqto
idivq %rcx
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0xce0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x3c2b
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movslq -0x18(%rbp), %rax
imulq $0xe8, %rax, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
movl -0x18(%rbp), %eax
addl $0x1, %eax
cltq
imulq $0xe8, %rax, %rax
addq %rax, %rsi
movl $0xe8, %edx
callq 0x2200
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3bd2
movq -0x10(%rbp), %rax
movl 0xce0(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xce0(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: new_search
static struct search *
new_search(void)
{
    struct search *sr, *oldest = NULL;

    /* Find the oldest done search */
    sr = searches;
    while(sr) {
        if(sr->done &&
           (oldest == NULL || oldest->step_time > sr->step_time))
            oldest = sr;
        sr = sr->next;
    }

    /* The oldest slot is expired. */
    if(oldest && oldest->step_time < now.tv_sec - DHT_SEARCH_EXPIRE_TIME)
        return oldest;

    /* Allocate a new slot. */
    if(numsearches < DHT_MAX_SEARCHES) {
        sr = calloc(1, sizeof(struct search));
        if(sr != NULL) {
            sr->next = searches;
            searches = sr;
            numsearches++;
            return sr;
        }
    }

    /* Return oldest slot if it's done. */
    if(oldest && oldest->done)
        return oldest;

    /* No available slots found, return NULL. */
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0x0, -0x18(%rbp)
movq 0xcfa1(%rip), %rax      # 0x10c08
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3cae
movq -0x10(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0x3c9d
cmpq $0x0, -0x18(%rbp)
je 0x3c95
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jle 0x3c9d
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0xce8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x3c6b
cmpq $0x0, -0x18(%rbp)
je 0x3cdd
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xcf4c(%rip), %rcx      # 0x10c10
subq $0xe88, %rcx            # imm = 0xE88
cmpq %rcx, %rax
jge 0x3cdd
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d5e
cmpl $0x400, 0xcf81(%rip)    # imm = 0x400
jge 0x3d3b
movl $0x1, %edi
movl $0xcf0, %esi            # imm = 0xCF0
callq 0x21a0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3d39
movq 0xcefe(%rip), %rcx      # 0x10c08
movq -0x10(%rbp), %rax
movq %rcx, 0xce8(%rax)
movq -0x10(%rbp), %rax
movq %rax, 0xcee8(%rip)      # 0x10c08
movl 0xcf42(%rip), %eax      # 0x10c68
addl $0x1, %eax
movl %eax, 0xcf39(%rip)      # 0x10c68
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d5e
jmp 0x3d3b
cmpq $0x0, -0x18(%rbp)
je 0x3d56
movq -0x18(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0x3d56
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d5e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: insert_search_bucket
static void
insert_search_bucket(struct bucket *b, struct search *sr)
{
    struct node *n;
    n = b->nodes;
    while(n) {
        insert_search_node(n->id, (struct sockaddr*)&n->ss, n->sslen,
                           sr, 0, NULL, 0);
        n = n->next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3dd2
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x18, %rsi
movq -0x18(%rbp), %rax
movl 0x98(%rax), %edx
movq -0x10(%rbp), %rcx
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x0, (%rsp)
callq 0x7a50
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3d8c
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: previous_bucket
static struct bucket *
previous_bucket(struct bucket *b)
{
    struct bucket *p = b->af == AF_INET ? buckets : buckets6;

    if(b == p)
        return NULL;

    while(1) {
        if(p->next == NULL)
            return NULL;
        if(p->next == b)
            return p;
        p = p->next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x3dfe
movq 0xce58(%rip), %rax      # 0x10c50
movq %rax, -0x20(%rbp)
jmp 0x3e09
movq 0xce53(%rip), %rax      # 0x10c58
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x3e25
movq $0x0, -0x8(%rbp)
jmp 0x3e6b
jmp 0x3e27
movq -0x18(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
jne 0x3e3f
movq $0x0, -0x8(%rbp)
jmp 0x3e6b
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x3e5a
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3e6b
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3e27
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: dht_nodes
int
dht_nodes(int af, int *good_return, int *dubious_return, int *cached_return,
          int *incoming_return)
{
    int good = 0, dubious = 0, cached = 0, incoming = 0;
    struct bucket *b = af == AF_INET ? buckets : buckets6;

    while(b) {
        struct node *n = b->nodes;
        while(n) {
            if(node_good(n)) {
                good++;
                if(n->time > n->reply_time)
                    incoming++;
            } else {
                dubious++;
            }
            n = n->next;
        }
        if(b->cached.ss_family > 0)
            cached++;
        b = b->next;
    }
    if(good_return)
        *good_return = good;
    if(dubious_return)
        *dubious_return = dubious;
    if(cached_return)
        *cached_return = cached;
    if(incoming_return)
        *incoming_return = incoming;
    return good + dubious;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
cmpl $0x2, -0x4(%rbp)
jne 0x422a
movq 0xca2c(%rip), %rax      # 0x10c50
movq %rax, -0x50(%rbp)
jmp 0x4235
movq 0xca27(%rip), %rax      # 0x10c58
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x42d9
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x42af
movq -0x48(%rbp), %rdi
callq 0x4330
cmpl $0x0, %eax
je 0x4295
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x48(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x48(%rbp), %rcx
cmpq 0xa8(%rcx), %rax
jle 0x4293
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x429e
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x48(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x4254
movq -0x40(%rbp), %rax
movzwl 0x30(%rax), %eax
cmpl $0x0, %eax
jle 0x42c5
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x423d
cmpq $0x0, -0x10(%rbp)
je 0x42e9
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x18(%rbp)
je 0x42f9
movl -0x30(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x4309
movl -0x34(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x4319
movl -0x38(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
addl -0x30(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: node_good
static int
node_good(struct node *node)
{
    return
        node->pinged <= 2 &&
        node->reply_time >= now.tv_sec - 7200 &&
        node->time >= now.tv_sec - 900;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x2, 0xb8(%rcx)
movb %al, -0x9(%rbp)
jg 0x438f
movq -0x8(%rbp), %rax
movq 0xa8(%rax), %rcx
movq 0xc8b4(%rip), %rdx      # 0x10c10
subq $0x1c20, %rdx           # imm = 0x1C20
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x9(%rbp)
jl 0x438f
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rax
movq 0xc891(%rip), %rcx      # 0x10c10
subq $0x384, %rcx            # imm = 0x384
cmpq %rcx, %rax
setge %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: common_bits
static int
common_bits(const unsigned char *id1, const unsigned char *id2)
{
    int i, j;
    unsigned char xor;
    for(i = 0; i < 20; i++) {
        if(id1[i] != id2[i])
            break;
    }

    if(i == 20)
        return 160;

    xor = id1[i] ^ id2[i];

    j = 0;
    while((xor & 0x80) == 0) {
        xor <<= 1;
        j++;
    }

    return 8 * i + j;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x14, -0x1c(%rbp)
jge 0x4c44
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4c37
jmp 0x4c44
jmp 0x4c39
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4c13
cmpl $0x14, -0x1c(%rbp)
jne 0x4c53
movl $0xa0, -0x4(%rbp)
jmp 0x4ca5
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movb %al, -0x21(%rbp)
movl $0x0, -0x20(%rbp)
movzbl -0x21(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x4c99
movzbl -0x21(%rbp), %eax
shll %eax
movb %al, -0x21(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4c77
movl -0x1c(%rbp), %eax
shll $0x3, %eax
addl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: find_node
static struct node *
find_node(const unsigned char *id, int af)
{
    struct bucket *b = find_bucket(id, af);
    struct node *n;

    if(b == NULL)
        return NULL;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x39a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4ce0
movq $0x0, -0x8(%rbp)
jmp 0x4d28
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4d20
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3b70
cmpl $0x0, %eax
jne 0x4d0f
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4d28
movq -0x28(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x4cec
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: rotate_secrets
static int
rotate_secrets(void)
{
    int rc;

    rotate_secrets_time = now.tv_sec + 900 + random() % 1800;

    memcpy(oldsecret, secret, sizeof(secret));
    rc = dht_random_bytes(secret, sizeof(secret));

    if(rc < 0)
        return -1;

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0xbc11(%rip), %rax      # 0x10c10
addq $0x384, %rax            # imm = 0x384
movq %rax, -0x10(%rbp)
callq 0x2230
movl $0x708, %ecx            # imm = 0x708
cqto
idivq %rcx
movq -0x10(%rbp), %rax
addq %rdx, %rax
movq %rax, 0xbc92(%rip)      # 0x10cb8
movq 0xbc7f(%rip), %rax      # 0x10cac
movq %rax, 0xbc94(%rip)      # 0x10cc8
leaq 0xbc71(%rip), %rdi      # 0x10cac
movl $0x8, %esi
callq 0x3480
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x5057
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x505e
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]dht/dht.c
// Function: expire_buckets
static int
expire_buckets(struct bucket *b)
{
    while(b) {
        struct node *n, *p;
        int changed = 0;

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

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

        if(changed)
            send_cached_ping(b);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x51c2
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x28(%rcx)
movb %al, -0x1d(%rbp)
je 0x50b3
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x4, 0xb8(%rax)
setge %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x50bc
jmp 0x50fa
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2040
jmp 0x508e
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x519f
jmp 0x5113
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0xc0(%rcx)
movb %al, -0x1e(%rbp)
je 0x513e
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
cmpl $0x4, 0xb8(%rax)
setge %al
movb %al, -0x1e(%rbp)
movb -0x1e(%rbp), %al
testb $0x1, %al
jne 0x5147
jmp 0x518b
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2040
jmp 0x5113
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x5106
cmpl $0x0, -0x1c(%rbp)
je 0x51ae
movq -0x8(%rbp), %rdi
callq 0xa1f0
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x507c
movq 0xba47(%rip), %rax      # 0x10c10
addq $0x78, %rax
movq %rax, -0x28(%rbp)
callq 0x2230
movl $0xf0, %ecx
cqto
idivq %rcx
movq -0x28(%rbp), %rax
addq %rdx, %rax
movq %rax, 0xbad2(%rip)      # 0x10cc0
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: dht_uninit
int
dht_uninit(void)
{
    if(dht_socket < 0 && dht_socket6 < 0) {
        errno = EINVAL;
        return -1;
    }

    dht_socket = -1;
    dht_socket6 = -1;

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

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

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

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

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
cmpl $0x0, 0x9fb9(%rip)      # 0xf1c8
jge 0x5231
cmpl $0x0, 0x9fb4(%rip)      # 0xf1cc
jge 0x5231
callq 0x2060
movl $0x16, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5394
movl $0xffffffff, 0x9f8d(%rip) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x9f87(%rip) # imm = 0xFFFFFFFF
cmpq $0x0, 0xba03(%rip)      # 0x10c50
je 0x52ac
movq 0xb9fa(%rip), %rax      # 0x10c50
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, 0xb9e4(%rip)      # 0x10c50
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x52a1
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rdi
callq 0x2040
jmp 0x526c
movq -0x10(%rbp), %rdi
callq 0x2040
jmp 0x5245
jmp 0x52ae
cmpq $0x0, 0xb9a2(%rip)      # 0x10c58
je 0x5315
movq 0xb999(%rip), %rax      # 0x10c58
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, 0xb983(%rip)      # 0x10c58
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x530a
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rdi
callq 0x2040
jmp 0x52d5
movq -0x20(%rbp), %rdi
callq 0x2040
jmp 0x52ae
jmp 0x5317
cmpq $0x0, 0xb941(%rip)      # 0x10c60
je 0x5356
movq 0xb938(%rip), %rax      # 0x10c60
movq %rax, -0x30(%rbp)
movq 0xb92d(%rip), %rax      # 0x10c60
movq 0x28(%rax), %rax
movq %rax, 0xb922(%rip)      # 0x10c60
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x30(%rbp), %rdi
callq 0x2040
jmp 0x5317
jmp 0x5358
cmpq $0x0, 0xb8a8(%rip)      # 0x10c08
je 0x538d
movq 0xb89f(%rip), %rax      # 0x10c08
movq %rax, -0x38(%rbp)
movq 0xb894(%rip), %rax      # 0x10c08
movq 0xce8(%rax), %rax
movq %rax, 0xb886(%rip)      # 0x10c08
movq -0x38(%rbp), %rdi
callq 0x2040
jmp 0x5358
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: is_martian
static int
is_martian(const struct sockaddr *sa)
{
    switch(sa->sa_family) {
    case AF_INET: {
        struct sockaddr_in *sin = (struct sockaddr_in*)sa;
        const unsigned char *address = (const unsigned char*)&sin->sin_addr;
        return sin->sin_port == 0 ||
            (address[0] == 0) ||
            (address[0] == 127) ||
            ((address[0] & 0xE0) == 0xE0);
    }
    case AF_INET6: {
        struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)sa;
        const unsigned char *address = (const unsigned char*)&sin6->sin6_addr;
        return sin6->sin6_port == 0 ||
            (address[0] == 0xFF) ||
            (address[0] == 0xFE && (address[1] & 0xC0) == 0x80) ||
            (memcmp(address, zeroes, 15) == 0 &&
             (address[15] == 0 || address[15] == 1)) ||
            (memcmp(address, v4prefix, 12) == 0);
    }

    default:
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x2, %eax
je 0x64ea
jmp 0x64dd
movl -0x34(%rbp), %eax
subl $0xa, %eax
je 0x6559
jmp 0x662d
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x35(%rbp)
je 0x6549
movq -0x20(%rbp), %rax
movzbl (%rax), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x35(%rbp)
je 0x6549
movq -0x20(%rbp), %rax
movzbl (%rax), %ecx
movb $0x1, %al
cmpl $0x7f, %ecx
movb %al, -0x35(%rbp)
je 0x6549
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
andl $0xe0, %eax
cmpl $0xe0, %eax
sete %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x6634
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movzwl 0x2(%rax), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x36(%rbp)
je 0x6620
movq -0x30(%rbp), %rax
movzbl (%rax), %ecx
movb $0x1, %al
cmpl $0xff, %ecx
movb %al, -0x36(%rbp)
je 0x6620
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x65c4
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %ecx
andl $0xc0, %ecx
movb $0x1, %al
cmpl $0x80, %ecx
movb %al, -0x36(%rbp)
je 0x6620
movq -0x30(%rbp), %rdi
leaq 0x5c61(%rip), %rsi      # 0xc230
movl $0xf, %edx
callq 0x2190
cmpl $0x0, %eax
jne 0x6602
movq -0x30(%rbp), %rax
movzbl 0xf(%rax), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x36(%rbp)
je 0x6620
movq -0x30(%rbp), %rax
movzbl 0xf(%rax), %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x36(%rbp)
je 0x6620
movq -0x30(%rbp), %rdi
leaq 0x5c43(%rip), %rsi      # 0xc250
movl $0xc, %edx
callq 0x2190
cmpl $0x0, %eax
sete %al
movb %al, -0x36(%rbp)
movb -0x36(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x6634
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: node_blacklisted
static int
node_blacklisted(const struct sockaddr *sa, int salen)
{
    int i;

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

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

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

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x80, %rax
jbe 0x665f
callq 0x2050
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x32f0
cmpl $0x0, %eax
je 0x6679
movl $0x1, -0x4(%rbp)
jmp 0x66c7
movl $0x0, -0x18(%rbp)
cmpl $0xa, -0x18(%rbp)
jge 0x66c0
movslq -0x18(%rbp), %rax
leaq 0xa63f(%rip), %rdi      # 0x10cd0
shlq $0x7, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x2190
cmpl $0x0, %eax
jne 0x66b3
movl $0x1, -0x4(%rbp)
jmp 0x66c7
jmp 0x66b5
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6680
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: debug_printable
static void
debug_printable(const unsigned char *buf, int buflen)
{
    int i;
    if(dht_debug) {
        for(i = 0; i < buflen; i++)
            putc(buf[i] >= 32 && buf[i] <= 126 ? buf[i] : '.', dht_debug);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, 0x9a39(%rip)      # 0x10c00
je 0x7231
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x722f
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jl 0x720b
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x7e, %eax
jg 0x720b
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x14(%rbp)
jmp 0x7215
movl $0x2e, %eax
movl %eax, -0x14(%rbp)
jmp 0x7215
movl -0x14(%rbp), %edi
movq 0x99e1(%rip), %rsi      # 0x10c00
callq 0x21b0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x71d0
jmp 0x7231
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: token_bucket
static int
token_bucket(void)
{
    if(token_bucket_tokens == 0) {
        token_bucket_tokens = MIN(MAX_TOKEN_BUCKET_TOKENS,
                                  100 * (now.tv_sec - token_bucket_time));
        token_bucket_time = now.tv_sec;
    }

    if(token_bucket_tokens == 0)
        return 0;

    token_bucket_tokens--;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x9a5d(%rip)      # 0x10ca8
jne 0x72a2
movq 0x99bc(%rip), %rax      # 0x10c10
subq 0x9a45(%rip), %rax      # 0x10ca0
imulq $0x64, %rax, %rcx
movl $0x190, %eax            # imm = 0x190
cmpq %rcx, %rax
jg 0x7274
movl $0x190, %eax            # imm = 0x190
movq %rax, -0x10(%rbp)
jmp 0x728a
movq 0x9995(%rip), %rax      # 0x10c10
subq 0x9a1e(%rip), %rax      # 0x10ca0
imulq $0x64, %rax, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl %eax, 0x9a14(%rip)      # 0x10ca8
movq 0x9975(%rip), %rax      # 0x10c10
movq %rax, 0x99fe(%rip)      # 0x10ca0
cmpl $0x0, 0x99ff(%rip)      # 0x10ca8
jne 0x72b4
movl $0x0, -0x4(%rbp)
jmp 0x72ca
movl 0x99ee(%rip), %eax      # 0x10ca8
addl $-0x1, %eax
movl %eax, 0x99e5(%rip)      # 0x10ca8
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop