// File: chhylp123[P]hifiasm/inter.cpp
// Function: get_ul_g(mul_ov_t*, mg_gres_a*, ma_ug_t*, asg_t const*, double, double, int, int)
void get_ul_g(mul_ov_t *aov, mg_gres_a *hits, ma_ug_t *ug, const asg_t *rg, 
double cov_thres, double vv, int32_t min_off, int32_t min_read_ovlp)
{
	int64_t c_thres = (aov->asm_cov*cov_thres)>2?(aov->asm_cov*cov_thres):2;
	uint64_t i, k, l, m, v0, v1, r0, r1;
	int32_t qs, qe, rs, re, qs0, qe0, qs1, qe1, ovlp, mmi, nngc2 = 0, is, ie, iocc, m_iocc, max_i;
	mg_gres_t *p = NULL;
	mg_gchain_t *gc = NULL, *gc0, *gc1;
	mg_lres_t *lf = NULL, *ll = NULL;
	asg_t *xg = copy_read_graph(ug->g);
	asg_arc_t *pe = NULL;
	kvec_t(lc_srt_t) tt; kv_init(tt); lc_srt_t *pt = NULL;
	kvec_t(eg_srt_t) td; kv_init(td); eg_srt_t *pd = NULL;
	kvec_t_u64_warp tidx; kv_init(tidx.a);
	///for debug
	kvec_t(eg_srt_t) dbg_vw_srt; kv_init(dbg_vw_srt);
	for (i = 0; i < hits->n; i++) {
		// fprintf(stderr, "+i+: %lu\n",i);
		p = &(hits->a[i]); tt.n = 0;
		// fprintf(stderr, "-i-: %lu\n",i);
		if(p->n_gc < 2) continue;
		nngc2++;
		// fprintf(stderr, "\nsis: %lu, p->n_gc: %d\n",i,p->n_gc);
		for (k = 0; k < (uint64_t)p->n_gc; k++) {
			gc = &(p->gc[k]);
			assert(gc->cnt > 0);
			lf = &(p->lc[gc->off]); ll = gc->cnt>1?&(p->lc[gc->off+gc->cnt-1]):NULL;
			assert(lf->qs != (uint32_t)-1);
			if(ll) assert(ll->qs != (uint32_t)-1);

			transfor_icoord(lf->qs, lf->qe, lf->ts, lf->te, lf->v&1, p->qlen, ug->g->seq[lf->v>>1].len, 
			&qs, ll?NULL:&qe, &rs, ll?NULL:&re);
			if(ll) {
				transfor_icoord(ll->qs, ll->qe, ll->ts, ll->te, ll->v&1, p->qlen, ug->g->seq[ll->v>>1].len, 
				NULL, &qe, NULL, &re);
			} else {
				ll = lf;
			}
			if(qe - qs < min_read_ovlp || re - rs < min_read_ovlp) continue;
			kv_pushp(lc_srt_t, tt, &pt); 
			pt->qse = qs; pt->qse <<= 32; pt->qse |= qe;
			pt->rse = rs; pt->rse <<= 32; pt->rse |= re;
			pt->gld = i; pt->gld <<= 32; pt->gld |= k;
			// fprintf(stderr, ">>>>k: %lu, qs: %d, qe: %d, qs-utg%.6d%c, qe-utg%.6d%c\n", k, qs, qe, 
			// (int32_t)((lf->v>>1)+1), "lc"[ug->u.a[lf->v>>1].circ], 
			// (int32_t)((ll->v>>1)+1), "lc"[ug->u.a[ll->v>>1].circ]);
			// fprintf(stderr, "lf_qs: %u, lf_qe: %u, lf_ts: %u, lf_te: %u\n", lf->qs, lf->qe, lf->ts, lf->te);
			// fprintf(stderr, "ll_qs: %u, ll_qe: %u, ll_ts: %u, ll_te: %u\n", ll->qs, ll->qe, ll->ts, ll->te);
		}
		// fprintf(stderr, "eie: %lu\n",i);
		radix_sort_lc_srt(tt.a, tt.a + tt.n);
		for (k = 0; k < tt.n; k++) {
			for (m = k + 1; m < tt.n; m++) {
				gc0 = &(p->gc[(uint32_t)(tt.a[k].gld)]); 
				v0 = p->lc[gc0->off+gc0->cnt-1].v;
				gc1 = &(p->gc[(uint32_t)(tt.a[m].gld)]);
				v1 = p->lc[gc1->off].v;
				if((v0>>1) == (v1>>1)) continue;

				qs0 = tt.a[k].qse>>32; qe0 = (uint32_t)(tt.a[k].qse);
				qs1 = tt.a[m].qse>>32; qe1 = (uint32_t)(tt.a[m].qse);
				// fprintf(stderr, "++++k: %lu, qs0: %d, qe0: %d, qs1: %d, qe1: %d, q0-utg%.6d%c, q1-utg%.6d%c\n", 
				// k, qs0, qe0, qs1, qe1, (int32_t)((v0>>1)+1), "lc"[ug->u.a[v0>>1].circ], (int32_t)((v1>>1)+1), "lc"[ug->u.a[v1>>1].circ]);
				if(qs1 <= qs0 && qe1 >= qe0) continue;///contain
				if(qs0 <= qs1 && qe0 >= qe1) continue;///contain
				if(ug->u.a[v0>>1].circ || ug->u.a[v1>>1].circ) continue;
				ovlp = ((MIN((qe0), (qe1)) > MAX((qs0), (qs1)))? MIN((qe0), (qe1)) - MAX((qs0), (qs1)):0);
				r0 = v0&1?(ug->u.a[v0>>1].start>>1):(ug->u.a[v0>>1].end>>1);
				r1 = v1&1?(ug->u.a[v1>>1].end>>1):(ug->u.a[v1>>1].start>>1);
				// fprintf(stderr, "----k: %lu, ovlp: %d\n", k, ovlp);
				// if((ovlp == 0) || (ovlp <= ((qe0 - qs0)*vv) && ovlp <= ((qe1 - qs1)*vv)) || 
				//  (asg_arc_n(ug->g, v0) == 0 && asg_arc_n(ug->g, v1^1) == 0)) {
				if(/**(asg_arc_n(ug->g, v0) == 0 && asg_arc_n(ug->g, v1^1) == 0) 
												&& **/(ovlp < (int32_t)(MIN(rg->seq[r0].len, rg->seq[r1].len)))) {
					kv_pushp(eg_srt_t, td, &pd);
					pd->d = MAX((qs0), (qs1)) - MIN((qe0), (qe1));
					pd->x = v0<v1?((v0<<32)|v1):(((v1^1)<<32)|(v0^1));
					pd->id = p->qid; 
					pd->e = (uint32_t)(tt.a[k].gld);
					pd->e <<= 32; pd->e |= (uint32_t)(tt.a[m].gld);
				}
			}
		}
	}
	fprintf(stderr, "td.n: %d\n", (int)td.n);
	radix_sort_eg_srt_x(td.a, td.a + td.n);
	for (k = 1, l = 0; k <= td.n; ++k) 
    {   
        if (k == td.n || td.a[k].x != td.a[l].x) 
        {
			if(k - l >= (uint64_t)c_thres) {
				for (i = l+1, mmi = l; i < k; i++) {
					if(td.a[mmi].d > td.a[i].d) mmi = i;
				}
				mmi = td.a[mmi].d < 0? -td.a[mmi].d:0;
				if(mmi != 0) {
					for (i = l; i < k; i++) td.a[i].d += mmi;
				}


				radix_sort_eg_srt_d(td.a + l, td.a + k);
				for (i = l, iocc = 0, tidx.a.n = 0; i < k; i++) {
					ovlp = (td.a[i].d > mmi? td.a[i].d - mmi: mmi - td.a[i].d) * vv;
					if(ovlp < min_off) ovlp = min_off;
					// fprintf(stderr, "i-%lu, ovlp: %d, td.a[i].d: %d, qid: %u\n", i, ovlp, td.a[i].d, td.a[i].id);
					// if(spec_ovlp_occ(td.a + l, k-l, i - l, ovlp, c_thres)) break;
					iocc = get_spec_ovlp_occ(td.a + l, k-l, i - l, ovlp, c_thres, &is, &ie, &tidx);
					// fprintf(stderr, "c_thres-%ld, iocc-%d\n", c_thres, iocc);
					if(iocc >= c_thres) break;
				}

				

				if(i < k) {
					m_iocc = iocc; max_i = i;
					for (i = ie + 1; i < k; i++) {
						iocc = get_spec_ovlp_occ(td.a + l, k-l, i - l, ovlp, m_iocc, &is, &ie, &tidx);
						if(iocc > m_iocc) m_iocc = iocc, max_i = i;
						i = ie + l;
					}
					///for debug
					kv_pushp(eg_srt_t, dbg_vw_srt, &pd);
					pd->x = m_iocc; pd->e = td.a[l].x;
					
					v0 = (uint32_t)td.a[l].x; v1 = td.a[l].x>>32;
					pe = asg_arc_pushp(xg);
					pe->del = 0; pe->strong = 0; pe->el = 0; pe->no_l_indel = 0; pe->ol = 0;
					pe->v = v0; pe->ul = v1<<32; pe->ul += xg->seq[v1>>1].len;

					v0 = (td.a[l].x>>32)^1; v1 = ((uint32_t)td.a[l].x)^1;
					pe = asg_arc_pushp(xg);
					pe->del = 0; pe->strong = 0; pe->el = 0; pe->no_l_indel = 0; pe->ol = 0;
					pe->v = v0; pe->ul = v1<<32; pe->ul += xg->seq[v1>>1].len;

					// fprintf(stderr, "++++q0-utg%.6d%c, q1-utg%.6d%c, k-l: %lu, c_thres: %ld, flag: %u\n", 
					// (int32_t)((td.a[l].x>>33)+1), "lc"[ug->u.a[td.a[l].x>>33].circ], 
					// (int32_t)(((uint32_t)td.a[l].x)>>1)+1, "lc"[ug->u.a[(((uint32_t)td.a[l].x)>>1)].circ], k-l, c_thres,
					// (asg_arc_n(ug->g, ((uint32_t)td.a[l].x)^1) == 0 && asg_arc_n(ug->g, (td.a[l].x>>32)) == 0));
				}
			}
            l = k;
        }
    }

	xg->is_srt = 0; xg->idx = 0; free(xg->idx); 
    asg_cleanup(xg);
	clean_ul_g(xg);

	///for debug
	fprintf(stderr, "[M::%s::] ==> nngc2: %d\n", __func__, nngc2);
	radix_sort_eg_srt_x(dbg_vw_srt.a, dbg_vw_srt.a + dbg_vw_srt.n);
	for (max_i = (int32_t)dbg_vw_srt.n - 1; max_i >= 0; --max_i) {
		pd = &(dbg_vw_srt.a[max_i]);
		fprintf(stderr, "++++q0-utg%.6d%c, q1-utg%.6d%c, occ: %lu, c_thres: %ld, flag: %u\n", 
					(int32_t)((pd->e>>33)+1), "lc"[ug->u.a[pd->e>>33].circ], 
					(int32_t)(((uint32_t)pd->e)>>1)+1, "lc"[ug->u.a[(((uint32_t)pd->e)>>1)].circ], pd->x, c_thres,
					(asg_arc_n(ug->g, ((uint32_t)pd->e)^1) == 0 && asg_arc_n(ug->g, (pd->e>>32)) == 0));
	}

	
	kv_destroy(tt); kv_destroy(td); kv_destroy(tidx.a); kv_destroy(dbg_vw_srt);
	asg_destroy(xg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x40(%rbp)
movl %r8d, -0x44(%rbp)
movl %r9d, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %xmm0
movaps 0x8c7e0(%rip), %xmm1    # 0x382010
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x8c7e4(%rip), %xmm1    # 0x382020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
mulsd -0x38(%rbp), %xmm0
movsd 0x8ca90(%rip), %xmm1    # 0x3822e8
ucomisd %xmm1, %xmm0
jbe 0x2f5898
movq -0x18(%rbp), %rax
movq 0x8(%rax), %xmm0
movaps 0x8c7a2(%rip), %xmm1    # 0x382010
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x8c7a6(%rip), %xmm1    # 0x382020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x190(%rbp)
jmp 0x2f58aa
movsd 0x8ca48(%rip), %xmm0    # 0x3822e8
movsd %xmm0, -0x190(%rbp)
jmp 0x2f58aa
movsd -0x190(%rbp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0xbc(%rbp)
movq $0x0, -0xd8(%rbp)
movq $0x0, -0xe0(%rbp)
movq $0x0, -0xf8(%rbp)
movq $0x0, -0x100(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x10b830
movq %rax, -0x108(%rbp)
movq $0x0, -0x110(%rbp)
movq $0x0, -0x120(%rbp)
movq $0x0, -0x128(%rbp)
movq $0x0, -0x118(%rbp)
movq $0x0, -0x130(%rbp)
movq $0x0, -0x140(%rbp)
movq $0x0, -0x148(%rbp)
movq $0x0, -0x138(%rbp)
movq $0x0, -0x150(%rbp)
movq $0x0, -0x168(%rbp)
movq $0x0, -0x170(%rbp)
movq $0x0, -0x160(%rbp)
movq $0x0, -0x180(%rbp)
movq $0x0, -0x188(%rbp)
movq $0x0, -0x178(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2f6538
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x58(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xd8(%rbp)
movq $0x0, -0x128(%rbp)
movq -0xd8(%rbp), %rax
cmpl $0x2, (%rax)
jge 0x2f59f6
jmp 0x2f6527
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0xd8(%rbp), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jae 0x2f5ee8
movq -0xd8(%rbp), %rax
movq 0x8(%rax), %rax
imulq $0x48, -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x2f5a4d
jmp 0x2f5a6c
leaq 0x9b179(%rip), %rdi     # 0x390bcd
leaq 0x9add4(%rip), %rsi     # 0x39082f
movl $0x4fa4, %edx           # imm = 0x4FA4
leaq 0x9f74e(%rip), %rcx     # 0x3951b5
callq 0x2130
movq -0xd8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xe0(%rbp), %rcx
movslq 0x8(%rcx), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
movq -0xe0(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jle 0x2f5ad2
movq -0xd8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xe0(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0xe0(%rbp), %rdx
addl 0xc(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x198(%rbp)
jmp 0x2f5add
xorl %eax, %eax
movq %rax, -0x198(%rbp)
jmp 0x2f5add
movq -0x198(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rax
cmpl $-0x1, 0xc(%rax)
je 0x2f5afa
jmp 0x2f5b19
leaq 0x9f717(%rip), %rdi     # 0x395218
leaq 0x9ad27(%rip), %rsi     # 0x39082f
movl $0x4fa6, %edx           # imm = 0x4FA6
leaq 0x9f6a1(%rip), %rcx     # 0x3951b5
callq 0x2130
cmpq $0x0, -0x100(%rbp)
je 0x2f5b53
movq -0x100(%rbp), %rax
cmpl $-0x1, 0xc(%rax)
je 0x2f5b32
jmp 0x2f5b51
leaq 0x9f6f6(%rip), %rdi     # 0x39522f
leaq 0x9acef(%rip), %rsi     # 0x39082f
movl $0x4fa7, %edx           # imm = 0x4FA7
leaq 0x9f669(%rip), %rcx     # 0x3951b5
callq 0x2130
jmp 0x2f5b53
movq -0xf8(%rbp), %rax
movl 0xc(%rax), %eax
movq %rax, -0x1d0(%rbp)
movq -0xf8(%rbp), %rax
movl 0x10(%rax), %eax
movq %rax, -0x1c8(%rbp)
movq -0xf8(%rbp), %rax
movl 0x14(%rax), %eax
movq %rax, -0x1c0(%rbp)
movq -0xf8(%rbp), %rax
movl 0x18(%rax), %eax
movq %rax, -0x1b8(%rbp)
movq -0xf8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
movb %al, -0x1a9(%rbp)
movq -0xd8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x1a8(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0xf8(%rbp), %rcx
movl 0x4(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq %rax, -0x1a0(%rbp)
cmpq $0x0, -0x100(%rbp)
je 0x2f5bfc
xorl %eax, %eax
movq %rax, -0x1d8(%rbp)
jmp 0x2f5c0c
leaq -0x98(%rbp), %rax
movq %rax, -0x1d8(%rbp)
jmp 0x2f5c0c
movq -0x1d8(%rbp), %rax
movq %rax, -0x1e0(%rbp)
cmpq $0x0, -0x100(%rbp)
je 0x2f5c2f
xorl %eax, %eax
movq %rax, -0x1e8(%rbp)
jmp 0x2f5c3f
leaq -0xa0(%rbp), %rax
movq %rax, -0x1e8(%rbp)
jmp 0x2f5c3f
movq -0x1e0(%rbp), %r11
movq -0x1a0(%rbp), %r14
movq -0x1a8(%rbp), %r9
movb -0x1a9(%rbp), %r8b
movq -0x1b8(%rbp), %rcx
movq -0x1c0(%rbp), %rdx
movq -0x1c8(%rbp), %rsi
movq -0x1d0(%rbp), %rdi
movq -0x1e8(%rbp), %rax
leaq -0x94(%rbp), %rbx
leaq -0x9c(%rbp), %r10
movzbl %r8b, %r8d
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x2874b0
cmpq $0x0, -0x100(%rbp)
je 0x2f5d6c
movq -0x100(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %edi
movq -0x100(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %esi
movq -0x100(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
movq -0x100(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, %ecx
movq -0x100(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
movb %al, %r8b
movq -0xd8(%rbp), %rax
movq 0x20(%rax), %r9
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x100(%rbp), %r10
movl 0x4(%r10), %r10d
shrl %r10d
movl %r10d, %r10d
movl (%rax,%r10,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %r11d
xorl %eax, %eax
leaq -0x98(%rbp), %r10
leaq -0xa0(%rbp), %rax
movzbl %r8b, %r8d
movq %r11, (%rsp)
movq $0x0, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x2874b0
jmp 0x2f5d7a
movq -0xf8(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x98(%rbp), %eax
subl -0x94(%rbp), %eax
cmpl -0x48(%rbp), %eax
jl 0x2f5d9c
movl -0xa0(%rbp), %eax
subl -0x9c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jge 0x2f5da1
jmp 0x2f5ed7
jmp 0x2f5da3
movq -0x128(%rbp), %rax
cmpq -0x120(%rbp), %rax
jne 0x2f5e07
cmpq $0x0, -0x120(%rbp)
je 0x2f5dd0
movq -0x120(%rbp), %rax
shlq %rax
movq %rax, -0x1f0(%rbp)
jmp 0x2f5dde
movl $0x2, %eax
movq %rax, -0x1f0(%rbp)
jmp 0x2f5dde
movq -0x1f0(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x118(%rbp), %rdi
imulq $0x18, -0x120(%rbp), %rsi
callq 0x2360
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq -0x128(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x128(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
movslq -0x94(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, (%rax)
movq -0x130(%rbp), %rax
movq (%rax), %rcx
shlq $0x20, %rcx
movq %rcx, (%rax)
movslq -0x98(%rbp), %rcx
movq -0x130(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movslq -0x9c(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x130(%rbp), %rax
movq 0x8(%rax), %rcx
shlq $0x20, %rcx
movq %rcx, 0x8(%rax)
movslq -0xa0(%rbp), %rcx
movq -0x130(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x130(%rbp), %rax
movq 0x10(%rax), %rcx
shlq $0x20, %rcx
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rcx
movq -0x130(%rbp), %rax
orq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2f5a0d
movq -0x118(%rbp), %rdi
movq -0x118(%rbp), %rsi
imulq $0x18, -0x128(%rbp), %rax
addq %rax, %rsi
callq 0x27f880
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x128(%rbp), %rax
jae 0x2f6525
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x128(%rbp), %rax
jae 0x2f6512
movq -0xd8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x118(%rbp), %rcx
imulq $0x18, -0x60(%rbp), %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
movl %ecx, %ecx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xe8(%rbp)
movq -0xd8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xe8(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0xe8(%rbp), %rdx
addl 0xc(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x78(%rbp)
movq -0xd8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x118(%rbp), %rcx
imulq $0x18, -0x70(%rbp), %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
movl %ecx, %ecx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xf0(%rbp)
movq -0xd8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xf0(%rbp), %rcx
movslq 0x8(%rcx), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
shrq %rax
movq -0x80(%rbp), %rcx
shrq %rcx
cmpq %rcx, %rax
jne 0x2f6007
jmp 0x2f6501
movq -0x118(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0xa4(%rbp)
movq -0x118(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0xa8(%rbp)
movq -0x118(%rbp), %rax
imulq $0x18, -0x70(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0xac(%rbp)
movq -0x118(%rbp), %rax
imulq $0x18, -0x70(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0xb0(%rbp)
movl -0xac(%rbp), %eax
cmpl -0xa4(%rbp), %eax
jg 0x2f6090
movl -0xb0(%rbp), %eax
cmpl -0xa8(%rbp), %eax
jl 0x2f6090
jmp 0x2f6501
movl -0xa4(%rbp), %eax
cmpl -0xac(%rbp), %eax
jg 0x2f60b1
movl -0xa8(%rbp), %eax
cmpl -0xb0(%rbp), %eax
jl 0x2f60b1
jmp 0x2f6501
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x78(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2f60f1
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2f60f6
jmp 0x2f6501
movl -0xa8(%rbp), %eax
cmpl -0xb0(%rbp), %eax
jg 0x2f6112
movl -0xa8(%rbp), %eax
movl %eax, -0x1f4(%rbp)
jmp 0x2f611e
movl -0xb0(%rbp), %eax
movl %eax, -0x1f4(%rbp)
movl -0x1f4(%rbp), %eax
movl %eax, -0x1f8(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0xac(%rbp), %eax
jl 0x2f6146
movl -0xa4(%rbp), %eax
movl %eax, -0x1fc(%rbp)
jmp 0x2f6152
movl -0xac(%rbp), %eax
movl %eax, -0x1fc(%rbp)
movl -0x1f8(%rbp), %eax
movl -0x1fc(%rbp), %ecx
cmpl %ecx, %eax
jle 0x2f61d4
movl -0xa8(%rbp), %eax
cmpl -0xb0(%rbp), %eax
jg 0x2f617e
movl -0xa8(%rbp), %eax
movl %eax, -0x200(%rbp)
jmp 0x2f618a
movl -0xb0(%rbp), %eax
movl %eax, -0x200(%rbp)
movl -0x200(%rbp), %eax
movl %eax, -0x204(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0xac(%rbp), %eax
jl 0x2f61b2
movl -0xa4(%rbp), %eax
movl %eax, -0x208(%rbp)
jmp 0x2f61be
movl -0xac(%rbp), %eax
movl %eax, -0x208(%rbp)
movl -0x204(%rbp), %eax
movl -0x208(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x20c(%rbp)
jmp 0x2f61de
xorl %eax, %eax
movl %eax, -0x20c(%rbp)
jmp 0x2f61de
movl -0x20c(%rbp), %eax
movl %eax, -0xb4(%rbp)
movq -0x78(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2f621b
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x78(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
shrl %eax
movl %eax, -0x210(%rbp)
jmp 0x2f623c
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x78(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl %eax, -0x210(%rbp)
movl -0x210(%rbp), %eax
movl %eax, %eax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2f627c
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl %eax, -0x214(%rbp)
jmp 0x2f629d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
shrq %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
shrl %eax
movl %eax, -0x214(%rbp)
movl -0x214(%rbp), %eax
movl %eax, %eax
movq %rax, -0x90(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0x218(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x88(%rbp), %rcx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x90(%rbp), %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jg 0x2f630a
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x88(%rbp), %rcx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x21c(%rbp)
jmp 0x2f6327
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x90(%rbp), %rcx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x21c(%rbp)
movl -0x218(%rbp), %eax
movl -0x21c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2f64ff
jmp 0x2f633d
movq -0x148(%rbp), %rax
cmpq -0x140(%rbp), %rax
jne 0x2f63a1
cmpq $0x0, -0x140(%rbp)
je 0x2f636a
movq -0x140(%rbp), %rax
shlq %rax
movq %rax, -0x228(%rbp)
jmp 0x2f6378
movl $0x2, %eax
movq %rax, -0x228(%rbp)
jmp 0x2f6378
movq -0x228(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x138(%rbp), %rdi
imulq $0x18, -0x140(%rbp), %rsi
callq 0x2360
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movq -0x148(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x148(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0xac(%rbp), %eax
jl 0x2f63e7
movl -0xa4(%rbp), %eax
movl %eax, -0x22c(%rbp)
jmp 0x2f63f3
movl -0xac(%rbp), %eax
movl %eax, -0x22c(%rbp)
movl -0x22c(%rbp), %eax
movl %eax, -0x230(%rbp)
movl -0xa8(%rbp), %eax
cmpl -0xb0(%rbp), %eax
jg 0x2f641b
movl -0xa8(%rbp), %eax
movl %eax, -0x234(%rbp)
jmp 0x2f6427
movl -0xb0(%rbp), %eax
movl %eax, -0x234(%rbp)
movl -0x230(%rbp), %ecx
movl -0x234(%rbp), %eax
subl %eax, %ecx
movq -0x150(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x78(%rbp), %rax
cmpq -0x80(%rbp), %rax
jae 0x2f645e
movq -0x78(%rbp), %rax
shlq $0x20, %rax
orq -0x80(%rbp), %rax
movq %rax, -0x240(%rbp)
jmp 0x2f647c
movq -0x80(%rbp), %rax
xorq $0x1, %rax
shlq $0x20, %rax
movq -0x78(%rbp), %rcx
xorq $0x1, %rcx
orq %rcx, %rax
movq %rax, -0x240(%rbp)
movq -0x240(%rbp), %rcx
movq -0x150(%rbp), %rax
movq %rcx, (%rax)
movq -0xd8(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %ecx
movq -0x150(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x118(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl %eax, %eax
movl %eax, %ecx
movq -0x150(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x150(%rbp), %rax
movq 0x8(%rax), %rcx
shlq $0x20, %rcx
movq %rcx, 0x8(%rax)
movq -0x118(%rbp), %rax
imulq $0x18, -0x70(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl %eax, %eax
movl %eax, %ecx
movq -0x150(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
jmp 0x2f6501
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x2f5f2b
jmp 0x2f6514
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2f5f0e
jmp 0x2f6527
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2f59b2
movq 0xcdaa1(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x148(%rbp), %rax
movl %eax, %edx
leaq 0x9ecf4(%rip), %rsi     # 0x395246
movb $0x0, %al
callq 0x22a0
movq -0x138(%rbp), %rdi
movq -0x138(%rbp), %rsi
imulq $0x18, -0x148(%rbp), %rax
addq %rax, %rsi
callq 0x27fda0
movq $0x1, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x148(%rbp), %rax
ja 0x2f6be0
movq -0x60(%rbp), %rax
cmpq -0x148(%rbp), %rax
je 0x2f65cf
movq -0x138(%rbp), %rax
imulq $0x18, -0x60(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x138(%rbp), %rcx
imulq $0x18, -0x68(%rbp), %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
je 0x2f6bcd
movq -0x60(%rbp), %rax
subq -0x68(%rbp), %rax
cmpq -0x50(%rbp), %rax
jb 0x2f6bc5
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movl %eax, -0xb8(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x2f6647
movq -0x138(%rbp), %rax
movslq -0xb8(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x138(%rbp), %rcx
imulq $0x18, -0x58(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jle 0x2f6637
movq -0x58(%rbp), %rax
movl %eax, -0xb8(%rbp)
jmp 0x2f6639
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2f65f7
movq -0x138(%rbp), %rax
movslq -0xb8(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x10(%rax)
jge 0x2f6684
movq -0x138(%rbp), %rcx
movslq -0xb8(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rcx
xorl %eax, %eax
subl 0x10(%rcx), %eax
movl %eax, -0x244(%rbp)
jmp 0x2f668e
xorl %eax, %eax
movl %eax, -0x244(%rbp)
jmp 0x2f668e
movl -0x244(%rbp), %eax
movl %eax, -0xb8(%rbp)
cmpl $0x0, -0xb8(%rbp)
je 0x2f66e0
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x2f66de
movl -0xb8(%rbp), %ecx
movq -0x138(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rdx
addq %rdx, %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2f66ab
jmp 0x2f66e0
movq -0x138(%rbp), %rdi
imulq $0x18, -0x68(%rbp), %rax
addq %rax, %rdi
movq -0x138(%rbp), %rsi
imulq $0x18, -0x60(%rbp), %rax
addq %rax, %rsi
callq 0x2802b0
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0xc8(%rbp)
movq $0x0, -0x170(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x2f682e
movq -0x138(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
cmpl -0xb8(%rbp), %eax
jle 0x2f6768
movq -0x138(%rbp), %rax
imulq $0x18, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl -0xb8(%rbp), %eax
movl %eax, -0x248(%rbp)
jmp 0x2f6786
movl -0xb8(%rbp), %eax
movq -0x138(%rbp), %rcx
imulq $0x18, -0x58(%rbp), %rdx
addq %rdx, %rcx
subl 0x10(%rcx), %eax
movl %eax, -0x248(%rbp)
movl -0x248(%rbp), %eax
cvtsi2sd %eax, %xmm0
mulsd -0x40(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x2f67b3
movl -0x44(%rbp), %eax
movl %eax, -0xb4(%rbp)
movq -0x138(%rbp), %rdi
imulq $0x18, -0x68(%rbp), %rax
addq %rax, %rdi
movq -0x60(%rbp), %rax
subq -0x68(%rbp), %rax
movl %eax, %esi
movq -0x58(%rbp), %rax
subq -0x68(%rbp), %rax
movl %eax, %edx
movl -0xb4(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %eax, %r8d
leaq -0xc0(%rbp), %r9
leaq -0xc4(%rbp), %r10
leaq -0x170(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2f5020
movl %eax, -0xc8(%rbp)
movslq -0xc8(%rbp), %rax
cmpq -0x50(%rbp), %rax
jl 0x2f681b
jmp 0x2f682e
jmp 0x2f681d
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2f6720
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x2f6bc3
movl -0xc8(%rbp), %eax
movl %eax, -0xcc(%rbp)
movq -0x58(%rbp), %rax
movl %eax, -0xd0(%rbp)
movl -0xc4(%rbp), %eax
addl $0x1, %eax
cltq
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x2f690c
movq -0x138(%rbp), %rdi
imulq $0x18, -0x68(%rbp), %rax
addq %rax, %rdi
movq -0x60(%rbp), %rax
subq -0x68(%rbp), %rax
movl %eax, %esi
movq -0x58(%rbp), %rax
subq -0x68(%rbp), %rax
movl %eax, %edx
movl -0xb4(%rbp), %ecx
movl -0xcc(%rbp), %r8d
leaq -0xc0(%rbp), %r9
leaq -0xc4(%rbp), %r10
leaq -0x170(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2f5020
movl %eax, -0xc8(%rbp)
movl -0xc8(%rbp), %eax
cmpl -0xcc(%rbp), %eax
jle 0x2f68ec
movl -0xc8(%rbp), %eax
movl %eax, -0xcc(%rbp)
movq -0x58(%rbp), %rax
movl %eax, -0xd0(%rbp)
movslq -0xc4(%rbp), %rax
addq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2f6861
jmp 0x2f690e
movq -0x188(%rbp), %rax
cmpq -0x180(%rbp), %rax
jne 0x2f6972
cmpq $0x0, -0x180(%rbp)
je 0x2f693b
movq -0x180(%rbp), %rax
shlq %rax
movq %rax, -0x250(%rbp)
jmp 0x2f6949
movl $0x2, %eax
movq %rax, -0x250(%rbp)
jmp 0x2f6949
movq -0x250(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x178(%rbp), %rdi
imulq $0x18, -0x180(%rbp), %rsi
callq 0x2360
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movq -0x188(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x188(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
movslq -0xcc(%rbp), %rcx
movq -0x150(%rbp), %rax
movq %rcx, (%rax)
movq -0x138(%rbp), %rax
imulq $0x18, -0x68(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x150(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x138(%rbp), %rax
imulq $0x18, -0x68(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, %eax
movq %rax, -0x78(%rbp)
movq -0x138(%rbp), %rax
imulq $0x18, -0x68(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movq %rax, -0x80(%rbp)
movq -0x108(%rbp), %rdi
callq 0x2f6e80
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0x110(%rbp), %rax
movw 0x10(%rax), %cx
andw $0xbfff, %cx            # imm = 0xBFFF
orw $0x0, %cx
movw %cx, 0x10(%rax)
movq -0x110(%rbp), %rax
movb $0x0, 0x12(%rax)
movq -0x110(%rbp), %rax
movw 0x10(%rax), %cx
andw $0x7fff, %cx            # imm = 0x7FFF
orw $0x0, %cx
movw %cx, 0x10(%rax)
movq -0x110(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x80000000, %ecx       # imm = 0x80000000
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x110(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x80(%rbp), %rcx
shlq $0x20, %rcx
movq -0x110(%rbp), %rax
movq %rcx, (%rax)
movq -0x108(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x80(%rbp), %rcx
shrq %rcx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %ecx
movq -0x110(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x138(%rbp), %rax
imulq $0x18, -0x68(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
xorq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x138(%rbp), %rax
imulq $0x18, -0x68(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
xorl $0x1, %eax
movl %eax, %eax
movq %rax, -0x80(%rbp)
movq -0x108(%rbp), %rdi
callq 0x2f6e80
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0x110(%rbp), %rax
movw 0x10(%rax), %cx
andw $0xbfff, %cx            # imm = 0xBFFF
orw $0x0, %cx
movw %cx, 0x10(%rax)
movq -0x110(%rbp), %rax
movb $0x0, 0x12(%rax)
movq -0x110(%rbp), %rax
movw 0x10(%rax), %cx
andw $0x7fff, %cx            # imm = 0x7FFF
orw $0x0, %cx
movw %cx, 0x10(%rax)
movq -0x110(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x80000000, %ecx       # imm = 0x80000000
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x110(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x80(%rbp), %rcx
shlq $0x20, %rcx
movq -0x110(%rbp), %rax
movq %rcx, (%rax)
movq -0x108(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x80(%rbp), %rcx
shrq %rcx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %ecx
movq -0x110(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x2f6bc5
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x2f6bcf
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2f6587
movq -0x108(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x4(%rax)
movq -0x108(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x108(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x108(%rbp), %rdi
callq 0xcdd10
movq -0x108(%rbp), %rdi
callq 0x2f53c0
movq 0xcd3ac(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movl -0xbc(%rbp), %ecx
leaq 0x9e60c(%rip), %rsi     # 0x395250
leaq 0x9e61e(%rip), %rdx     # 0x395269
movb $0x0, %al
callq 0x22a0
movq -0x178(%rbp), %rdi
movq -0x178(%rbp), %rsi
imulq $0x18, -0x188(%rbp), %rax
addq %rax, %rsi
callq 0x27fda0
movq -0x188(%rbp), %rax
subl $0x1, %eax
movl %eax, -0xd0(%rbp)
cmpl $0x0, -0xd0(%rbp)
jl 0x2f6e38
movq -0x178(%rbp), %rax
movslq -0xd0(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
movq 0xcd330(%rip), %rax     # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x280(%rbp)
movq -0x150(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x21, %rax
addq $0x1, %rax
movl %eax, -0x278(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq $0x21, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x8e602(%rip), %rax     # 0x385303
movsbl (%rax,%rcx), %eax
movl %eax, -0x274(%rbp)
movq -0x150(%rbp), %rax
movq 0x8(%rax), %rax
shrl %eax
addl $0x1, %eax
movl %eax, -0x270(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x8e5b4(%rip), %rax     # 0x385303
movsbl (%rax,%rcx), %eax
movl %eax, -0x26c(%rbp)
movq -0x150(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x268(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rcx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x251(%rbp)
jne 0x2f6dcf
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq $0x20, %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x0, %eax
sete %al
movb %al, -0x251(%rbp)
movq -0x260(%rbp), %r10
movq -0x268(%rbp), %r11
movl -0x26c(%rbp), %r9d
movl -0x270(%rbp), %r8d
movl -0x274(%rbp), %ecx
movl -0x278(%rbp), %edx
movq -0x280(%rbp), %rdi
movb -0x251(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
leaq 0x9e462(%rip), %rsi     # 0x395272
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x22a0
movl -0xd0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xd0(%rbp)
jmp 0x2f6c80
movq -0x118(%rbp), %rdi
callq 0x2210
movq -0x138(%rbp), %rdi
callq 0x2210
movq -0x160(%rbp), %rdi
callq 0x2210
movq -0x178(%rbp), %rdi
callq 0x2210
movq -0x108(%rbp), %rdi
callq 0xcd170
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbx
popq %r14
popq %rbp
retq