// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/lchain.c
// Function: mg_lchain_rmq
mg128_t *mg_lchain_rmq(int max_dist, int max_dist_inner, int bw, int max_chn_skip, int cap_rmq_size, int min_cnt, int min_sc, float chn_pen_gap, float chn_pen_skip,
					   int64_t n, mg128_t *a, int *n_u_, uint64_t **_u, void *km)
{
	int32_t *f,*t, *v, n_u, n_v, mmax_f = 0, max_rmq_size = 0, max_drop = bw;
	int64_t *p, i, i0, st = 0, st_inner = 0, n_iter = 0;
	uint64_t *u;
	lc_elem_t *root = 0, *root_inner = 0;
	void *mem_mp = 0;
	kmp_rmq_t *mp;

	if (_u) *_u = 0, *n_u_ = 0;
	if (n == 0 || a == 0) {
		kfree(km, a);
		return 0;
	}
	if (max_dist < bw) max_dist = bw;
	if (max_dist_inner <= 0 || max_dist_inner >= max_dist) max_dist_inner = 0;
	KMALLOC(km, p, n);
	KMALLOC(km, f, n);
	KCALLOC(km, t, n);
	KMALLOC(km, v, n);
	mem_mp = km_init2(km, 0x10000);
	mp = kmp_init_rmq(mem_mp);

	// fill the score and backtrack arrays
	for (i = i0 = 0; i < n; ++i) {
		int64_t max_j = -1;
		int32_t q_span = a[i].y>>32&0xff, max_f = q_span;
		lc_elem_t s, *q, *r, lo, hi;
		// add in-range anchors
		if (i0 < i && a[i0].x != a[i].x) {
			int64_t j;
			for (j = i0; j < i; ++j) {
				q = kmp_alloc_rmq(mp);
				q->y = (int32_t)a[j].y, q->i = j, q->pri = -(f[j] + 0.5 * chn_pen_gap * ((int32_t)a[j].x + (int32_t)a[j].y));
				krmq_insert(lc_elem, &root, q, 0);
				if (max_dist_inner > 0) {
					r = kmp_alloc_rmq(mp);
					*r = *q;
					krmq_insert(lc_elem, &root_inner, r, 0);
				}
			}
			i0 = i;
		}
		// get rid of active chains out of range
		while (st < i && (a[i].x>>32 != a[st].x>>32 || a[i].x > a[st].x + max_dist || krmq_size(head, root) > cap_rmq_size)) {
			s.y = (int32_t)a[st].y, s.i = st;
			if ((q = krmq_find(lc_elem, root, &s, 0)) != 0) {
				q = krmq_erase(lc_elem, &root, q, 0);
				kmp_free_rmq(mp, q);
			}
			++st;
		}
		if (max_dist_inner > 0)  { // similar to the block above, but applied to the inner tree
			while (st_inner < i && (a[i].x>>32 != a[st_inner].x>>32 || a[i].x > a[st_inner].x + max_dist_inner || krmq_size(head, root_inner) > cap_rmq_size)) {
				s.y = (int32_t)a[st_inner].y, s.i = st_inner;
				if ((q = krmq_find(lc_elem, root_inner, &s, 0)) != 0) {
					q = krmq_erase(lc_elem, &root_inner, q, 0);
					kmp_free_rmq(mp, q);
				}
				++st_inner;
			}
		}
		// RMQ
		lo.i = INT32_MAX, lo.y = (int32_t)a[i].y - max_dist;
		hi.i = 0, hi.y = (int32_t)a[i].y - 1;
		if ((q = krmq_rmq(lc_elem, root, &lo, &hi)) != 0) {
			int32_t sc, exact, width, n_skip = 0;
			int64_t j = q->i;
			assert(q->y >= lo.y && q->y <= hi.y);
			sc = f[j] + comput_sc_simple(&a[i], &a[j], chn_pen_gap, chn_pen_skip, &exact, &width);
			if (width <= bw && sc > max_f) max_f = sc, max_j = j;
			if (!exact && root_inner && (int32_t)a[i].y > 0) {
				lc_elem_t *lo, *hi;
				s.y = (int32_t)a[i].y - 1, s.i = n;
				krmq_interval(lc_elem, root_inner, &s, &lo, &hi);
				if (lo) {
					const lc_elem_t *q;
					int32_t width, n_rmq_iter = 0;
					krmq_itr_t(lc_elem) itr;
					krmq_itr_find(lc_elem, root_inner, lo, &itr);
					while ((q = krmq_at(&itr)) != 0) {
						if (q->y < (int32_t)a[i].y - max_dist_inner) break;
						++n_rmq_iter;
						j = q->i;
						sc = f[j] + comput_sc_simple(&a[i], &a[j], chn_pen_gap, chn_pen_skip, 0, &width);
						if (width <= bw) {
							if (sc > max_f) {
								max_f = sc, max_j = j;
								if (n_skip > 0) --n_skip;
							} else if (t[j] == (int32_t)i) {
								if (++n_skip > max_chn_skip)
									break;
							}
							if (p[j] >= 0) t[p[j]] = i;
						}
						if (!krmq_itr_prev(lc_elem, &itr)) break;
					}
					n_iter += n_rmq_iter;
				}
			}
		}
		// set max
		assert(max_j < 0 || (a[max_j].x < a[i].x && (int32_t)a[max_j].y < (int32_t)a[i].y));
		f[i] = max_f, p[i] = max_j;
		v[i] = max_j >= 0 && v[max_j] > max_f? v[max_j] : max_f; // v[] keeps the peak score up to i; f[] is the score ending at i, not always the peak
		if (mmax_f < max_f) mmax_f = max_f;
		if (max_rmq_size < krmq_size(head, root)) max_rmq_size = krmq_size(head, root);
	}
	if (mg_dbg_flag & MG_DBG_LC_PROF) fprintf(stderr, "LP\tn_iter=%ld\tmmax_f=%d\trmq_size=%d\tmp_max=%ld\n", (long)n_iter, mmax_f, max_rmq_size, mp->max);
	km_destroy(mem_mp);

	u = mg_chain_backtrack(km, n, f, p, v, t, min_cnt, min_sc, max_drop, 0, &n_u, &n_v);
	*n_u_ = n_u, *_u = u; // NB: note that u[] may not be sorted by score here
	kfree(km, p); kfree(km, f); kfree(km, t);
	if (n_u == 0) {
		kfree(km, a); kfree(km, v);
		return 0;
	}
	return compact_a(km, n_u, u, n_v, v, a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x430, %rsp            # imm = 0x430
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movl %edi, -0x1c(%rbp)
movl %esi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movl %ecx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl %r9d, -0x30(%rbp)
movss %xmm0, -0x34(%rbp)
movss %xmm1, -0x38(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x64(%rbp)
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movq $0x0, -0x98(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xb0(%rbp)
movq $0x0, -0xb8(%rbp)
cmpq $0x0, 0x30(%rbp)
je 0x24a05
movq 0x30(%rbp), %rax
movq $0x0, (%rax)
movq 0x28(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x0, 0x18(%rbp)
je 0x24a13
cmpq $0x0, 0x20(%rbp)
jne 0x24a2d
movq 0x38(%rbp), %rdi
movq 0x20(%rbp), %rsi
callq 0x2670
movq $0x0, -0x18(%rbp)
jmp 0x25672
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x24a3b
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x20(%rbp)
jle 0x24a49
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x24a50
movl $0x0, -0x20(%rbp)
movq 0x38(%rbp), %rdi
movq 0x18(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2890
movq %rax, -0x70(%rbp)
movq 0x38(%rbp), %rdi
movq 0x18(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2890
movq %rax, -0x40(%rbp)
movq 0x38(%rbp), %rdi
movq 0x18(%rbp), %rsi
movl $0x4, %edx
callq 0x2540
movq %rax, -0x48(%rbp)
movq 0x38(%rbp), %rdi
movq 0x18(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2890
movq %rax, -0x50(%rbp)
movq 0x38(%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
callq 0x24a0
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x25690
movq %rax, -0xc0(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq 0x18(%rbp), %rax
jge 0x25540
movq $-0x1, -0xc8(%rbp)
movq 0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xff, %rax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movl %eax, -0xd0(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x78(%rbp), %rax
jge 0x24cc0
movq 0x20(%rbp), %rax
movq -0x80(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x20(%rbp), %rcx
movq -0x78(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
je 0x24cc0
movq -0x80(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rax
cmpq -0x78(%rbp), %rax
jge 0x24cb8
movq -0xc0(%rbp), %rdi
callq 0x256d0
movq %rax, -0x110(%rbp)
movq 0x20(%rbp), %rax
movq -0x190(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
movq -0x110(%rbp), %rax
movl %ecx, (%rax)
movq -0x190(%rbp), %rcx
movq -0x110(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq -0x190(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm1
movss -0x34(%rbp), %xmm0
cvtss2sd %xmm0, %xmm2
movsd 0x18580(%rip), %xmm0    # 0x3d160
mulsd %xmm2, %xmm0
movq 0x20(%rbp), %rax
movq -0x190(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x20(%rbp), %rcx
movq -0x190(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
addl %ecx, %eax
cvtsi2sd %eax, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x110(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movq -0x110(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x235b0
cmpl $0x0, -0x20(%rbp)
jle 0x24c9f
movq -0xc0(%rbp), %rdi
callq 0x256d0
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
movl $0x38, %edx
callq 0x2230
movq -0x118(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x235b0
jmp 0x24ca1
movq -0x190(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x190(%rbp)
jmp 0x24b68
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x24cc2
movq -0x88(%rbp), %rcx
xorl %eax, %eax
cmpq -0x78(%rbp), %rcx
movb %al, -0x3d1(%rbp)
jge 0x24d96
movq 0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
shrq $0x20, %rcx
movq 0x20(%rbp), %rax
movq -0x88(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rax), %rdx
shrq $0x20, %rdx
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x3d2(%rbp)
jne 0x24d8a
movq 0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq 0x20(%rbp), %rax
movq -0x88(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rax), %rdx
movslq -0x1c(%rbp), %rax
addq %rax, %rdx
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x3d2(%rbp)
ja 0x24d8a
cmpq $0x0, -0xa8(%rbp)
je 0x24d6e
movq -0xa8(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x3d8(%rbp)
jmp 0x24d78
xorl %eax, %eax
movl %eax, -0x3d8(%rbp)
jmp 0x24d78
movl -0x3d8(%rbp), %eax
cmpl -0x2c(%rbp), %eax
seta %al
movb %al, -0x3d2(%rbp)
movb -0x3d2(%rbp), %al
movb %al, -0x3d1(%rbp)
movb -0x3d1(%rbp), %al
testb $0x1, %al
jne 0x24da5
jmp 0x24e3b
movq 0x20(%rbp), %rax
movq -0x88(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl %eax, -0x108(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xa8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x22e50
movq %rax, -0x110(%rbp)
cmpq $0x0, %rax
je 0x24e24
movq -0x110(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x23eb0
movq %rax, -0x110(%rbp)
movq -0xc0(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x25740
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x24cc2
cmpl $0x0, -0x20(%rbp)
jle 0x24fc2
jmp 0x24e47
movq -0x90(%rbp), %rcx
xorl %eax, %eax
cmpq -0x78(%rbp), %rcx
movb %al, -0x3d9(%rbp)
jge 0x24f1b
movq 0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
shrq $0x20, %rcx
movq 0x20(%rbp), %rax
movq -0x90(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rax), %rdx
shrq $0x20, %rdx
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x3da(%rbp)
jne 0x24f0f
movq 0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq 0x20(%rbp), %rax
movq -0x90(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rax), %rdx
movslq -0x20(%rbp), %rax
addq %rax, %rdx
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x3da(%rbp)
ja 0x24f0f
cmpq $0x0, -0xb0(%rbp)
je 0x24ef3
movq -0xb0(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x3e0(%rbp)
jmp 0x24efd
xorl %eax, %eax
movl %eax, -0x3e0(%rbp)
jmp 0x24efd
movl -0x3e0(%rbp), %eax
cmpl -0x2c(%rbp), %eax
seta %al
movb %al, -0x3da(%rbp)
movb -0x3da(%rbp), %al
movb %al, -0x3d9(%rbp)
movb -0x3d9(%rbp), %al
testb $0x1, %al
jne 0x24f2a
jmp 0x24fc0
movq 0x20(%rbp), %rax
movq -0x90(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl %eax, -0x108(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xb0(%rbp), %rdi
leaq -0x108(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x22e50
movq %rax, -0x110(%rbp)
cmpq $0x0, %rax
je 0x24fa9
movq -0x110(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x23eb0
movq %rax, -0x110(%rbp)
movq -0xc0(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x25740
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x24e47
jmp 0x24fc2
movq $0x7fffffff, -0x148(%rbp) # imm = 0x7FFFFFFF
movq 0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
subl -0x1c(%rbp), %eax
movl %eax, -0x150(%rbp)
movq $0x0, -0x180(%rbp)
movq 0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
subl $0x1, %eax
movl %eax, -0x188(%rbp)
movq -0xa8(%rbp), %rdi
leaq -0x150(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0x23090
movq %rax, -0x110(%rbp)
cmpq $0x0, %rax
je 0x253b3
movl $0x0, -0x1a0(%rbp)
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1a8(%rbp)
movq -0x110(%rbp), %rax
movl (%rax), %eax
cmpl -0x150(%rbp), %eax
jl 0x2507b
movq -0x110(%rbp), %rax
movl (%rax), %eax
cmpl -0x188(%rbp), %eax
jg 0x2507b
jmp 0x2509a
leaq 0x181b8(%rip), %rdi     # 0x3d23a
leaq 0x180ef(%rip), %rsi     # 0x3d178
movl $0x141, %edx            # imm = 0x141
leaq 0x181c2(%rip), %rcx     # 0x3d257
callq 0x2170
movq -0x40(%rbp), %rax
movq -0x1a8(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3e4(%rbp)
movq 0x20(%rbp), %rdi
movq -0x78(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq 0x20(%rbp), %rsi
movq -0x1a8(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movss -0x34(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
leaq -0x198(%rbp), %rdx
leaq -0x19c(%rbp), %rcx
callq 0x25810
movl %eax, %ecx
movl -0x3e4(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x194(%rbp)
movl -0x19c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x2512f
movl -0x194(%rbp), %eax
cmpl -0xd0(%rbp), %eax
jle 0x2512f
movl -0x194(%rbp), %eax
movl %eax, -0xd0(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpl $0x0, -0x198(%rbp)
jne 0x253b1
cmpq $0x0, -0xb0(%rbp)
je 0x253b1
movq 0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpl $0x0, %eax
jle 0x253b1
movq 0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
subl $0x1, %eax
movl %eax, -0x108(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xb0(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
leaq -0x1b8(%rbp), %rcx
callq 0x22f70
cmpq $0x0, -0x1b0(%rbp)
je 0x253af
movl $0x0, -0x1c8(%rbp)
movq -0xb0(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
leaq -0x3d0(%rbp), %rdx
callq 0x24700
movq -0x1d0(%rbp), %rax
leaq -0x3d0(%rbp), %rcx
cmpq %rcx, %rax
jae 0x251fe
xorl %eax, %eax
movq %rax, -0x3f0(%rbp)
jmp 0x2520f
movq -0x1d0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x3f0(%rbp)
movq -0x3f0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
cmpq $0x0, %rax
je 0x2539a
movq -0x1c0(%rbp), %rax
movl (%rax), %eax
movq 0x20(%rbp), %rcx
movq -0x78(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
subl -0x20(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2524f
jmp 0x2539a
movl -0x1c8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c8(%rbp)
movq -0x1c0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1a8(%rbp)
movq -0x40(%rbp), %rax
movq -0x1a8(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3f4(%rbp)
movq 0x20(%rbp), %rdi
movq -0x78(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq 0x20(%rbp), %rsi
movq -0x1a8(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movss -0x34(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
xorl %eax, %eax
movl %eax, %edx
leaq -0x1c4(%rbp), %rcx
callq 0x25810
movl %eax, %ecx
movl -0x3f4(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x194(%rbp)
movl -0x1c4(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x25380
movl -0x194(%rbp), %eax
cmpl -0xd0(%rbp), %eax
jle 0x25320
movl -0x194(%rbp), %eax
movl %eax, -0xd0(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpl $0x0, -0x1a0(%rbp)
jle 0x2531e
movl -0x1a0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1a0(%rbp)
jmp 0x25350
movq -0x48(%rbp), %rax
movq -0x1a8(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x78(%rbp), %rcx
cmpl %ecx, %eax
jne 0x2534e
movl -0x1a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a0(%rbp)
cmpl -0x28(%rbp), %eax
jle 0x2534c
jmp 0x2539a
jmp 0x2534e
jmp 0x25350
movq -0x70(%rbp), %rax
movq -0x1a8(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x2537e
movq -0x78(%rbp), %rax
movl %eax, %edx
movq -0x48(%rbp), %rax
movq -0x70(%rbp), %rcx
movq -0x1a8(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x25380
leaq -0x3d0(%rbp), %rdi
xorl %esi, %esi
callq 0x24810
cmpl $0x0, %eax
jne 0x25395
jmp 0x2539a
jmp 0x251e0
movslq -0x1c8(%rbp), %rax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x253b1
jmp 0x253b3
cmpq $0x0, -0xc8(%rbp)
jl 0x25413
movq 0x20(%rbp), %rax
movq -0xc8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x20(%rbp), %rcx
movq -0x78(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0x25415
movq 0x20(%rbp), %rax
movq -0xc8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq 0x20(%rbp), %rcx
movq -0x78(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpl %ecx, %eax
jge 0x25415
jmp 0x25434
leaq 0x17eb3(%rip), %rdi     # 0x3d2cf
leaq 0x17d55(%rip), %rsi     # 0x3d178
movl $0x163, %edx            # imm = 0x163
leaq 0x17e28(%rip), %rcx     # 0x3d257
callq 0x2170
movl -0xd0(%rbp), %edx
movq -0x40(%rbp), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0xc8(%rbp), %rdx
movq -0x70(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0xc8(%rbp)
jl 0x2548e
movq -0x50(%rbp), %rax
movq -0xc8(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0xd0(%rbp), %eax
jle 0x2548e
movq -0x50(%rbp), %rax
movq -0xc8(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3f8(%rbp)
jmp 0x2549a
movl -0xd0(%rbp), %eax
movl %eax, -0x3f8(%rbp)
movl -0x3f8(%rbp), %edx
movq -0x50(%rbp), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x5c(%rbp), %eax
cmpl -0xd0(%rbp), %eax
jge 0x254bf
movl -0xd0(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x3fc(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x254e4
movq -0xa8(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x400(%rbp)
jmp 0x254ee
xorl %eax, %eax
movl %eax, -0x400(%rbp)
jmp 0x254ee
movl -0x3fc(%rbp), %eax
movl -0x400(%rbp), %ecx
cmpl %ecx, %eax
jae 0x2552d
cmpq $0x0, -0xa8(%rbp)
je 0x2551a
movq -0xa8(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x404(%rbp)
jmp 0x25524
xorl %eax, %eax
movl %eax, -0x404(%rbp)
jmp 0x25524
movl -0x404(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0x2552f
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x24add
leaq 0x20141(%rip), %rax     # 0x45688
movl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x25584
movq 0x1fa9e(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x98(%rbp), %rdx
movl -0x5c(%rbp), %ecx
movl -0x60(%rbp), %r8d
movq -0xc0(%rbp), %rax
movq 0x10(%rax), %r9
leaq 0x17d9e(%rip), %rsi     # 0x3d31b
movb $0x0, %al
callq 0x2210
movq -0xb8(%rbp), %rdi
callq 0x25f0
movq 0x38(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x48(%rbp), %r9
movl -0x30(%rbp), %r14d
movl 0x10(%rbp), %ebx
movl -0x64(%rbp), %r11d
xorl %eax, %eax
leaq -0x54(%rbp), %r10
leaq -0x58(%rbp), %rax
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x21af0
movq %rax, -0xa0(%rbp)
movl -0x54(%rbp), %ecx
movq 0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0xa0(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, (%rax)
movq 0x38(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x2670
movq 0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x2670
movq 0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x2670
cmpl $0x0, -0x54(%rbp)
jne 0x25650
movq 0x38(%rbp), %rdi
movq 0x20(%rbp), %rsi
callq 0x2670
movq 0x38(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x2670
movq $0x0, -0x18(%rbp)
jmp 0x25672
movq 0x38(%rbp), %rdi
movl -0x54(%rbp), %esi
movq -0xa0(%rbp), %rdx
movl -0x58(%rbp), %ecx
movq -0x50(%rbp), %r8
movq 0x20(%rbp), %r9
callq 0x22b70
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x430, %rsp            # imm = 0x430
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)