LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x9e49
testb $0x20, 0xa(%r14)
jne 0x9e49
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 0x9e4b
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_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffff87b2, %r14d      # imm = 0xFFFF87B2
cmpw $0x2, 0x40(%rdi)
jb 0x9f58
movl %esi, %ebp
movq %rdi, %rbx
callq 0x9f86
movzwl 0x42(%rbx), %eax
movzwl 0x148(%rbx,%rax,2), %ecx
testl %ebp, %ebp
je 0x9eb4
incl %ecx
movq 0x48(%rbx,%rax,8), %rdx
movzwl 0xc(%rdx), %edx
addl $-0x10, %edx
shrl %edx
cmpl %edx, %ecx
jb 0x9eba
jmp 0x9ec4
testl %ecx, %ecx
je 0x9ec4
decl %ecx
movw %cx, 0x148(%rbx,%rax,2)
jmp 0x9ee6
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9e6c
movl %eax, %r14d
movzwl 0x42(%rbx), %eax
testl %r14d, %r14d
je 0x9ee6
incl %eax
movw %ax, 0x42(%rbx)
incw 0x40(%rbx)
jmp 0x9f58
movq 0x48(%rbx,%rax,8), %rcx
testb $0x1, 0xa(%rcx)
je 0x9f66
movzwl 0x148(%rbx,%rax,2), %eax
movzwl 0x10(%rcx,%rax,2), %eax
movq 0x18(%rbx), %rdi
movl (%rcx,%rax), %edx
movzwl 0x4(%rcx,%rax), %esi
shlq $0x20, %rsi
orq %rdx, %rsi
xorl %r14d, %r14d
movq %rsp, %rdx
xorl %ecx, %ecx
callq 0x6fba
testl %eax, %eax
je 0x9f2b
andb $-0x4, 0x44(%rbx)
movl %eax, %r14d
jmp 0x9f58
movq (%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x68b2
testl %ebp, %ebp
jne 0x9f58
movzwl 0xc(%r15), %eax
addl $0x1fff0, %eax          # imm = 0x1FFF0
shrl %eax
decl %eax
movzwl 0x42(%rbx), %ecx
movw %ax, 0x148(%rbx,%rcx,2)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rdi
leaq 0x4b03(%rip), %rsi      # 0xea78
leaq 0x4b1d(%rip), %rdx      # 0xea99
movl $0x1610, %ecx           # imm = 0x1610
callq 0xb672
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_find_oldest
static txnid_t
mdb_find_oldest(MDB_txn *txn)
{
	int i;
	txnid_t mr, oldest = txn->mt_txnid - 1;
	if (txn->mt_env->me_txns) {
		MDB_reader *r = txn->mt_env->me_txns->mti_readers;
		for (i = txn->mt_env->me_txns->mti_numreaders; --i >= 0; ) {
			if (r[i].mr_pid) {
				mr = r[i].mr_txnid;
				if (oldest > mr)
					oldest = mr;
			}
		}
	}
	return oldest;
}

// Assembly:
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rcx
decq %rax
movq 0x40(%rcx), %rcx
testq %rcx, %rcx
je 0xa138
movl 0x38(%rcx), %edx
subq $-0x80, %rcx
leal 0x1(%rdx), %esi
movq %rdx, %rdi
shlq $0x6, %rdi
addq %rcx, %rdi
decl %esi
testl %esi, %esi
jle 0xa138
leaq -0x40(%rdi), %r8
decq %rdx
cmpl $0x0, -0x38(%rdi)
movq %r8, %rdi
je 0xa116
movq (%r8), %rsi
cmpq %rsi, %rax
cmovaeq %rsi, %rax
jmp 0xa109
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xa151
leaq 0x1458(%rip), %rcx      # 0xb5a7
jmp 0xa158
leaq 0x14d1(%rip), %rcx      # 0xb629
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 0xa17e
decl 0x80(%rbx)
addq $0x10, %rsp
popq %rbx
retq
movq 0x20(%rbx), %rdi
leaq 0x4881(%rip), %rsi      # 0xea0a
leaq 0x4999(%rip), %rdx      # 0xeb29
movl $0x829, %ecx            # imm = 0x829
callq 0xb672
// File: /workspace/github_cpp_makefile_star2_O2/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), %rcx
movl %ecx, 0x40(%rsi)
movl 0x44(%rdi), %eax
movl %eax, 0x44(%rsi)
xorl %eax, %eax
movzwl %cx, %ecx
cmpq %rcx, %rax
jae 0xac58
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
jmp 0xac2d
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6fba
testl %eax, %eax
jne 0xb083
movzwl 0x42(%rbx), %eax
andw $0x0, 0x148(%rbx,%rax,2)
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x68b2
testl %eax, %eax
je 0xb089
addq $0x10, %rsp
popq %rbx
retq
pushq $0x4
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
jmp 0x9bfa
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rsi
cmovleq %rax, %rsi
addq %rdi, %rdx
leaq (%r8,%r9), %rdi
decq %rdi
cmpq %rdx, %rcx
jbe 0xb0e3
movzbl -0x1(%rcx), %eax
decq %rcx
movzbl (%rdi), %r8d
decq %rdi
subl %r8d, %eax
je 0xb0ca
retq
testq %rsi, %rsi
pushq $-0x1
popq %rax
cmovnsq %rsi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_cmp_memn
static int
mdb_cmp_memn(const MDB_val *a, const MDB_val *b)
{
	int diff;
	ssize_t len_diff;
	unsigned int len;

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

	diff = memcmp(a->mv_data, b->mv_data, len);
	return diff ? diff : len_diff<0 ? -1 : len_diff;
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
movq (%rsi), %rcx
movq 0x8(%rsi), %rsi
movq %rax, %rdx
subq %rcx, %rdx
testq %rdx, %rdx
pushq $-0x1
popq %r8
cmovnsq %rdx, %r8
cmovgq %rcx, %rax
pushq $0x1
popq %rbx
cmovlel %r8d, %ebx
movl %eax, %edx
callq 0x21e0
testl %eax, %eax
cmovel %ebx, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb1a1
movq %rax, %rcx
addq $0x8, %rax
movq %rbx, (%rcx)
andq $0x0, 0x8(%rcx)
jmp 0xb1a3
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb1e9
addq $-0x8, %rdi
movl $0x100000, %esi         # imm = 0x100000
callq 0x2290
testq %rax, %rax
je 0xb1e9
movq %rax, %rcx
addq $0x8, %rcx
movq $0x1ffff, (%rax)        # imm = 0x1FFFF
movq %rcx, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb243
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 0x2290
testq %rax, %rax
je 0xb240
addl $-0x2, %r15d
movq %rax, %rcx
addq $0x8, %rcx
movq %r15, (%rax)
movq %rcx, (%r14)
jmp 0xb243
pushq $0xc
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb27a
movq %rdi, %r14
movl $0x1ffff, %esi          # imm = 0x1FFFF
callq 0xb290
testl %eax, %eax
je 0xb274
pushq $0xc
popq %rax
jmp 0xb288
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_O2/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 0x2290
testq %rax, %rax
je 0xb2c8
addq %r14, (%rax)
addq $0x8, %rax
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0xb2cb
pushq $0xc
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb30a
movq %rdi, %r14
movl %edx, %esi
callq 0xb290
testl %eax, %eax
je 0xb301
pushq $0xc
popq %rax
jmp 0xb327
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_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %rax
movq (%rax), %r12
movl %edx, %r15d
leaq (%r12,%r15), %r13
cmpq -0x8(%rax), %r13
jbe 0xb368
movq %rdi, %r14
orl $0x1ffff, %edx          # imm = 0x1FFFF
movl %edx, %esi
callq 0xb290
testl %eax, %eax
je 0xb365
pushq $0xc
popq %rax
jmp 0xb386
movq (%r14), %rax
movq %r13, (%rax)
leaq (%rax,%r12,8), %rax
movq %r15, %rcx
subq $0x1, %rcx
jb 0xb384
movq %rbx, (%rax,%r15,8)
incq %rbx
movq %rcx, %r15
jmp 0xb372
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_midl_xmerge
void mdb_midl_xmerge( MDB_IDL idl, MDB_IDL merge )
{
	MDB_ID old_id, merge_id, i = merge[0], j = idl[0], k = i+j, total = k;
	idl[0] = (MDB_ID)-1;		/* delimiter for idl scan below */
	old_id = idl[j];
	while (i) {
		merge_id = merge[i--];
		for (; old_id < merge_id; old_id = idl[--j])
			idl[k--] = old_id;
		idl[k--] = merge_id;
	}
	idl[0] = total;
}

// Assembly:
movq (%rsi), %r10
movq (%rdi), %rax
orq $-0x1, (%rdi)
leaq (%rax,%r10), %rcx
movq (%rdi,%rax,8), %rdx
movq %rcx, %r8
movq %r10, %r9
subq $0x1, %r9
jb 0xb3d3
movq (%rsi,%r10,8), %r10
decq %r8
cmpq %r10, %rdx
jae 0xb3c9
movq %rdx, 0x8(%rdi,%r8,8)
movq -0x8(%rdi,%rax,8), %rdx
decq %rax
jmp 0xb3b2
movq %r10, 0x8(%rdi,%r8,8)
movq %r9, %r10
jmp 0xb3a8
movq %rcx, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_mid2l_search
unsigned mdb_mid2l_search( MDB_ID2L ids, MDB_ID id )
{
	/*
	 * binary search of id in ids
	 * if found, returns position of id
	 * if not found, returns first position greater than id
	 */
	unsigned base = 0;
	unsigned cursor = 1;
	int val = 0;
	unsigned n = (unsigned)ids[0].mid;

	while( 0 < n ) {
		unsigned pivot = n >> 1;
		cursor = base + pivot + 1;
		val = CMP( id, ids[cursor].mid );

		if( val < 0 ) {
			n = pivot;

		} else if ( val > 0 ) {
			base = cursor;
			n -= pivot + 1;

		} else {
			return cursor;
		}
	}

	if( val > 0 ) {
		++cursor;
	}
	return cursor;
}

// Assembly:
movl (%rdi), %edx
pushq $0x1
popq %r11
xorl %eax, %eax
pushq $-0x1
popq %rcx
xorl %r8d, %r8d
movl %eax, %r10d
incl %r10d
movl %r11d, %eax
testl %edx, %edx
je 0xb59c
movl %edx, %r9d
shrl %edx
leal (%r10,%rdx), %eax
movq %rax, %r8
shlq $0x4, %r8
movq (%rdi,%r8), %r11
xorl %r8d, %r8d
cmpq %rsi, %r11
setb %r8b
cmoval %ecx, %r8d
ja 0xb565
jae 0xb5a6
notl %edx
addl %edx, %r9d
movl %eax, %r11d
movl %r9d, %edx
jmp 0xb55c
xorl %ecx, %ecx
testl %r8d, %r8d
setg %cl
addl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/midl.c
// Function: mdb_mid2l_insert
int mdb_mid2l_insert( MDB_ID2L ids, MDB_ID2 *id )
{
	unsigned x, i;

	x = mdb_mid2l_search( ids, id->mid );

	if( x < 1 ) {
		/* internal error */
		return -2;
	}

	if ( x <= ids[0].mid && ids[x].mid == id->mid ) {
		/* duplicate */
		return -1;
	}

	if ( ids[0].mid >= MDB_IDL_UM_MAX ) {
		/* too big */
		return -2;

	} else {
		/* insert id */
		ids[0].mid++;
		for (i=(unsigned)ids[0].mid; i>x; i--)
			ids[i] = ids[i-1];
		ids[x] = *id;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
movq %r15, %rsi
callq 0xb54e
pushq $-0x2
popq %rcx
testl %eax, %eax
je 0xb621
movl %eax, %edx
movq (%rbx), %rsi
cmpq %rdx, %rsi
jb 0xb5e0
movq %rdx, %rdi
shlq $0x4, %rdi
cmpq %r15, (%rbx,%rdi)
jne 0xb5e0
pushq $-0x1
popq %rcx
jmp 0xb621
cmpq $0x1fffe, %rsi          # imm = 0x1FFFE
ja 0xb621
leaq 0x1(%rsi), %rcx
movq %rcx, (%rbx)
movq %rsi, %rcx
shlq $0x4, %rcx
addq %rbx, %rcx
addq $0x10, %rcx
incl %esi
cmpl %esi, %eax
jae 0xb613
movups -0x10(%rcx), %xmm0
movups %xmm0, (%rcx)
addq $-0x10, %rcx
decl %esi
jmp 0xb600
shlq $0x4, %rdx
movups (%r14), %xmm0
movups %xmm0, (%rbx,%rdx)
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_version
char * ESECT
mdb_version(int *major, int *minor, int *patch)
{
	if (major) *major = MDB_VERSION_MAJOR;
	if (minor) *minor = MDB_VERSION_MINOR;
	if (patch) *patch = MDB_VERSION_PATCH;
	return MDB_VERSION_STRING;
}

// Assembly:
testq %rdi, %rdi
je 0xb654
andl $0x0, (%rdi)
testq %rsi, %rsi
je 0xb65f
movl $0x9, (%rsi)
testq %rdx, %rdx
je 0xb66a
movl $0x10, (%rdx)
leaq 0x299c(%rip), %rax      # 0xe00d
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_assert_fail
static void ESECT
mdb_assert_fail(MDB_env *env, const char *expr_txt,
	const char *func, const char *file, int line)
{
	char buf[400];
	sprintf(buf, "%.100s:%d: Assertion '%.200s' failed in %.40s()",
		file, line, expr_txt, func);
	if (env->me_assert_func)
		env->me_assert_func(env, buf);
	fprintf(stderr, "%s\n", buf);
	abort();
}

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdx, %r9
movq %rsi, %r8
movq %rdi, %rbx
leaq 0x32ad(%rip), %rsi      # 0xe937
leaq 0x2d82(%rip), %rdx      # 0xe413
movq %rsp, %rdi
xorl %eax, %eax
callq 0x2380
movq 0xf0(%rbx), %rax
testq %rax, %rax
je 0xb6af
movq %rsp, %rsi
movq %rbx, %rdi
callq *%rax
movq 0x7942(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x298c(%rip), %rsi      # 0xe04c
movq %rsp, %rdx
xorl %eax, %eax
callq 0x2220
callq 0x2040
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_create
int ESECT
mdb_env_create(MDB_env **env)
{
	MDB_env *e;

	e = calloc(1, sizeof(MDB_env));
	if (!e)
		return ENOMEM;

	e->me_maxreaders = DEFAULT_READERS;
	e->me_maxdbs = e->me_numdbs = CORE_DBS;
	e->me_fd = INVALID_HANDLE_VALUE;
	e->me_lfd = INVALID_HANDLE_VALUE;
	e->me_mfd = INVALID_HANDLE_VALUE;
#ifdef MDB_USE_POSIX_SEM
	e->me_rmutex = SEM_FAILED;
	e->me_wmutex = SEM_FAILED;
#elif defined MDB_USE_SYSV_SEM
	e->me_rmutex->semid = -1;
	e->me_wmutex->semid = -1;
#endif
	e->me_pid = getpid();
	GET_PAGESIZE(e->me_os_psize);
	VGMEMP_CREATE(e,0,0);
	*env = e;
	return MDB_SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rdi
movl $0xf8, %esi
callq 0x2200
testq %rax, %rax
je 0xb725
movq %rax, %r14
movl $0x7e, 0x18(%rax)
movabsq $0x200000002, %rax      # imm = 0x200000002
movq %rax, 0x20(%r14)
orq $-0x1, (%r14)
orl $-0x1, 0x8(%r14)
callq 0x20e0
movl %eax, 0x28(%r14)
pushq $0x1e
popq %rdi
callq 0x2330
movl %eax, 0x14(%r14)
movq %r14, (%rbx)
xorl %eax, %eax
jmp 0xb728
pushq $0xc
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_set_mapsize
int ESECT
mdb_env_set_mapsize(MDB_env *env, size_t size)
{
	/* If env is already open, caller is responsible for making
	 * sure there are no active txns.
	 */
	if (env->me_map) {
		int rc;
		MDB_meta *meta;
		void *old;
		if (env->me_txn)
			return EINVAL;
		meta = mdb_env_pick_meta(env);
		if (!size)
			size = meta->mm_mapsize;
		{
			/* Silently round up to minimum if the size is too small */
			size_t minsize = (meta->mm_last_pg + 1) * env->me_psize;
			if (size < minsize)
				size = minsize;
		}
		munmap(env->me_map, env->me_mapsize);
		env->me_mapsize = size;
		old = (env->me_flags & MDB_FIXEDMAP) ? env->me_map : NULL;
		rc = mdb_env_map(env, old);
		if (rc)
			return rc;
	}
	env->me_mapsize = size;
	if (env->me_psize)
		env->me_maxpg = env->me_mapsize / env->me_psize;
	return MDB_SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0xb7bd
cmpq $0x0, 0x60(%rbx)
je 0xb752
pushq $0x16
popq %rcx
jmp 0xb7da
movq 0x48(%rbx), %rax
movq 0x80(%rax), %rax
movq 0x50(%rbx), %rcx
xorl %edx, %edx
cmpq 0x80(%rcx), %rax
setb %dl
movq 0x48(%rbx,%rdx,8), %rax
testq %r14, %r14
jne 0xb77b
movq 0x10(%rax), %r14
movq %r14, %rcx
movq 0x78(%rax), %rax
incq %rax
movl 0x10(%rbx), %r14d
imulq %rax, %r14
cmpq %r14, %rcx
cmovaq %rcx, %r14
movq 0x70(%rbx), %rsi
callq 0x22a0
movq %r14, 0x70(%rbx)
testb $0x1, 0xc(%rbx)
jne 0xb7ab
xorl %esi, %esi
jmp 0xb7af
movq 0x38(%rbx), %rsi
movq %rbx, %rdi
callq 0xb7e4
movl %eax, %ecx
testl %eax, %eax
jne 0xb7da
movq %r14, 0x70(%rbx)
movl 0x10(%rbx), %esi
xorl %ecx, %ecx
testq %rsi, %rsi
je 0xb7da
movq %r14, %rax
xorl %edx, %edx
divq %rsi
movq %rax, 0x80(%rbx)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_close
void ESECT
mdb_env_close(MDB_env *env)
{
	MDB_page *dp;

	if (env == NULL)
		return;

	VGMEMP_DESTROY(env);
	while ((dp = env->me_dpages) != NULL) {
		VGMEMP_DEFINED(&dp->mp_next, sizeof(dp->mp_next));
		env->me_dpages = dp->mp_next;
		free(dp);
	}

	mdb_env_close0(env, 0);
	free(env);
}

// Assembly:
testq %rdi, %rdi
je 0xc3dc
pushq %rbx
movq %rdi, %rbx
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0xc3cb
movq (%rdi), %rax
movq %rax, 0xc0(%rbx)
callq 0x2030
jmp 0xc3ae
movq %rbx, %rdi
callq 0xc25b
movq %rbx, %rdi
popq %rbx
jmp 0x2030
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_copy2
int ESECT
mdb_env_copy2(MDB_env *env, const char *path, unsigned int flags)
{
	int rc, len;
	char *lpath;
	HANDLE newfd = INVALID_HANDLE_VALUE;

	if (env->me_flags & MDB_NOSUBDIR) {
		lpath = (char *)path;
	} else {
		len = strlen(path);
		len += sizeof(DATANAME);
		lpath = malloc(len);
		if (!lpath)
			return ENOMEM;
		sprintf(lpath, "%s" DATANAME, path);
	}

	/* The destination path must exist, but the destination file must not.
	 * We don't want the OS to cache the writes, since the source data is
	 * already in the OS cache.
	 */
#ifdef _WIN32
	newfd = CreateFileA(lpath, GENERIC_WRITE, 0, NULL, CREATE_NEW,
				FILE_FLAG_NO_BUFFERING|FILE_FLAG_WRITE_THROUGH, NULL);
#else
	newfd = open(lpath, O_WRONLY|O_CREAT|O_EXCL, 0666);
#endif
	if (newfd == INVALID_HANDLE_VALUE) {
		rc = ErrCode();
		goto leave;
	}

	if (env->me_psize >= env->me_os_psize) {
#ifdef O_DIRECT
	/* Set O_DIRECT if the file system supports it */
	if ((rc = fcntl(newfd, F_GETFL)) != -1)
		(void) fcntl(newfd, F_SETFL, rc | O_DIRECT);
#endif
#ifdef F_NOCACHE	/* __APPLE__ */
	rc = fcntl(newfd, F_NOCACHE, 1);
	if (rc) {
		rc = ErrCode();
		goto leave;
	}
#endif
	}

	rc = mdb_env_copyfd2(env, newfd, flags);

leave:
	if (!(env->me_flags & MDB_NOSUBDIR))
		free(lpath);
	if (newfd != INVALID_HANDLE_VALUE)
		if (close(newfd) < 0 && rc == MDB_SUCCESS)
			rc = ErrCode();

	return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testb $0x40, 0xd(%rdi)
jne 0xc8f9
movq %rbx, %rdi
callq 0x2110
addl $0xa, %eax
movslq %eax, %rdi
callq 0x2270
testq %rax, %rax
je 0xc994
movq %rax, %r15
leaq 0x1b44(%rip), %rsi      # 0xe42d
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2380
movq %r15, %rbx
movq %rbx, %rdi
movl $0xc1, %esi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x2320
movl %eax, %r15d
cmpl $-0x1, %eax
je 0xc956
movl 0x10(%r14), %eax
cmpl 0x14(%r14), %eax
jb 0xc945
pushq $0x3
popq %rsi
movl %r15d, %edi
xorl %eax, %eax
callq 0x20c0
cmpl $-0x1, %eax
je 0xc945
orl $0x4000, %eax           # imm = 0x4000
pushq $0x4
popq %rsi
movl %r15d, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x20c0
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0xc3dd
movl %eax, %ebp
jmp 0xc95d
callq 0x2050
movl (%rax), %ebp
testb $0x40, 0xd(%r14)
jne 0xc96c
movq %rbx, %rdi
callq 0x2030
cmpl $-0x1, %r15d
je 0xc997
movl %r15d, %edi
callq 0x21a0
testl %eax, %eax
sets %al
testl %ebp, %ebp
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xc997
callq 0x2050
movl (%rax), %ebp
jmp 0xc997
pushq $0xc
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_set_flags
int ESECT
mdb_env_set_flags(MDB_env *env, unsigned int flag, int onoff)
{
	if (flag & ~CHANGEABLE)
		return EINVAL;
	if (onoff)
		env->me_flags |= flag;
	else
		env->me_flags &= ~flag;
	return MDB_SUCCESS;
}

// Assembly:
testl $0xfeeaffff, %esi       # imm = 0xFEEAFFFF
je 0xc9b7
pushq $0x16
popq %rax
retq
testl %edx, %edx
je 0xc9c0
orl %esi, 0xc(%rdi)
jmp 0xc9c5
notl %esi
andl %esi, 0xc(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_info
int ESECT
mdb_env_info(MDB_env *env, MDB_envinfo *arg)
{
	MDB_meta *meta;

	if (env == NULL || arg == NULL)
		return EINVAL;

	meta = mdb_env_pick_meta(env);
	arg->me_mapaddr = meta->mm_address;
	arg->me_last_pgno = meta->mm_last_pg;
	arg->me_last_txnid = meta->mm_txnid;

	arg->me_mapsize = env->me_mapsize;
	arg->me_maxreaders = env->me_maxreaders;
	arg->me_numreaders = env->me_txns ? env->me_txns->mti_numreaders : 0;
	return MDB_SUCCESS;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0xcad2
pushq $0x16
popq %rax
retq
movq 0x48(%rdi), %rax
movq 0x80(%rax), %rax
movq 0x50(%rdi), %rcx
xorl %edx, %edx
cmpq 0x80(%rcx), %rax
setb %dl
movq 0x48(%rdi,%rdx,8), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%rsi)
movq 0x78(%rax), %rcx
movq %rcx, 0x10(%rsi)
movq 0x80(%rax), %rax
movq %rax, 0x18(%rsi)
movq 0x70(%rdi), %rax
movq %rax, 0x8(%rsi)
movl 0x18(%rdi), %eax
movl %eax, 0x20(%rsi)
movq 0x40(%rdi), %rcx
xorl %eax, %eax
movl $0x0, %edx
testq %rcx, %rcx
je 0xcb2d
movl 0x38(%rcx), %edx
movl %edx, 0x24(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_stat
int ESECT
mdb_stat(MDB_txn *txn, MDB_dbi dbi, MDB_stat *arg)
{
	if (!arg || !TXN_DBI_EXIST(txn, dbi, DB_VALID))
		return EINVAL;

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

	if (txn->mt_dbflags[dbi] & DB_STALE) {
		MDB_cursor mc;
		MDB_xcursor mx;
		/* Stale, must read the DB's root. cursor_init does it for us. */
		mdb_cursor_init(&mc, txn, dbi, &mx);
	}
	return mdb_stat0(txn->mt_env, &txn->mt_dbs[dbi], arg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x380, %rsp            # imm = 0x380
movq %rdx, %rbx
movl %esi, %edx
testq %rbx, %rbx
sete %cl
testq %rdi, %rdi
sete %sil
pushq $0x16
popq %rax
orb %cl, %sil
jne 0xcbac
movq %rdi, %r14
cmpl %edx, 0x78(%rdi)
jbe 0xcbac
movq 0x70(%r14), %rcx
movl %edx, %r15d
movzbl (%rcx,%r15), %ecx
testb $0x8, %cl
je 0xcbac
movl $0xffff87c2, %eax       # imm = 0xFFFF87C2
testb $0x13, 0x7c(%r14)
jne 0xcbac
testb $0x2, %cl
je 0xcb96
leaq 0x8(%rsp), %rdi
leaq 0x190(%rsp), %rcx
movq %r14, %rsi
callq 0x4451
movq 0x20(%r14), %rdi
imulq $0x30, %r15, %rsi
addq 0x58(%r14), %rsi
movq %rbx, %rdx
callq 0xcaa1
xorl %eax, %eax
addq $0x380, %rsp            # imm = 0x380
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_reader_list
int ESECT
mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx)
{
	unsigned int i, rdrs;
	MDB_reader *mr;
	char buf[64];
	int rc = 0, first = 1;

	if (!env || !func)
		return -1;
	if (!env->me_txns) {
		return func("(no reader locks)\n", ctx);
	}
	rdrs = env->me_txns->mti_numreaders;
	mr = env->me_txns->mti_readers;
	for (i=0; i<rdrs; i++) {
		if (mr[i].mr_pid) {
			txnid_t	txnid = mr[i].mr_txnid;
			sprintf(buf, txnid == (txnid_t)-1 ?
				"%10d %"Z"x -\n" : "%10d %"Z"x %"Z"u\n",
				(int)mr[i].mr_pid, (size_t)mr[i].mr_tid, txnid);
			if (first) {
				first = 0;
				rc = func("    pid     thread     txnid\n", ctx);
				if (rc < 0)
					break;
			}
			rc = func(buf, ctx);
			if (rc < 0)
				break;
		}
	}
	if (first) {
		rc = func("(no active readers)\n", ctx);
	}
	return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xcc83
movq %rdx, %rbx
movq %rsi, %rdx
movq 0x40(%rdi), %r12
testq %r12, %r12
je 0xcc95
movl 0x38(%r12), %r13d
shlq $0x6, %r13
pushq $0x1
popq %r15
xorl %ebp, %ebp
xorl %eax, %eax
cmpq %rbp, %r13
je 0xccaf
cmpl $0x0, 0x88(%r12,%rbp)
je 0xcc7d
movq 0x80(%r12,%rbp), %r8
cmpq $-0x1, %r8
leaq 0x1844(%rip), %rsi      # 0xe470
leaq 0x1831(%rip), %rax      # 0xe464
cmoveq %rax, %rsi
movq %rdx, %r14
movl 0x88(%r12,%rbp), %edx
movq 0x90(%r12,%rbp), %rcx
movq %rsp, %rdi
xorl %eax, %eax
callq 0x2380
testl %r15d, %r15d
je 0xcc6a
leaq 0x181e(%rip), %rdi      # 0xe47e
movq %rbx, %rsi
callq *%r14
testl %eax, %eax
js 0xcc86
movq %rsp, %rdi
movq %rbx, %rsi
callq *%r14
xorl %r15d, %r15d
testl %eax, %eax
movq %r14, %rdx
js 0xcc86
addq $0x40, %rbp
jmp 0xcc05
pushq $-0x1
popq %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17b5(%rip), %rdi      # 0xe451
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rdx
testl %r15d, %r15d
je 0xcc86
leaq 0x17e1(%rip), %rdi      # 0xe49c
movq %rbx, %rsi
callq *%rdx
jmp 0xcc86
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_reader_check
int ESECT
mdb_reader_check(MDB_env *env, int *dead)
{
	if (!env)
		return EINVAL;
	if (dead)
		*dead = 0;
	return env->me_txns ? mdb_reader_check0(env, 0, dead) : MDB_SUCCESS;
}

// Assembly:
testq %rdi, %rdi
je 0xccdd
movq %rsi, %rdx
testq %rsi, %rsi
je 0xccd2
andl $0x0, (%rdx)
cmpq $0x0, 0x40(%rdi)
je 0xcce1
xorl %esi, %esi
jmp 0xcce4
pushq $0x16
popq %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_mutex_failed
static int ESECT
mdb_mutex_failed(MDB_env *env, mdb_mutexref_t mutex, int rc)
{
	int rlocked, rc2;
	MDB_meta *meta;

	if (rc == MDB_OWNERDEAD) {
		/* We own the mutex. Clean up after dead previous owner. */
		rc = MDB_SUCCESS;
		rlocked = (mutex == env->me_rmutex);
		if (!rlocked) {
			/* Keep mti_txnid updated, otherwise next writer can
			 * overwrite data which latest meta page refers to.
			 */
			meta = mdb_env_pick_meta(env);
			env->me_txns->mti_txnid = meta->mm_txnid;
			/* env is hosed if the dead thread was ours */
			if (env->me_txn) {
				env->me_flags |= MDB_FATAL_ERROR;
				env->me_txn = NULL;
				rc = MDB_PANIC;
			}
		}
		DPRINTF(("%cmutex owner died, %s", (rlocked ? 'r' : 'w'),
			(rc ? "this process' env is hosed" : "recovering")));
		rc2 = mdb_reader_check0(env, rlocked, NULL);
		if (rc2 == 0)
			rc2 = mdb_mutex_consistent(mutex);
		if (rc || (rc = rc2)) {
			DPRINTF(("LOCK_MUTEX recovery failed, %s", mdb_strerror(rc)));
			UNLOCK_MUTEX(mutex);
		}
	} else {
#ifdef _WIN32
		rc = ErrCode();
#endif
		DPRINTF(("LOCK_MUTEX failed, %s", mdb_strerror(rc)));
	}

	return rc;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
cmpl $0x82, %edx
jne 0xcf5d
movq %rsi, %r14
movq 0x40(%rdi), %rax
leaq 0x8(%rax), %rcx
xorl %ebx, %ebx
xorl %esi, %esi
movb $0x1, %bpl
cmpq %r14, %rcx
sete %sil
je 0xcf37
movq 0x48(%rdi), %rcx
movq 0x80(%rcx), %rcx
movq 0x50(%rdi), %rdx
xorl %r8d, %r8d
cmpq 0x80(%rdx), %rcx
setb %r8b
movq 0x48(%rdi,%r8,8), %rcx
movq 0x80(%rcx), %rcx
movq %rcx, 0x30(%rax)
cmpq $0x0, 0x60(%rdi)
je 0xcf37
orb $-0x80, 0xf(%rdi)
andq $0x0, 0x60(%rdi)
movl $0xffff87b5, %ebx       # imm = 0xFFFF87B5
xorl %ebp, %ebp
xorl %edx, %edx
callq 0xcce4
testl %eax, %eax
jne 0xcf4a
movq %r14, %rdi
callq 0x2210
testb %bpl, %bpl
je 0xcf55
movl %eax, %ebx
testl %eax, %eax
je 0xcf64
movq %r14, %rdi
callq 0x2260
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebx, %ebx
jmp 0xcf5d
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_init_meta
static int ESECT
mdb_env_init_meta(MDB_env *env, MDB_meta *meta)
{
	MDB_page *p, *q;
	int rc;
	unsigned int	 psize;
#ifdef _WIN32
	DWORD len;
	OVERLAPPED ov;
	memset(&ov, 0, sizeof(ov));
#define DO_PWRITE(rc, fd, ptr, size, len, pos)	do { \
	ov.Offset = pos;	\
	rc = WriteFile(fd, ptr, size, &len, &ov);	} while(0)
#else
	int len;
#define DO_PWRITE(rc, fd, ptr, size, len, pos)	do { \
	len = pwrite(fd, ptr, size, pos);	\
	if (len == -1 && ErrCode() == EINTR) continue; \
	rc = (len >= 0); break; } while(1)
#endif

	DPUTS("writing new meta page");

	psize = env->me_psize;

	p = calloc(NUM_METAS, psize);
	p->mp_pgno = 0;
	p->mp_flags = P_META;
	*(MDB_meta *)METADATA(p) = *meta;

	q = (MDB_page *)((char *)p + psize);
	q->mp_pgno = 1;
	q->mp_flags = P_META;
	*(MDB_meta *)METADATA(q) = *meta;

	DO_PWRITE(rc, env->me_fd, p, psize * NUM_METAS, len, 0);
	if (!rc)
		rc = ErrCode();
	else if ((unsigned) len == psize * NUM_METAS)
		rc = MDB_SUCCESS;
	else
		rc = ENOSPC;
	free(p);
	return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r14
movl 0x10(%rdi), %r15d
pushq $0x2
popq %rdi
movq %r15, %rsi
callq 0x2200
movq %rax, %rbx
movw $0x8, %bp
movw %bp, 0xa(%rax)
leaq 0x10(%rax), %rdi
movl $0x88, %edx
movq %r12, %rsi
callq 0x2240
leaq (%rbx,%r15), %rdi
addq $0x10, %rdi
movq $0x1, -0x10(%rdi)
movw %bp, -0x6(%rdi)
movl $0x88, %edx
movq %r12, %rsi
callq 0x2240
addl %r15d, %r15d
movl (%r14), %edi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x22b0
cmpl $-0x1, %eax
jne 0xcfe6
callq 0x2050
cmpl $0x4, (%rax)
je 0xcfc5
jmp 0xcffc
testl %eax, %eax
js 0xcff7
xorl %ecx, %ecx
cmpl %eax, %r15d
pushq $0x1c
popq %rbp
cmovel %ecx, %ebp
jmp 0xcffe
callq 0x2050
movl (%rax), %ebp
movq %rbx, %rdi
callq 0x2030
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_copythr
static THREAD_RET ESECT
mdb_env_copythr(void *arg)
{
	mdb_copy *my = arg;
	char *ptr;
	int toggle = 0, wsize, rc;
#ifdef _WIN32
	DWORD len;
#define DO_WRITE(rc, fd, ptr, w2, len)	rc = WriteFile(fd, ptr, w2, &len, NULL)
#else
	int len;
#define DO_WRITE(rc, fd, ptr, w2, len)	len = write(fd, ptr, w2); rc = (len >= 0)
#endif

	pthread_mutex_lock(&my->mc_mutex);
	my->mc_new = 0;
	pthread_cond_signal(&my->mc_cond);
	for(;;) {
		while (!my->mc_new)
			pthread_cond_wait(&my->mc_cond, &my->mc_mutex);
		if (my->mc_new < 0) {
			my->mc_new = 0;
			break;
		}
		my->mc_new = 0;
		wsize = my->mc_wlen[toggle];
		ptr = my->mc_wbuf[toggle];
again:
		while (wsize > 0) {
			DO_WRITE(rc, my->mc_fd, ptr, wsize, len);
			if (!rc) {
				rc = ErrCode();
				break;
			} else if (len > 0) {
				rc = MDB_SUCCESS;
				ptr += len;
				wsize -= len;
				continue;
			} else {
				rc = EIO;
				break;
			}
		}
		if (rc) {
			my->mc_status = rc;
			break;
		}
		/* If there's an overflow page tail, write it too */
		if (my->mc_olen[toggle]) {
			wsize = my->mc_olen[toggle];
			ptr = my->mc_over[toggle];
			my->mc_olen[toggle] = 0;
			goto again;
		}
		my->mc_wlen[toggle] = 0;
		toggle ^= 1;
		pthread_cond_signal(&my->mc_cond);
	}
	pthread_cond_signal(&my->mc_cond);
	pthread_mutex_unlock(&my->mc_mutex);
	return (THREAD_RET)0;
#undef DO_WRITE
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2420
movl $0x0, 0xa8(%rbx)
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x21f0
xorl %r12d, %r12d
cmpl $0x0, 0xa8(%rbx)
jne 0xd053
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20f0
jmp 0xd03d
cmpl $0x0, 0xa8(%rbx)
movl $0x0, 0xa8(%rbx)
js 0xd0ed
movl %r12d, %r13d
movl 0x88(%rbx,%r13,4), %ebp
movq 0x58(%rbx,%r13,8), %r15
testl %ebp, %ebp
jle 0xd0ae
movl 0xa0(%rbx), %edi
movl %ebp, %edx
movq %r15, %rsi
callq 0x20d0
testl %eax, %eax
js 0xd0a3
je 0xd0e4
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq %rcx, %r15
subl %eax, %ebp
jmp 0xd07a
callq 0x2050
movl (%rax), %eax
testl %eax, %eax
jne 0xd0e7
movl 0x90(%rbx,%r13,4), %ebp
testl %ebp, %ebp
je 0xd0ca
movq 0x68(%rbx,%r13,8), %r15
andl $0x0, 0x90(%rbx,%r13,4)
jmp 0xd07a
andl $0x0, 0x88(%rbx,%r13,4)
xorl $0x1, %r12d
movq %r14, %rdi
callq 0x21f0
jmp 0xd03d
pushq $0x5
popq %rax
movl %eax, 0xa4(%rbx)
movq %r14, %rdi
callq 0x21f0
movq %rbx, %rdi
callq 0x2260
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_cthr_toggle
static int ESECT
mdb_env_cthr_toggle(mdb_copy *my, int st)
{
	int toggle = my->mc_toggle ^ 1;
	pthread_mutex_lock(&my->mc_mutex);
	if (my->mc_status) {
		pthread_mutex_unlock(&my->mc_mutex);
		return my->mc_status;
	}
	while (my->mc_new == 1)
		pthread_cond_wait(&my->mc_cond, &my->mc_mutex);
	my->mc_new = st;
	my->mc_toggle = toggle;
	pthread_cond_signal(&my->mc_cond);
	pthread_mutex_unlock(&my->mc_mutex);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0xac(%rdi), %r15d
callq 0x2420
cmpl $0x0, 0xa4(%rbx)
je 0xd6eb
movq %rbx, %rdi
callq 0x2260
movl 0xa4(%rbx), %eax
jmp 0xd72a
xorl $0x1, %r15d
leaq 0x28(%rbx), %r14
movl 0xa8(%rbx), %eax
cmpl $0x1, %eax
jne 0xd70b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20f0
jmp 0xd6f3
movl %ebp, 0xa8(%rbx)
movl %r15d, 0xac(%rbx)
movq %r14, %rdi
callq 0x21f0
movq %rbx, %rdi
callq 0x2260
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hkbu-victor[P]SFastLDA/doc_uci_to_word_uci.cpp
// Function: parse_args(int, char**)
int parse_args(int argc, char **argv){
	char *arg;

	inputFile = NULL;
	outputFile = NULL;

	if (argc < 5){
		show_help();
		return -1;
	}

	int i = 0;
	while (i < argc){
		arg = argv[i];

		if (strcmp(arg,"-inputFile")==0){
			inputFile = argv[++i];
		} else if (strcmp(arg,"-outputFile")==0){
			outputFile = argv[++i];
		} else {
            // any more
		}
		i++;
	}
	if (strcmp(inputFile, outputFile) == 0){
		printf("\n***Input file and output file have the same path and name !!!\n");
		return -1;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
andq $0x0, 0x2e50(%rip)      # 0x4088
andq $0x0, 0x2e50(%rip)      # 0x4090
cmpl $0x5, %edi
jge 0x124f
callq 0x11dc
jmp 0x12dd
movq %rsi, %rbx
movl %edi, %ebp
movq $0x0, (%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
cmpl %ebp, %r15d
jge 0x12bd
movslq %r15d, %r14
movq (%rbx,%r14,8), %r12
movq %r12, %rdi
leaq 0xd8c(%rip), %rsi       # 0x2004
callq 0x1090
testl %eax, %eax
je 0x12a9
movq %r12, %rdi
leaq 0xd84(%rip), %rsi       # 0x200f
callq 0x1090
testl %eax, %eax
jne 0x12b8
incl %r15d
movq 0x8(%rbx,%r14,8), %rcx
movq %rcx, (%rsp)
movq %rcx, 0x2de9(%rip)      # 0x4090
jmp 0x12b8
incl %r15d
movq 0x8(%rbx,%r14,8), %r13
movq %r13, 0x2dd0(%rip)      # 0x4088
incl %r15d
jmp 0x1262
movq %r13, %rdi
movq (%rsp), %rsi
callq 0x1090
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x12e0
leaq 0xf56(%rip), %rdi       # 0x222e
callq 0x10b0
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/csMOOC[P]UIUC/MP1Node.cpp
// Function: MP1Node::MP1Node(Member*, Params*, EmulNet*, Log*, Address*)
MP1Node::MP1Node(Member *member, Params *params, EmulNet *emul, Log *log, Address *address) {
	for( int i = 0; i < 6; i++ ) {
		NULLADDR[i] = 0;
	}
	this->memberNode = member;
	this->emulNet = emul;
	this->log = log;
	this->par = params;
	this->memberNode->addr = *address;
}

// Assembly:
leaq 0x8753(%rip), %rax      # 0xaca0
movq %rax, (%rdi)
pushq $-0x6
popq %rax
testq %rax, %rax
je 0x2562
movb $0x0, 0x2e(%rdi,%rax)
incq %rax
jmp 0x2553
movq %rsi, 0x20(%rdi)
movq %rcx, 0x8(%rdi)
movq %r8, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
addq $0x8, %rsi
movq %rsi, %rdi
movq %r9, %rsi
jmp 0x4a3e
nop
// File: /workspace/github_cpp_makefile_star2_O2/csMOOC[P]UIUC/MP1Node.cpp
// Function: MP1Node::introduceSelfToGroup(Address*)
int MP1Node::introduceSelfToGroup(Address *joinaddr) {
	MessageHdr *msg;
#ifdef DEBUGLOG
    static char s[1024];
#endif

    if ( 0 == memcmp((char *)&(memberNode->addr.addr), (char *)&(joinaddr->addr), sizeof(memberNode->addr.addr))) {
        // I am the group booter (first process to join the group). Boot up the group
#ifdef DEBUGLOG
        log->LOG(&memberNode->addr, "Starting up group...");
#endif
        memberNode->inGroup = true;
        addOrUpdateMember(memberNode->addr, memberNode->heartbeat);
    }
    else {
        size_t msgsize = sizeof(MessageHdr) + sizeof(joinaddr->addr) + sizeof(long) + 1;
        msg = (MessageHdr *) malloc(msgsize * sizeof(char));

        // create JOINREQ message: format of data is {struct Address myaddr}
        msg->msgType = JOINREQ;
        memcpy((char *)(msg+1), &memberNode->addr.addr, sizeof(memberNode->addr.addr));
        memcpy((char *)(msg+1) + 1 + sizeof(memberNode->addr.addr), &memberNode->heartbeat, sizeof(long));

#ifdef DEBUGLOG
        sprintf(s, "Trying to join...");
        log->LOG(&memberNode->addr, s);
#endif

        // send JOINREQ message to introducer member
        emulNet->ENsend(&memberNode->addr, joinaddr, (char *)msg, msgsize);

        free(msg);
    }

    return 1;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %r13
leaq 0x8(%r13), %r15
pushq $0x6
popq %rdx
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
je 0x26f1
pushq $0x13
popq %rdi
callq 0x2230
movq %rax, %r12
andl $0x0, (%rax)
movl (%r15), %eax
movl %eax, 0x4(%r12)
movzwl 0x4(%r15), %eax
movw %ax, 0x8(%r12)
movq 0x18(%r13), %rax
movq %rax, 0xb(%r12)
movups 0x4972(%rip), %xmm0     # 0x7019
movaps %xmm0, 0x8b32(%rip)     # 0xb1e0
movw $0x2e, 0x8b39(%rip)     # 0xb1f0
leaq 0x8b22(%rip), %rdx      # 0xb1e0
movq 0x10(%rbx), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x44fe
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
addq $0x8, %rsi
pushq $0x13
popq %r8
movq %r14, %rdx
movq %r12, %rcx
callq 0x3456
movq %r12, %rdi
callq 0x21f0
jmp 0x2732
movq 0x10(%rbx), %rdi
leaq 0x4908(%rip), %rdx      # 0x7004
movq %r15, %rsi
xorl %eax, %eax
callq 0x44fe
movq 0x20(%rbx), %rsi
movb $0x1, 0xf(%rsi)
addq $0x8, %rsi
leaq 0xa(%rsp), %r14
movq %r14, %rdi
callq 0x4a30
movq 0x20(%rbx), %rax
movq 0x18(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x276e
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/csMOOC[P]UIUC/MP1Node.cpp
// Function: MP1Node::finishUpThisNode()
int MP1Node::finishUpThisNode(){
   /*
    * Your code goes here
    */
    initMemberListTable(memberNode);
    memberNode->inGroup = false;
    return 0;
}

// Assembly:
movq 0x20(%rdi), %rax
movq 0x28(%rax), %rcx
cmpq %rcx, 0x30(%rax)
je 0x2756
movq %rcx, 0x30(%rax)
movb $0x0, 0xf(%rax)
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/csMOOC[P]UIUC/MP1Node.cpp
// Function: MP1Node::addOrUpdateMember(Address, long)
void MP1Node::addOrUpdateMember(Address memberAddr, long heartbeat)
{
	int id = *(int*)(&memberAddr.addr[0]);
	int port = *(short*)(&memberAddr.addr[4]);
    bool memberFound = false;

    for (vector<MemberListEntry>::iterator iter = memberNode->memberList.begin();
            iter != memberNode->memberList.end(); ++iter)
    {
        if (iter->id == id && iter->port == port)
        {
            memberFound = true;
            if (iter->heartbeat < heartbeat)
            {
                iter->heartbeat = heartbeat;
                iter->timestamp = par->getcurrtime();
            }
            break;
        }
    }

    if (!memberFound)
    {
        memberNode->memberList.push_back(
            MemberListEntry(id, port, heartbeat, par->getcurrtime()));
        memberNode->nnb += 1;
        log->logNodeAdd(&memberNode->addr, &memberAddr);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %ebp
movzwl 0x4(%rsi), %r12d
movq 0x20(%rdi), %rax
leaq 0x28(%rax), %rcx
movq 0x28(%rax), %r13
movq 0x30(%rax), %rax
cmpq %rax, %r13
je 0x27b4
cmpl %ebp, (%r13)
jne 0x27ae
cmpw %r12w, 0x4(%r13)
je 0x2808
addq $0x18, %r13
jmp 0x279c
movq %rcx, %r13
movq 0x18(%r14), %rdi
callq 0x4a24
movslq %eax, %r8
movswl %r12w, %edx
movq %rsp, %r12
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rcx
callq 0x4a5e
movq %r13, %rdi
movq %r12, %rsi
callq 0x3006
movq 0x20(%r14), %rsi
incl 0x14(%rsi)
movq 0x10(%r14), %rdi
addq $0x8, %rsi
movq %rbx, %rdx
callq 0x47a2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %r15, 0x8(%r13)
jge 0x27f9
movq %r15, 0x8(%r13)
movq 0x18(%r14), %rdi
callq 0x4a24
cltq
movq %rax, 0x10(%r13)
jmp 0x27f9
nop
// File: /workspace/github_cpp_makefile_star2_O2/csMOOC[P]UIUC/MP1Node.cpp
// Function: MP1Node::checkMessages()
void MP1Node::checkMessages() {
    void *ptr;
    int size;

    // Pop waiting messages from memberNode's mp1q
    while ( !memberNode->mp1q.empty() ) {
    	ptr = memberNode->mp1q.front().elt;
    	size = memberNode->mp1q.front().size;
    	memberNode->mp1q.pop();
    	recvCallBack((void *)memberNode, (char *)ptr, size);
    }
    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rbx), %rdi
movq 0x58(%rdi), %rax
cmpq %rax, 0x78(%rdi)
je 0x287a
addq $0x48, %rdi
movq (%rax), %r14
callq 0x2fb0
movq %rbx, %rdi
movq %r14, %rdx
callq 0x289c
jmp 0x2853
addq $0x8, %rsp
popq %rbx
popq %r14
retq