// File: /workspace/github_cpp_makefile_star2_O3/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_rebalance
static int
mdb_rebalance(MDB_cursor *mc)
{
	MDB_node	*node;
	int rc;
	unsigned int ptop, minkeys;
	MDB_cursor	mn;
	indx_t oldki;

	minkeys = 1 + (IS_BRANCH(mc->mc_pg[mc->mc_top]));
	DPRINTF(("rebalancing %s page %"Z"u (has %u keys, %.1f%% full)",
	    IS_LEAF(mc->mc_pg[mc->mc_top]) ? "leaf" : "branch",
	    mdb_dbg_pgno(mc->mc_pg[mc->mc_top]), NUMKEYS(mc->mc_pg[mc->mc_top]),
		(float)PAGEFILL(mc->mc_txn->mt_env, mc->mc_pg[mc->mc_top]) / 10));

	if (PAGEFILL(mc->mc_txn->mt_env, mc->mc_pg[mc->mc_top]) >= FILL_THRESHOLD &&
		NUMKEYS(mc->mc_pg[mc->mc_top]) >= minkeys) {
		DPRINTF(("no need to rebalance page %"Z"u, above fill threshold",
		    mdb_dbg_pgno(mc->mc_pg[mc->mc_top])));
		return MDB_SUCCESS;
	}

	if (mc->mc_snum < 2) {
		MDB_page *mp = mc->mc_pg[0];
		if (IS_SUBP(mp)) {
			DPUTS("Can't rebalance a subpage, ignoring");
			return MDB_SUCCESS;
		}
		if (NUMKEYS(mp) == 0) {
			DPUTS("tree is completely empty");
			mc->mc_db->md_root = P_INVALID;
			mc->mc_db->md_depth = 0;
			mc->mc_db->md_leaf_pages = 0;
			rc = mdb_midl_append(&mc->mc_txn->mt_free_pgs, mp->mp_pgno);
			if (rc)
				return rc;
			/* Adjust cursors pointing to mp */
			mc->mc_snum = 0;
			mc->mc_top = 0;
			mc->mc_flags &= ~C_INITIALIZED;
			{
				MDB_cursor *m2, *m3;
				MDB_dbi dbi = mc->mc_dbi;

				for (m2 = mc->mc_txn->mt_cursors[dbi]; m2; m2=m2->mc_next) {
					if (mc->mc_flags & C_SUB)
						m3 = &m2->mc_xcursor->mx_cursor;
					else
						m3 = m2;
					if (m3->mc_snum < mc->mc_snum) continue;
					if (m3->mc_pg[0] == mp) {
						m3->mc_snum = 0;
						m3->mc_top = 0;
						m3->mc_flags &= ~C_INITIALIZED;
					}
				}
			}
		} else if (IS_BRANCH(mp) && NUMKEYS(mp) == 1) {
			int i;
			DPUTS("collapsing root page!");
			rc = mdb_midl_append(&mc->mc_txn->mt_free_pgs, mp->mp_pgno);
			if (rc)
				return rc;
			mc->mc_db->md_root = NODEPGNO(NODEPTR(mp, 0));
			rc = mdb_page_get(mc->mc_txn,mc->mc_db->md_root,&mc->mc_pg[0],NULL);
			if (rc)
				return rc;
			mc->mc_db->md_depth--;
			mc->mc_db->md_branch_pages--;
			mc->mc_ki[0] = mc->mc_ki[1];
			for (i = 1; i<mc->mc_db->md_depth; i++) {
				mc->mc_pg[i] = mc->mc_pg[i+1];
				mc->mc_ki[i] = mc->mc_ki[i+1];
			}
			{
				/* Adjust other cursors pointing to mp */
				MDB_cursor *m2, *m3;
				MDB_dbi dbi = mc->mc_dbi;

				for (m2 = mc->mc_txn->mt_cursors[dbi]; m2; m2=m2->mc_next) {
					if (mc->mc_flags & C_SUB)
						m3 = &m2->mc_xcursor->mx_cursor;
					else
						m3 = m2;
					if (m3 == mc || m3->mc_snum < mc->mc_snum) continue;
					if (m3->mc_pg[0] == mp) {
						for (i=0; i<m3->mc_snum; i++) {
							m3->mc_pg[i] = m3->mc_pg[i+1];
							m3->mc_ki[i] = m3->mc_ki[i+1];
						}
						m3->mc_snum--;
						m3->mc_top--;
					}
				}
			}
		} else
			DPUTS("root page doesn't need rebalancing");
		return MDB_SUCCESS;
	}

	/* The parent (branch page) must have at least 2 pointers,
	 * otherwise the tree is invalid.
	 */
	ptop = mc->mc_top-1;
	mdb_cassert(mc, NUMKEYS(mc->mc_pg[ptop]) > 1);

	/* Leaf page fill factor is below the threshold.
	 * Try to move keys from left or right neighbor, or
	 * merge with a neighbor page.
	 */

	/* Find neighbors.
	 */
	mdb_cursor_copy(mc, &mn);
	mn.mc_xcursor = NULL;

	oldki = mc->mc_ki[mc->mc_top];
	if (mc->mc_ki[ptop] == 0) {
		/* We're the leftmost leaf in our parent.
		 */
		DPUTS("reading right neighbor");
		mn.mc_ki[ptop]++;
		node = NODEPTR(mc->mc_pg[ptop], mn.mc_ki[ptop]);
		rc = mdb_page_get(mc->mc_txn,NODEPGNO(node),&mn.mc_pg[mn.mc_top],NULL);
		if (rc)
			return rc;
		mn.mc_ki[mn.mc_top] = 0;
		mc->mc_ki[mc->mc_top] = NUMKEYS(mc->mc_pg[mc->mc_top]);
	} else {
		/* There is at least one neighbor to the left.
		 */
		DPUTS("reading left neighbor");
		mn.mc_ki[ptop]--;
		node = NODEPTR(mc->mc_pg[ptop], mn.mc_ki[ptop]);
		rc = mdb_page_get(mc->mc_txn,NODEPGNO(node),&mn.mc_pg[mn.mc_top],NULL);
		if (rc)
			return rc;
		mn.mc_ki[mn.mc_top] = NUMKEYS(mn.mc_pg[mn.mc_top]) - 1;
		mc->mc_ki[mc->mc_top] = 0;
	}

	DPRINTF(("found neighbor page %"Z"u (%u keys, %.1f%% full)",
	    mn.mc_pg[mn.mc_top]->mp_pgno, NUMKEYS(mn.mc_pg[mn.mc_top]),
		(float)PAGEFILL(mc->mc_txn->mt_env, mn.mc_pg[mn.mc_top]) / 10));

	/* If the neighbor page is above threshold and has enough keys,
	 * move one key from it. Otherwise we should try to merge them.
	 * (A branch page must never have less than 2 keys.)
	 */
	minkeys = 1 + (IS_BRANCH(mn.mc_pg[mn.mc_top]));
	if (PAGEFILL(mc->mc_txn->mt_env, mn.mc_pg[mn.mc_top]) >= FILL_THRESHOLD && NUMKEYS(mn.mc_pg[mn.mc_top]) > minkeys) {
		rc = mdb_node_move(&mn, mc);
		if (mc->mc_ki[ptop]) {
			oldki++;
		}
	} else {
		if (mc->mc_ki[ptop] == 0) {
			rc = mdb_page_merge(&mn, mc);
		} else {
			MDB_cursor dummy;
			oldki += NUMKEYS(mn.mc_pg[mn.mc_top]);
			mn.mc_ki[mn.mc_top] += mc->mc_ki[mn.mc_top] + 1;
			/* We want mdb_rebalance to find mn when doing fixups */
			if (mc->mc_flags & C_SUB) {
				dummy.mc_next = mc->mc_txn->mt_cursors[mc->mc_dbi];
				mc->mc_txn->mt_cursors[mc->mc_dbi] = &dummy;
				dummy.mc_xcursor = (MDB_xcursor *)&mn;
			} else {
				mn.mc_next = mc->mc_txn->mt_cursors[mc->mc_dbi];
				mc->mc_txn->mt_cursors[mc->mc_dbi] = &mn;
			}
			rc = mdb_page_merge(mc, &mn);
			if (mc->mc_flags & C_SUB)
				mc->mc_txn->mt_cursors[mc->mc_dbi] = dummy.mc_next;
			else
				mc->mc_txn->mt_cursors[mc->mc_dbi] = mn.mc_next;
			mdb_cursor_copy(&mn, mc);
		}
		mc->mc_flags &= ~C_EOF;
	}
	mc->mc_ki[mc->mc_top] = oldki;
	return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
movq %rdi, %rbx
movzwl 0x42(%rdi), %r14d
movq 0x48(%rdi,%r14,8), %rsi
movq 0x18(%rdi), %r13
movq 0x20(%r13), %rdi
movl 0x10(%rdi), %r8d
addl $-0x10, %r8d
movzwl 0xe(%rsi), %eax
movzwl 0xc(%rsi), %ecx
subl %ecx, %eax
movzwl %ax, %eax
movl %r8d, %edx
subl %eax, %edx
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
xorl %r15d, %r15d
xorl %edx, %edx
divq %r8
cmpq $0xfa, %rax
jb 0xaa24
movzwl 0xa(%rsi), %eax
andl $0x1, %eax
incl %eax
addl $-0x10, %ecx
shrl %ecx
cmpl %eax, %ecx
jae 0xb057
leaq 0x48(%rbx), %rdx
cmpw $0x1, 0x40(%rbx)
ja 0xaadb
movq (%rdx), %r12
movzwl 0xa(%r12), %eax
xorl %r15d, %r15d
testb $0x40, %al
jne 0xb057
movzwl 0xc(%r12), %ecx
addl $-0x10, %ecx
cmpl $0x1, %ecx
ja 0xad6d
movq 0x28(%rbx), %rax
movq $-0x1, 0x28(%rax)
movw $0x0, 0x6(%rax)
movq $0x0, 0x10(%rax)
addq $0x28, %r13
movq (%r12), %rsi
movq %r13, %rdi
callq 0xbad1
testl %eax, %eax
jne 0xadc9
movl $0x0, 0x40(%rbx)
andb $-0x2, 0x44(%rbx)
movl 0x20(%rbx), %eax
movq 0x18(%rbx), %rcx
movq 0x68(%rcx), %rcx
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0xb057
testb $0x4, 0x44(%rbx)
movq %rax, %rcx
je 0xaabb
movq 0x10(%rax), %rcx
movzwl 0x40(%rcx), %edx
cmpw 0x40(%rbx), %dx
jb 0xaad6
cmpq %r12, 0x48(%rcx)
jne 0xaad6
movl $0x0, 0x40(%rcx)
andb $-0x2, 0x44(%rcx)
movq (%rax), %rax
jmp 0xaaa5
leal -0x1(%r14), %ebp
movq %rdx, 0x20(%rsp)
movq (%rdx,%rbp,8), %r15
movzwl 0xc(%r15), %eax
andl $-0x4, %eax
cmpw $0x10, %ax
je 0xb3ca
leaq 0x58(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb444
movq $0x0, 0x10(%r12)
movzwl 0x148(%rbx,%r14,2), %r14d
cmpw $0x0, 0x148(%rbx,%rbp,2)
movzwl 0x1a0(%rsp,%rbp,2), %eax
je 0xaba2
decl %eax
movw %ax, 0x1a0(%rsp,%rbp,2)
movzwl %ax, %eax
movzwl 0x10(%r15,%rax,2), %eax
movl (%r15,%rax), %ecx
movzwl 0x4(%r15,%rax), %esi
shlq $0x20, %rsi
orq %rcx, %rsi
movzwl 0x9a(%rsp), %eax
leaq (%r12,%rax,8), %rdx
addq $0x48, %rdx
movq %r13, %rdi
xorl %ecx, %ecx
callq 0x74c4
testl %eax, %eax
jne 0xadc9
movzwl 0x9a(%rsp), %ecx
movq 0xa0(%rsp,%rcx,8), %rax
movzwl 0xc(%rax), %eax
addl $0x1fff0, %eax          # imm = 0x1FFF0
shrl %eax
decl %eax
movw %ax, 0x1a0(%rsp,%rcx,2)
movzwl 0x42(%rbx), %eax
xorl %edx, %edx
jmp 0xac0f
incl %eax
movw %ax, 0x1a0(%rsp,%rbp,2)
movzwl %ax, %eax
movzwl 0x10(%r15,%rax,2), %eax
movl (%r15,%rax), %ecx
movzwl 0x4(%r15,%rax), %esi
shlq $0x20, %rsi
orq %rcx, %rsi
movzwl 0x9a(%rsp), %eax
leaq (%r12,%rax,8), %rdx
addq $0x48, %rdx
movq %r13, %rdi
xorl %ecx, %ecx
callq 0x74c4
testl %eax, %eax
jne 0xadc9
movzwl 0x9a(%rsp), %ecx
movw $0x0, 0x1a0(%rsp,%rcx,2)
movzwl 0x42(%rbx), %eax
movq 0x48(%rbx,%rax,8), %rdx
movzwl 0xc(%rdx), %edx
addl $0x1fff0, %edx          # imm = 0x1FFF0
shrl %edx
movw %dx, 0x148(%rbx,%rax,2)
movq 0xa0(%rsp,%rcx,8), %r8
movq 0x18(%rbx), %rsi
movq 0x20(%rsi), %rax
movl 0x10(%rax), %r9d
addl $-0x10, %r9d
movzwl 0xe(%r8), %eax
movzwl 0xc(%r8), %edi
subl %edi, %eax
movzwl %ax, %eax
movl %r9d, %edx
subl %eax, %edx
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
xorl %edx, %edx
divq %r9
cmpq $0xfa, %rax
jb 0xad15
movzwl 0xa(%r8), %eax
andl $0x1, %eax
incl %eax
leal -0x10(%rdi), %edx
shrl %edx
cmpl %eax, %edx
jbe 0xad15
leaq 0x58(%rsp), %rdi
callq 0xa0ec
testl %eax, %eax
jne 0xb039
movq %rbx, %rdi
callq 0xa0ec
testl %eax, %eax
jne 0xb039
movzwl 0x9a(%rsp), %edx
movq 0xa0(%rsp,%rdx,8), %rcx
movzwl 0xa(%rcx), %eax
testb $0x20, %al
jne 0xaf20
movzwl 0x1a0(%rsp,%rdx,2), %edx
movzwl 0x10(%rcx,%rdx,2), %r12d
addq %rcx, %r12
testb $0x1, %r12b
jne 0xb3e2
movl (%r12), %esi
movzwl 0x4(%r12), %r9d
testb $0x1, %al
je 0xaf5d
testw %dx, %dx
jne 0xaf5d
movq %rsi, 0x28(%rsp)
movq %r9, 0x18(%rsp)
movl %r14d, %r13d
leaq 0x58(%rsp), %rdi
movzwl 0x40(%rdi), %r14d
callq 0xb88a
testl %eax, %eax
je 0xaf74
movl %eax, %r15d
movl %r13d, %r14d
jmp 0xb03c
cmpw $0x0, 0x148(%rbx,%rbp,2)
je 0xadd1
addl $0x1fff0, %edi          # imm = 0x1FFF0
shrl %edi
addl %edi, %r14d
addl %ecx, %ecx
movzwl 0x148(%rbx,%rcx), %eax
addw 0x1a0(%rsp,%rcx), %ax
incl %eax
movw %ax, 0x1a0(%rsp,%rcx)
testb $0x4, 0x44(%rbx)
movq 0x68(%rsi), %rax
movl 0x20(%rbx), %ecx
leaq (%rax,%rcx,8), %rax
movq (%rax), %rcx
jne 0xade3
movq %rcx, 0x58(%rsp)
jmp 0xadf9
testb $0x1, %al
je 0xb057
andl $-0x2, %ecx
cmpl $0x2, %ecx
jne 0xb057
movq %rdx, %r14
addq $0x28, %r13
movq (%r12), %rsi
movq %r13, %rdi
callq 0xbad1
testl %eax, %eax
jne 0xadc9
movzwl 0x10(%r12), %eax
movl (%r12,%rax), %ecx
movzwl 0x4(%r12,%rax), %esi
shlq $0x20, %rsi
orq %rcx, %rsi
movq 0x28(%rbx), %rax
movq %rsi, 0x28(%rax)
movq 0x18(%rbx), %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x74c4
testl %eax, %eax
je 0xae40
movl %eax, %r15d
jmp 0xb057
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0xb495
movl %eax, %r15d
jmp 0xae37
leaq 0x1e0(%rsp), %rdx
movq %rcx, (%rdx)
movq %rdx, (%rax)
leaq 0x1f0(%rsp), %rax
movq %r12, (%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb495
movl %eax, %r15d
testb $0x4, 0x44(%rbx)
leaq 0x1e0(%rsp), %rax
cmoveq %r12, %rax
movq (%rax), %rax
movq 0x18(%rbx), %rcx
movq 0x68(%rcx), %rcx
movl 0x20(%rbx), %edx
movq %rax, (%rcx,%rdx,8)
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb444
andb $-0x3, 0x44(%rbx)
jmp 0xb04a
movq 0x28(%rbx), %rax
decw 0x6(%rax)
decq 0x8(%rax)
movzwl 0x14a(%rbx), %ecx
movw %cx, 0x148(%rbx)
cmpw $0x2, 0x6(%rax)
jb 0xae91
xorl %ecx, %ecx
movq 0x58(%rbx,%rcx,8), %rdx
movq %rdx, 0x50(%rbx,%rcx,8)
movzwl 0x14c(%rbx,%rcx,2), %edx
movw %dx, 0x14a(%rbx,%rcx,2)
movzwl 0x6(%rax), %edx
leaq 0x1(%rcx), %rsi
addq $0x2, %rcx
cmpq %rdx, %rcx
movq %rsi, %rcx
jb 0xae63
movl 0x20(%rbx), %eax
movq 0x18(%rbx), %rcx
movq 0x68(%rcx), %rcx
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0xaf18
movl 0x44(%rbx), %ecx
movq %rax, %rdx
testb $0x4, %cl
je 0xaeb4
movq 0x10(%rax), %rdx
cmpq %rbx, %rdx
je 0xaf08
movzwl 0x40(%rdx), %esi
cmpw 0x40(%rbx), %si
jb 0xaf08
cmpq %r12, 0x48(%rdx)
jne 0xaf08
testq %rsi, %rsi
je 0xaefc
xorl %edi, %edi
movq 0x50(%rdx,%rdi,8), %r8
movq %r8, 0x48(%rdx,%rdi,8)
movzwl 0x14a(%rdx,%rdi,2), %r8d
movw %r8w, 0x148(%rdx,%rdi,2)
leaq 0x1(%rdi), %r8
movq %r8, %rdi
cmpq %rsi, %r8
jb 0xaed0
decl %esi
jmp 0xaf00
movw $0xffff, %si            # imm = 0xFFFF
movw %si, 0x40(%rdx)
decw 0x42(%rdx)
movq (%rax), %rax
xorl %r15d, %r15d
testq %rax, %rax
jne 0xaea8
jmp 0xb057
xorl %r15d, %r15d
jmp 0xb057
movq 0x80(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x8(%rsp)
movzwl 0x1a0(%rsp,%rdx,2), %edx
imulq %rax, %rdx
leaq (%rcx,%rdx), %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x30(%rsp)
xorl %r9d, %r9d
xorl %r13d, %r13d
jmp 0xaffa
movzwl 0x6(%r12), %eax
movq %rax, 0x8(%rsp)
leaq 0x8(%r12), %rcx
movq %rcx, 0x10(%rsp)
jmp 0xafdb
movzwl 0x9a(%rsp), %eax
movq 0xa0(%rsp,%rax,8), %rax
testb $0x20, 0xa(%rax)
jne 0xaf9b
movzwl 0x10(%rax), %ecx
addq %rcx, %rax
addq $0x8, %rax
movzwl -0x2(%rax), %ecx
jmp 0xafa9
movq 0x80(%rsp), %rcx
movl (%rcx), %ecx
addq $0x10, %rax
movq 0x18(%rsp), %r9
movq 0x28(%rsp), %rsi
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
leal -0x1(%r14), %eax
movw %r14w, 0x98(%rsp)
movw %ax, 0x9a(%rsp)
movzwl 0x6(%r12), %eax
movl %r13d, %r14d
movq %r9, %r13
shlq $0x20, %r13
orq %rsi, %r13
movl (%r12), %ecx
movq %rcx, 0x30(%rsp)
addq %r12, %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movzwl 0x42(%rbx), %eax
movq 0x48(%rbx,%rax,8), %rcx
testb $0x1, 0xa(%rcx)
je 0xb018
cmpw $0x0, 0x148(%rbx,%rax,2)
je 0xb118
movzwl 0x148(%rbx,%rax,2), %esi
leaq 0x8(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
movq %r13, %r8
callq 0x87d4
testl %eax, %eax
je 0xb06c
movl %eax, %r15d
cmpw $0x1, 0x148(%rbx,%rbp,2)
sbbw $-0x1, %r14w
movzwl 0x42(%rbx), %eax
movw %r14w, 0x148(%rbx,%rax,2)
movl %r15d, %eax
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rsp), %esi
leaq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x7385
movl 0x20(%r15), %eax
movzwl 0x42(%r15), %edx
movq 0x18(%r15), %rcx
movq 0x68(%rcx), %rcx
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0xb150
movq 0xa0(%rsp,%rdx,8), %rcx
movl 0x9c(%rsp), %edx
movq %rax, %rsi
testb $0x4, %dl
je 0xb0b6
movq 0x10(%rax), %rsi
cmpq %r15, %rsi
je 0xb103
movzwl 0x9a(%rsp), %edi
cmpq %rcx, 0x48(%rsi,%rdi,8)
jne 0xb103
leal (%rdi,%rdi), %r8d
movzwl 0x148(%rsi,%r8), %r9d
cmpw 0x1a0(%rsp,%r8), %r9w
jne 0xb103
movzwl 0x42(%rbx), %r8d
movq 0x48(%rbx,%r8,8), %r9
movq %r9, 0x48(%rsi,%rdi,8)
movzwl 0x148(%rbx,%r8,2), %r8d
movw %r8w, 0x148(%rsi,%rdi,2)
movq (%rax), %rax
testq %rax, %rax
jne 0xb0aa
movzwl 0x9a(%rsp), %ecx
movzwl %cx, %edx
jmp 0xb152
movq %r9, 0x18(%rsp)
movl %r14d, %r12d
movzwl 0x40(%rbx), %r14d
leaq 0x1e0(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb444
movq %r15, %rdi
callq 0xb88a
testl %eax, %eax
je 0xb1ec
movl %eax, %r15d
jmp 0xb3c2
movl %edx, %ecx
cmpw $0x0, 0x1a0(%rsp,%rdx,2)
je 0xb1b9
movzwl 0x42(%rbx), %eax
xorl %r15d, %r15d
cmpw $0x0, 0x148(%rbx,%rax,2)
jne 0xb03c
cmpw $0x0, 0x146(%rbx,%rax,2)
je 0xb374
movzwl %cx, %ecx
movq 0xa0(%rsp,%rcx,8), %rcx
movq 0x20(%rsp), %rdx
movq (%rdx,%rax,8), %rax
testb $0x20, 0xa(%rcx)
jne 0xb328
movzwl 0x10(%rax), %ecx
addq %rcx, %rax
addq $0x8, %rax
movzwl -0x2(%rax), %ecx
movq %rcx, 0x8(%rsp)
jmp 0xb32c
cmpw $0x0, 0x19e(%rsp,%rdx,2)
je 0xb274
movq 0xa0(%rsp,%rdx,8), %rax
testb $0x20, 0xa(%rax)
jne 0xb21e
movzwl 0x10(%rax), %ecx
addq %rcx, %rax
addq $0x8, %rax
movzwl -0x2(%rax), %ecx
movq %rcx, 0x8(%rsp)
jmp 0xb222
movzwl %r14w, %eax
movzwl 0x222(%rsp), %ecx
movq 0x228(%rsp,%rcx,8), %rcx
testb $0x20, 0xa(%rcx)
jne 0xb2d3
movzwl 0x10(%rcx), %edx
addq %rdx, %rcx
addq $0x8, %rcx
movzwl -0x2(%rcx), %edx
jmp 0xb2e1
addq $0x10, %rax
leaq 0x8(%rsp), %r15
movq %rax, 0x8(%r15)
leaq 0x58(%rsp), %rdi
leaq 0x1e0(%rsp), %r12
movq %r12, %rsi
callq 0xb444
movq 0x40(%r12), %xmm0
pcmpeqd %xmm1, %xmm1
paddw %xmm0, %xmm1
movd %xmm1, 0x40(%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0x6e4d
testl %eax, %eax
jne 0xb039
movzwl 0x9a(%rsp), %ecx
movzwl %cx, %edx
movq 0xa0(%rsp,%rdx,8), %rax
testb $0x1, 0xa(%rax)
je 0xb15d
movl %r14d, %r12d
movzwl 0x1a0(%rsp,%rdx,2), %r14d
leaq 0x48(%rsp), %rsi
movq $0x0, (%rsi)
movw $0x0, 0x1a0(%rsp,%rdx,2)
leaq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x6e4d
movzwl 0x42(%r15), %ecx
movw %r14w, 0x1a0(%rsp,%rcx,2)
testl %eax, %eax
jne 0xb403
movl %r12d, %r14d
jmp 0xb15d
movq 0x208(%rsp), %rdx
movl (%rdx), %edx
addq $0x10, %rcx
leaq 0x48(%rsp), %rsi
movq %rdx, (%rsi)
movq %rcx, 0x8(%rsi)
leal -0x1(%rax), %ecx
leaq 0x1e0(%rsp), %rdi
movw %ax, 0x40(%rdi)
movw %cx, 0x42(%rdi)
movw $0x0, 0x328(%rsp,%rcx,2)
callq 0x6e4d
testl %eax, %eax
movl %r12d, %r14d
jne 0xb039
movzwl 0x42(%rbx), %eax
movq 0x18(%rsp), %r9
jmp 0xb018
addq $0x10, %rax
leaq 0x8(%rsp), %r12
movq %rax, 0x8(%r12)
leaq 0x1e0(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0xb444
movq 0x40(%r13), %xmm0
pcmpeqd %xmm1, %xmm1
paddw %xmm0, %xmm1
movd %xmm1, 0x40(%r13)
movq %r13, %rdi
movq %r12, %rsi
callq 0x6e4d
testl %eax, %eax
jne 0xb039
movzwl 0x42(%rbx), %eax
movq 0x20(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
testb $0x1, 0xa(%rcx)
je 0xb03c
movl %r14d, %r12d
movzwl 0x148(%rbx,%rax,2), %r14d
leaq 0x48(%rsp), %rsi
movq $0x0, (%rsi)
movw $0x0, 0x148(%rbx,%rax,2)
movq %rbx, %rdi
callq 0x6e4d
movzwl 0x42(%rbx), %ecx
movw %r14w, 0x148(%rbx,%rcx,2)
testl %eax, %eax
jne 0xb424
movl %r12d, %r14d
jmp 0xb03c
leaq 0x482f(%rip), %rsi      # 0xfc00
leaq 0x4845(%rip), %rdx      # 0xfc1d
movl $0x1f33, %ecx           # imm = 0x1F33
callq 0xbfbd
movq 0x70(%rsp), %rax
movq 0x20(%rax), %rdi
leaq 0x4839(%rip), %rsi      # 0xfc2b
leaq 0x4849(%rip), %rdx      # 0xfc42
movl $0x1d92, %ecx           # imm = 0x1D92
callq 0xbfbd
movq 0x70(%rsp), %rax
movq 0x20(%rax), %rdi
leaq 0x483d(%rip), %rsi      # 0xfc50
leaq 0x4828(%rip), %rdx      # 0xfc42
movl $0x1e05, %ecx           # imm = 0x1E05
callq 0xbfbd
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rdi
leaq 0x481d(%rip), %rsi      # 0xfc50
leaq 0x4808(%rip), %rdx      # 0xfc42
movl $0x1e21, %ecx           # imm = 0x1E21
callq 0xbfbd