// File: chhylp123[P]hifiasm/inter.cpp
// Function: gl_chain_graph(void*, ul_idx_t const*, ma_ug_t const*, vec_mg_lchain_t*, vec_mg_lchain_t*, vec_mg_path_dst_t*, vec_sp_node_t*, vec_mg_pathv_t*, long, ug_opt_t const*, long, double, double, unsigned long*, st_mt_t*, Chain_Data*, long, long, long, long)
int64_t gl_chain_graph(void *km, const ul_idx_t *uref, const ma_ug_t *ug, vec_mg_lchain_t *lc, 
vec_mg_lchain_t *sw, vec_mg_path_dst_t *dst, vec_sp_node_t *out, vec_mg_pathv_t *path,
int64_t qlen, const ug_opt_t *uopt, int64_t bw, double diff_thre, double ng_diff_thre, uint64_t *srt, 
st_mt_t *bf, Chain_Data* dp, int64_t max_skip, int64_t max_iter, int64_t max_dis, int64_t need_srt)
{
	bf->n = 0;
    if(lc->n == 0) return 0;
	int64_t i, j, lc_n = lc->n, n_ext, mm_ovlp, target_dist, max_target_dist, x, m_idx, m_sc, qo, sc; 
    int64_t max_f, max_j = -1, max_d = -1, max_inner = 0; uint32_t max_hash = 0; int64_t k, k0, n_u, n_v, ni;
    mg_lchain_t *r, *li, *lj; mg_path_dst_t *q; asg_t *g = ug->g; uint64_t isolated, *u, ff; ul_ov_t ui, uj;
	if(!need_srt) {
		for (i = n_ext = 0; i < lc_n; i++) {
			r = &lc->a[i]; r->dist_pre = -1; isolated = 0;///dist_pre -> parent in graph chain
			if((r->re < g->seq[r->v>>1].len) && (r->rs > 0)) isolated = 1;///UL contained in one vertice
			if (!isolated) {
				srt[n_ext] = r->qe; srt[n_ext] <<= 32; 
				srt[n_ext] |= (uint64_t)i; srt[n_ext] |= (isolated<<63);
				++n_ext;
			}
		}
		j = n_ext;
		if(j < lc_n) {
			for (i = 0; i < lc_n; i++) {
				r = &lc->a[i]; r->dist_pre = -1; isolated = 0;///dist_pre -> parent in graph chain
				if((r->re < g->seq[r->v>>1].len) && (r->rs > 0)) isolated = 1;///UL contained in one vertice
				if (isolated) {
					srt[j] = r->qe; srt[j] <<= 32; srt[j] |= (uint64_t)i; srt[j] |= (isolated<<63); ++j;
				}
			}
		}
		assert(j == lc_n);
	} else {
		for (i = n_ext = 0; i < lc_n; i++) {
			r = &lc->a[i]; r->dist_pre = -1; isolated = 0;///dist_pre -> parent in graph chain
			if((r->re < g->seq[r->v>>1].len) && (r->rs > 0)) isolated = 1;///UL contained in one vertice
			if (!isolated) ++n_ext;
			srt[i] = r->qe; srt[i] <<= 32; srt[i] |= (uint64_t)i; srt[i] |= (isolated<<63);
		}
		radix_sort_gfa64(srt, srt+lc_n); 
		for (i = 1, j = 0; i <= lc_n; i++) {
			if (i == lc_n || (srt[i]>>32) != (srt[j]>>32)) {
				if(i - j > 1) {
					for (x = j; x < i; x++) {
						srt[x] <<= 32; srt[x] >>= 32; srt[x] |= ((uint64_t)lc->a[(uint32_t)srt[x]].qs)<<32;
					}
					radix_sort_gfa64(srt+j, srt+i);
				}
				j = i;
			}
		}
	}
	if((n_ext != lc_n) || (need_srt)) {
		kv_resize(mg_lchain_t, *sw, (uint64_t)lc_n); sw->n = lc_n;
		for (i = 0; i < lc_n; i++) sw->a[i] = lc->a[(uint32_t)srt[i]];
		memcpy(lc->a, sw->a, lc_n *sizeof((*(lc->a))));
	}

	resize_Chain_Data(dp, lc_n, NULL);
	int32_t *p; int64_t *f, *t, n_skip, dst_n, is_f, plus, n_v0; mg_path_dst_t *dj;
	t = dp->tmp; p = dp->score; f = dp->pre;
	if(ng_diff_thre >= 0) {
		m_idx = gl_chain_linear(uref, ug, lc, sw, qlen, uopt, bw, ng_diff_thre, bf, 
			max_skip, max_iter, max_dis, p, f, t, n_ext, -1);
		if(diff_thre < 0) return m_idx;
		if(m_idx >= 0 && primary_chain_check(bf->a, bf->n, lc->a)) return m_idx;
		else m_idx = -1;
		// if(m_idx >= 0) return m_idx;
		bf->n = 0;
	}

	memset(t, 0, (n_ext*sizeof((*t))));
	for (i = plus = 0; i < n_ext; ++i) { // core loop
        li = &lc->a[i]; set_ul_ov_t_by_mg_lchain_t(&ui, li);
        mm_ovlp = max_ovlp(g, li->v^1);
        x = (li->qs + mm_ovlp)*diff_thre; if(x < bw) x = bw; 
        x += li->qs + mm_ovlp;
        if (x > qlen+1) x = qlen+1;
        x = find_mg_lchain_max(i, lc->a, x+G_CHAIN_INDEL);

		n_skip = 0; is_f = 0;
        // collect potential destination vertices
        for (dst->n = 0, max_target_dist = -1, j = x; j >= 0; --j) { 
            lj = &lc->a[j]; ///extend_end_coord(lj, qlen, g->seq[lj->v>>1].len, &jqs, &jqe, &jrs, &jre);
            //lj contained in li; actually in circle, this might happen; need to deal with it later
            if(lj->qs >= li->qs/**+G_CHAIN_INDEL**/) continue;
            ///if there is a circle, the two linear chains might be at the same vertice
            target_dist = hc_target_len(g, li, lj);
            if(target_dist < 0) continue;
            kv_pushp(mg_path_dst_t, *dst, &q);
            memset(q, 0, sizeof(*q));
            q->inner = 0;//we set q->inner = 0 to allow circles
            q->v = lj->v^1;///must be v^1 instead of v
            q->meta = j;
            ///lj->qs************lj->qe
            ///         li->qs************li->qe
            q->qlen = li->qs - lj->qe;///might be negative; this is the region that need to be checked in base-level
            q->target_dist = target_dist;///cannot understand the target_dist
            q->target_hash = 0;
            q->check_hash = 0;
            if(max_target_dist < target_dist) max_target_dist = target_dist;
			if (t[j] == i) {
				if (++n_skip > max_skip)
					break;
			}
			if (p[j] >= 0) t[p[j]] = i;
			if((!is_f) && (lj->qe+G_CHAIN_INDEL > li->qs)) {
				set_ul_ov_t_by_mg_lchain_t(&uj, lj);
                qo = infer_rovlp(&ui, &uj, NULL, NULL, NULL, (ma_ug_t *)ug);
				if(/**li->v!=lj->v &&**/ get_ecov_adv(uref, uopt, li->v^1, lj->v^1, bw, N_GCHAIN_RATE, qo, 0, NULL)) {
					is_f = 1; if(n_skip > 0) n_skip--; 
					if(n_skip < (max_skip>>1)) n_skip= (max_skip>>1);
				}
			}
        }

        // confirm reach-ability
        max_f = li->score, max_j = -1, max_d = -1, max_inner = 0; max_hash = 0;
        if(dst->n) {
            max_target_dist *= (1+diff_thre); if(max_target_dist < bw) max_target_dist = bw;
            hc_shortest_k(km, g, li->v^1, dst->n, dst->a, max_target_dist, MG_MAX_SHORT_K, bf, srt, out, NULL, 1, 0, 0);
            // remove unreachable destinations
            //TODO: check sequence identity
			dst_n = dst->n;
            for (j = 0; j < dst_n; ++j) {
                dj = &dst->a[j];
                if (dj->n_path == 0) continue; // unreachable
                sc = cal_gchain_sc(dj, li, lc->a, f, bw, diff_thre, W_CHN_PEN_GAP);     

                if (sc == INT32_MIN) continue; // out of band
                // if (sc < 0) continue;// negative score
                if (sc > max_f) {
                    max_f = sc, max_j = dj->meta, max_d = dj->dist, max_hash = dj->hash, max_inner = dj->inner;
                }
            }
        }
		if(max_f < 0) {
            max_f = li->score; max_j = -1; 
        }

        f[i] = max_f; p[i] = max_j;
        ///same time for gchain
        li->dist_pre = max_d;
        li->hash_pre = max_hash;
        li->inner_pre = max_inner;
		if(max_f < plus) plus = max_f;//minmun negative
    }

	for (; i < lc_n; i++) {
		li = &lc->a[i];
		max_f = li->score, max_j = -1, max_d = -1, max_inner = 0; max_hash = 0;
		f[i] = max_f; p[i] = max_j;
        ///same time for gchain
        li->dist_pre = max_d;
        li->hash_pre = max_hash;
        li->inner_pre = max_inner;
		if(max_f < plus) plus = max_f;//minmun negative
	}
	
	for (i = 0; i < lc_n; ++i) {
		f[i]-=plus; t[i] = f[i]<<32; t[i] += (i<<1);
	}

	sw->n = 0; kv_resize(mg_lchain_t, *sw, (uint64_t)lc_n);
	kv_resize(uint64_t, *bf, (uint64_t)lc_n); u = bf->a;
	n_u = n_v = 0; radix_sort_gfa64i(t, t + lc_n); plus = 0;
	for (k = lc_n-1, n_v = n_u = 0; k >= 0; --k) {
        n_v0 = n_v;
        for (i = ((uint32_t)t[k])>>1; i >= 0 && (t[i]&1) == 0; ) {
            sw->a[n_v++] = lc->a[i]; t[i] |= 1; i = p[i];
        }
        if(n_v0 == n_v) continue;
        sc = (i<0?(t[k]>>32):((t[k]>>32)-f[i]));
		if(sc < plus) plus = sc;
		if(sc >= 0) {
			ff = ((uint64_t)(0x8000000000000000));
		} else {
			ff = 0; sc = -sc;
		}
		u[n_u++] = (((uint64_t)sc)<<32)|((uint64_t)(n_v-n_v0))|ff;
    }
	
	m_idx = m_sc = -1; 
	for (i = 0, k = 0; i < n_u; ++i) {
		if((u[i]&((uint64_t)(0x8000000000000000)))) {
			u[i] -= ((uint64_t)(0x8000000000000000)); sc = u[i]>>32;
		} else {
			sc = u[i]>>32; sc = -sc; 
		}
		sc -= plus; u[i] <<= 32; u[i] >>= 32; u[i] |= (((uint64_t)sc)<<32);

        k0 = k, ni = (uint32_t)u[i];
        for (j = 0; j < ni; ++j) {
            lc->a[k++] = sw->a[k0 + (ni - j - 1)];
        }
        if(m_idx < 0 || m_sc < ((int64_t)(u[i]>>32))) {
            m_idx = i; m_sc = ((int64_t)(u[i]>>32));
        }
    }
    assert(k == n_v); bf->n = n_u;
	return m_idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq 0x68(%rbp), %rax
movq 0x60(%rbp), %rax
movq 0x58(%rbp), %rax
movq 0x50(%rbp), %rax
movq 0x48(%rbp), %rax
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movq %r8, -0x58(%rbp)
movq %r9, -0x60(%rbp)
movsd %xmm0, -0x68(%rbp)
movsd %xmm1, -0x70(%rbp)
movq 0x40(%rbp), %rax
movq $0x0, (%rax)
movq -0x50(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2a4e89
movq $0x0, -0x30(%rbp)
jmp 0x2a66ba
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq $-0x1, -0xe0(%rbp)
movq $-0x1, -0xe8(%rbp)
movq $0x0, -0xf0(%rbp)
movl $0x0, -0xf4(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x148(%rbp)
cmpq $0x0, 0x68(%rbp)
jne 0x2a5171
movq $0x0, -0x90(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x2a500d
movq -0x50(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movq $0x0, -0x150(%rbp)
movq -0x128(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x148(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x128(%rbp), %rdx
movl 0x8(%rdx), %edx
shrl %edx
movl %edx, %edx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jge 0x2a4f78
movq -0x128(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x2a4f78
movq $0x1, -0x150(%rbp)
cmpq $0x0, -0x150(%rbp)
jne 0x2a4ffa
movq -0x128(%rbp), %rax
movslq 0x18(%rax), %rdx
movq 0x38(%rbp), %rax
movq -0x90(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x38(%rbp), %rax
movq -0x90(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x78(%rbp), %rdx
movq 0x38(%rbp), %rax
movq -0x90(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x150(%rbp), %rdx
shlq $0x3f, %rdx
movq 0x38(%rbp), %rax
movq -0x90(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x2a4ffc
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2a4ef0
movq -0x90(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x2a513e
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x2a513c
movq -0x50(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movq $0x0, -0x150(%rbp)
movq -0x128(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x148(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x128(%rbp), %rdx
movl 0x8(%rdx), %edx
shrl %edx
movl %edx, %edx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jge 0x2a50b9
movq -0x128(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x2a50b9
movq $0x1, -0x150(%rbp)
cmpq $0x0, -0x150(%rbp)
je 0x2a5129
movq -0x128(%rbp), %rax
movslq 0x18(%rax), %rdx
movq 0x38(%rbp), %rax
movq -0x80(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x38(%rbp), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x78(%rbp), %rdx
movq 0x38(%rbp), %rax
movq -0x80(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x150(%rbp), %rdx
shlq $0x3f, %rdx
movq 0x38(%rbp), %rax
movq -0x80(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x2a512b
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2a5031
jmp 0x2a513e
movq -0x80(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0x2a514d
jmp 0x2a516c
leaq 0xecdff(%rip), %rdi     # 0x391f53
leaq 0xeb6d4(%rip), %rsi     # 0x39082f
movl $0x16b7, %edx           # imm = 0x16B7
leaq 0xecdf6(%rip), %rcx     # 0x391f5d
callq 0x2130
jmp 0x2a53ee
movq $0x0, -0x90(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x2a5293
movq -0x50(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movq $0x0, -0x150(%rbp)
movq -0x128(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x148(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x128(%rbp), %rdx
movl 0x8(%rdx), %edx
shrl %edx
movl %edx, %edx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jge 0x2a520c
movq -0x128(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x2a520c
movq $0x1, -0x150(%rbp)
cmpq $0x0, -0x150(%rbp)
jne 0x2a5228
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0x128(%rbp), %rax
movslq 0x18(%rax), %rdx
movq 0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x78(%rbp), %rdx
movq 0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x150(%rbp), %rdx
shlq $0x3f, %rdx
movq 0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2a5184
movq 0x38(%rbp), %rdi
movq 0x38(%rbp), %rsi
movq -0x88(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x27a9b0
movq $0x1, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jg 0x2a53ec
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
je 0x2a5305
movq 0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq 0x38(%rbp), %rcx
movq -0x80(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
je 0x2a53d9
movq -0x78(%rbp), %rax
subq -0x80(%rbp), %rax
cmpq $0x1, %rax
jle 0x2a53d1
movq -0x80(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0x78(%rbp), %rax
jge 0x2a53ae
movq 0x38(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x38(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shrq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rbp), %rcx
movq -0xb0(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rdx
shlq $0x20, %rdx
movq 0x38(%rbp), %rax
movq -0xb0(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x2a5322
movq 0x38(%rbp), %rdi
movq -0x80(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x38(%rbp), %rsi
movq -0x78(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x27a9b0
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x2a53db
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2a52be
jmp 0x2a53ee
movq -0x90(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0x2a5409
cmpq $0x0, 0x68(%rbp)
je 0x2a5569
jmp 0x2a540b
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x88(%rbp), %rax
jae 0x2a54e5
movq -0x88(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x2, %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x4, %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x8, %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x10, %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq (%rax), %rdi
movq -0x58(%rbp), %rax
imulq $0x28, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2a54e7
movq -0x88(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x2a554e
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq 0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
imulq $0x28, %rax, %rax
addq %rax, %rsi
movq -0x58(%rbp), %rax
movq (%rax), %rdi
imulq $0x28, -0x78(%rbp), %rax
addq %rax, %rdi
movl $0x28, %edx
callq 0x2180
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2a54fe
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x58(%rbp), %rax
movq (%rax), %rsi
imulq $0x28, -0x88(%rbp), %rdx
callq 0x2180
movq 0x48(%rbp), %rdi
movq -0x88(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x226f0
movq 0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x1b0(%rbp)
movq 0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1a0(%rbp)
movq 0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1a8(%rbp)
movsd -0x70(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2a56d0
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq 0x20(%rbp), %r8
movq 0x28(%rbp), %r9
movq 0x30(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movsd -0x70(%rbp), %xmm0
movq 0x40(%rbp), %r13
movq 0x50(%rbp), %r12
movq 0x58(%rbp), %r15
movq 0x60(%rbp), %r14
movq -0x1a0(%rbp), %rbx
movq -0x1a8(%rbp), %r11
movq -0x1b0(%rbp), %r10
movq -0x90(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x1f0(%rbp), %rax
movq %rax, (%rsp)
movq -0x1e8(%rbp), %rax
movq %r13, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq %r15, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %r11, 0x30(%rsp)
movq %r10, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq $-0x1, 0x48(%rsp)
callq 0x2a3f70
movq %rax, -0xb8(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x68(%rbp), %xmm0
jbe 0x2a567f
movq -0xb8(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x2a66ba
cmpq $0x0, -0xb8(%rbp)
jl 0x2a56ba
movq 0x40(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x40(%rbp), %rax
movq (%rax), %rsi
movq -0x50(%rbp), %rax
movq (%rax), %rdx
callq 0x2a3bf0
cmpq $0x0, %rax
je 0x2a56ba
movq -0xb8(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x2a66ba
movq $-0x1, -0xb8(%rbp)
movq 0x40(%rbp), %rax
movq $0x0, (%rax)
movq -0x1b0(%rbp), %rdi
movq -0x90(%rbp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x2100
movq $0x0, -0x1d0(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x90(%rbp), %rax
jge 0x2a5e83
movq -0x50(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rsi
leaq -0x17c(%rbp), %rdi
callq 0x2a3930
movq -0x148(%rbp), %rdi
movq -0x130(%rbp), %rax
movl 0x8(%rax), %esi
xorl $0x1, %esi
callq 0x287d20
movq %rax, -0x98(%rbp)
movq -0x130(%rbp), %rax
movslq 0x14(%rax), %rax
addq -0x98(%rbp), %rax
cvtsi2sd %rax, %xmm0
mulsd -0x68(%rbp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
cmpq 0x30(%rbp), %rax
jge 0x2a5796
movq 0x30(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x130(%rbp), %rax
movslq 0x14(%rax), %rax
addq -0x98(%rbp), %rax
addq -0xb0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq 0x20(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jle 0x2a57d9
movq 0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
movq -0x78(%rbp), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq -0xb0(%rbp), %rax
addq $0x80, %rax
movl %eax, %edx
callq 0x2a39b0
movq %rax, -0xb0(%rbp)
movq $0x0, -0x1b8(%rbp)
movq $0x0, -0x1c8(%rbp)
movq -0x60(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $-0x1, -0xa8(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jl 0x2a5b8b
movq -0x50(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x130(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jl 0x2a5873
jmp 0x2a5b7a
movq -0x148(%rbp), %rdi
movq -0x130(%rbp), %rsi
movq -0x138(%rbp), %rdx
callq 0x2a3ad0
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
jge 0x2a58a3
jmp 0x2a5b7a
jmp 0x2a58a5
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x60(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x2a5912
movq -0x60(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2a58d6
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0x1f8(%rbp)
jmp 0x2a58e4
movl $0x2, %eax
movq %rax, -0x1f8(%rbp)
jmp 0x2a58e4
movq -0x1f8(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rax
movq (%rax), %rdi
movq -0x60(%rbp), %rax
imulq $0x30, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, (%rax)
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq -0x60(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x2100
movq -0x140(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0x138(%rbp), %rax
movl 0x8(%rax), %ecx
xorl $0x1, %ecx
movq -0x140(%rbp), %rax
movl %ecx, (%rax)
movq -0x80(%rbp), %rax
movl %eax, %edx
movq -0x140(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0x130(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x138(%rbp), %rax
subl 0x18(%rax), %ecx
movq -0x140(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0xa0(%rbp), %rax
movl %eax, %ecx
movq -0x140(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x140(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x140(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0xa8(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jge 0x2a5a0d
movq -0xa0(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x1b0(%rbp), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x78(%rbp), %rax
jne 0x2a5a41
movq -0x1b8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1b8(%rbp)
cmpq 0x50(%rbp), %rax
jle 0x2a5a3f
jmp 0x2a5b8b
jmp 0x2a5a41
movq -0x1a0(%rbp), %rax
movq -0x80(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x2a5a70
movq -0x78(%rbp), %rdx
movq -0x1b0(%rbp), %rax
movq -0x1a0(%rbp), %rcx
movq -0x80(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x1c8(%rbp)
jne 0x2a5b78
movq -0x138(%rbp), %rax
movl 0x18(%rax), %eax
addl $0x80, %eax
movq -0x130(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jle 0x2a5b78
movq -0x138(%rbp), %rsi
leaq -0x198(%rbp), %rdi
callq 0x2a3930
movq -0x48(%rbp), %r9
leaq -0x17c(%rbp), %rdi
leaq -0x198(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rdx
movq %r8, %rcx
callq 0x71a90
movq %rax, -0xc8(%rbp)
movq -0x40(%rbp), %rdi
movq 0x28(%rbp), %rsi
movq -0x130(%rbp), %rax
movl 0x8(%rax), %edx
xorl $0x1, %edx
movq -0x138(%rbp), %rax
movl 0x8(%rax), %ecx
xorl $0x1, %ecx
movq 0x30(%rbp), %r8
movq -0xc8(%rbp), %r9
movsd 0xd9522(%rip), %xmm0    # 0x37f030
xorl %eax, %eax
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x292000
cmpq $0x0, %rax
je 0x2a5b76
movq $0x1, -0x1c8(%rbp)
cmpq $0x0, -0x1b8(%rbp)
jle 0x2a5b53
movq -0x1b8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
movq 0x50(%rbp), %rcx
sarq %rcx
cmpq %rcx, %rax
jge 0x2a5b74
movq 0x50(%rbp), %rax
sarq %rax
movq %rax, -0x1b8(%rbp)
jmp 0x2a5b76
jmp 0x2a5b78
jmp 0x2a5b7a
movq -0x80(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x2a5837
movq -0x130(%rbp), %rax
movslq 0x1c(%rax), %rax
movq %rax, -0xd8(%rbp)
movq $-0x1, -0xe0(%rbp)
movq $-0x1, -0xe8(%rbp)
movq $0x0, -0xf0(%rbp)
movl $0x0, -0xf4(%rbp)
movq -0x60(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2a5db7
movsd 0xdc421(%rip), %xmm1    # 0x382000
addsd -0x68(%rbp), %xmm1
cvtsi2sdq -0xa8(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
cmpq 0x30(%rbp), %rax
jge 0x2a5c15
movq 0x30(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rdi
movq -0x148(%rbp), %rsi
movq -0x130(%rbp), %rax
movl 0x8(%rax), %edx
xorl $0x1, %edx
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq (%rax), %r8
movq -0xa8(%rbp), %rax
movl %eax, %r9d
movq 0x40(%rbp), %r11
movq 0x38(%rbp), %r10
movq 0x10(%rbp), %rax
xorl %ebx, %ebx
xorps %xmm0, %xmm0
movl $0xf, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x1, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
callq 0x29be70
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1c0(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x1c0(%rbp), %rax
jge 0x2a5db5
movq -0x60(%rbp), %rax
movq (%rax), %rax
imulq $0x30, -0x80(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x0, %eax
jne 0x2a5ce6
jmp 0x2a5da4
movq -0x1e0(%rbp), %rdi
movq -0x130(%rbp), %rsi
movq -0x50(%rbp), %rax
movq (%rax), %rdx
movq -0x1a8(%rbp), %rcx
movq 0x30(%rbp), %r8
movsd -0x68(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss 0xe0b81(%rip), %xmm1    # 0x386898
callq 0x30cb50
cltq
movq %rax, -0xd0(%rbp)
cmpq $-0x80000000, -0xd0(%rbp) # imm = 0x80000000
jne 0x2a5d34
jmp 0x2a5da4
movq -0xd0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
jle 0x2a5da2
movq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x1e0(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, %eax
movq %rax, -0xe0(%rbp)
movq -0x1e0(%rbp), %rax
movslq 0x1c(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0x1e0(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0xf4(%rbp)
movq -0x1e0(%rbp), %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movq %rax, -0xf0(%rbp)
jmp 0x2a5da4
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x2a5ca6
jmp 0x2a5db7
cmpq $0x0, -0xd8(%rbp)
jge 0x2a5dde
movq -0x130(%rbp), %rax
movslq 0x1c(%rax), %rax
movq %rax, -0xd8(%rbp)
movq $-0x1, -0xe0(%rbp)
movq -0xd8(%rbp), %rdx
movq -0x1a8(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0xe0(%rbp), %rax
movl %eax, %edx
movq -0x1a0(%rbp), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0xe8(%rbp), %rax
movl %eax, %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0xf4(%rbp), %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0xf0(%rbp), %rax
movl %eax, %edx
movq -0x130(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x4(%rax)
movq -0xd8(%rbp), %rax
cmpq -0x1d0(%rbp), %rax
jge 0x2a5e70
movq -0xd8(%rbp), %rax
movq %rax, -0x1d0(%rbp)
jmp 0x2a5e72
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2a56fc
jmp 0x2a5e85
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x2a5f8e
movq -0x50(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movslq 0x1c(%rax), %rax
movq %rax, -0xd8(%rbp)
movq $-0x1, -0xe0(%rbp)
movq $-0x1, -0xe8(%rbp)
movq $0x0, -0xf0(%rbp)
movl $0x0, -0xf4(%rbp)
movq -0xd8(%rbp), %rdx
movq -0x1a8(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0xe0(%rbp), %rax
movl %eax, %edx
movq -0x1a0(%rbp), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0xe8(%rbp), %rax
movl %eax, %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0xf4(%rbp), %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0xf0(%rbp), %rax
movl %eax, %edx
movq -0x130(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x4(%rax)
movq -0xd8(%rbp), %rax
cmpq -0x1d0(%rbp), %rax
jge 0x2a5f7b
movq -0xd8(%rbp), %rax
movq %rax, -0x1d0(%rbp)
jmp 0x2a5f7d
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2a5e85
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jge 0x2a600a
movq -0x1d0(%rbp), %rsi
movq -0x1a8(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
subq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x1a8(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq -0x1b0(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x78(%rbp), %rdx
shlq %rdx
movq -0x1b0(%rbp), %rax
movq -0x78(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2a5f96
movq -0x58(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x88(%rbp), %rax
jae 0x2a60f0
movq -0x88(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x2, %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x4, %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x8, %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
shrq $0x10, %rcx
movq -0x58(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq (%rax), %rdi
movq -0x58(%rbp), %rax
imulq $0x28, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2a60f2
jmp 0x2a60f4
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x88(%rbp), %rax
jae 0x2a61d3
movq -0x88(%rbp), %rcx
movq 0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq 0x40(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq 0x40(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq 0x40(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq 0x40(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq 0x40(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x40(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq 0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x2a61d5
movq 0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x158(%rbp)
movq $0x0, -0x118(%rbp)
movq $0x0, -0x110(%rbp)
movq -0x1b0(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
movq -0x88(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x27ae10
movq $0x0, -0x1d0(%rbp)
movq -0x88(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x100(%rbp)
movq $0x0, -0x110(%rbp)
movq $0x0, -0x118(%rbp)
cmpq $0x0, -0x100(%rbp)
jl 0x2a644f
movq -0x118(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1b0(%rbp), %rax
movq -0x100(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrl %eax
movl %eax, %eax
movq %rax, -0x78(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x78(%rbp)
movb %al, -0x1f9(%rbp)
jl 0x2a62b3
movq -0x1b0(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x1f9(%rbp)
movb -0x1f9(%rbp), %al
testb $0x1, %al
jne 0x2a62bf
jmp 0x2a632a
movq -0x50(%rbp), %rax
movq (%rax), %rsi
imulq $0x28, -0x78(%rbp), %rax
addq %rax, %rsi
movq -0x58(%rbp), %rax
movq (%rax), %rdi
movq -0x118(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x118(%rbp)
imulq $0x28, %rax, %rax
addq %rax, %rdi
movl $0x28, %edx
callq 0x2180
movq -0x1b0(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
orq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x1a0(%rbp), %rax
movq -0x78(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
movq %rax, -0x78(%rbp)
jmp 0x2a6284
movq -0x1d8(%rbp), %rax
cmpq -0x118(%rbp), %rax
jne 0x2a633f
jmp 0x2a6438
cmpq $0x0, -0x78(%rbp)
jge 0x2a6365
movq -0x1b0(%rbp), %rax
movq -0x100(%rbp), %rcx
movq (%rax,%rcx,8), %rax
sarq $0x20, %rax
movq %rax, -0x208(%rbp)
jmp 0x2a6391
movq -0x1b0(%rbp), %rax
movq -0x100(%rbp), %rcx
movq (%rax,%rcx,8), %rax
sarq $0x20, %rax
movq -0x1a8(%rbp), %rcx
movq -0x78(%rbp), %rdx
subq (%rcx,%rdx,8), %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
cmpq -0x1d0(%rbp), %rax
jge 0x2a63bd
movq -0xd0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
cmpq $0x0, -0xd0(%rbp)
jl 0x2a63da
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x160(%rbp)
jmp 0x2a63f5
movq $0x0, -0x160(%rbp)
xorl %eax, %eax
subq -0xd0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdx
shlq $0x20, %rdx
movq -0x118(%rbp), %rax
subq -0x1d8(%rbp), %rax
orq %rax, %rdx
orq -0x160(%rbp), %rdx
movq -0x158(%rbp), %rax
movq -0x110(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x110(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x100(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x100(%rbp)
jmp 0x2a624e
movq $-0x1, -0xc0(%rbp)
movq $-0x1, -0xb8(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x100(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x110(%rbp), %rax
jge 0x2a6670
movq -0x158(%rbp), %rcx
movq -0x78(%rbp), %rdx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
je 0x2a64e4
movq -0x158(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
subq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x158(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0xd0(%rbp)
jmp 0x2a650e
movq -0x158(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0xd0(%rbp)
xorl %eax, %eax
subq -0xd0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x1d0(%rbp), %rcx
movq -0xd0(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xd0(%rbp)
movq -0x158(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x158(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shrq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xd0(%rbp), %rdx
shlq $0x20, %rdx
movq -0x158(%rbp), %rax
movq -0x78(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x100(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x158(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x120(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x120(%rbp), %rax
jge 0x2a660f
movq -0x58(%rbp), %rax
movq (%rax), %rsi
movq -0x108(%rbp), %rax
movq -0x120(%rbp), %rcx
subq -0x80(%rbp), %rcx
subq $0x1, %rcx
addq %rcx, %rax
imulq $0x28, %rax, %rax
addq %rax, %rsi
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x100(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x100(%rbp)
imulq $0x28, %rax, %rax
addq %rax, %rdi
movl $0x28, %edx
callq 0x2180
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x2a65a0
cmpq $0x0, -0xb8(%rbp)
jl 0x2a6638
movq -0xc0(%rbp), %rax
movq -0x158(%rbp), %rcx
movq -0x78(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
jge 0x2a665d
movq -0x78(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x158(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0xc0(%rbp)
jmp 0x2a665f
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2a6478
movq -0x100(%rbp), %rax
cmpq -0x118(%rbp), %rax
jne 0x2a6682
jmp 0x2a66a1
leaq 0xea3bc(%rip), %rdi     # 0x390a45
leaq 0xea19f(%rip), %rsi     # 0x39082f
movl $0x175f, %edx           # imm = 0x175F
leaq 0xeb8c1(%rip), %rcx     # 0x391f5d
callq 0x2130
movq -0x110(%rbp), %rcx
movq 0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0xb8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq