LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_sync.c
// Function: callback_unshadow
static int
callback_unshadow(void * cookie)
{
	struct write_cookie * WC = cookie;
	struct btree * T = WC->T;
	struct node * root_shadow;

	/*
	 * Grab the root of the shadow tree, and use the (now clean) dirty
	 * tree as the shadow tree henceforth.
	 */
	root_shadow = T->root_shadow;
	T->root_shadow = T->root_dirty;
	btree_node_lock(T, T->root_shadow);

	/* Kill the old shadow tree, if there was one. */
	if (root_shadow != NULL) {
		/* This isn't a root any more, so release the root lock. */
		btree_node_unlock(T, root_shadow);

		/*
		 * Traverse the tree, re-pointing clean children at their
		 * dirty parents and freeing shadow nodes.
		 */
		unshadow(T, root_shadow);
	}

	/* Update number-of-pages-used value. */
	T->npages = T->nextblk - T->root_dirty->oldestleaf;

	/*
	 * We could issue a FREE call here, but since FREE is only advisory
	 * we need to call it elsewhere as well in order to avoid having data
	 * permanently stored even when it could all be freed.  Since we're
	 * calling FREE elsewhere anyway, don't bother calling it here.
	 */

	/* Register post-sync callback to be performed. */
	if (!events_immediate_register(WC->callback, WC->cookie, 0))
		goto err1;

	/* Free cookie. */
	free(WC);

	/* Success! */
	return (0);

err1:
	free(WC);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xaa50
cmpq $0x0, -0x28(%rbp)
je 0xa9ae
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xaa20
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xab70
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
subq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0x111b0
cmpq $0x0, %rax
jne 0xa9e8
jmp 0xa9fa
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
jmp 0xaa0a
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_sync.c
// Function: unshadow
static void
unshadow(struct btree * T, struct node * N)
{
	size_t i;

#ifdef SANITY_CHECKS
	/* Sanity check the B+Tree. */
	btree_sanity(T);
#endif

	/* Sanity-check: We should not have reached a dirty node. */
	assert(N->state != NODE_STATE_DIRTY);

	/* If this node is clean, reparent it and return. */
	if (N->state == NODE_STATE_CLEAN) {
		/* Do we need to release a lock on our shadow parent? */
		if (node_hasplock(N))
			btree_node_unlock(T, N->p_shadow);

		/* Our dirty parent is our only parent. */
		N->p_shadow = N->p_dirty;

		/* Acquire a lock on our new shadow parent. */
		if (node_hasplock(N))
			btree_node_lock(T, N->p_shadow);

		/* We're done. */
		return;
	}

	/* If this node has children, recurse down. */
	if (N->type == NODE_TYPE_PARENT) {
		for (i = 0; i <= N->nkeys; i++) {
			/* Recurse down. */
			unshadow(T, N->v.children[i]);

			/* Clear the child pointer. */
			N->v.children[i] = NULL;
		}
	}

#ifdef SANITY_CHECKS
	/* Sanity check the B+Tree. */
	btree_sanity(T);
#endif

	/* Destroy this node. */
	btree_node_destroy(T, N);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
shrb $0x2, %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x2, %eax
je 0xab96
jmp 0xabb5
leaq 0x14688(%rip), %rdi     # 0x1f225
leaq 0x14580(%rip), %rsi     # 0x1f124
movl $0x99, %edx
leaq 0x14692(%rip), %rcx     # 0x1f242
callq 0x21d0
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
shrb $0x2, %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xac19
movq -0x10(%rbp), %rdi
callq 0xac90
cmpl $0x0, %eax
je 0xabe8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xaa20
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rdi
callq 0xac90
cmpl $0x0, %eax
je 0xac17
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xaa50
jmp 0xac8a
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xac7d
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
ja 0xac7b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0xab70
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xac32
jmp 0xac7d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc2e0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_find.c
// Function: btree_find_kvpair
struct kvpair_const *
btree_find_kvpair(struct node * N, const struct kvldskey * k)
{
	size_t min, max, mid;
	int rc;

	/* We must be in a leaf node. */
	assert(N->type == NODE_TYPE_LEAF);

	/*
	 * This key could be anywhere from position 0 (less than key #0) up
	 * to position N->nkeys (greater than key #(nkeys - 1)).
	 */
	min = 0;
	max = N->nkeys;

	/* Keep looking until we figure out where it belongs. */
	while (min != max) {
		/* Compare to the midpoint. */
		mid = min + (max - min) / 2;
		rc = kvldskey_cmp2(k, N->u.pairs[mid].k, N->mlen_t);

		/* Adjust endpoints. */
		if (rc < 0) {
			/* The key is less than key #mid. */
			max = mid;
		} else if (rc > 0) {
			/* The key is greater than key #mid. */
			min = mid + 1;
		} else {
			/* Found it! */
			return (&N->u.pairs[mid]);
		}
	}

	/* We didn't find it. */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xace3
jmp 0xad02
leaq 0x143e9(%rip), %rdi     # 0x1f0d3
leaq 0x1457e(%rip), %rsi     # 0x1f26f
movl $0x29, %edx
leaq 0x1457f(%rip), %rcx     # 0x1f27c
callq 0x21d0
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0xadaa
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq -0x20(%rbp), %rcx
shrq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movzbl 0x1e(%rax), %eax
movl %eax, %edx
callq 0x18690
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0xad76
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xada5
cmpl $0x0, -0x34(%rbp)
jle 0xad8a
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xada3
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xadb2
jmp 0xada5
jmp 0xad16
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_find.c
// Function: btree_find_child
size_t
btree_find_child(struct node * N, const struct kvldskey * k)
{
	size_t min, max, mid;
	int rc;

	/* We must be in a parent node. */
	assert(N->type == NODE_TYPE_PARENT);

	/* This key could belong anywhere from child 0 up to N->nkeys. */
	min = 0;
	max = N->nkeys;

	/* Keep looking until we figure out where it belongs. */
	while (min != max) {
		/* Compare to the midpoint. */
		mid = min + (max - min) / 2;
		rc = kvldskey_cmp2(k, N->u.keys[mid], N->mlen_t);

		/* Adjust endpoints. */
		if (rc < 0) {
			/* The key is less than key #mid. */
			max = mid;
		} else if (rc > 0) {
			/* The key is greater than or equal to key #mid. */
			min = mid + 1;
		} else {
			/* Found it! */
			return (mid + 1);
		}
	}

	/* This must be it. */
	return (min);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xade3
jmp 0xae02
leaq 0x144e1(%rip), %rdi     # 0x1f2cb
leaq 0x1447e(%rip), %rsi     # 0x1f26f
movl $0x55, %edx
leaq 0x144ea(%rip), %rcx     # 0x1f2e7
callq 0x21d0
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0xae92
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq -0x20(%rbp), %rcx
shrq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
movzbl 0x1e(%rax), %eax
movl %eax, %edx
callq 0x18690
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0xae6c
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xae90
cmpl $0x0, -0x34(%rbp)
jle 0xae80
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xae8e
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xae9a
jmp 0xae90
jmp 0xae16
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_find.c
// Function: btree_find_leaf
int
btree_find_leaf(struct btree * T, struct node * N, const struct kvldskey * k,
    int (* callback)(void *, struct node *), void * cookie)
{
	struct findleaf_cookie * C;

	/* Bake a cookie. */
	if ((C = mpool_findleaf_malloc()) == NULL)
		goto err0;
	C->callback = callback;
	C->callback_range = NULL;
	C->cookie = cookie;
	C->T = T;
	C->N = N;
	C->k = k;
	C->h = 0;
	C->e = NULL;

	/* Lock the node. */
	btree_node_lock(C->T, C->N);

	/* Call into findleaf. */
	if (findleaf(C)) {
		/* Upon error, findleaf has already freed C. */
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
callq 0xaf80
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0xaee0
jmp 0xaf6c
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xafa0
movq -0x38(%rbp), %rdi
callq 0xafd0
cmpl $0x0, %eax
je 0xaf63
jmp 0xaf6c
movl $0x0, -0x4(%rbp)
jmp 0xaf73
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_find.c
// Function: btree_find_range
int
btree_find_range(struct btree * T, struct node * N,
    const struct kvldskey * k, int h,
    int (* callback)(void *, struct node *, struct kvldskey *),
    void * cookie)
{
	struct findleaf_cookie * C;

	/* Bake a cookie. */
	if ((C = mpool_findleaf_malloc()) == NULL)
		goto err0;
	C->callback = NULL;
	C->callback_range = callback;
	C->cookie = cookie;
	C->T = T;
	C->N = N;
	C->k = k;
	C->h = h;

	if ((C->e = kvldskey_create(NULL, 0)) == NULL)
		goto err1;

	/* Lock the node. */
	btree_node_lock(C->T, C->N);

	/* Call into findleaf. */
	if (findleaf(C)) {
		/* Upon error, findleaf has already freed C->e and C. */
		goto err0;
	}

	/* Success! */
	return (0);

err1:
	mpool_findleaf_free(C);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
callq 0xaf80
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0xb2a3
jmp 0xb347
movq -0x40(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x24(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x30(%rax)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x18530
movq -0x40(%rbp), %rcx
movq %rax, 0x38(%rcx)
cmpq $0x0, %rax
jne 0xb310
jmp 0xb33e
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xafa0
movq -0x40(%rbp), %rdi
callq 0xafd0
cmpl $0x0, %eax
je 0xb335
jmp 0xb347
movl $0x0, -0x4(%rbp)
jmp 0xb34e
movq -0x40(%rbp), %rdi
callq 0xb360
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_mutate.c
// Function: btree_mutate_mutable
int
btree_mutate_mutable(struct node * N)
{

	/* Sanity check. */
	assert(N->type == NODE_TYPE_LEAF);
	assert(N->state == NODE_STATE_DIRTY);
	assert(N->pagesize == (uint32_t)(-1));
	assert(N->v.H == NULL);

	/* Create a hash table for short-term key-value storage. */
	if ((N->v.H = kvhash_init()) == NULL)
		goto err0;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xb79f
jmp 0xb7be
leaq 0x1392d(%rip), %rdi     # 0x1f0d3
leaq 0x13bb7(%rip), %rsi     # 0x1f364
movl $0x19, %edx
leaq 0x13bba(%rip), %rcx     # 0x1f373
callq 0x21d0
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
shrb $0x2, %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x2, %eax
jne 0xb7d4
jmp 0xb7f3
leaq 0x13bc0(%rip), %rdi     # 0x1f39b
leaq 0x13b82(%rip), %rsi     # 0x1f364
movl $0x1a, %edx
leaq 0x13b85(%rip), %rcx     # 0x1f373
callq 0x21d0
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x18(%rax)
jne 0xb7ff
jmp 0xb81e
leaq 0x13bb2(%rip), %rdi     # 0x1f3b8
leaq 0x13b57(%rip), %rsi     # 0x1f364
movl $0x1b, %edx
leaq 0x13b5a(%rip), %rcx     # 0x1f373
callq 0x21d0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0xb82b
jmp 0xb84a
leaq 0x13ba4(%rip), %rdi     # 0x1f3d6
leaq 0x13b2b(%rip), %rsi     # 0x1f364
movl $0x1c, %edx
leaq 0x13b2e(%rip), %rcx     # 0x1f373
callq 0x21d0
callq 0x18790
movq -0x10(%rbp), %rcx
movq %rax, 0x48(%rcx)
cmpq $0x0, %rax
jne 0xb85f
jmp 0xb868
movl $0x0, -0x4(%rbp)
jmp 0xb86f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_mutate.c
// Function: btree_mutate_add
int
btree_mutate_add(struct node * N, struct kvpair_const * pos,
    const struct kvldskey * k, const struct kvldskey * v)
{
	size_t mlen;

	/* Update the all-keys-present-match-up-to value. */
	if (N->nkeys) {
		mlen = kvldskey_mlen(k, N->u.pairs[0].k);
		if (mlen < N->mlen_n)
			N->mlen_n = (uint8_t)mlen;
	} else {
		N->mlen_n = 0;
	}

	/* Record the pair. */
	pos->k = k;
	pos->v = v;

	/* Grow the hash table if necessary. */
	return (kvhash_postadd(N->v.H));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0xb92b
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rsi
callq 0x18730
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movzbl 0x1f(%rcx), %ecx
cmpq %rcx, %rax
jae 0xb929
movq -0x28(%rbp), %rax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1f(%rax)
jmp 0xb933
movq -0x8(%rbp), %rax
movb $0x0, 0x1f(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x18a40
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node.c
// Function: makepresent
static int
makepresent(struct btree * T, struct node * N)
{
	void * evict;
	struct node * N_evict;

	/* Add the node to the pool. */
	if (pool_rec_add(T->P, N, &evict))
		goto err0;
	N_evict = evict;

	/* If a node was evicted, make it non-present. */
	if (N_evict != NULL) {
		/* Sanity-check: We can only evict clean nodes. */
		assert(N_evict->state == NODE_STATE_CLEAN);

		/* Delete the node's data and mark it as non-present. */
		freedata(T, N_evict);
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x18eb0
cmpl $0x0, %eax
je 0xbfec
jmp 0xc046
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xc03d
movq -0x28(%rbp), %rax
movb 0x1c(%rax), %al
shrb $0x2, %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xc011
jmp 0xc030
leaq 0x13591(%rip), %rdi     # 0x1f5a9
leaq 0x13417(%rip), %rsi     # 0x1f436
movl $0x71, %edx
leaq 0x135a1(%rip), %rcx     # 0x1f5cc
callq 0x21d0
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc370
movl $0x0, -0x4(%rbp)
jmp 0xc04d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node.c
// Function: btree_node_destroy
void
btree_node_destroy(struct btree * T, struct node * N)
{

	/* Sanity-check: We can't free a node we're fetching. */
	assert(N->type != NODE_TYPE_READ);

	/* Make the page non-present. */
	if (N->type != NODE_TYPE_NP) {
		/* Remove from the node pool. */
		pool_rec_free(T->P, N);
		N->pool_cookie = NULL;

		/* Free the node data. */
		freedata(T, N);
	}

	/* Free node. */
	node_free(N);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x3, %eax
je 0xc303
jmp 0xc322
leaq 0x131c4(%rip), %rdi     # 0x1f4ce
leaq 0x13125(%rip), %rsi     # 0x1f436
movl $0x18b, %edx            # imm = 0x18B
leaq 0x131cb(%rip), %rcx     # 0x1f4e8
callq 0x21d0
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x2, %eax
je 0xc35d
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x190c0
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc370
movq -0x10(%rbp), %rdi
callq 0xfb50
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node.c
// Function: freedata
static void
freedata(struct btree * T, struct node * N)
{
	size_t i;

	/* Sanity check. */
	assert(node_present(N));

	/* If the node has data, free it. */
	if (N->nkeys != (size_t)(-1)) {
		/* Leaf or parent? */
		if (N->type == NODE_TYPE_LEAF) {
			/* Free array of key-value pairs. */
			free(N->u.pairs);
		} else {
			/* Free array of keys. */
			free(N->u.keys);

			/* Free children and their array. */
			for (i = 0; i <= N->nkeys; i++)
				node_free(N->v.children[i]);
			free(N->v.children);
		}

		/* This node no longer has any data. */
		N->nkeys = (size_t)(-1);
	}

	/* If the node has a serialized buffer, free it. */
	if (N->pagebuf) {
		free(N->pagebuf);
		N->pagebuf = NULL;
	}

	/* We just removed a reason for keeping the parent(s) present. */
	btree_node_unlock(T, N->p_shadow);
	btree_node_unlock(T, N->p_dirty);

	/* This node now has indeterminate height. */
	N->height = -1;

	/* Mark the node as not present. */
	N->type = NODE_TYPE_NP;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xca10
cmpl $0x0, %eax
je 0xc390
jmp 0xc3af
leaq 0x13188(%rip), %rdi     # 0x1f51f
leaq 0x13098(%rip), %rsi     # 0x1f436
movl $0x3b, %edx
leaq 0x1334b(%rip), %rcx     # 0x1f6f5
callq 0x21d0
movq -0x10(%rbp), %rax
cmpq $-0x1, 0x38(%rax)
je 0xc439
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xc3da
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2040
jmp 0xc42d
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2040
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
ja 0xc420
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xfb50
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xc3ef
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq $-0x1, 0x38(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xc45d
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xcb20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xcb20
movq -0x10(%rbp), %rax
movb $-0x1, 0x1d(%rax)
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %cl
andb $-0x4, %cl
orb $0x2, %cl
movb %cl, 0x1c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node.c
// Function: btree_node_pageout_recursive
void
btree_node_pageout_recursive(struct btree * T, struct node * N)
{
	size_t i;

	/* If this node is not paged in, return immediately. */
	if ((N->type == NODE_TYPE_NP) || (N->type == NODE_TYPE_READ))
		return;

	/* Otherwise, pick up a lock in order to keep the node paged in. */
	btree_node_lock(T, N);

	/* Recurse down. */
	if (N->type == NODE_TYPE_PARENT) {
		for (i = 0; i <= N->nkeys; i++)
			btree_node_pageout_recursive(T, N->v.children[i]);
	}

	/* Evict this node from the pool. */
	pool_rec_free(T->P, N);
	N->pool_cookie = NULL;

	/* Free the node data. */
	freedata(T, N);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x2, %eax
je 0xc4d2
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x3, %eax
jne 0xc4d7
jmp 0xc55e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc570
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xc534
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
ja 0xc532
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0xc4a0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xc4fd
jmp 0xc534
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x190c0
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc370
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node.c
// Function: btree_node_descend
int
btree_node_descend(struct btree * T, struct node * N,
    int (* callback)(void *, struct node *), void * cookie)
{
	struct descend * C;

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct descend))) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->N = N;

	/* Fetch the node or schedule an immediate callback. */
	if (!node_present(N)) {
		if (btree_node_fetch(T, N, callback_descend, C))
			goto err1;
	} else {
		btree_node_lock(T, N);
		if (!events_immediate_register(callback_descend, C, 0))
			goto err1;
	}

	/* Success! */
	return (0);

err1:
	free(C);
err0:
	/* Failure! */
	return (-1);
}

// 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)
movl $0x18, %edi
callq 0x22a0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xcb81
jmp 0xcc0e
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rdi
callq 0xca10
cmpl $0x0, %eax
jne 0xcbd3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rcx
leaq 0x5b(%rip), %rdx        # 0xcc20
callq 0xc060
cmpl $0x0, %eax
je 0xcbd1
jmp 0xcc05
jmp 0xcbfc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc570
movq -0x30(%rbp), %rsi
leaq 0x35(%rip), %rdi        # 0xcc20
xorl %edx, %edx
callq 0x111b0
cmpq $0x0, %rax
jne 0xcbfa
jmp 0xcc05
jmp 0xcbfc
movl $0x0, -0x4(%rbp)
jmp 0xcc15
movq -0x30(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node.c
// Function: callback_descend
static int
callback_descend(void * cookie)
{
	struct descend * C = cookie;
	int rc;

	/* Invoke the callback. */
	rc = (C->callback)(C->cookie, C->N);

	/* Free the cookie. */
	free(C);

	/* Return status from callback. */
	return (rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rsi
callq *%rax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2040
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node_split.c
// Function: btree_node_split_nparts
size_t
btree_node_split_nparts(struct btree * T, struct node * N)
{
	size_t breakat;

	/* We will split when we exceed 2/3 of a full node. */
	breakat = (T->pagelen * 2)/3;

	/* Handle leaves and parents separately. */
	if (N->type == NODE_TYPE_LEAF)
		return (nparts_leaf(N, breakat));
	else
		return (nparts_parent(N, breakat));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
shlq %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xd0ec
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xd110
movq %rax, -0x8(%rbp)
jmp 0xd0fd
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xd200
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node_split.c
// Function: nparts_leaf
static size_t
nparts_leaf(struct node * N, size_t breakat)
{
	size_t nparts;
	size_t i;
	size_t cursize;

	/* This is a leaf. */
	assert(N->type == NODE_TYPE_LEAF);

	/* Scan through nodes. */
	nparts = 1;
	cursize = SERIALIZE_OVERHEAD;
	for (i = 0; i < N->nkeys; i++) {
		/* Should we split before this next key-value pair? */
		if (cursize > breakat) {
			nparts += 1;
			cursize = SERIALIZE_OVERHEAD;
		}

		/* Add the key size. */
		cursize += kvldskey_serial_size(N->u.pairs[i].k);

		/* Add the value size. */
		cursize += kvldskey_serial_size(N->u.pairs[i].v);
	}

	/* Return the number of parts. */
	return (nparts);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xd133
jmp 0xd152
leaq 0x11f99(%rip), %rdi     # 0x1f0d3
leaq 0x125e1(%rip), %rsi     # 0x1f722
movl $0x18, %edx
leaq 0x12650(%rip), %rcx     # 0x1f79d
callq 0x21d0
movq $0x1, -0x18(%rbp)
movq $0xa, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0xd1f2
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0xd196
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq $0xa, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movzbl (%rax), %eax
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xd16a
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node_split.c
// Function: nparts_parent
static size_t
nparts_parent(struct node * N, size_t breakat)
{
	size_t nparts;
	size_t i;
	size_t cursize;

	/* This is a parent. */
	assert(N->type == NODE_TYPE_PARENT);

	/* Scan through nodes. */
	nparts = 1;
	cursize = SERIALIZE_OVERHEAD + SERIALIZE_PERCHILD;
	for (i = 1; i <= N->nkeys; i++) {
		/* Should we split before this next child? */
		if (cursize > breakat) {
			nparts += 1;
			cursize = SERIALIZE_OVERHEAD + SERIALIZE_PERCHILD;
		} else {
			/* Add the separator key size. */
			cursize += kvldskey_serial_size(N->u.keys[i-1]);

			/* Add the next child. */
			cursize += SERIALIZE_PERCHILD;
		}
	}

	/* Return the number of parts. */
	return (nparts);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xd223
jmp 0xd242
leaq 0x120a1(%rip), %rdi     # 0x1f2cb
leaq 0x124f1(%rip), %rsi     # 0x1f722
movl $0x38, %edx
leaq 0x1258a(%rip), %rcx     # 0x1f7c7
callq 0x21d0
movq $0x1, -0x18(%rbp)
movq $0x1e, -0x28(%rbp)
movq $0x1, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x38(%rcx), %rax
ja 0xd2c7
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0xd288
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq $0x1e, -0x28(%rbp)
jmp 0xd2b7
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movzbl (%rax), %eax
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x14, %rax
movq %rax, -0x28(%rbp)
jmp 0xd2b9
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xd25a
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node_split.c
// Function: btree_node_split
int
btree_node_split(struct btree * T, struct node * N,
    const struct kvldskey ** keys, struct node ** parents, size_t * nparts)
{
	size_t breakat;
	int rc;

	/* Sanity-check: We should never try to split a non-dirty node. */
	assert(N->state == NODE_STATE_DIRTY);

	/* We will split when we exceed 2/3 of a full node. */
	breakat = (T->pagelen * 2)/3;

	/* Handle leaves and parents separately. */
	if (N->type == NODE_TYPE_LEAF)
		rc = split_leaf(T, N, keys, parents, nparts, breakat);
	else
		rc = split_parent(T, N, keys, parents, nparts, breakat);

	/* On success, update recorded size of tree. */
	if (rc == 0)
		T->nnodes += *nparts - 1;

	/* Return status from split_leaf or split_parent. */
	return (rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
shrb $0x2, %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x2, %eax
jne 0xd312
jmp 0xd331
leaq 0x12082(%rip), %rdi     # 0x1f39b
leaq 0x12402(%rip), %rsi     # 0x1f722
movl $0x155, %edx            # imm = 0x155
leaq 0x12409(%rip), %rcx     # 0x1f735
callq 0x21d0
movq -0x8(%rbp), %rax
movq (%rax), %rax
shlq %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xd37c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
callq 0xd3d0
movl %eax, -0x34(%rbp)
jmp 0xd39c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
callq 0xd600
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0xd3b9
movq -0x28(%rbp), %rax
movq (%rax), %rcx
subq $0x1, %rcx
movq -0x8(%rbp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node_split.c
// Function: makeleaf
static struct node *
makeleaf(struct btree * T, size_t nkeys, struct kvpair_const * pairs)
{
	struct kvpair_const * new_pairs;
	struct node * N;

	/* Allocate new array of pairs and copy keys and values. */
	if (IMALLOC(new_pairs, nkeys, struct kvpair_const))
		goto err0;
	memcpy(new_pairs, pairs, nkeys * sizeof(struct kvpair_const));

	/* Construct a leaf node. */
	if ((N = btree_node_mkleaf(T, nkeys, new_pairs)) == NULL)
		goto err1;

	/* Success! */
	return (N);

err1:
	free(new_pairs);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl $0x10, %esi
callq 0xd9f0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0xd985
cmpq $0x0, -0x18(%rbp)
jbe 0xd985
jmp 0xd9de
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
callq 0x2280
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movl $0x1, %esi
xorl %edx, %edx
xorl %r8d, %r8d
movl %r8d, %r9d
movq %r9, %r8
movq %rax, (%rsp)
callq 0xbe40
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xd9cb
jmp 0xd9d5
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd9e6
movq -0x28(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node_split.c
// Function: makeparent
static struct node *
makeparent(struct btree * T, int height, size_t nkeys,
    const struct kvldskey ** keys, struct node ** children)
{
	const struct kvldskey ** new_keys;
	struct node ** new_children;
	struct node * N;

	/* Allocate new key array and copy pointers to keys. */
	if (IMALLOC(new_keys, nkeys, const struct kvldskey *))
		goto err0;
	memcpy(new_keys, keys, nkeys * sizeof(const struct kvldskey *));

	/* Allocate new child array and copy pointers to children. */
	if (IMALLOC(new_children, nkeys + 1, struct node *))
		goto err1;
	memcpy(new_children, children, (nkeys + 1) * sizeof(struct node *));

	/* Construct a parent node. */
	if ((N = btree_node_mkparent(T, height,
	    nkeys, new_keys, new_children)) == NULL)
		goto err2;

	/* Success! */
	return (N);

err2:
	free(new_children);
err1:
	free(new_keys);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movl $0x8, %esi
callq 0xd9f0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0xdacf
cmpq $0x0, -0x20(%rbp)
jbe 0xdacf
jmp 0xdb75
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
shlq $0x3, %rdx
callq 0x2280
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
movl $0x8, %esi
callq 0xd9f0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0xdb10
movq -0x20(%rbp), %rax
addq $0x1, %rax
cmpq $0x0, %rax
jbe 0xdb10
jmp 0xdb6c
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
shlq $0x3, %rdx
callq 0x2280
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
xorl %esi, %esi
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0xbe40
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
jne 0xdb59
jmp 0xdb63
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xdb7d
movq -0x40(%rbp), %rdi
callq 0x2040
movq -0x38(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node_split.c
// Function: destroy_parent_nokeys
static void
destroy_parent_nokeys(struct btree * T, struct node * N)
{

	/* Detach the keys from the node. */
	free(N->u.keys);

	/* Detach the children from the node. */
	free(N->v.children);

	/* This node has no data to free. */
	N->nkeys = (size_t)(-1);

	/* Free the node. */
	btree_node_destroy(T, N);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq $-0x1, 0x38(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc2e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree_node_merge.c
// Function: btree_node_merge
int
btree_node_merge(struct btree * T,
    struct node ** c_in, const struct kvldskey ** k_in,
    struct node ** c_out, const struct kvldskey ** k_out, size_t nsep)
{
	size_t i;
	int rc;

	/* Sanity-check: All the nodes should be dirty. */
	for (i = 0; i <= nsep; i++)
		assert(c_in[i]->state == NODE_STATE_DIRTY);

	/* Handle leaves and parents separately. */
	if (c_in[0]->type == NODE_TYPE_LEAF)
		rc = merge_leaf(T, c_in, c_out, nsep);
	else
		rc = merge_parent(T, c_in, k_in, c_out, nsep);

	/* If we succeeded, update the tree size. */
	if (!rc) {
		/* The tree has shrunk. */
		T->nnodes -= nsep;
	}

	/* If we failed, copy the nodes and keys. */
	if (rc) {
		memcpy(c_out, c_in, (nsep + 1) * sizeof(struct node *));
		memcpy(k_out, k_in, nsep * sizeof(const struct kvldskey *));
	}

	/* Return code from merge_(leaf|parent). */
	return (rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
ja 0xdddf
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movb 0x1c(%rax), %al
shrb $0x2, %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x2, %eax
jne 0xddb0
jmp 0xddcf
leaq 0x11b12(%rip), %rdi     # 0x1f8c9
leaq 0x11b2e(%rip), %rsi     # 0x1f8ec
movl $0xb1, %edx
leaq 0x11b35(%rip), %rcx     # 0x1f8ff
callq 0x21d0
jmp 0xddd1
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xdd88
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xde0d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0xde80
movl %eax, -0x3c(%rbp)
jmp 0xde29
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0xe0e0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0xde42
movq -0x30(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x48(%rax)
cmpl $0x0, -0x3c(%rbp)
je 0xde76
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x1, %rdx
shlq $0x3, %rdx
callq 0x2280
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
shlq $0x3, %rdx
callq 0x2280
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/serialize.c
// Function: serialize_merge_size
size_t
serialize_merge_size(struct node * N)
{
	size_t headerlen;

	/*
	 * The merge size is just the serialized size minus the overhead
	 * size of the page header.
	 */
	if (N->root)
		headerlen = SERIALIZE_OVERHEAD + SERIALIZE_ROOT;
	else
		headerlen = SERIALIZE_OVERHEAD;
	return (serialize_size(N) - headerlen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb 0x1c(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xfa4a
movq $0x12, -0x10(%rbp)
jmp 0xfa52
movq $0xa, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xecb0
subq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/node.c
// Function: node_alloc
struct node *
node_alloc(uint64_t pagenum, uint64_t oldestleaf, uint32_t pagesize)
{
	struct node * N;

	/* Allocate node. */
	if ((N = malloc(sizeof(struct node))) == NULL)
		goto err0;
	memset(N, 0, sizeof(struct node));

	/* Initialize values. */
	N->pagenum = pagenum;
	N->oldestleaf = oldestleaf;
	N->oldestncleaf = oldestleaf;
	N->pagesize = pagesize;
	N->type = NODE_TYPE_NP;
	N->state = NODE_STATE_CLEAN;
	N->needmerge = 1;
	N->height = -1;
	N->nkeys = (size_t)(-1);
	N->pagebuf = NULL;

	/* Success! */
	return (N);

err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x58, %edi
callq 0x22a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0xfa9c
jmp 0xfb33
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x58, %edx
callq 0x21e0
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rax
movb 0x1c(%rax), %cl
andb $-0x4, %cl
orb $0x2, %cl
movb %cl, 0x1c(%rax)
movq -0x28(%rbp), %rax
movb 0x1c(%rax), %cl
andb $-0xd, %cl
orb $0x0, %cl
movb %cl, 0x1c(%rax)
movq -0x28(%rbp), %rax
movb 0x1c(%rax), %cl
andb $-0x41, %cl
orb $0x40, %cl
movb %cl, 0x1c(%rax)
movq -0x28(%rbp), %rax
movb $-0x1, 0x1d(%rax)
movq -0x28(%rbp), %rax
movq $-0x1, 0x38(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xfb3b
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/Tarsnap[P]kivaloo/liball/../libcperciva/network/network_accept.c
// Function: network_accept
void *
network_accept(int fd, int (* callback)(void *, int), void * cookie)
{
	struct accept_cookie * C;

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct accept_cookie))) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->fd = fd;

	/*
	 * Register a network event.  A connection arriving on a listening
	 * socket is treated by select(2) as the socket becoming readable.
	 */
	if (events_network_register(callback_accept, C, C->fd,
	    EVENTS_NETWORK_OP_READ))
		goto err1;

	/* Success! */
	return (C);

err1:
	free(C);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x18, %edi
callq 0x22a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x139a9
jmp 0x139fd
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x34(%rip), %rdi        # 0x13a10
xorl %ecx, %ecx
callq 0x11750
cmpl $0x0, %eax
je 0x139ea
jmp 0x139f4
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x13a05
movq -0x28(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/network/network_accept.c
// Function: callback_accept
static int
callback_accept(void * cookie)
{
	struct accept_cookie * C = cookie;
	int s;
	int rc;

	/* Attempt to accept a new connection. */
	if ((s = accept(C->fd, NULL, NULL)) == -1) {
		/* If a connection isn't available, reset the callback. */
		if ((errno == EAGAIN) ||
#if EAGAIN != EWOULDBLOCK
		    (errno == EWOULDBLOCK) ||
#endif
		    (errno == ECONNABORTED) ||
		    (errno == EINTR))
			goto tryagain;
	}

	/* Call the upstream callback. */
	rc = (C->callback)(C->cookie, s);

	/* Free the cookie. */
	free(C);

	/* Return status from upstream callback. */
	return (rc);

tryagain:
	/* Reset the callback. */
	return (events_network_register(callback_accept, C, C->fd,
	    EVENTS_NETWORK_OP_READ));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x2360
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x13a61
callq 0x20a0
cmpl $0xb, (%rax)
je 0x13a5d
callq 0x20a0
cmpl $0x67, (%rax)
je 0x13a5d
callq 0x20a0
cmpl $0x4, (%rax)
jne 0x13a5f
jmp 0x13a89
jmp 0x13a61
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rdi
movl -0x1c(%rbp), %esi
callq *%rax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2040
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x13aa5
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
leaq -0x8b(%rip), %rdi       # 0x13a10
xorl %ecx, %ecx
callq 0x11750
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/daemonize.c
// Function: daemonize
int
daemonize(const char * spid)
{
	struct ipc_sync * IS;

	/*
	 * Create a pipe for the child to notify the parent when it has
	 * finished daemonizing.
	 */
	if ((IS = ipc_sync_init()) == NULL)
		goto err0;

	/*
	 * Fork into the parent process (which waits for a poke and exits)
	 * and the child process (which keeps going).
	 */
	switch (fork()) {
	case -1:
		/* Fork failed. */
		warnp("fork");
		goto err1;
	case 0:
		/* In child process. */
		break;
	default:
		/* In parent process; wait for the child to start. */
		if (ipc_sync_wait(IS))
			goto err1;

		/*
		 * Free resources associated with ${IS}.  These would be
		 * released by the following _exit(), but we're explicitly
		 * releasing them for the benefit of leak checkers.
		 */
		if (ipc_sync_done(IS))
			goto err0;

		/* We have been poked by the child.  Exit. */
		_exit(0);
	}

	/* Set ourselves to be a session leader. */
	if (setsid() == -1) {
		warnp("setsid");
		goto die;
	}

	/* Write out our pid file. */
	if (writepid(spid))
		goto die;

	/* Tell the parent that we've started. */
	if (ipc_sync_signal(IS))
		goto die;

	/* Clean up. */
	if (ipc_sync_done(IS))
		goto die;

	/* Success! */
	return (0);

err1:
	ipc_sync_done(IS);
err0:
	/* Failure! */
	return (-1);

die:
	/*
	 * We're in the child and something bad happened; the parent will be
	 * notified when we die thanks to the pipe being closed.
	 */
	_exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
callq 0x15b80
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x14820
jmp 0x1492a
callq 0x23e0
movl %eax, %ecx
movl %ecx, -0x1c(%rbp)
subl $-0x1, %eax
je 0x1483a
jmp 0x14831
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x14876
jmp 0x14878
jmp 0x1483c
callq 0x20a0
cmpl $0x0, (%rax)
je 0x14861
leaq 0xbb72(%rip), %rdi      # 0x203bf
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x1486f
leaq 0xbb57(%rip), %rdi      # 0x203bf
movb $0x0, %al
callq 0x182f0
jmp 0x14871
jmp 0x14921
jmp 0x148a5
movq -0x18(%rbp), %rdi
callq 0x15c50
cmpl $0x0, %eax
je 0x1488b
jmp 0x14921
movq -0x18(%rbp), %rdi
callq 0x15ee0
cmpl $0x0, %eax
je 0x1489e
jmp 0x1492a
xorl %edi, %edi
callq 0x20c0
callq 0x2220
cmpl $-0x1, %eax
jne 0x148e8
jmp 0x148b1
callq 0x20a0
cmpl $0x0, (%rax)
je 0x148d6
leaq 0xbb02(%rip), %rdi      # 0x203c4
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x148e4
leaq 0xbae7(%rip), %rdi      # 0x203c4
movb $0x0, %al
callq 0x182f0
jmp 0x148e6
jmp 0x14933
movq -0x10(%rbp), %rdi
callq 0x14950
cmpl $0x0, %eax
je 0x148f8
jmp 0x14933
movq -0x18(%rbp), %rdi
callq 0x15de0
cmpl $0x0, %eax
je 0x14908
jmp 0x14933
movq -0x18(%rbp), %rdi
callq 0x15ee0
cmpl $0x0, %eax
je 0x14918
jmp 0x14933
movl $0x0, -0x4(%rbp)
jmp 0x1493a
movq -0x18(%rbp), %rdi
callq 0x15ee0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1493a
xorl %edi, %edi
callq 0x20c0
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)