// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gchain1.c
// Function: mg_gchain1_dp
int32_t mg_gchain1_dp(void *km, const gfa_t *g, int32_t *n_lc_, mg_lchain_t *lc, int32_t qlen, int32_t max_dist_g, int32_t max_dist_q, int32_t bw, int32_t max_skip,
					  int32_t ref_bonus, float chn_pen_gap, float chn_pen_skip, float mask_level, const mg128_t *an, uint64_t **u_)
{
	int32_t i, j, k, m_dst, n_dst, n_ext, n_u, n_v, n_lc = *n_lc_;
	int32_t *f, *v, *t;
	int64_t *p;
	uint64_t *u;
	mg_path_dst_t *dst;
	gc_frag_t *a;
	mg_lchain_t *swap;
	char *qs;

	*u_ = 0;
	if (n_lc == 0) return 0;

	KMALLOC(km, a, n_lc);
	for (i = n_ext = 0; i < n_lc; ++i) { // a[] is a view of frag[]; for sorting
		mg_lchain_t *r = &lc[i];
		gc_frag_t *ai = &a[i];
		int32_t is_isolated = 0, min_end_dist_g;
		r->dist_pre = -1;
		min_end_dist_g = g->seg[r->v>>1].len - r->re;
		if (r->rs < min_end_dist_g) min_end_dist_g = r->rs;
		if (min_end_dist_g > max_dist_g) is_isolated = 1; // if too far from segment ends
		else if (min_end_dist_g>>3 > r->score) is_isolated = 1; // if the lchain too small relative to distance to the segment ends
		ai->srt = (uint32_t)is_isolated<<31 | r->qe;
		ai->i = i;
		if (!is_isolated) ++n_ext;
	}
	if (n_ext < 2) { // no graph chaining needed; early return
		kfree(km, a);
		KMALLOC(km, u, n_lc);
		for (i = 0; i < n_lc; ++i)
			u[i] = (uint64_t)lc[i].score<<32 | 1;
		*u_ = u;
		return n_lc;
	}
	radix_sort_gc(a, a + n_lc);

	KMALLOC(km, v, n_lc);
	KMALLOC(km, f, n_ext);
	KMALLOC(km, p, n_ext);
	KCALLOC(km, t, n_ext);

	KMALLOC(km, qs, max_dist_q + 1);
	m_dst = n_dst = 0, dst = 0;
	for (i = 0; i < n_ext; ++i) { // core loop
		gc_frag_t *ai = &a[i];
		mg_lchain_t *li = &lc[ai->i];
		int32_t segi = (an[li->off].y & MG_SEED_SEG_MASK) >> MG_SEED_SEG_SHIFT;
		{ // collect end points potentially reachable from _i_
			int32_t x = li->qs + bw, n_skip = 0;
			if (x > qlen) x = qlen;
			x = find_max(i, a, x);
			n_dst = 0;
			for (j = x; j >= 0; --j) { // collect potential destination vertices
				gc_frag_t *aj = &a[j];
				mg_lchain_t *lj = &lc[aj->i];
				mg_path_dst_t *q;
				int32_t target_dist, segj, dq;
				if (lj->qs >= li->qs) continue; // lj is contained in li on the query coordinate
				if (lj->qe > li->qs) { // test overlap on the query
					int o = lj->qe - li->qs;
					if (o > (lj->qe - lj->qs) * mask_level || o > (li->qe - li->qs) * mask_level)
						continue;
				}
				dq = li->qs - lj->qe;
				segj = (an[lj->off + lj->cnt - 1].y & MG_SEED_SEG_MASK) >> MG_SEED_SEG_SHIFT;
				if (segi == segj) {
					if (dq > max_dist_q) break; // if query gap too large, stop
				} else {
					if (dq > max_dist_g && dq > max_dist_q) break;
				}
				if (li->v != lj->v) { // the two linear chains are on two different segments
					int32_t min_dist = li->rs + (g->seg[lj->v>>1].len - lj->re); // minimal graph gap
					if (min_dist > max_dist_g) continue; // graph gap too large
					if (segi == segj && min_dist - bw > li->qs - lj->qe) continue; // when li->qs < lj->qe, the condition turns to min_dist + (lj->qe - li->qs) > bw, which is desired
					target_dist = mg_target_dist(g, lj, li);
					if (target_dist < 0) continue; // this may happen if the query overlap is far too large
				} else if (lj->rs >= li->rs || lj->re >= li->re) { // not colinear
					continue;
				} else {
					int32_t dr = li->rs - lj->re, w = dr > dq? dr - dq : dq - dr;
					if (segi == segj && w > bw) continue; // test bandwidth
					if (dr > max_dist_g || dr < -max_dist_g) continue;
					if (lj->re > li->rs) { // test overlap on the graph segment
						int o = lj->re - li->rs;
						if (o > (lj->re - lj->rs) * mask_level || o > (li->re - li->rs) * mask_level)
							continue;
					}
					target_dist = mg_target_dist(g, lj, li);
				}
				if (n_dst == m_dst) KEXPAND(km, dst, m_dst); // TODO: watch out the quadratic behavior!
				q = &dst[n_dst++];
				memset(q, 0, sizeof(mg_path_dst_t));
				q->inner = (li->v == lj->v);
				q->v = lj->v^1;
				q->meta = j;
				q->qlen = li->qs - lj->qe;
				q->target_dist = target_dist;
				q->target_hash = 0;
				q->check_hash = 0;
				if (t[j] == i) {
					if (++n_skip > max_skip)
						break;
				}
				if (p[j] >= 0) t[p[j]] = i;
			}
		}
		{ // confirm reach-ability
			int32_t k;
			// test reach-ability without sequences
			mg_shortest_k(km, g, li->v^1, n_dst, dst, max_dist_g + (g->seg[li->v>>1].len - li->rs), MG_MAX_SHORT_K, 0);
			// remove unreachable destinations
			for (j = k = 0; j < n_dst; ++j) {
				mg_path_dst_t *dj = &dst[j];
				int32_t sc;
				if (dj->n_path == 0) continue; // not reachable
				sc = cal_sc(dj, li, lc, an, a, f, bw, ref_bonus, chn_pen_gap);
				if (sc == INT32_MIN) continue; // out of band
				if (sc + li->score < 0) continue; // negative score and too low
				dst[k++] = dst[j];
			}
			n_dst = k;
		}
		{ // DP
			int32_t max_f = li->score, max_j = -1, max_d = -1, max_inner = 0;
			uint32_t max_hash = 0;
			for (j = 0; j < n_dst; ++j) {
				mg_path_dst_t *dj = &dst[j];
				int32_t sc;
				sc = cal_sc(dj, li, lc, an, a, f, bw, ref_bonus, chn_pen_gap);
				if (sc == INT32_MIN) continue;
				if (mg_dbg_flag & MG_DBG_GC1) {
					mg_lchain_t *lj = &lc[a[dj->meta].i];
					fprintf(stderr, "  [dst:%d] dst=%c%s[%d], n_path=%d, target=%d, opt_dist=%d, score=%d, q_intv=[%d,%d), g_intv=[%d,%d)\n", dj->meta, "><"[dj->v&1], g->seg[dj->v>>1].name, dj->v, dj->n_path, dj->target_dist - g->seg[li->v>>1].len, dj->dist - g->seg[li->v>>1].len, sc, lj->qs, lj->qe, lj->rs, lj->re);
				}
				if (sc > max_f) max_f = sc, max_j = dj->meta, max_d = dj->dist, max_hash = dj->hash, max_inner = dj->inner;
			}
			f[i] = max_f, p[i] = max_j;
			li->dist_pre = max_d;
			li->hash_pre = max_hash;
			li->inner_pre = max_inner;
			v[i] = max_j >= 0 && v[max_j] > max_f? v[max_j] : max_f;
			if (mg_dbg_flag & MG_DBG_GC1) fprintf(stderr, " [opt:%d] opt=%d, max_f=%d\n", ai->i, max_j, max_f);
		}
	}
	kfree(km, dst);
	kfree(km, qs);
	if (mg_dbg_flag & MG_DBG_GC1) {
		int32_t mmax_f = 0, mmax_i = -1;
		for (i = 0; i < n_ext; ++i) if (f[i] > mmax_f) mmax_f = f[i], mmax_i = i;
		i = mmax_i; while (i >= 0) { fprintf(stderr, "[best] i=%d, seg=%s, max_f=%d, chn_pen_gap=%f\n", a[i].i, g->seg[lc[a[i].i].v>>1].name, f[i], chn_pen_gap); i = p[i]; }
	}

	u = mg_chain_backtrack(km, n_ext, f, p, v, t, 0, 0, INT32_MAX, n_lc - n_ext, &n_u, &n_v);
	kfree(km, f); kfree(km, p); kfree(km, t);

	for (i = 0; i < n_lc - n_ext; ++i) {
		u[n_u++] = (uint64_t)lc[a[n_ext + i].i].score << 32 | 1;
		v[n_v++] = n_ext + i;
	}

	KMALLOC(km, swap, n_v);
	for (i = 0, k = 0; i < n_u; ++i) {
		int32_t k0 = k, ni = (int32_t)u[i];
		for (j = 0; j < ni; ++j)
			swap[k++] = lc[a[v[k0 + (ni - j - 1)]].i];
	}
	assert(k == n_v);
	memcpy(lc, swap, n_v * sizeof(mg_lchain_t));
	*n_lc_ = n_v;
	*u_ = u;

	kfree(km, a);
	kfree(km, swap);
	kfree(km, v);
	return n_u;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movl %r8d, -0x54(%rbp)
movl %r9d, -0x58(%rbp)
movss %xmm0, -0x5c(%rbp)
movss %xmm1, -0x60(%rbp)
movss %xmm2, -0x64(%rbp)
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x88(%rbp)
movq 0x38(%rbp), %rax
movq $0x0, (%rax)
cmpl $0x0, -0x88(%rbp)
jne 0x2640b
movl $0x0, -0x2c(%rbp)
jmp 0x275f3
movq -0x38(%rbp), %rdi
movslq -0x88(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2890
movq %rax, -0xc0(%rbp)
movl $0x0, -0x7c(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x88(%rbp), %eax
jge 0x2655e
movq -0x50(%rbp), %rax
movslq -0x68(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xd8(%rbp)
movq -0xc0(%rbp), %rax
movslq -0x68(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movl $0x0, -0xe4(%rbp)
movq -0xd8(%rbp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xd8(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0xd8(%rbp), %rcx
subl 0x10(%rcx), %eax
movl %eax, -0xe8(%rbp)
movq -0xd8(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0xe8(%rbp), %eax
jge 0x264db
movq -0xd8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0x264f2
movl $0x1, -0xe4(%rbp)
jmp 0x26513
movl -0xe8(%rbp), %eax
sarl $0x3, %eax
movq -0xd8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jle 0x26511
movl $0x1, -0xe4(%rbp)
jmp 0x26513
movl -0xe4(%rbp), %ecx
shll $0x1f, %ecx
movq -0xd8(%rbp), %rax
orl 0x18(%rax), %ecx
movq -0xe0(%rbp), %rax
movl %ecx, (%rax)
movl -0x68(%rbp), %ecx
movq -0xe0(%rbp), %rax
movl %ecx, 0x4(%rax)
cmpl $0x0, -0xe4(%rbp)
jne 0x2654e
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x26550
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x26434
cmpl $0x2, -0x7c(%rbp)
jge 0x265f6
movq -0x38(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x2670
movq -0x38(%rbp), %rdi
movslq -0x88(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2890
movq %rax, -0xb0(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x88(%rbp), %eax
jge 0x265da
movq -0x50(%rbp), %rax
movslq -0x68(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq 0x1c(%rax), %rdx
shlq $0x20, %rdx
orq $0x1, %rdx
movq -0xb0(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x2659a
movq -0xb0(%rbp), %rcx
movq 0x38(%rbp), %rax
movq %rcx, (%rax)
movl -0x88(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x275f3
movq -0xc0(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movslq -0x88(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x26330
movq -0x38(%rbp), %rdi
movslq -0x88(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2890
movq %rax, -0x98(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x7c(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2890
movq %rax, -0x90(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x7c(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2890
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x7c(%rbp), %rsi
movl $0x4, %edx
callq 0x2540
movq %rax, -0xa0(%rbp)
movq -0x38(%rbp), %rdi
movl 0x10(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x0, %rsi
callq 0x2890
movq %rax, -0xd0(%rbp)
movl $0x0, -0x78(%rbp)
movl $0x0, -0x74(%rbp)
movq $0x0, -0xb8(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jge 0x27216
movq -0xc0(%rbp), %rax
movslq -0x68(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xf0(%rbp)
movq -0x50(%rbp), %rax
movq -0xf0(%rbp), %rcx
movslq 0x4(%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
movq 0x30(%rbp), %rcx
movq -0xf8(%rbp), %rax
movslq (%rax), %rax
shlq $0x4, %rax
addq %rax, %rcx
movabsq $0xff000000000000, %rax # imm = 0xFF000000000000
andq 0x8(%rcx), %rax
shrq $0x30, %rax
movl %eax, -0xfc(%rbp)
movq -0xf8(%rbp), %rax
movl 0x14(%rax), %eax
addl 0x18(%rbp), %eax
movl %eax, -0x100(%rbp)
movl $0x0, -0x104(%rbp)
movl -0x100(%rbp), %eax
cmpl -0x54(%rbp), %eax
jle 0x26758
movl -0x54(%rbp), %eax
movl %eax, -0x100(%rbp)
movl -0x68(%rbp), %edi
movq -0xc0(%rbp), %rsi
movl -0x100(%rbp), %edx
callq 0x27610
movl %eax, -0x100(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x100(%rbp), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
jl 0x26cf1
movq -0xc0(%rbp), %rax
movslq -0x6c(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x110(%rbp)
movq -0x50(%rbp), %rax
movq -0x110(%rbp), %rcx
movslq 0x4(%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movl 0x14(%rax), %eax
movq -0xf8(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jl 0x267de
jmp 0x26ce3
movq -0x118(%rbp), %rax
movl 0x18(%rax), %eax
movq -0xf8(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jle 0x26869
movq -0x118(%rbp), %rax
movl 0x18(%rax), %eax
movq -0xf8(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, -0x130(%rbp)
cvtsi2ssl -0x130(%rbp), %xmm0
movq -0x118(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x118(%rbp), %rcx
subl 0x14(%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss -0x64(%rbp), %xmm1
ucomiss %xmm1, %xmm0
ja 0x26862
cvtsi2ssl -0x130(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl 0x18(%rax), %eax
movq -0xf8(%rbp), %rcx
subl 0x14(%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss -0x64(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x26867
jmp 0x26ce3
jmp 0x26869
movq -0xf8(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x118(%rbp), %rcx
subl 0x18(%rcx), %eax
movl %eax, -0x12c(%rbp)
movq 0x30(%rbp), %rcx
movq -0x118(%rbp), %rax
movl (%rax), %eax
movq -0x118(%rbp), %rdx
movl 0x4(%rdx), %edx
shll %edx
sarl %edx
addl %edx, %eax
subl $0x1, %eax
cltq
shlq $0x4, %rax
addq %rax, %rcx
movabsq $0xff000000000000, %rax # imm = 0xFF000000000000
andq 0x8(%rcx), %rax
shrq $0x30, %rax
movl %eax, -0x128(%rbp)
movl -0xfc(%rbp), %eax
cmpl -0x128(%rbp), %eax
jne 0x268e4
movl -0x12c(%rbp), %eax
cmpl 0x10(%rbp), %eax
jle 0x268e2
jmp 0x26cf1
jmp 0x26901
movl -0x12c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0x268ff
movl -0x12c(%rbp), %eax
cmpl 0x10(%rbp), %eax
jle 0x268ff
jmp 0x26cf1
jmp 0x26901
movq -0xf8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x118(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x269ca
movq -0xf8(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x40(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x118(%rbp), %rdx
movl 0x8(%rdx), %edx
shrl %edx
movl %edx, %edx
shlq $0x6, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
movq -0x118(%rbp), %rdx
subl 0x10(%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x134(%rbp)
movl -0x134(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0x26966
jmp 0x26ce3
movl -0xfc(%rbp), %eax
cmpl -0x128(%rbp), %eax
jne 0x2699a
movl -0x134(%rbp), %eax
subl 0x18(%rbp), %eax
movq -0xf8(%rbp), %rcx
movl 0x14(%rcx), %ecx
movq -0x118(%rbp), %rdx
subl 0x18(%rdx), %ecx
cmpl %ecx, %eax
jle 0x2699a
jmp 0x26ce3
movq -0x40(%rbp), %rdi
movq -0x118(%rbp), %rsi
movq -0xf8(%rbp), %rdx
callq 0x27700
movl %eax, -0x124(%rbp)
cmpl $0x0, -0x124(%rbp)
jge 0x269c5
jmp 0x26ce3
jmp 0x26b3c
movq -0x118(%rbp), %rax
movl 0xc(%rax), %eax
movq -0xf8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x269f6
movq -0x118(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xf8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jl 0x269fb
jmp 0x26ce3
movq -0xf8(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x118(%rbp), %rcx
subl 0x10(%rcx), %eax
movl %eax, -0x138(%rbp)
movl -0x138(%rbp), %eax
cmpl -0x12c(%rbp), %eax
jle 0x26a37
movl -0x138(%rbp), %eax
subl -0x12c(%rbp), %eax
movl %eax, -0x194(%rbp)
jmp 0x26a49
movl -0x12c(%rbp), %eax
subl -0x138(%rbp), %eax
movl %eax, -0x194(%rbp)
movl -0x194(%rbp), %eax
movl %eax, -0x13c(%rbp)
movl -0xfc(%rbp), %eax
cmpl -0x128(%rbp), %eax
jne 0x26a73
movl -0x13c(%rbp), %eax
cmpl 0x18(%rbp), %eax
jle 0x26a73
jmp 0x26ce3
movl -0x138(%rbp), %eax
cmpl -0x58(%rbp), %eax
jg 0x26a8d
movl -0x138(%rbp), %eax
xorl %ecx, %ecx
subl -0x58(%rbp), %ecx
cmpl %ecx, %eax
jge 0x26a92
jmp 0x26ce3
movq -0x118(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xf8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jle 0x26b1d
movq -0x118(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xf8(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x140(%rbp)
cvtsi2ssl -0x140(%rbp), %xmm0
movq -0x118(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x118(%rbp), %rcx
subl 0xc(%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss -0x64(%rbp), %xmm1
ucomiss %xmm1, %xmm0
ja 0x26b16
cvtsi2ssl -0x140(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xf8(%rbp), %rcx
subl 0xc(%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss -0x64(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x26b1b
jmp 0x26ce3
jmp 0x26b1d
movq -0x40(%rbp), %rdi
movq -0x118(%rbp), %rsi
movq -0xf8(%rbp), %rdx
callq 0x27700
movl %eax, -0x124(%rbp)
jmp 0x26b3c
movl -0x78(%rbp), %eax
cmpl -0x74(%rbp), %eax
jne 0x26b95
jmp 0x26b46
cmpl $0x4, -0x74(%rbp)
jl 0x26b5e
movl -0x74(%rbp), %eax
movl -0x74(%rbp), %ecx
sarl %ecx
addl %ecx, %eax
movl %eax, -0x198(%rbp)
jmp 0x26b6b
movl $0x10, %eax
movl %eax, -0x198(%rbp)
jmp 0x26b6b
movl -0x198(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x38(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movslq -0x74(%rbp), %rax
imulq $0x24, %rax, %rdx
callq 0x2ae0
movq %rax, -0xb8(%rbp)
jmp 0x26b95
movq -0xb8(%rbp), %rax
movl -0x78(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x78(%rbp)
movslq %ecx, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x24, %edx
callq 0x2190
movq -0xf8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x118(%rbp), %rcx
cmpl 0x8(%rcx), %eax
sete %al
andb $0x1, %al
movzbl %al, %edx
movq -0x120(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0x118(%rbp), %rax
movl 0x8(%rax), %ecx
xorl $0x1, %ecx
movq -0x120(%rbp), %rax
movl %ecx, (%rax)
movl -0x6c(%rbp), %edx
movq -0x120(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0xf8(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x118(%rbp), %rax
subl 0x18(%rax), %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x124(%rbp), %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x120(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x120(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0xa0(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x68(%rbp), %eax
jne 0x26cb3
movl -0x104(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x104(%rbp)
cmpl 0x20(%rbp), %eax
jle 0x26cb1
jmp 0x26cf1
jmp 0x26cb3
movq -0xa8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x26ce1
movl -0x68(%rbp), %edx
movq -0xa0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movslq -0x6c(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x26ce3
movl -0x6c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x26783
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0xf8(%rbp), %rax
movl 0x8(%rax), %edx
xorl $0x1, %edx
movl -0x78(%rbp), %ecx
movq -0xb8(%rbp), %r8
movl -0x58(%rbp), %r9d
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xf8(%rbp), %r10
movl 0x8(%r10), %r10d
shrl %r10d
movl %r10d, %r10d
shlq $0x6, %r10
addq %r10, %rax
movl (%rax), %eax
movq -0xf8(%rbp), %r10
subl 0xc(%r10), %eax
addl %eax, %r9d
xorl %eax, %eax
movl $0xf, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x19720
movl $0x0, -0x144(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x78(%rbp), %eax
jge 0x26e5d
movq -0xb8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x0, %eax
jne 0x26daa
jmp 0x26e4f
movq -0x150(%rbp), %rdi
movq -0xf8(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq 0x30(%rbp), %rcx
movq -0xc0(%rbp), %r8
movq -0x90(%rbp), %r9
movl 0x18(%rbp), %r10d
movl 0x28(%rbp), %eax
movss -0x5c(%rbp), %xmm0
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x27770
movl %eax, -0x154(%rbp)
cmpl $0x80000000, -0x154(%rbp) # imm = 0x80000000
jne 0x26dfb
jmp 0x26e4f
movl -0x154(%rbp), %eax
movq -0xf8(%rbp), %rcx
addl 0x1c(%rcx), %eax
cmpl $0x0, %eax
jge 0x26e12
jmp 0x26e4f
movq -0xb8(%rbp), %rdi
movl -0x144(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x144(%rbp)
cltq
imulq $0x24, %rax, %rax
addq %rax, %rdi
movq -0xb8(%rbp), %rsi
movslq -0x6c(%rbp), %rax
imulq $0x24, %rax, %rax
addq %rax, %rsi
movl $0x24, %edx
callq 0x2230
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x26d6c
movl -0x144(%rbp), %eax
movl %eax, -0x78(%rbp)
movq -0xf8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x158(%rbp)
movl $0xffffffff, -0x15c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x160(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x164(%rbp)
movl $0x0, -0x168(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x78(%rbp), %eax
jge 0x27100
movq -0xb8(%rbp), %rax
movslq -0x6c(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rdi
movq -0xf8(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq 0x30(%rbp), %rcx
movq -0xc0(%rbp), %r8
movq -0x90(%rbp), %r9
movl 0x18(%rbp), %r10d
movl 0x28(%rbp), %eax
movss -0x5c(%rbp), %xmm0
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x27770
movl %eax, -0x174(%rbp)
cmpl $0x80000000, -0x174(%rbp) # imm = 0x80000000
jne 0x26f1e
jmp 0x270f2
leaq 0x1e763(%rip), %rax     # 0x45688
movl (%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x2708e
movq -0x50(%rbp), %rax
movq -0xc0(%rbp), %rcx
movq -0x170(%rbp), %rdx
movl 0xc(%rdx), %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
movl %edx, %edx
movslq 0x4(%rcx,%rdx,8), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x180(%rbp)
movq 0x1e08e(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x170(%rbp), %rax
movl 0xc(%rax), %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
movq -0x170(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x156f8(%rip), %rax     # 0x3c68c
movsbl (%rax,%rcx), %ecx
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x170(%rbp), %rsi
movl (%rsi), %esi
shrl %esi
movl %esi, %esi
shlq $0x6, %rsi
addq %rsi, %rax
movq 0x18(%rax), %r8
movq -0x170(%rbp), %rax
movl (%rax), %r9d
movq -0x170(%rbp), %rax
movl 0x14(%rax), %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq -0x170(%rbp), %rax
movl 0x4(%rax), %r12d
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xf8(%rbp), %rsi
movl 0x8(%rsi), %esi
shrl %esi
movl %esi, %esi
shlq $0x6, %rsi
addq %rsi, %rax
subl (%rax), %r12d
movq -0x170(%rbp), %rax
movl 0x1c(%rax), %r15d
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xf8(%rbp), %rsi
movl 0x8(%rsi), %esi
shrl %esi
movl %esi, %esi
shlq $0x6, %rsi
addq %rsi, %rax
subl (%rax), %r15d
movl -0x174(%rbp), %r14d
movq -0x180(%rbp), %rax
movl 0x14(%rax), %ebx
movq -0x180(%rbp), %rax
movl 0x18(%rax), %r11d
movq -0x180(%rbp), %rax
movl 0xc(%rax), %r10d
movq -0x180(%rbp), %rax
movl 0x10(%rax), %eax
leaq 0x16390(%rip), %rsi     # 0x3d3f2
movl %r13d, (%rsp)
movl %r12d, 0x8(%rsp)
movl %r15d, 0x10(%rsp)
movl %r14d, 0x18(%rsp)
movl %ebx, 0x20(%rsp)
movl %r11d, 0x28(%rsp)
movl %r10d, 0x30(%rsp)
movl %eax, 0x38(%rsp)
movb $0x0, %al
callq 0x2210
movl -0x174(%rbp), %eax
cmpl -0x158(%rbp), %eax
jle 0x270f0
movl -0x174(%rbp), %eax
movl %eax, -0x158(%rbp)
movq -0x170(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, -0x15c(%rbp)
movq -0x170(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x160(%rbp)
movq -0x170(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x168(%rbp)
movq -0x170(%rbp), %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
movl %eax, -0x164(%rbp)
jmp 0x270f2
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x26ea5
movl -0x158(%rbp), %edx
movq -0x90(%rbp), %rax
movslq -0x68(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movslq -0x15c(%rbp), %rdx
movq -0xa8(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x160(%rbp), %ecx
movq -0xf8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x168(%rbp), %ecx
movq -0xf8(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0x164(%rbp), %edx
movq -0xf8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x4(%rax)
cmpl $0x0, -0x15c(%rbp)
jl 0x271a6
movq -0x98(%rbp), %rax
movslq -0x15c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x158(%rbp), %eax
jle 0x271a6
movq -0x98(%rbp), %rax
movslq -0x15c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x19c(%rbp)
jmp 0x271b2
movl -0x158(%rbp), %eax
movl %eax, -0x19c(%rbp)
movl -0x19c(%rbp), %edx
movq -0x98(%rbp), %rax
movslq -0x68(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
leaq 0x1e4bb(%rip), %rax     # 0x45688
movl (%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x27206
movq 0x1de1a(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0xf0(%rbp), %rax
movl 0x4(%rax), %edx
movl -0x15c(%rbp), %ecx
movl -0x158(%rbp), %r8d
leaq 0x16259(%rip), %rsi     # 0x3d458
movb $0x0, %al
callq 0x2210
jmp 0x27208
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x266b8
movq -0x38(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x2670
movq -0x38(%rbp), %rdi
movq -0xd0(%rbp), %rsi
callq 0x2670
leaq 0x1e44b(%rip), %rax     # 0x45688
movl (%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x2734e
movl $0x0, -0x184(%rbp)
movl $0xffffffff, -0x188(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jge 0x272ae
movq -0x90(%rbp), %rax
movslq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x184(%rbp), %eax
jle 0x272a1
movq -0x90(%rbp), %rax
movslq -0x68(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x184(%rbp)
movl -0x68(%rbp), %eax
movl %eax, -0x188(%rbp)
jmp 0x272a3
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x27266
movl -0x188(%rbp), %eax
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x68(%rbp)
jl 0x2734c
movq 0x1dd30(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0xc0(%rbp), %rax
movslq -0x68(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %edx
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rcx
movq -0xc0(%rbp), %rsi
movslq -0x68(%rbp), %r8
movslq 0x4(%rsi,%r8,8), %rsi
imulq $0x28, %rsi, %rsi
addq %rsi, %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
movq -0x90(%rbp), %rax
movslq -0x68(%rbp), %rsi
movl (%rax,%rsi,4), %r8d
movss -0x5c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x16146(%rip), %rsi     # 0x3d474
movb $0x1, %al
callq 0x2210
movq -0xa8(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x68(%rbp)
jmp 0x272b7
jmp 0x2734e
movq -0x38(%rbp), %rdi
movslq -0x7c(%rbp), %rsi
movq -0x90(%rbp), %rdx
movq -0xa8(%rbp), %rcx
movq -0x98(%rbp), %r8
movq -0xa0(%rbp), %r9
movl -0x88(%rbp), %r11d
subl -0x7c(%rbp), %r11d
xorl %eax, %eax
leaq -0x80(%rbp), %r10
leaq -0x84(%rbp), %rax
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x7fffffff, 0x10(%rsp) # imm = 0x7FFFFFFF
movl %r11d, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x21af0
movq %rax, -0xb0(%rbp)
movq -0x38(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x2670
movq -0x38(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x2670
movq -0x38(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x2670
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
movl -0x88(%rbp), %ecx
subl -0x7c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2747a
movq -0x50(%rbp), %rax
movq -0xc0(%rbp), %rcx
movl -0x7c(%rbp), %edx
addl -0x68(%rbp), %edx
movslq %edx, %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq 0x1c(%rax), %rdx
shlq $0x20, %rdx
orq $0x1, %rdx
movq -0xb0(%rbp), %rax
movl -0x80(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x80(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x7c(%rbp), %edx
addl -0x68(%rbp), %edx
movq -0x98(%rbp), %rax
movl -0x84(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x84(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x273f3
movq -0x38(%rbp), %rdi
movslq -0x84(%rbp), %rax
imulq $0x28, %rax, %rsi
callq 0x2890
movq %rax, -0xc8(%rbp)
movl $0x0, -0x68(%rbp)
movl $0x0, -0x70(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x80(%rbp), %eax
jge 0x2755c
movl -0x70(%rbp), %eax
movl %eax, -0x18c(%rbp)
movq -0xb0(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x190(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x190(%rbp), %eax
jge 0x2754c
movq -0xc8(%rbp), %rdi
movl -0x70(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x70(%rbp)
cltq
imulq $0x28, %rax, %rax
addq %rax, %rdi
movq -0x50(%rbp), %rsi
movq -0xc0(%rbp), %rax
movq -0x98(%rbp), %rcx
movl -0x18c(%rbp), %edx
movl -0x190(%rbp), %r8d
subl -0x6c(%rbp), %r8d
subl $0x1, %r8d
addl %r8d, %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
movslq 0x4(%rax,%rcx,8), %rax
imulq $0x28, %rax, %rax
addq %rax, %rsi
movl $0x28, %edx
callq 0x2230
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x274d4
jmp 0x2754e
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x274a3
movl -0x70(%rbp), %eax
cmpl -0x84(%rbp), %eax
jne 0x27569
jmp 0x27588
leaq 0x15f33(%rip), %rdi     # 0x3d4a3
leaq 0x15e3d(%rip), %rsi     # 0x3d3b4
movl $0xe7, %edx
leaq 0x15f29(%rip), %rcx     # 0x3d4ac
callq 0x2170
movq -0x50(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movslq -0x84(%rbp), %rax
imulq $0x28, %rax, %rdx
callq 0x2230
movl -0x84(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, (%rax)
movq -0xb0(%rbp), %rcx
movq 0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x2670
movq -0x38(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x2670
movq -0x38(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x2670
movl -0x80(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)