LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_page_new
static int
mdb_page_new(MDB_cursor *mc, uint32_t flags, int num, MDB_page **mp)
{
	MDB_page	*np;
	int rc;

	if ((rc = mdb_page_alloc(mc, num, &np)))
		return rc;
	DPRINTF(("allocated new mpage %"Z"u, page size %u",
	    np->mp_pgno, mc->mc_txn->mt_env->me_psize));
	np->mp_flags = flags | P_DIRTY;
	np->mp_lower = (PAGEHDRSZ-PAGEBASE);
	np->mp_upper = mc->mc_txn->mt_env->me_psize - PAGEBASE;

	if (IS_BRANCH(np))
		mc->mc_db->md_branch_pages++;
	else if (IS_LEAF(np))
		mc->mc_db->md_leaf_pages++;
	else if (IS_OVERFLOW(np)) {
		mc->mc_db->md_overflow_pages += num;
		np->mp_pages = num;
	}
	*mp = np;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
movq %rsp, %rdx
movl %ebp, %esi
callq 0x6f78
testl %eax, %eax
jne 0x6d8e
orl $0x10, %r15d
movq (%rsp), %rcx
movw %r15w, 0xa(%rcx)
movw $0x10, 0xc(%rcx)
movq 0x18(%r14), %rdx
movq 0x20(%rdx), %rdx
movzwl 0x10(%rdx), %edx
movw %dx, 0xe(%rcx)
testb $0x1, %r15b
jne 0x6d79
movzwl %r15w, %edx
testb $0x2, %dl
jne 0x6d83
testb $0x4, %dl
je 0x6d8b
movslq %ebp, %rdx
movq 0x28(%r14), %rsi
addq %rdx, 0x18(%rsi)
movl %ebp, 0xc(%rcx)
jmp 0x6d8b
movq 0x28(%r14), %rdx
incq 0x8(%rdx)
jmp 0x6d8b
movq 0x28(%r14), %rdx
incq 0x10(%rdx)
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_cursor_touch
static int
mdb_cursor_touch(MDB_cursor *mc)
{
	int rc = MDB_SUCCESS;

	if (mc->mc_dbi >= CORE_DBS && !(*mc->mc_dbflag & DB_DIRTY)) {
		MDB_cursor mc2;
		MDB_xcursor mcx;
		if (TXN_DBI_CHANGED(mc->mc_txn, mc->mc_dbi))
			return MDB_BAD_DBI;
		mdb_cursor_init(&mc2, mc->mc_txn, MAIN_DBI, &mcx);
		rc = mdb_page_search(&mc2, &mc->mc_dbx->md_name, MDB_PS_MODIFY);
		if (rc)
			 return rc;
		*mc->mc_dbflag |= DB_DIRTY;
	}
	mc->mc_top = 0;
	if (mc->mc_snum) {
		do {
			rc = mdb_page_touch(mc);
		} while (!rc && ++(mc->mc_top) < mc->mc_snum);
		mc->mc_top = mc->mc_snum-1;
	}
	return rc;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movq %rdi, %rbx
movl 0x20(%rdi), %ecx
cmpq $0x2, %rcx
jb 0x6e0c
movq 0x38(%rbx), %rax
testb $0x1, (%rax)
jne 0x6e0c
movq 0x18(%rbx), %rsi
movq 0x20(%rsi), %rax
movq 0x60(%rsi), %rdx
movl (%rdx,%rcx,4), %edx
movq 0x98(%rax), %rdi
movl $0xffff87c4, %eax       # imm = 0xFFFF87C4
cmpl (%rdi,%rcx,4), %edx
jne 0x6e42
movq %rsp, %r14
leaq 0x188(%rsp), %rcx
movq %r14, %rdi
movl $0x1, %edx
callq 0x40be
movq 0x30(%rbx), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x9d28
testl %eax, %eax
jne 0x6e42
movq 0x38(%rbx), %rax
orb $0x1, (%rax)
movw $0x0, 0x42(%rbx)
cmpw $0x0, 0x40(%rbx)
je 0x6e40
movq %rbx, %rdi
callq 0xa0ec
movzwl 0x40(%rbx), %ecx
testl %eax, %eax
jne 0x6e38
movzwl 0x42(%rbx), %edx
incl %edx
movw %dx, 0x42(%rbx)
cmpw %cx, %dx
jb 0x6e19
decl %ecx
movw %cx, 0x42(%rbx)
jmp 0x6e42
xorl %eax, %eax
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_node_del
static void
mdb_node_del(MDB_cursor *mc, int ksize)
{
	MDB_page *mp = mc->mc_pg[mc->mc_top];
	indx_t	indx = mc->mc_ki[mc->mc_top];
	unsigned int	 sz;
	indx_t		 i, j, numkeys, ptr;
	MDB_node	*node;
	char		*base;

	DPRINTF(("delete node %u on %s page %"Z"u", indx,
	    IS_LEAF(mp) ? "leaf" : "branch", mdb_dbg_pgno(mp)));
	numkeys = NUMKEYS(mp);
	mdb_cassert(mc, indx < numkeys);

	if (IS_LEAF2(mp)) {
		int x = numkeys - 1 - indx;
		base = LEAF2KEY(mp, indx, ksize);
		if (x)
			memmove(base, base + ksize, x * ksize);
		mp->mp_lower -= sizeof(indx_t);
		mp->mp_upper += ksize - sizeof(indx_t);
		return;
	}

	node = NODEPTR(mp, indx);
	sz = NODESIZE + node->mn_ksize;
	if (IS_LEAF(mp)) {
		if (F_ISSET(node->mn_flags, F_BIGDATA))
			sz += sizeof(pgno_t);
		else
			sz += NODEDSZ(node);
	}
	sz = EVEN(sz);

	ptr = mp->mp_ptrs[indx];
	for (i = j = 0; i < numkeys; i++) {
		if (i != indx) {
			mp->mp_ptrs[j] = mp->mp_ptrs[i];
			if (mp->mp_ptrs[i] < ptr)
				mp->mp_ptrs[j] += sz;
			j++;
		}
	}

	base = (char *)mp + mp->mp_upper + PAGEBASE;
	memmove(base + sz, base, ptr - mp->mp_upper);

	mp->mp_lower -= sizeof(indx_t);
	mp->mp_upper += sz;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movzwl 0x42(%rdi), %eax
movq 0x48(%rdi,%rax,8), %r14
movzwl 0x148(%rdi,%rax,2), %edx
movzwl 0xc(%r14), %ecx
leal 0x1fff0(%rcx), %eax
shrl %eax
movzwl %ax, %eax
cmpl %edx, %eax
jbe 0x74a4
movl %esi, %ebx
movzwl 0xa(%r14), %esi
testb $0x20, %sil
jne 0x73e4
movl %edx, %ecx
movzwl 0x10(%r14,%rcx,2), %edx
movzwl 0x6(%r14,%rdx), %edi
leal 0x8(%rdi), %ebx
testb $0x2, %sil
je 0x7432
testb $0x1, 0x4(%r14,%rdx)
jne 0x742d
addl (%r14,%rdx), %ebx
jmp 0x7432
movl %edx, %esi
notl %esi
addl %esi, %eax
je 0x7416
movslq %ebx, %rcx
imulq %rcx, %rdx
leaq (%r14,%rdx), %rsi
leaq (%r14,%rdx), %rdi
addq $0x10, %rdi
addq %rcx, %rsi
addq $0x10, %rsi
imull %ebx, %eax
movslq %eax, %rdx
callq 0x22d0
movzwl 0xc(%r14), %ecx
addl $-0x2, %ecx
movw %cx, 0xc(%r14)
addw 0xe(%r14), %bx
addl $-0x2, %ebx
movw %bx, 0xe(%r14)
jmp 0x749c
addl $0x10, %edi
movl %edi, %ebx
incl %ebx
andl $-0x2, %ebx
xorl %esi, %esi
xorl %edi, %edi
cmpq %rsi, %rcx
je 0x7461
movzwl 0x10(%r14,%rsi,2), %r8d
movl %ebx, %r9d
cmpw %dx, %r8w
jb 0x7452
xorl %r9d, %r9d
addl %r9d, %r8d
movzwl %di, %r9d
movw %r8w, 0x10(%r14,%r9,2)
incl %edi
incq %rsi
cmpq %rsi, %rax
jne 0x743b
movzwl 0xe(%r14), %eax
leaq (%r14,%rax), %rsi
movl %ebx, %edi
addq %rsi, %rdi
subq %rax, %rdx
callq 0x22d0
movd 0xc(%r14), %xmm0
movdqa 0x7ea3(%rip), %xmm1     # 0xf330
pinsrw $0x1, %ebx, %xmm1
paddw %xmm0, %xmm1
movd %xmm1, 0xc(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x18(%rdi), %rax
movq 0x20(%rax), %rdi
leaq 0x8716(%rip), %rsi      # 0xfbc9
leaq 0x871e(%rip), %rdx      # 0xfbd8
movl $0x1bfc, %ecx           # imm = 0x1BFC
callq 0xbfbd
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_page_get
static int
mdb_page_get(MDB_txn *txn, pgno_t pgno, MDB_page **ret, int *lvl)
{
	MDB_env *env = txn->mt_env;
	MDB_page *p = NULL;
	int level;

	if (! (txn->mt_flags & (MDB_TXN_RDONLY|MDB_TXN_WRITEMAP))) {
		MDB_txn *tx2 = txn;
		level = 1;
		do {
			MDB_ID2L dl = tx2->mt_u.dirty_list;
			unsigned x;
			/* Spilled pages were dirtied in this txn and flushed
			 * because the dirty list got full. Bring this page
			 * back in from the map (but don't unspill it here,
			 * leave that unless page_touch happens again).
			 */
			if (tx2->mt_spill_pgs) {
				MDB_ID pn = pgno << 1;
				x = mdb_midl_search(tx2->mt_spill_pgs, pn);
				if (x <= tx2->mt_spill_pgs[0] && tx2->mt_spill_pgs[x] == pn) {
					p = (MDB_page *)(env->me_map + env->me_psize * pgno);
					goto done;
				}
			}
			if (dl[0].mid) {
				unsigned x = mdb_mid2l_search(dl, pgno);
				if (x <= dl[0].mid && dl[x].mid == pgno) {
					p = dl[x].mptr;
					goto done;
				}
			}
			level++;
		} while ((tx2 = tx2->mt_parent) != NULL);
	}

	if (pgno < txn->mt_next_pgno) {
		level = 0;
		p = (MDB_page *)(env->me_map + env->me_psize * pgno);
	} else {
		DPRINTF(("page %"Z"u not found", pgno));
		txn->mt_flags |= MDB_TXN_ERROR;
		return MDB_PAGE_NOTFOUND;
	}

done:
	*ret = p;
	if (lvl)
		*lvl = level;
	return MDB_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq %rax, (%rsp)
testb $0xa, 0x7e(%rdi)
jne 0x7557
leaq (%r15,%r15), %r13
movl $0x1, %r14d
movq %rbx, %r12
movq 0x40(%r12), %rdi
movq 0x48(%r12), %rbp
testq %rdi, %rdi
je 0x7526
movq %r13, %rsi
callq 0xb9bc
movl %eax, %eax
movq 0x40(%r12), %rcx
cmpq %rax, (%rcx)
jb 0x7526
cmpq %r13, (%rcx,%rax,8)
je 0x75a0
cmpq $0x0, (%rbp)
je 0x754b
movq %rbp, %rdi
movq %r15, %rsi
callq 0xbea3
movl %eax, %eax
cmpq %rax, (%rbp)
jb 0x754b
shlq $0x4, %rax
cmpq %r15, (%rbp,%rax)
je 0x75b1
incl %r14d
movq (%r12), %r12
testq %r12, %r12
jne 0x74fd
cmpq %r15, 0x10(%rbx)
jbe 0x7588
movq (%rsp), %rcx
movl 0x10(%rcx), %eax
imulq %r15, %rax
addq 0x38(%rcx), %rax
xorl %r14d, %r14d
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
xorl %eax, %eax
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x7591
movl %r14d, (%rcx)
jmp 0x7591
orb $0x2, 0x7c(%rbx)
movl $0xffff87b3, %eax       # imm = 0xFFFF87B3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rcx
movl 0x10(%rcx), %eax
imulq %r15, %rax
addq 0x38(%rcx), %rax
jmp 0x756f
addq %rax, %rbp
movq 0x8(%rbp), %rax
jmp 0x756f
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_page_unspill
static int
mdb_page_unspill(MDB_txn *txn, MDB_page *mp, MDB_page **ret)
{
	MDB_env *env = txn->mt_env;
	const MDB_txn *tx2;
	unsigned x;
	pgno_t pgno = mp->mp_pgno, pn = pgno << 1;

	for (tx2 = txn; tx2; tx2=tx2->mt_parent) {
		if (!tx2->mt_spill_pgs)
			continue;
		x = mdb_midl_search(tx2->mt_spill_pgs, pn);
		if (x <= tx2->mt_spill_pgs[0] && tx2->mt_spill_pgs[x] == pn) {
			MDB_page *np;
			int num;
			if (txn->mt_dirty_room == 0)
				return MDB_TXN_FULL;
			if (IS_OVERFLOW(mp))
				num = mp->mp_pages;
			else
				num = 1;
			if (env->me_flags & MDB_WRITEMAP) {
				np = mp;
			} else {
				np = mdb_page_malloc(txn, num);
				if (!np)
					return ENOMEM;
				if (num > 1)
					memcpy(np, mp, num * env->me_psize);
				else
					mdb_page_copy(np, mp, env->me_psize);
			}
			if (tx2 == txn) {
				/* If in current txn, this page is no longer spilled.
				 * If it happens to be the last page, truncate the spill list.
				 * Otherwise mark it as deleted by setting the LSB.
				 */
				if (x == txn->mt_spill_pgs[0])
					txn->mt_spill_pgs[0]--;
				else
					txn->mt_spill_pgs[x] |= 1;
			}	/* otherwise, if belonging to a parent txn, the
				 * page remains spilled until child commits
				 */

			mdb_page_dirty(txn, np);
			np->mp_flags |= P_DIRTY;
			*ret = np;
			break;
		}
	}
	return MDB_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, %r14
movq 0x20(%rdi), %rbx
movq (%rsi), %r12
addq %r12, %r12
movq %rdi, %r13
movq 0x40(%r13), %rdi
testq %rdi, %rdi
je 0x7602
movq %r12, %rsi
callq 0xb9bc
movl %eax, %ebp
movq 0x40(%r13), %rax
cmpq %rbp, (%rax)
jb 0x7602
cmpq %r12, (%rax,%rbp,8)
je 0x761c
movq (%r13), %r13
testq %r13, %r13
jne 0x75e0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x80(%r14)
je 0x766e
movl $0x1, %eax
testb $0x4, 0xa(%r15)
je 0x7636
movl 0xc(%r15), %eax
testb $0x8, 0xe(%rbx)
jne 0x7675
movq %r14, %rdi
movl %eax, %esi
movl %eax, 0xc(%rsp)
callq 0x76c4
testq %rax, %rax
je 0x767a
movq %rax, %r12
movl 0x10(%rbx), %edx
movl 0xc(%rsp), %eax
cmpl $0x2, %eax
jl 0x7681
imull %eax, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2240
jmp 0x768c
movl $0xffff87bc, %eax       # imm = 0xFFFF87BC
jmp 0x760d
movq %r15, %r12
jmp 0x768c
movl $0xc, %eax
jmp 0x760d
movq %r12, %rdi
movq %r15, %rsi
callq 0xa635
cmpq %r14, %r13
jne 0x76a6
movq 0x40(%r14), %rax
cmpq %rbp, (%rax)
jne 0x76a2
decq %rbp
movq %rbp, (%rax)
jmp 0x76a6
orb $0x1, (%rax,%rbp,8)
movq %r14, %rdi
movq %r12, %rsi
callq 0xa956
orb $0x10, 0xa(%r12)
movq 0x10(%rsp), %rax
movq %r12, (%rax)
jmp 0x760b
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_page_malloc
static MDB_page *
mdb_page_malloc(MDB_txn *txn, unsigned num)
{
	MDB_env *env = txn->mt_env;
	MDB_page *ret = env->me_dpages;
	size_t psize = env->me_psize, sz = psize, off;
	/* For ! #MDB_NOMEMINIT, psize counts how much to init.
	 * For a single page alloc, we init everything after the page header.
	 * For multi-page, we init the final page; if the caller needed that
	 * many pages they will be filling in at least up to the last page.
	 */
	if (num == 1) {
		if (ret) {
			VGMEMP_ALLOC(env, ret, sz);
			VGMEMP_DEFINED(ret, sizeof(ret->mp_next));
			env->me_dpages = ret->mp_next;
			return ret;
		}
		psize -= off = PAGEHDRSZ;
	} else {
		sz *= num;
		off = sz - psize;
	}
	if ((ret = malloc(sz)) != NULL) {
		VGMEMP_ALLOC(env, ret, sz);
		if (!(env->me_flags & MDB_NOMEMINIT)) {
			memset((char *)ret + off, 0, psize);
			ret->mp_pad = 0;
		}
	} else {
		txn->mt_flags |= MDB_TXN_ERROR;
	}
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r12
movl 0x10(%r12), %edi
cmpl $0x1, %esi
jne 0x76f8
movq 0xc0(%r12), %r14
testq %r14, %r14
je 0x770c
movq (%r14), %rax
movq %rax, 0xc0(%r12)
jmp 0x774b
movl %esi, %eax
imulq %rdi, %rax
movq %rax, %r13
subq %rdi, %r13
movq %rdi, %r15
movq %rax, %rdi
jmp 0x7716
leaq -0x10(%rdi), %r15
movl $0x10, %r13d
callq 0x2270
testq %rax, %rax
je 0x7744
movq %rax, %r14
testb $0x1, 0xf(%r12)
jne 0x774b
movq %r14, %rdi
addq %r13, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2190
movw $0x0, 0x8(%r14)
jmp 0x774b
orb $0x2, 0x7c(%rbx)
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_node_shrink
static void
mdb_node_shrink(MDB_page *mp, indx_t indx)
{
	MDB_node *node;
	MDB_page *sp, *xp;
	char *base;
	indx_t delta, nsize, len, ptr;
	int i;

	node = NODEPTR(mp, indx);
	sp = (MDB_page *)NODEDATA(node);
	delta = SIZELEFT(sp);
	nsize = NODEDSZ(node) - delta;

	/* Prepare to shift upward, set len = length(subpage part to shift) */
	if (IS_LEAF2(sp)) {
		len = nsize;
		if (nsize & 1)
			return;		/* do not make the node uneven-sized */
	} else {
		xp = (MDB_page *)((char *)sp + delta); /* destination subpage */
		for (i = NUMKEYS(sp); --i >= 0; )
			xp->mp_ptrs[i] = sp->mp_ptrs[i] - delta;
		len = PAGEHDRSZ;
	}
	sp->mp_upper = sp->mp_lower;
	COPY_PGNO(sp->mp_pgno, mp->mp_pgno);
	SETDSZ(node, nsize);

	/* Shift <lower nodes...initial part of subpage> upward */
	base = (char *)mp + mp->mp_upper + PAGEBASE;
	memmove(base + delta, base, (char *)sp + len - base);

	ptr = mp->mp_ptrs[indx];
	for (i = NUMKEYS(mp); --i >= 0; ) {
		if (mp->mp_ptrs[i] <= ptr)
			mp->mp_ptrs[i] += delta;
	}
	mp->mp_upper += delta;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
movzwl 0x10(%rdi,%r14,2), %r9d
leaq (%rdi,%r9), %rax
movzwl 0x6(%rdi,%r9), %ecx
movzwl 0x16(%rcx,%rax), %ebp
movzwl 0x14(%rcx,%rax), %edx
subl %edx, %ebp
movzwl (%rdi,%r9), %esi
subl %ebp, %esi
testb $0x20, 0x12(%rcx,%rax)
movzwl %bp, %edi
jne 0x8dcf
leal -0x10(%rdx), %r11d
movw $0x10, %r8w
cmpl $0x2, %r11d
jb 0x8dd8
movl %r11d, %r10d
shrl %r10d
incq %r10
andl $-0x2, %r11d
addq %rcx, %r9
addq %r11, %r9
addq %rbx, %r9
addq $0x16, %r9
movzwl (%r9), %r11d
subl %edi, %r11d
movw %r11w, (%r9,%rdi)
decq %r10
addq $-0x2, %r9
cmpq $0x1, %r10
ja 0x8db4
jmp 0x8dd8
movl %esi, %r8d
testb $0x1, %sil
jne 0x8e41
addq %rax, %rcx
addq $0x8, %rcx
movw %dx, 0xe(%rcx)
movq (%rbx), %rdx
movq %rdx, (%rcx)
movw %si, (%rax)
movw $0x0, 0x2(%rax)
movzwl 0xe(%rbx), %esi
addq %rbx, %rsi
addq %rsi, %rdi
movzwl %r8w, %edx
addq %rcx, %rdx
subq %rsi, %rdx
callq 0x22d0
movzwl 0xc(%rbx), %eax
addl $-0x10, %eax
cmpl $0x2, %eax
jb 0x8e3d
movzwl 0x10(%rbx,%r14,2), %ecx
shrl %eax
movzwl 0xe(%rbx,%rax,2), %edx
cmpw %cx, %dx
ja 0x8e30
addl %ebp, %edx
movw %dx, 0xe(%rbx,%rax,2)
decq %rax
leaq 0x1(%rax), %rdx
cmpq $0x1, %rdx
ja 0x8e1f
addw %bp, 0xe(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_cursor_open
int
mdb_cursor_open(MDB_txn *txn, MDB_dbi dbi, MDB_cursor **ret)
{
	MDB_cursor	*mc;
	size_t size = sizeof(MDB_cursor);

	if (!ret || !TXN_DBI_EXIST(txn, dbi, DB_VALID))
		return EINVAL;

	if (txn->mt_flags & MDB_TXN_BLOCKED)
		return MDB_BAD_TXN;

	if (dbi == FREE_DBI && !F_ISSET(txn->mt_flags, MDB_TXN_RDONLY))
		return EINVAL;

	if (txn->mt_dbs[dbi].md_flags & MDB_DUPSORT)
		size += sizeof(MDB_xcursor);

	if ((mc = malloc(size)) != NULL) {
		mdb_cursor_init(mc, txn, dbi, (MDB_xcursor *)(mc + 1));
		if (txn->mt_cursors) {
			mc->mc_next = txn->mt_cursors[dbi];
			txn->mt_cursors[dbi] = mc;
			mc->mc_flags |= C_UNTRACK;
		}
	} else {
		return ENOMEM;
	}

	*ret = mc;

	return MDB_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
testq %rdx, %rdx
sete %cl
testq %rdi, %rdi
sete %dl
movl $0x16, %eax
orb %cl, %dl
jne 0x92a9
movl %esi, %ebp
movq %rdi, %r14
cmpl %esi, 0x78(%rdi)
jbe 0x92a9
movq 0x70(%r14), %rcx
movl %ebp, %r12d
testb $0x8, (%rcx,%r12)
je 0x92a9
movl 0x7c(%r14), %ecx
movl $0xffff87c2, %eax       # imm = 0xFFFF87C2
testb $0x13, %cl
je 0x92b2
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
andl $0x20000, %ecx          # imm = 0x20000
orl %ebp, %ecx
movl $0x16, %eax
je 0x92a9
movq 0x58(%r14), %rax
leaq (%r12,%r12,2), %rcx
shlq $0x4, %rcx
movzwl 0x4(%rax,%rcx), %eax
testb $0x4, %al
movl $0x188, %eax            # imm = 0x188
movl $0x378, %edi            # imm = 0x378
cmoveq %rax, %rdi
callq 0x2270
testq %rax, %rax
je 0x9326
movq %rax, %r15
movq %rax, %rcx
addq $0x188, %rcx            # imm = 0x188
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x40be
movq 0x68(%r14), %rax
testq %rax, %rax
je 0x931f
movq (%rax,%r12,8), %rcx
movq %rcx, (%r15)
movq %r15, (%rax,%r12,8)
orb $0x40, 0x44(%r15)
movq %r15, (%rbx)
xorl %eax, %eax
jmp 0x92a9
movl $0xc, %eax
jmp 0x92a9
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_cursor_renew
int
mdb_cursor_renew(MDB_txn *txn, MDB_cursor *mc)
{
	if (!mc || !TXN_DBI_EXIST(txn, mc->mc_dbi, DB_VALID))
		return EINVAL;

	if ((mc->mc_flags & C_UNTRACK) || txn->mt_cursors)
		return EINVAL;

	if (txn->mt_flags & MDB_TXN_BLOCKED)
		return MDB_BAD_TXN;

	mdb_cursor_init(mc, txn, mc->mc_dbi, mc->mc_xcursor);
	return MDB_SUCCESS;
}

// Assembly:
testq %rsi, %rsi
sete %cl
testq %rdi, %rdi
sete %dl
movl $0x16, %eax
orb %cl, %dl
jne 0x9389
movq %rdi, %r8
movl 0x20(%rsi), %edx
cmpl 0x78(%rdi), %edx
jae 0x9389
movq 0x70(%r8), %rcx
testb $0x8, (%rcx,%rdx)
je 0x9389
testb $0x40, 0x44(%rsi)
jne 0x9389
cmpq $0x0, 0x68(%r8)
jne 0x9389
movl $0xffff87c2, %eax       # imm = 0xFFFF87C2
testb $0x13, 0x7c(%r8)
jne 0x9389
pushq %rax
movq 0x10(%rsi), %rcx
movq %rsi, %rdi
movq %r8, %rsi
callq 0x40be
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_cursor_count
int
mdb_cursor_count(MDB_cursor *mc, size_t *countp)
{
	MDB_node	*leaf;

	if (mc == NULL || countp == NULL)
		return EINVAL;

	if (mc->mc_xcursor == NULL)
		return MDB_INCOMPATIBLE;

	if (mc->mc_txn->mt_flags & MDB_TXN_BLOCKED)
		return MDB_BAD_TXN;

	if (!(mc->mc_flags & C_INITIALIZED))
		return EINVAL;

	if (!mc->mc_snum || (mc->mc_flags & C_EOF))
		return MDB_NOTFOUND;

	leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]);
	if (!F_ISSET(leaf->mn_flags, F_DUPDATA)) {
		*countp = 1;
	} else {
		if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED))
			return EINVAL;

		*countp = mc->mc_xcursor->mx_db.md_entries;
	}
	return MDB_SUCCESS;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x93a0
movl $0x16, %eax
retq
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x93b9
movq 0x18(%rdi), %rdx
movl $0xffff87c2, %eax       # imm = 0xFFFF87C2
testb $0x13, 0x7c(%rdx)
je 0x93bf
retq
movl $0xffff87c0, %eax       # imm = 0xFFFF87C0
retq
movl 0x44(%rdi), %edx
testb $0x1, %dl
je 0x939a
movl $0xffff87b2, %eax       # imm = 0xFFFF87B2
testb $0x2, %dl
jne 0x93b8
cmpw $0x0, 0x40(%rdi)
je 0x93b8
movzwl 0x42(%rdi), %eax
movq 0x48(%rdi,%rax,8), %rdx
movzwl 0x148(%rdi,%rax,2), %eax
movzwl 0x10(%rdx,%rax,2), %edi
movl $0x1, %eax
testb $0x4, 0x4(%rdx,%rdi)
je 0x940c
testb $0x1, 0x44(%rcx)
movl $0x16, %eax
je 0x93b8
movq 0x1a8(%rcx), %rax
movq %rax, (%rsi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_cursor_close
void
mdb_cursor_close(MDB_cursor *mc)
{
	if (mc && !mc->mc_backup) {
		/* remove from txn, if tracked */
		if ((mc->mc_flags & C_UNTRACK) && mc->mc_txn->mt_cursors) {
			MDB_cursor **prev = &mc->mc_txn->mt_cursors[mc->mc_dbi];
			while (*prev && *prev != mc) prev = &(*prev)->mc_next;
			if (*prev == mc)
				*prev = mc->mc_next;
		}
		free(mc);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x941e
cmpq $0x0, 0x8(%rdi)
je 0x941f
retq
testb $0x40, 0x44(%rdi)
je 0x2030
movq 0x18(%rdi), %rax
movq 0x68(%rax), %rax
testq %rax, %rax
je 0x2030
movl 0x20(%rdi), %ecx
leaq (%rax,%rcx,8), %rcx
movq %rcx, %rax
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x9451
cmpq %rdi, %rcx
jne 0x9441
cmpq %rdi, %rcx
jne 0x2030
movq (%rdi), %rcx
movq %rcx, (%rax)
jmp 0x2030
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_del
int
mdb_del(MDB_txn *txn, MDB_dbi dbi,
    MDB_val *key, MDB_val *data)
{
	if (!key || !TXN_DBI_EXIST(txn, dbi, DB_USRVALID))
		return EINVAL;

	if (txn->mt_flags & (MDB_TXN_RDONLY|MDB_TXN_BLOCKED))
		return (txn->mt_flags & MDB_TXN_RDONLY) ? EACCES : MDB_BAD_TXN;

	if (!F_ISSET(txn->mt_dbs[dbi].md_flags, MDB_DUPSORT)) {
		/* must ignore any data */
		data = NULL;
	}

	return mdb_del0(txn, dbi, key, data, 0);
}

// Assembly:
testq %rdx, %rdx
sete %r8b
testq %rdi, %rdi
sete %r9b
movl $0x16, %eax
orb %r8b, %r9b
jne 0x94bc
cmpl %esi, 0x78(%rdi)
jbe 0x94bc
movq 0x70(%rdi), %r9
movl %esi, %r8d
testb $0x10, (%r9,%r8)
je 0x94bc
movl 0x7c(%rdi), %eax
testl $0x20013, %eax          # imm = 0x20013
je 0x94bd
btl $0x11, %eax
movl $0xffff87c2, %ecx       # imm = 0xFFFF87C2
movl $0xd, %eax
cmovael %ecx, %eax
retq
movq 0x58(%rdi), %rax
leaq (%r8,%r8,2), %r8
shlq $0x4, %r8
movzwl 0x4(%rax,%r8), %eax
xorl %r8d, %r8d
testb $0x4, %al
cmoveq %r8, %rcx
xorl %r8d, %r8d
jmp 0x94dd
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_del0
static int
mdb_del0(MDB_txn *txn, MDB_dbi dbi,
	MDB_val *key, MDB_val *data, unsigned flags)
{
	MDB_cursor mc;
	MDB_xcursor mx;
	MDB_cursor_op op;
	MDB_val rdata, *xdata;
	int		 rc, exact = 0;
	DKBUF;

	DPRINTF(("====> delete db %u key [%s]", dbi, DKEY(key)));

	mdb_cursor_init(&mc, txn, dbi, &mx);

	if (data) {
		op = MDB_GET_BOTH;
		rdata = *data;
		xdata = &rdata;
	} else {
		op = MDB_SET;
		xdata = NULL;
		flags |= MDB_NODUPDATA;
	}
	rc = mdb_cursor_set(&mc, key, xdata, op, &exact);
	if (rc == 0) {
		/* let mdb_page_split know about this cursor if needed:
		 * delete will trigger a rebalance; if it needs to move
		 * a node from one page to another, it will have to
		 * update the parent's separator key(s). If the new sepkey
		 * is larger than the current one, the parent page may
		 * run out of space, triggering a split. We need this
		 * cursor to be consistent until the end of the rebalance.
		 */
		mc.mc_flags |= C_UNTRACK;
		mc.mc_next = txn->mt_cursors[dbi];
		txn->mt_cursors[dbi] = &mc;
		rc = mdb_cursor_del(&mc, flags);
		txn->mt_cursors[dbi] = mc.mc_next;
	}
	return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x398, %rsp            # imm = 0x398
movl %r8d, %ebp
movq %rcx, %r13
movq %rdx, %r12
movl %esi, %r15d
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
leaq 0x20(%rsp), %r14
leaq 0x1a8(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x40be
testq %r13, %r13
je 0x9546
movups (%r13), %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
leaq 0x20(%rsp), %rdi
leaq 0xc(%rsp), %r8
movq %r12, %rsi
movl $0x2, %ecx
jmp 0x955d
orl $0x20, %ebp
leaq 0x20(%rsp), %rdi
leaq 0xc(%rsp), %r8
movq %r12, %rsi
xorl %edx, %edx
movl $0xf, %ecx
callq 0x5ab9
testl %eax, %eax
jne 0x9596
orb $0x40, 0x64(%rsp)
movq 0x68(%rbx), %rax
movl %r15d, %r15d
movq (%rax,%r15,8), %rcx
movq %rcx, 0x20(%rsp)
movq %r14, (%rax,%r15,8)
movq %r14, %rdi
movl %ebp, %esi
callq 0x8aee
movq 0x20(%rsp), %rcx
movq 0x68(%rbx), %rdx
movq %rcx, (%rdx,%r15,8)
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_put
int
mdb_put(MDB_txn *txn, MDB_dbi dbi,
    MDB_val *key, MDB_val *data, unsigned int flags)
{
	MDB_cursor mc;
	MDB_xcursor mx;

	if (!key || !data || !TXN_DBI_EXIST(txn, dbi, DB_USRVALID))
		return EINVAL;

	if (flags & ~(MDB_NOOVERWRITE|MDB_NODUPDATA|MDB_RESERVE|MDB_APPEND|MDB_APPENDDUP))
		return EINVAL;

	if (txn->mt_flags & (MDB_TXN_RDONLY|MDB_TXN_BLOCKED))
		return (txn->mt_flags & MDB_TXN_RDONLY) ? EACCES : MDB_BAD_TXN;

	mdb_cursor_init(&mc, txn, dbi, &mx);
	return mdb_cursor_put(&mc, key, data, flags);
}

// Assembly:
movl $0x16, %eax
testq %rdi, %rdi
je 0x9646
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movq %rdx, %r15
testq %rdx, %rdx
je 0x9638
movq %rcx, %r14
testq %rcx, %rcx
je 0x9638
movl %esi, %edx
movq %rdi, %rsi
cmpl %edx, 0x78(%rdi)
jbe 0x9638
movl %r8d, %ebx
testl $0xfff8ffcf, %r8d       # imm = 0xFFF8FFCF
jne 0x9638
movq 0x70(%rsi), %rcx
movl %edx, %edi
movb (%rcx,%rdi), %cl
andb $0x10, %cl
je 0x9638
movl 0x7c(%rsi), %eax
testl $0x20013, %eax          # imm = 0x20013
je 0x9615
btl $0x11, %eax
movl $0xffff87c2, %ecx       # imm = 0xFFFF87C2
movl $0xd, %eax
cmovael %ecx, %eax
jmp 0x9638
movq %rsp, %r12
leaq 0x188(%rsp), %rcx
movq %r12, %rdi
callq 0x40be
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x41b9
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_default_cmp
static void
mdb_default_cmp(MDB_txn *txn, MDB_dbi dbi)
{
	uint16_t f = txn->mt_dbs[dbi].md_flags;

	txn->mt_dbxs[dbi].md_cmp =
		(f & MDB_REVERSEKEY) ? mdb_cmp_memnr :
		(f & MDB_INTEGERKEY) ? mdb_cmp_cint  : mdb_cmp_memn;

	txn->mt_dbxs[dbi].md_dcmp =
		!(f & MDB_DUPSORT) ? 0 :
		((f & MDB_INTEGERDUP)
		 ? ((f & MDB_DUPFIXED)   ? mdb_cmp_int   : mdb_cmp_cint)
		 : ((f & MDB_REVERSEDUP) ? mdb_cmp_memnr : mdb_cmp_memn));
}

// Assembly:
movl %edx, %eax
movq %rax, %rcx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %r9
movzwl 0x4(%rsi,%r9), %edx
testb $0x8, %dl
leaq 0x1fff(%rip), %rsi      # 0xb97d
leaq 0xc7b(%rip), %r8        # 0xa600
movq %r8, %r10
cmoveq %rsi, %r10
testb $0x2, %dl
leaq 0x1f8e(%rip), %rcx      # 0xb924
cmovneq %rcx, %r10
movq %r10, 0x10(%rdi,%r9)
testb $0x4, %dl
jne 0x99a8
xorl %ecx, %ecx
jmp 0x99c4
testb $0x20, %dl
jne 0x99b6
testb $0x40, %dl
cmoveq %rsi, %rcx
jmp 0x99c4
testb $0x10, %dl
leaq -0x6997(%rip), %rcx     # 0x3029
cmoveq %r8, %rcx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movq %rcx, 0x18(%rdi,%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_dbi_close
void mdb_dbi_close(MDB_env *env, MDB_dbi dbi)
{
	char *ptr;
	if (dbi < CORE_DBS || dbi >= env->me_maxdbs)
		return;
	ptr = env->me_dbxs[dbi].md_name.mv_data;
	/* If there was no name, this was already closed */
	if (ptr) {
		env->me_dbxs[dbi].md_name.mv_data = NULL;
		env->me_dbxs[dbi].md_name.mv_size = 0;
		env->me_dbflags[dbi] = 0;
		env->me_dbiseqs[dbi]++;
		free(ptr);
	}
}

// Assembly:
cmpl $0x2, %esi
jb 0x9a1d
cmpl %esi, 0x24(%rdi)
jbe 0x9a1d
movq 0x88(%rdi), %rdx
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rsi
shlq $0x4, %rsi
movq 0x8(%rdx,%rsi), %rax
testq %rax, %rax
je 0x9a1d
xorps %xmm0, %xmm0
movups %xmm0, (%rdx,%rsi)
movq 0x90(%rdi), %rdx
movw $0x0, (%rdx,%rcx,2)
movq 0x98(%rdi), %rdx
incl (%rdx,%rcx,4)
movq %rax, %rdi
jmp 0x2030
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_drop
int mdb_drop(MDB_txn *txn, MDB_dbi dbi, int del)
{
	MDB_cursor *mc, *m2;
	int rc;

	if ((unsigned)del > 1 || !TXN_DBI_EXIST(txn, dbi, DB_USRVALID))
		return EINVAL;

	if (F_ISSET(txn->mt_flags, MDB_TXN_RDONLY))
		return EACCES;

	if (TXN_DBI_CHANGED(txn, dbi))
		return MDB_BAD_DBI;

	rc = mdb_cursor_open(txn, dbi, &mc);
	if (rc)
		return rc;

	rc = mdb_drop0(mc, mc->mc_db->md_flags & MDB_DUPSORT);
	/* Invalidate the dropped DB's cursors */
	for (m2 = txn->mt_cursors[dbi]; m2; m2 = m2->mc_next)
		m2->mc_flags &= ~(C_INITIALIZED|C_EOF);
	if (rc)
		goto leave;

	/* Can't delete the main DB */
	if (del && dbi >= CORE_DBS) {
		rc = mdb_del0(txn, MAIN_DBI, &mc->mc_dbx->md_name, NULL, F_SUBDATA);
		if (!rc) {
			txn->mt_dbflags[dbi] = DB_STALE;
			mdb_dbi_close(txn->mt_env, dbi);
		} else {
			txn->mt_flags |= MDB_TXN_ERROR;
		}
	} else {
		/* reset the DB record, mark it dirty */
		txn->mt_dbflags[dbi] |= DB_DIRTY;
		txn->mt_dbs[dbi].md_depth = 0;
		txn->mt_dbs[dbi].md_branch_pages = 0;
		txn->mt_dbs[dbi].md_leaf_pages = 0;
		txn->mt_dbs[dbi].md_overflow_pages = 0;
		txn->mt_dbs[dbi].md_entries = 0;
		txn->mt_dbs[dbi].md_root = P_INVALID;

		txn->mt_flags |= MDB_TXN_DIRTY;
	}
leave:
	mdb_cursor_close(mc);
	return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0x2, %edx
setae %al
testq %rdi, %rdi
sete %cl
movl $0x16, %r14d
orb %al, %cl
jne 0x9bb9
movl %esi, %ebp
movq %rdi, %rbx
cmpl %esi, 0x78(%rdi)
jbe 0x9bb9
movq 0x70(%rbx), %rax
movl %ebp, %r12d
testb $0x10, (%rax,%r12)
je 0x9bb9
movl $0xd, %r14d
testb $0x2, 0x7e(%rbx)
jne 0x9bb9
movq 0x20(%rbx), %rax
movq 0x60(%rbx), %rcx
movl (%rcx,%r12,4), %ecx
movq 0x98(%rax), %rax
movl $0xffff87c4, %r14d      # imm = 0xFFFF87C4
cmpl (%rax,%r12,4), %ecx
jne 0x9bb9
movl %edx, %r15d
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9263
movl %eax, %r14d
testl %eax, %eax
jne 0x9bb9
movq 0x8(%rsp), %rdi
movq 0x28(%rdi), %rax
movzwl 0x4(%rax), %esi
andl $0x4, %esi
callq 0x8e46
movl %eax, %r14d
movq 0x68(%rbx), %rax
movq (%rax,%r12,8), %rax
testq %rax, %rax
je 0x9b19
andb $-0x4, 0x44(%rax)
movq (%rax), %rax
jmp 0x9b0b
testl %r14d, %r14d
jne 0x9baf
testl %r15d, %r15d
sete %al
cmpl $0x2, %ebp
setb %cl
orb %al, %cl
jne 0x9b60
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdx
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x94dd
testl %eax, %eax
je 0x9b9b
orb $0x2, 0x7c(%rbx)
movl %eax, %r14d
jmp 0x9baf
movq 0x70(%rbx), %rax
orb $0x1, (%rax,%r12)
movq 0x58(%rbx), %rax
leaq (%r12,%r12,2), %rcx
shlq $0x4, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x16(%rax,%rcx)
movups %xmm0, 0x6(%rax,%rcx)
movw $0x0, 0x26(%rax,%rcx)
movq $-0x1, 0x28(%rax,%rcx)
orb $0x4, 0x7c(%rbx)
xorl %r14d, %r14d
jmp 0x9baf
movq 0x70(%rbx), %rax
movb $0x2, (%rax,%r12)
movq 0x20(%rbx), %rdi
movl %ebp, %esi
callq 0x99d2
movq 0x8(%rsp), %rdi
callq 0x9412
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_reader_pid
static int
mdb_reader_pid(MDB_env *env, enum Pidlock_op op, MDB_PID_T pid)
{
#if !(MDB_PIDLOCK)		/* Currently the same as defined(_WIN32) */
	int ret = 0;
	HANDLE h;
	if (op == Pidcheck) {
		h = OpenProcess(env->me_pidquery, FALSE, pid);
		/* No documented "no such process" code, but other program use this: */
		if (!h)
			return ErrCode() != ERROR_INVALID_PARAMETER;
		/* A process exists until all handles to it close. Has it exited? */
		ret = WaitForSingleObject(h, 0) != 0;
		CloseHandle(h);
	}
	return ret;
#else
	for (;;) {
		int rc;
		struct flock lock_info;
		memset(&lock_info, 0, sizeof(lock_info));
		lock_info.l_type = F_WRLCK;
		lock_info.l_whence = SEEK_SET;
		lock_info.l_start = pid;
		lock_info.l_len = 1;
		if ((rc = fcntl(env->me_lfd, op, &lock_info)) == 0) {
			if (op == F_GETLK && lock_info.l_type != F_UNLCK)
				rc = -1;
		} else if ((rc = ErrCode()) == EINTR) {
			continue;
		}
		return rc;
	}
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
movslq %edx, %r12
movq %rsp, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movw $0x1, (%rsp)
movq %r12, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
movl 0x4(%r14), %edi
movl %ebx, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
testl %eax, %eax
je 0x9ce1
callq 0x2050
movl (%rax), %eax
cmpl $0x4, %eax
je 0x9c9f
jmp 0x9cf6
cmpl $0x5, %ebx
sete %al
cmpw $0x2, (%rsp)
setne %cl
andb %al, %cl
movzbl %cl, %eax
negl %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_dpage_free
static void
mdb_dpage_free(MDB_env *env, MDB_page *dp)
{
	if (!IS_OVERFLOW(dp) || dp->mp_pages == 1) {
		mdb_page_free(env, dp);
	} else {
		/* large pages just get freed directly */
		VGMEMP_FREE(env, dp);
		free(dp);
	}
}

// Assembly:
testb $0x4, 0xa(%rsi)
je 0x9d0e
cmpl $0x1, 0xc(%rsi)
jne 0x9d20
movq 0xc0(%rdi), %rax
movq %rax, (%rsi)
movq %rsi, 0xc0(%rdi)
retq
movq %rsi, %rdi
jmp 0x2030
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_page_copy
static void
mdb_page_copy(MDB_page *dst, MDB_page *src, unsigned int psize)
{
	enum { Align = sizeof(pgno_t) };
	indx_t upper = src->mp_upper, lower = src->mp_lower, unused = upper-lower;

	/* If page isn't full, just copy the used portion. Adjust
	 * alignment so memcpy may copy words instead of bytes.
	 */
	if ((unused &= -Align) && !IS_LEAF2(src)) {
		upper = (upper + PAGEBASE) & -Align;
		memcpy(dst, src, (lower + PAGEBASE + (Align-1)) & -Align);
		memcpy((pgno_t *)((char *)dst+upper), (pgno_t *)((char *)src+upper),
			psize - upper);
	} else {
		memcpy(dst, src, psize - unused);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movzwl 0xe(%rsi), %r12d
movzwl 0xc(%rsi), %edx
movl %r12d, %eax
subl %edx, %eax
andl $0xfff8, %eax           # imm = 0xFFF8
je 0xa681
testb $0x20, 0xa(%r14)
jne 0xa681
andl $-0x8, %r12d
addl $0x7, %edx
andl $-0x8, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2240
addq %r12, %r15
addq %r12, %r14
subl %r12d, %ebx
jmp 0xa683
subl %eax, %ebx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_cursor_sibling
static int
mdb_cursor_sibling(MDB_cursor *mc, int move_right)
{
	int		 rc;
	MDB_node	*indx;
	MDB_page	*mp;

	if (mc->mc_snum < 2) {
		return MDB_NOTFOUND;		/* root has no siblings */
	}

	mdb_cursor_pop(mc);
	DPRINTF(("parent page is page %"Z"u, index %u",
		mc->mc_pg[mc->mc_top]->mp_pgno, mc->mc_ki[mc->mc_top]));

	if (move_right ? (mc->mc_ki[mc->mc_top] + 1u >= NUMKEYS(mc->mc_pg[mc->mc_top]))
		       : (mc->mc_ki[mc->mc_top] == 0)) {
		DPRINTF(("no more keys left, moving to %s sibling",
		    move_right ? "right" : "left"));
		if ((rc = mdb_cursor_sibling(mc, move_right)) != MDB_SUCCESS) {
			/* undo cursor_pop before returning */
			mc->mc_top++;
			mc->mc_snum++;
			return rc;
		}
	} else {
		if (move_right)
			mc->mc_ki[mc->mc_top]++;
		else
			mc->mc_ki[mc->mc_top]--;
		DPRINTF(("just moving to %s index key %u",
		    move_right ? "right" : "left", mc->mc_ki[mc->mc_top]));
	}
	mdb_cassert(mc, IS_BRANCH(mc->mc_pg[mc->mc_top]));

	indx = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]);
	if ((rc = mdb_page_get(mc->mc_txn, NODEPGNO(indx), &mp, NULL)) != 0) {
		/* mc will be inconsistent if caller does mc_snum++ as above */
		mc->mc_flags &= ~(C_INITIALIZED|C_EOF);
		return rc;
	}

	mdb_cursor_push(mc, mp);
	if (!move_right)
		mc->mc_ki[mc->mc_top] = NUMKEYS(mp)-1;

	return MDB_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movzwl 0x40(%rdi), %ecx
movl $0xffff87b2, %eax       # imm = 0xFFFF87B2
cmpw $0x2, %cx
jb 0xa7bf
movl %esi, %ebp
movq %rdi, %rbx
decl %ecx
movw %cx, 0x40(%rdi)
movzwl 0x42(%rdi), %eax
decl %eax
movw %ax, 0x42(%rdi)
movzwl %ax, %ecx
movzwl 0x148(%rdi,%rcx,2), %eax
testl %esi, %esi
je 0xa6f9
incl %eax
movq 0x48(%rbx,%rcx,8), %rdx
movzwl 0xc(%rdx), %edx
addl $-0x10, %edx
shrl %edx
movl $0x1, %esi
cmpl %edx, %eax
jb 0xa6ff
jmp 0xa70b
testl %eax, %eax
je 0xa709
decl %eax
movw %ax, 0x148(%rbx,%rcx,2)
jmp 0xa72a
xorl %esi, %esi
movq %rbx, %rdi
callq 0xa6a4
movzwl 0x42(%rbx), %ecx
testl %eax, %eax
je 0xa72a
incl %ecx
movw %cx, 0x42(%rbx)
incw 0x40(%rbx)
jmp 0xa7bf
movq 0x48(%rbx,%rcx,8), %rax
testb $0x1, 0xa(%rax)
je 0xa7c6
movzwl 0x148(%rbx,%rcx,2), %ecx
movzwl 0x10(%rax,%rcx,2), %ecx
movq 0x18(%rbx), %rdi
movl (%rax,%rcx), %edx
movzwl 0x4(%rax,%rcx), %esi
shlq $0x20, %rsi
orq %rdx, %rsi
movq %rsp, %rdx
xorl %ecx, %ecx
callq 0x74c4
testl %eax, %eax
je 0xa76d
andb $-0x4, 0x44(%rbx)
jmp 0xa7bf
movq (%rsp), %rcx
movzwl 0x40(%rbx), %eax
cmpq $0x20, %rax
jb 0xa785
movq 0x18(%rbx), %rax
orl $0x2, 0x7c(%rax)
jmp 0xa79f
leal 0x1(%rax), %edx
movw %dx, 0x40(%rbx)
movw %ax, 0x42(%rbx)
movq %rcx, 0x48(%rbx,%rax,8)
movw $0x0, 0x148(%rbx,%rax,2)
xorl %eax, %eax
testl %ebp, %ebp
jne 0xa7bf
movzwl 0xc(%rcx), %ecx
addl $0x1fff0, %ecx          # imm = 0x1FFF0
shrl %ecx
decl %ecx
movzwl 0x42(%rbx), %edx
movw %cx, 0x148(%rbx,%rdx,2)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rdi
leaq 0x52c3(%rip), %rsi      # 0xfa98
leaq 0x52dd(%rip), %rdx      # 0xfab9
movl $0x1610, %ecx           # imm = 0x1610
callq 0xbfbd
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_page_dirty
static void
mdb_page_dirty(MDB_txn *txn, MDB_page *mp)
{
	MDB_ID2 mid;
	int rc, (*insert)(MDB_ID2L, MDB_ID2 *);

	if (txn->mt_flags & MDB_TXN_WRITEMAP) {
		insert = mdb_mid2l_append;
	} else {
		insert = mdb_mid2l_insert;
	}
	mid.mid = mp->mp_pgno;
	mid.mptr = mp;
	rc = insert(txn->mt_u.dirty_list, &mid);
	mdb_tassert(txn, rc == 0);
	txn->mt_dirty_room--;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
btl $0x13, 0x7c(%rdi)
jb 0xa96e
leaq 0x157d(%rip), %rcx      # 0xbee9
jmp 0xa975
leaq 0x15fa(%rip), %rcx      # 0xbf6f
movq (%rsi), %rdx
movq %rsp, %rax
movq %rdx, (%rax)
movq %rsi, 0x8(%rax)
movq 0x48(%rbx), %rdi
movq %rax, %rsi
callq *%rcx
testl %eax, %eax
jne 0xa99b
decl 0x80(%rbx)
addq $0x10, %rsp
popq %rbx
retq
movq 0x20(%rbx), %rdi
leaq 0x5084(%rip), %rsi      # 0xfa2a
leaq 0x519c(%rip), %rdx      # 0xfb49
movl $0x829, %ecx            # imm = 0x829
callq 0xbfbd
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_cursor_copy
static void
mdb_cursor_copy(const MDB_cursor *csrc, MDB_cursor *cdst)
{
	unsigned int i;

	cdst->mc_txn = csrc->mc_txn;
	cdst->mc_dbi = csrc->mc_dbi;
	cdst->mc_db  = csrc->mc_db;
	cdst->mc_dbx = csrc->mc_dbx;
	cdst->mc_snum = csrc->mc_snum;
	cdst->mc_top = csrc->mc_top;
	cdst->mc_flags = csrc->mc_flags;

	for (i=0; i<csrc->mc_snum; i++) {
		cdst->mc_pg[i] = csrc->mc_pg[i];
		cdst->mc_ki[i] = csrc->mc_ki[i];
	}
}

// Assembly:
movq 0x18(%rdi), %rax
movq %rax, 0x18(%rsi)
movl 0x20(%rdi), %eax
movl %eax, 0x20(%rsi)
movups 0x28(%rdi), %xmm0
movups %xmm0, 0x28(%rsi)
movq 0x40(%rdi), %rax
movl %eax, 0x40(%rsi)
movl 0x44(%rdi), %ecx
movl %ecx, 0x44(%rsi)
testw %ax, %ax
je 0xb494
xorl %eax, %eax
movq 0x48(%rdi,%rax,8), %rcx
movq %rcx, 0x48(%rsi,%rax,8)
movzwl 0x148(%rdi,%rax,2), %ecx
movw %cx, 0x148(%rsi,%rax,2)
incq %rax
movzwl 0x40(%rdi), %ecx
cmpq %rcx, %rax
jb 0xb46e
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_page_search_lowest
static int
mdb_page_search_lowest(MDB_cursor *mc)
{
	MDB_page	*mp = mc->mc_pg[mc->mc_top];
	MDB_node	*node = NODEPTR(mp, 0);
	int rc;

	if ((rc = mdb_page_get(mc->mc_txn, NODEPGNO(node), &mp, NULL)) != 0)
		return rc;

	mc->mc_ki[mc->mc_top] = 0;
	if ((rc = mdb_cursor_push(mc, mp)))
		return rc;
	return mdb_page_search_root(mc, NULL, MDB_PS_FIRST);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movzwl 0x42(%rdi), %eax
movq 0x48(%rdi,%rax,8), %rax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movzwl 0x10(%rax), %ecx
movq 0x18(%rdi), %rdi
movl (%rax,%rcx), %r8d
movzwl 0x4(%rax,%rcx), %esi
shlq $0x20, %rsi
orq %r8, %rsi
xorl %ecx, %ecx
callq 0x74c4
testl %eax, %eax
jne 0xb8eb
movzwl 0x42(%rbx), %eax
movw $0x0, 0x148(%rbx,%rax,2)
movzwl 0x40(%rbx), %eax
cmpq $0x20, %rax
jb 0xb8f1
movq 0x18(%rbx), %rax
orl $0x2, 0x7c(%rax)
movl $0xffff87bd, %eax       # imm = 0xFFFF87BD
addq $0x10, %rsp
popq %rbx
retq
movq 0x8(%rsp), %rcx
leal 0x1(%rax), %edx
movw %dx, 0x40(%rbx)
movw %ax, 0x42(%rbx)
movq %rcx, 0x48(%rbx,%rax,8)
movw $0x0, 0x148(%rbx,%rax,2)
movq %rbx, %rdi
xorl %esi, %esi
movl $0x4, %edx
addq $0x10, %rsp
popq %rbx
jmp 0xa404
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_cmp_memnr
static int
mdb_cmp_memnr(const MDB_val *a, const MDB_val *b)
{
	const unsigned char	*p1, *p2, *p1_lim;
	ssize_t len_diff;
	int diff;

	p1_lim = (const unsigned char *)a->mv_data;
	p1 = (const unsigned char *)a->mv_data + a->mv_size;
	p2 = (const unsigned char *)b->mv_data + b->mv_size;

	len_diff = (ssize_t) a->mv_size - (ssize_t) b->mv_size;
	if (len_diff > 0) {
		p1_lim += len_diff;
		len_diff = 1;
	}

	while (p1 > p1_lim) {
		diff = *--p1 - *--p2;
		if (diff)
			return diff;
	}
	return len_diff<0 ? -1 : len_diff;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
leaq (%rdi,%rax), %rcx
movq (%rsi), %r8
movq 0x8(%rsi), %r9
subq %r8, %rax
xorl %edx, %edx
testq %rax, %rax
cmovgq %rax, %rdx
movl $0x1, %esi
cmovleq %rax, %rsi
addq %rdi, %rdx
leaq (%r8,%r9), %rdi
decq %rdi
cmpq %rdx, %rcx
jbe 0xb96e
movzbl -0x1(%rcx), %eax
decq %rcx
movzbl (%rdi), %r8d
decq %rdi
subl %r8d, %eax
je 0xb955
retq
testq %rsi, %rsi
movq $-0x1, %rax
cmovnsq %rsi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_midl_alloc
MDB_IDL mdb_midl_alloc(int num)
{
	MDB_IDL ids = malloc((num+2) * sizeof(MDB_ID));
	if (ids) {
		*ids++ = num;
		*ids = 0;
	}
	return ids;
}

// Assembly:
pushq %rbx
movslq %edi, %rbx
leaq 0x10(,%rbx,8), %rdi
callq 0x2270
testq %rax, %rax
je 0xba25
movq %rax, %rcx
addq $0x8, %rax
movq %rbx, (%rcx)
movq $0x0, 0x8(%rcx)
jmp 0xba27
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_midl_shrink
void mdb_midl_shrink( MDB_IDL *idp )
{
	MDB_IDL ids = *idp;
	if (*(--ids) > MDB_IDL_UM_MAX &&
		(ids = realloc(ids, (MDB_IDL_UM_MAX+1) * sizeof(MDB_ID))))
	{
		*ids++ = MDB_IDL_UM_MAX;
		*idp = ids;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
cmpq $0x20000, -0x8(%rdi)    # imm = 0x20000
jb 0xba6d
addq $-0x8, %rdi
movl $0x100000, %esi         # imm = 0x100000
callq 0x2280
testq %rax, %rax
je 0xba6d
movq %rax, %rcx
addq $0x8, %rcx
movq $0x1ffff, (%rax)        # imm = 0x1FFFF
movq %rcx, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_midl_need
int mdb_midl_need( MDB_IDL *idp, unsigned num )
{
	MDB_IDL ids = *idp;
	num += ids[0];
	if (num > ids[-1]) {
		num = (num + num/4 + (256 + 2)) & -256;
		if (!(ids = realloc(ids-1, num * sizeof(MDB_ID))))
			return ENOMEM;
		*ids++ = num - 2;
		*idp = ids;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rdi), %rdi
addl (%rdi), %esi
xorl %ebx, %ebx
cmpq %rsi, -0x8(%rdi)
jae 0xbac9
addq $-0x8, %rdi
movl %esi, %eax
shrl $0x2, %eax
leal (%rsi,%rax), %r15d
addl $0x102, %r15d           # imm = 0x102
andl $0xffffff00, %r15d      # imm = 0xFFFFFF00
leaq (,%r15,8), %rsi
callq 0x2280
testq %rax, %rax
je 0xbac4
addl $-0x2, %r15d
movq %rax, %rcx
addq $0x8, %rcx
movq %r15, (%rax)
movq %rcx, (%r14)
jmp 0xbac9
movl $0xc, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_midl_append
int mdb_midl_append( MDB_IDL *idp, MDB_ID id )
{
	MDB_IDL ids = *idp;
	/* Too big? */
	if (ids[0] >= ids[-1]) {
		if (mdb_midl_grow(idp, MDB_IDL_UM_MAX))
			return ENOMEM;
		ids = *idp;
	}
	ids[0]++;
	ids[ids[0]] = id;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
movq (%rax), %rcx
cmpq -0x8(%rax), %rcx
jb 0xbb02
movq %rdi, %r14
movl $0x1ffff, %esi          # imm = 0x1FFFF
callq 0xbb18
movl %eax, %ecx
movl $0xc, %eax
testl %ecx, %ecx
jne 0xbb10
movq (%r14), %rax
movq (%rax), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rax)
movq %rbx, 0x8(%rax,%rcx,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_midl_grow
static int mdb_midl_grow( MDB_IDL *idp, int num )
{
	MDB_IDL idn = *idp-1;
	/* grow it */
	idn = realloc(idn, (*idn + num + 2) * sizeof(MDB_ID));
	if (!idn)
		return ENOMEM;
	*idn++ += num;
	*idp = idn;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movslq %esi, %r14
movq -0x8(%rdi), %rax
addq %r14, %rax
addq $-0x8, %rdi
leaq 0x10(,%rax,8), %rsi
callq 0x2280
testq %rax, %rax
je 0xbb50
addq %r14, (%rax)
addq $0x8, %rax
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0xbb55
movl $0xc, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_midl_append_list
int mdb_midl_append_list( MDB_IDL *idp, MDB_IDL app )
{
	MDB_IDL ids = *idp;
	/* Too big? */
	if (ids[0] + app[0] >= ids[-1]) {
		if (mdb_midl_grow(idp, app[0]))
			return ENOMEM;
		ids = *idp;
	}
	memcpy(&ids[ids[0]+1], &app[1], app[0] * sizeof(MDB_ID));
	ids[0] += app[0];
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %r15
movq (%r15), %rax
movq (%rsi), %rdx
leaq (%rdx,%rax), %rcx
cmpq -0x8(%r15), %rcx
jb 0xbb96
movq %rdi, %r14
movl %edx, %esi
callq 0xbb18
movl %eax, %ecx
movl $0xc, %eax
testl %ecx, %ecx
jne 0xbbb3
movq (%r14), %r15
movq (%r15), %rax
movq (%rbx), %rdx
leaq (%r15,%rax,8), %rdi
addq $0x8, %rdi
leaq 0x8(%rbx), %rsi
shlq $0x3, %rdx
callq 0x2240
movq (%rbx), %rax
addq %rax, (%r15)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_midl_append_range
int mdb_midl_append_range( MDB_IDL *idp, MDB_ID id, unsigned n )
{
	MDB_ID *ids = *idp, len = ids[0];
	/* Too big? */
	if (len + n > ids[-1]) {
		if (mdb_midl_grow(idp, n | MDB_IDL_UM_MAX))
			return ENOMEM;
		ids = *idp;
	}
	ids[0] = len + n;
	ids += len;
	while (n)
		ids[n--] = id++;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq (%rdi), %rax
movq (%rax), %r15
movl %edx, %r12d
leaq (%r15,%r12), %r13
cmpq -0x8(%rax), %r13
jbe 0xbbfe
movq %rdi, %r14
movl %ebp, %esi
orl $0x1ffff, %esi          # imm = 0x1FFFF
callq 0xbb18
movl %eax, %ecx
movl $0xc, %eax
testl %ecx, %ecx
jne 0xbcb2
movq (%r14), %rax
movq %r13, (%rax)
testl %ebp, %ebp
je 0xbcb0
leaq 0x1(%r12), %rcx
andq $-0x2, %rcx
leaq -0x1(%r12), %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shlq $0x3, %r12
leaq (%r12,%r15,8), %rdx
addq %rdx, %rax
xorl %edx, %edx
movdqa 0x370a(%rip), %xmm1     # 0xf340
movdqa 0x3712(%rip), %xmm2     # 0xf350
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %esi
notl %esi
testb $0x1, %sil
je 0xbc89
leaq (%rbx,%rdx), %rsi
movq %rsi, (%rax)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %esi
testb $0x1, %sil
je 0xbca3
leaq (%rbx,%rdx), %rsi
incq %rsi
movq %rsi, -0x8(%rax)
addq $0x2, %rdx
addq $-0x10, %rax
cmpq %rdx, %rcx
jne 0xbc46
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq