// File: chhylp123[P]hifiasm/inter.cpp
// Function: flat_contain_adv(overlap_region_alloc*, All_reads*, ul_idx_t const*, ug_opt_t const*, long, double, long, long, long, long, bit_extz_t*, long, char*, UC_Read*, double, kv_rtrace_t*, ul_ov_t*, long, int*, int*, int*, int*, int*, long*, long*, ul_ov_t*, unsigned long*, unsigned long, long*, ul_ov_t*)
int64_t flat_contain_adv(overlap_region_alloc* ol, All_reads *ridx, const ul_idx_t *uref, 
const ug_opt_t *uopt, int64_t bw, double diff_ec_ul, int64_t qlen, int64_t max_skip, int64_t max_iter, 
int64_t max_dis, bit_extz_t *exz, int64_t trans_sc, char* qstr, UC_Read *tu, double e_rate, 
kv_rtrace_t *trace, ul_ov_t *a, int64_t a_n, int32_t *f0, int32_t *c_n0, int32_t *c_sc0, 
int32_t *rch0, int32_t *ssc0, int64_t *p0, int64_t *t0, ul_ov_t *ori_a, uint64_t *flag, 
uint64_t rechain_w, int64_t *vis, ul_ov_t *idx)
{
	if(a_n <= 0) return 0;
	int32_t *t = f0, *c_n = c_n0; int64_t *p = p0, *f = t0, rech = 0, nf = 0, ori_i, ori_j, ncl; uint64_t qs;
	int64_t mm_ovlp, x, i, j, st, max_ii, mm_sc, mm_n, mm_idx, n_skip, end_j, qo, sc, sn, is_c, cl, csc, cl1; 
	uint32_t li_v, lj_v; ul_ov_t *li, *lj; int64_t max, max_n, tot_sc = INT32_MIN, tot_n = INT32_MIN, tot_i = -1;
	for (i = 1, j = 0; i <= a_n; i++) {
		if (i == a_n || a[i].qe != a[j].qe) {
			if(i - j > 1) radix_sort_ul_ov_srt_qs(a+j, a+i);
			j = i;
		}
	}
	// fprintf(stderr, "\n[M::%s::] sc::%u\n", __func__, idx->qn);
	memset(t, 0, (a_n*sizeof((*t)))); 
	for (i = st = 0, max_ii = -1; i < a_n; ++i) {
        li = &(a[i]); li_v = (li->tn<<1)|li->rev; 
		flag[i] = li->sec; li->sec = ori_a[li->sec>>1].sec; 
		
		csc = ((li->el)?(li->qe-li->qs):(0));
		mm_sc = csc; mm_n = 1; mm_idx = -1; n_skip = 0; end_j = -1; 
		if(flag[i]&1) {//low prority
			rech++; f[i] = INT32_MIN; p[i] = mm_idx; c_n[i] = 0; continue;
		}
		// fprintf(stderr, "[i::%ld] (id::%u)\n", i, li->tn);
		// fprintf(stderr, "[i::%ld] (id::%u)%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\n", i, li->tn,
        //             (int)Get_NAME_LENGTH(R_INF, a[i].tn), Get_NAME(R_INF, a[i].tn), 
		// 			"+-"[a[i].rev], a[i].qs, a[i].qe, a[i].ts, a[i].te, !a[i].el);
		mm_ovlp = max_ovlp_src(uopt, li_v^1);        
		x = (li->qs + mm_ovlp)*diff_ec_ul; 
		if(x < bw) x = bw; 
		x += li->qs + mm_ovlp;
		if (x > qlen+1) x = qlen+1;
		x = find_ul_ov_max(i, a, x+G_CHAIN_INDEL); 
		
		if ((x-st) > max_iter) st = x-max_iter;
		for (j = x; j >= st; --j) { // collect potential destination vertices
			lj = &(a[j]); lj_v = (lj->tn<<1)|lj->rev;
			if(flag[j]&1) continue;//low prority
			if(lj->qe <= li->qs) break;//even this pair has a overlap, its length will be very small; just ignore
			// if(lj->qs >= li->qs) continue;///no contain
			if(lj->qs > li->qs) continue;///no contain, must be > instad of >=
			qo = infer_rovlp(li, lj, NULL, NULL, ridx, NULL); ///overlap length in query (UL read)
			if(li_v != lj_v && get_ecov_contain_adv(uref, uopt, li_v^1, lj_v^1, bw, diff_ec_ul, qo, &is_c)) {
				if(is_c == 0) {
					sc = f[j] + csc; sn = c_n[j] + 1;
					// if(li->tn == 6312) {
					// 	fprintf(stderr, "***[i::%ld] (id::%u)%.*s\t%c\tj::%ld\t%.*s\tsc::%ld\tsn::%ld\n", i, li->tn,
					// 		(int)Get_NAME_LENGTH(R_INF, a[i].tn), Get_NAME(R_INF, a[i].tn), 
					// 		"+-"[a[i].rev], j, (int)Get_NAME_LENGTH(R_INF, a[j].tn), Get_NAME(R_INF, a[j].tn),
					// 		sc, sn);
					// }
					if((sc > mm_sc) || ((sc == mm_sc) && (sn > mm_n))) {
						mm_sc = sc, mm_idx = j; mm_n = sn;
						if (n_skip > 0) --n_skip;
					} else if (t[j] == i) {
						if (++n_skip > max_skip)
							break;
					}
					if (p[j] >= 0) t[p[j]] = i;
				}
			}
		}

		end_j = j;
		if (max_ii < 0 || ((a[i].qe) > (a[max_ii].qe+max_dis))) {//too long
			max = INT32_MIN; max_n = INT32_MIN; max_ii = -1;
			for (j = i - 1; (j >= st) && (a[i].qe<=(max_dis+a[j].qe)); --j) {
				if ((max < f[j]) || ((max == f[j]) && (max_n < c_n[j]))) {
					max = f[j]; max_n = c_n[j]; max_ii = j;
				}
			}
		}
		
		if (max_ii >= 0 && max_ii < end_j) {///just have a try with a[i]<->a[max_ii]
			lj = &(a[max_ii]); lj_v = (lj->tn<<1)|lj->rev;
			if((lj->qe > li->qs) && (lj->qs <= li->qs) && (!(flag[max_ii]&1))) {
				qo = infer_rovlp(li, lj, NULL, NULL, ridx, NULL); ///overlap length in query (UL read)
				if(li_v != lj_v && get_ecov_contain_adv(uref, uopt, li_v^1, lj_v^1, bw, diff_ec_ul, qo, &is_c)) {
					if(is_c == 0) {
						sc = f[max_ii] + csc; sn = c_n[max_ii] + 1;
						if((sc > mm_sc) || ((sc == mm_sc) && (sn > mm_n))) {
							mm_sc = sc; mm_idx = max_ii; mm_n = sn;
						}
					}
				}
			}
		}

		f[i] = mm_sc; p[i] = mm_idx; c_n[i] = mm_n; 
		if ((max_ii < 0) || ((a[i].qe<=max_dis+a[max_ii].qe) && (f[max_ii]<f[i]))) {
			max_ii = i;
		}

		if((tot_sc < f[i]) || ((tot_sc == f[i]) && (tot_n < c_n[i]))) {
			tot_sc = f[i]; tot_n = c_n[i]; tot_i = i;
		}
	}
	// fprintf(stderr, "+++[i::%ld] (id::%u)\n", i, li->tn);
	cl = 0; i = tot_i; t = NULL;
	while (i >= 0) {
        flag[cl] |= (((uint64_t)i)<<32); 
		i = p[i]; cl++;
    }
	// fprintf(stderr, "+++[i::%ld] (cl::%ld)\n", i, cl);

	st = flag[cl-1]>>32; qs = a[st].qs; cl1 = 0;
	// fprintf(stderr, "[M::%s] qs::%lu\trechain_w::%lu\trech::%ld\tcl::%ld\n", 
	// 	__func__, qs, rechain_w, rech, cl);
	if((qs <= rechain_w) && (rech > 0)) {
		for (i = nf = 0; i < cl; i++) {
			st = flag[cl-i-1]>>32;
			if(a[st].el) break;
			if((a[st].ts == 0) && (a[st].te == Get_READ_LENGTH(R_INF, a[st].tn))) nf++;
		}
		if(i < cl && a[st].qs > qs && nf > 0) {
			
			cl1 = quick_rechain(ol, a, st+1, trace, uref, uopt, bw, diff_ec_ul, qlen, max_skip, max_iter, max_dis, 
			exz, trans_sc, ridx, qstr, tu, e_rate, f0, c_n0, c_sc0, rch0, p0, t0);
			// fprintf(stderr, "st::%ld\tcl1::%ld[M::%s]\t(id::%u)\t%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\n", 
			// st, cl1, __func__, a[st].tn, (int)Get_NAME_LENGTH(R_INF, a[st].tn), Get_NAME(R_INF, a[st].tn), 
			// 		"+-"[a[st].rev], a[st].qs, a[st].qe, a[st].ts, a[st].te, !a[st].el);
			
			// fprintf(stderr, "i::%ld\t[M::%s]\t(id::%u)\t%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\n", 
			// i, __func__, a[t0[cl1-1]].tn, (int)Get_NAME_LENGTH(R_INF, a[t0[cl1-1]].tn), 
			// 		Get_NAME(R_INF, a[t0[cl1-1]].tn), "+-"[a[t0[cl1-1]].rev], a[t0[cl1-1]].qs, a[t0[cl1-1]].qe, 
			// 		a[t0[cl1-1]].ts, a[t0[cl1-1]].te, !a[t0[cl1-1]].el);

			if(cl1 > 0 && a[t0[cl1-1]].qs <= qs) {
				cl = cl-i-1; assert(st == t0[0]);
				for (i = 0; i < cl1; i++) {
					flag[cl] <<= 32; flag[cl] >>= 32; 
					flag[cl] |= ((uint64_t)t0[i])<<32; cl++;
				}
			}
		}
	}
	// fprintf(stderr, "---[i::%ld] (cl::%ld)\n", i, cl);
	for (i = 0; i < cl; i++) {
		// fprintf(stderr, "[i::%ld] flag[cl-i-1]>>32::%lu\n", i, flag[cl-i-1]>>32);
		t0[i] = flag[cl-i-1]>>32; 
		vis[((uint32_t)flag[t0[i]])>>1] |= 1;///set as used 
		// fprintf(stderr, "[i::%ld]\t%.*s\traw_i::%u\n", i, 
		// (int)Get_NAME_LENGTH(R_INF, a[t0[i]].tn), Get_NAME(R_INF, a[t0[i]].tn), ((uint32_t)flag[t0[i]])>>1);
		// flag[cl-i-1] = (uint32_t)flag[cl-i-1];
	}

	i = 0; ncl = 0;
	if(cl1 > 1) {
		// for (i = 0; i < cl; i++) vis[((uint32_t)flag[t0[i]])>>1] |= 1;///set as used 
		for (i = 0; i < cl1; i++) {
			if(flag[t0[i]]&1) flag[t0[i]]-=1; 
			vis[((uint32_t)flag[t0[i]])>>1] |= 1;
			c_n[ncl++] = ((uint32_t)flag[t0[i]])>>1;

			// a[ncl] = a[t0[i]];
			// if(a[ncl].qs < idx->qs) idx->qs = a[ncl].qs;
			// if(a[ncl].qe > idx->qe) idx->qe = a[ncl].qe;
			// fprintf(stderr, "[ncl::%ld]\t%.*s\n", ncl, 
			// (int)Get_NAME_LENGTH(R_INF, a[ncl].tn), Get_NAME(R_INF, a[ncl].tn));
			// ncl++;

			if(i < cl1 - 1) {
				ori_i = ((uint32_t)flag[t0[i]])>>1; 
				ori_j = ((uint32_t)flag[t0[i+1]])>>1; 
				ncl += push_trans_aln(uref, uopt, bw, diff_ec_ul, ridx, ori_a, ori_i, ori_j, vis, c_n+ncl);
			}
		}
	}


	for (; i < cl; i++) {
		///t0[i] -> idx of a; (uint32_t)flag[t0[i]] -> idx of ori_a
		if(flag[t0[i]]&1) flag[t0[i]]-=1;
		vis[((uint32_t)flag[t0[i]])>>1] |= 1;
		c_n[ncl++] = ((uint32_t)flag[t0[i]])>>1;
		// a[ncl] = a[t0[i]];
		// if(a[ncl].qs < idx->qs) idx->qs = a[ncl].qs;
		// if(a[ncl].qe > idx->qe) idx->qe = a[ncl].qe;
		// fprintf(stderr, "[ncl::%ld]\t%.*s\n", ncl, 
		// 	(int)Get_NAME_LENGTH(R_INF, a[ncl].tn), Get_NAME(R_INF, a[ncl].tn));
		// ncl++;
		// fprintf(stderr, "[M::%s] (id::%u)%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\n", 
		// __func__, a[i].tn, (int)Get_NAME_LENGTH(R_INF, a[i].tn), Get_NAME(R_INF, a[i].tn), 
		// 			"+-"[a[i].rev], a[i].qs, a[i].qe, a[i].ts, a[i].te, !a[i].el);
	}
	assert(ncl >= cl);
	if(ncl <= 0) return ncl;

	idx->qs = ori_a[c_n[0]].qs; 
	idx->qe = ori_a[c_n[0]].qe;
	for (i = 0; i < ncl; i++) {
		a[i] = ori_a[c_n[i]];
		if(a[i].qs < idx->qs) idx->qs = a[i].qs;
		if(a[i].qe > idx->qe) idx->qe = a[i].qe;
	}
	return ncl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq 0xb8(%rbp), %rax
movq 0xb0(%rbp), %rax
movq 0xa8(%rbp), %rax
movq 0xa0(%rbp), %rax
movq 0x98(%rbp), %rax
movq 0x90(%rbp), %rax
movq 0x88(%rbp), %rax
movq 0x80(%rbp), %rax
movq 0x78(%rbp), %rax
movq 0x70(%rbp), %rax
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)
movsd %xmm0, -0x60(%rbp)
movq %r9, -0x68(%rbp)
movsd %xmm1, -0x70(%rbp)
cmpq $0x0, 0x58(%rbp)
jg 0x2b3dfa
movq $0x0, -0x30(%rbp)
jmp 0x2b5291
movq 0x60(%rbp), %rax
movq %rax, -0x78(%rbp)
movq 0x68(%rbp), %rax
movq %rax, -0x80(%rbp)
movq 0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movq $-0x80000000, -0x180(%rbp) # imm = 0x80000000
movq $-0x80000000, -0x188(%rbp) # imm = 0x80000000
movq $-0x1, -0x190(%rbp)
movq $0x1, -0xd8(%rbp)
movq $0x0, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
cmpq 0x58(%rbp), %rax
jg 0x2b3f15
movq -0xd8(%rbp), %rax
cmpq 0x58(%rbp), %rax
je 0x2b3eb7
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x50(%rbp), %rcx
imulq $0x1c, -0xe0(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
je 0x2b3efc
movq -0xd8(%rbp), %rax
subq -0xe0(%rbp), %rax
cmpq $0x1, %rax
jle 0x2b3eee
movq 0x50(%rbp), %rdi
imulq $0x1c, -0xe0(%rbp), %rax
addq %rax, %rdi
movq 0x50(%rbp), %rsi
imulq $0x1c, -0xd8(%rbp), %rax
addq %rax, %rsi
callq 0x27b890
movq -0xd8(%rbp), %rax
movq %rax, -0xe0(%rbp)
jmp 0x2b3efe
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x2b3e73
movq -0x78(%rbp), %rdi
movq 0x58(%rbp), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x2100
movq $0x0, -0xe8(%rbp)
movq $0x0, -0xd8(%rbp)
movq $-0x1, -0xf0(%rbp)
movq -0xd8(%rbp), %rax
cmpq 0x58(%rbp), %rax
jge 0x2b490f
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movl 0xc(%rax), %eax
shll %eax
movq -0x160(%rbp), %rcx
movl 0x18(%rcx), %ecx
shrl $0x1f, %ecx
orl %ecx, %eax
movl %eax, -0x154(%rbp)
movq -0x160(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq 0xa0(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x98(%rbp), %rax
movq -0x160(%rbp), %rcx
movl 0x18(%rcx), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
sarl %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
movq -0x160(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x160(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2b402e
movq -0x160(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x160(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x194(%rbp)
jmp 0x2b4038
xorl %eax, %eax
movl %eax, -0x194(%rbp)
jmp 0x2b4038
movl -0x194(%rbp), %eax
movl %eax, %eax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq $0x1, -0x100(%rbp)
movq $-0x1, -0x108(%rbp)
movq $0x0, -0x110(%rbp)
movq $-0x1, -0x118(%rbp)
movq 0xa0(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2b40f5
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq $-0x80000000, (%rax,%rcx,8) # imm = 0x80000000
movq -0x108(%rbp), %rdx
movq -0x88(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x80(%rbp), %rax
movq -0xd8(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0x2b48f8
movq -0x50(%rbp), %rdi
movl -0x154(%rbp), %esi
xorl $0x1, %esi
callq 0x287de0
movq %rax, -0xc8(%rbp)
movq -0x160(%rbp), %rax
movl 0x4(%rax), %eax
addq -0xc8(%rbp), %rax
cvtsi2sd %rax, %xmm0
mulsd -0x60(%rbp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
cmpq -0x58(%rbp), %rax
jge 0x2b414d
movq -0x58(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x160(%rbp), %rax
movl 0x4(%rax), %eax
addq -0xc8(%rbp), %rax
addq -0xd0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq -0x68(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jle 0x2b418f
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
movq -0xd8(%rbp), %rax
movl %eax, %edi
movq 0x50(%rbp), %rsi
movq -0xd0(%rbp), %rax
addq $0x80, %rax
movl %eax, %edx
callq 0x28cf00
cltq
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
subq -0xe8(%rbp), %rax
cmpq 0x18(%rbp), %rax
jle 0x2b41df
movq -0xd0(%rbp), %rax
subq 0x18(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
cmpq -0xe8(%rbp), %rax
jl 0x2b4458
movq 0x50(%rbp), %rax
imulq $0x1c, -0xe0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
movl 0xc(%rax), %eax
shll %eax
movq -0x168(%rbp), %rcx
movl 0x18(%rcx), %ecx
shrl $0x1f, %ecx
orl %ecx, %eax
movl %eax, -0x158(%rbp)
movq 0xa0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2b4259
jmp 0x2b4441
movq -0x168(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x160(%rbp), %rcx
cmpl 0x4(%rcx), %eax
ja 0x2b4274
jmp 0x2b4458
movq -0x168(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x160(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x2b428f
jmp 0x2b4441
movq -0x160(%rbp), %rdi
movq -0x168(%rbp), %rsi
movq -0x40(%rbp), %r8
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rdx
movq %r9, %rcx
callq 0x71a90
movq %rax, -0x120(%rbp)
movl -0x154(%rbp), %eax
cmpl -0x158(%rbp), %eax
je 0x2b443f
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x154(%rbp), %edx
xorl $0x1, %edx
movl -0x158(%rbp), %ecx
xorl $0x1, %ecx
movq -0x58(%rbp), %r8
movsd -0x60(%rbp), %xmm0
movq -0x120(%rbp), %r9
leaq -0x138(%rbp), %rax
movq %rax, (%rsp)
callq 0x2b0c90
cmpq $0x0, %rax
je 0x2b443f
cmpq $0x0, -0x138(%rbp)
jne 0x2b443d
movq -0x90(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq -0x148(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x80(%rbp), %rax
movq -0xe0(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl $0x1, %eax
cltq
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jg 0x2b4386
movq -0x128(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jne 0x2b43ce
movq -0x130(%rbp), %rax
cmpq -0x100(%rbp), %rax
jle 0x2b43ce
movq -0x128(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x100(%rbp)
cmpq $0x0, -0x110(%rbp)
jle 0x2b43cc
movq -0x110(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x110(%rbp)
jmp 0x2b4404
movq -0x78(%rbp), %rax
movq -0xe0(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
cmpq -0xd8(%rbp), %rax
jne 0x2b4402
movq -0x110(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x110(%rbp)
cmpq 0x10(%rbp), %rax
jle 0x2b4400
jmp 0x2b4458
jmp 0x2b4402
jmp 0x2b4404
movq -0x88(%rbp), %rax
movq -0xe0(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x2b443b
movq -0xd8(%rbp), %rax
movl %eax, %edx
movq -0x78(%rbp), %rax
movq -0x88(%rbp), %rcx
movq -0xe0(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x2b443d
jmp 0x2b443f
jmp 0x2b4441
movq -0xe0(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xe0(%rbp)
jmp 0x2b41ed
movq -0xe0(%rbp), %rax
movq %rax, -0x118(%rbp)
cmpq $0x0, -0xf0(%rbp)
jl 0x2b44a1
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x50(%rbp), %rcx
imulq $0x1c, -0xf0(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addq 0x20(%rbp), %rcx
cmpq %rcx, %rax
jle 0x2b45db
movq $-0x80000000, -0x170(%rbp) # imm = 0x80000000
movq $-0x80000000, -0x178(%rbp) # imm = 0x80000000
movq $-0x1, -0xf0(%rbp)
movq -0xd8(%rbp), %rax
subq $0x1, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rcx
xorl %eax, %eax
cmpq -0xe8(%rbp), %rcx
movb %al, -0x195(%rbp)
jl 0x2b4523
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x20(%rbp), %rcx
movq 0x50(%rbp), %rdx
imulq $0x1c, -0xe0(%rbp), %rsi
addq %rsi, %rdx
movl 0x8(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
setle %al
movb %al, -0x195(%rbp)
movb -0x195(%rbp), %al
testb $0x1, %al
jne 0x2b4532
jmp 0x2b45d9
movq -0x170(%rbp), %rax
movq -0x90(%rbp), %rcx
movq -0xe0(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jl 0x2b4583
movq -0x170(%rbp), %rax
movq -0x90(%rbp), %rcx
movq -0xe0(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0x2b45c0
movq -0x178(%rbp), %rax
movq -0x80(%rbp), %rcx
movq -0xe0(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
cmpq %rcx, %rax
jge 0x2b45c0
movq -0x90(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x170(%rbp)
movq -0x80(%rbp), %rax
movq -0xe0(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
movq %rax, -0x178(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x2b45c2
movq -0xe0(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xe0(%rbp)
jmp 0x2b44d4
jmp 0x2b45db
cmpq $0x0, -0xf0(%rbp)
jl 0x2b47b1
movq -0xf0(%rbp), %rax
cmpq -0x118(%rbp), %rax
jge 0x2b47b1
movq 0x50(%rbp), %rax
imulq $0x1c, -0xf0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
movl 0xc(%rax), %eax
shll %eax
movq -0x168(%rbp), %rcx
movl 0x18(%rcx), %ecx
shrl $0x1f, %ecx
orl %ecx, %eax
movl %eax, -0x158(%rbp)
movq -0x168(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x160(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x2b47af
movq -0x168(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x160(%rbp), %rcx
cmpl 0x4(%rcx), %eax
ja 0x2b47af
movq 0xa0(%rbp), %rax
movq -0xf0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0x2b47af
movq -0x160(%rbp), %rdi
movq -0x168(%rbp), %rsi
movq -0x40(%rbp), %r8
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rdx
movq %r9, %rcx
callq 0x71a90
movq %rax, -0x120(%rbp)
movl -0x154(%rbp), %eax
cmpl -0x158(%rbp), %eax
je 0x2b47ad
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x154(%rbp), %edx
xorl $0x1, %edx
movl -0x158(%rbp), %ecx
xorl $0x1, %ecx
movq -0x58(%rbp), %r8
movsd -0x60(%rbp), %xmm0
movq -0x120(%rbp), %r9
leaq -0x138(%rbp), %rax
movq %rax, (%rsp)
callq 0x2b0c90
cmpq $0x0, %rax
je 0x2b47ad
cmpq $0x0, -0x138(%rbp)
jne 0x2b47ab
movq -0x90(%rbp), %rax
movq -0xf0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq -0x148(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x80(%rbp), %rax
movq -0xf0(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl $0x1, %eax
cltq
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jg 0x2b477f
movq -0x128(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jne 0x2b47a9
movq -0x130(%rbp), %rax
cmpq -0x100(%rbp), %rax
jle 0x2b47a9
movq -0x128(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x100(%rbp)
jmp 0x2b47ab
jmp 0x2b47ad
jmp 0x2b47af
jmp 0x2b47b1
movq -0xf8(%rbp), %rdx
movq -0x90(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x108(%rbp), %rdx
movq -0x88(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x100(%rbp), %rax
movl %eax, %edx
movq -0x80(%rbp), %rax
movq -0xd8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
cmpq $0x0, -0xf0(%rbp)
jl 0x2b485a
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x20(%rbp), %rcx
movq 0x50(%rbp), %rdx
imulq $0x1c, -0xf0(%rbp), %rsi
addq %rsi, %rdx
movl 0x8(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jg 0x2b4868
movq -0x90(%rbp), %rax
movq -0xf0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jge 0x2b4868
movq -0xd8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x180(%rbp), %rax
movq -0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jl 0x2b48b9
movq -0x180(%rbp), %rax
movq -0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0x2b48f6
movq -0x188(%rbp), %rax
movq -0x80(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
cmpq %rcx, %rax
jge 0x2b48f6
movq -0x90(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x180(%rbp)
movq -0x80(%rbp), %rax
movq -0xd8(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
movq %rax, -0x188(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x190(%rbp)
jmp 0x2b48f8
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x2b3f49
movq $0x0, -0x140(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq $0x0, -0x78(%rbp)
cmpq $0x0, -0xd8(%rbp)
jl 0x2b4988
movq -0xd8(%rbp), %rdx
shlq $0x20, %rdx
movq 0xa0(%rbp), %rax
movq -0x140(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x88(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xd8(%rbp)
movq -0x140(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x140(%rbp)
jmp 0x2b4930
movq 0xa0(%rbp), %rax
movq -0x140(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0xe8(%rbp)
movq 0x50(%rbp), %rax
imulq $0x1c, -0xe8(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0xc0(%rbp)
movq $0x0, -0x150(%rbp)
movq -0xc0(%rbp), %rax
cmpq 0xa8(%rbp), %rax
ja 0x2b4d95
cmpq $0x0, -0x98(%rbp)
jle 0x2b4d95
movq $0x0, -0xa0(%rbp)
movq $0x0, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0x140(%rbp), %rax
jge 0x2b4ad5
movq 0xa0(%rbp), %rax
movq -0x140(%rbp), %rcx
subq -0xd8(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0xe8(%rbp)
movq 0x50(%rbp), %rax
imulq $0x1c, -0xe8(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2b4a60
jmp 0x2b4ad5
movq 0x50(%rbp), %rax
imulq $0x1c, -0xe8(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, 0x10(%rax)
jne 0x2b4abc
movq 0x50(%rbp), %rax
imulq $0x1c, -0xe8(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
leaq 0x110842(%rip), %rcx    # 0x3c52d0
movq 0x18(%rcx), %rcx
movq 0x50(%rbp), %rdx
imulq $0x1c, -0xe8(%rbp), %rsi
addq %rsi, %rdx
movl 0xc(%rdx), %edx
cmpq (%rcx,%rdx,8), %rax
jne 0x2b4abc
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x2b4abe
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x2b4a05
movq -0xd8(%rbp), %rax
cmpq -0x140(%rbp), %rax
jge 0x2b4d93
movq 0x50(%rbp), %rax
imulq $0x1c, -0xe8(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpq -0xc0(%rbp), %rax
jbe 0x2b4d93
cmpq $0x0, -0xa0(%rbp)
jle 0x2b4d93
movq -0x38(%rbp), %rdi
movq 0x50(%rbp), %rsi
movq -0xe8(%rbp), %rdx
addq $0x1, %rdx
movq 0x48(%rbp), %rcx
movq -0x48(%rbp), %r8
movq -0x50(%rbp), %r9
movq -0x58(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movsd -0x60(%rbp), %xmm0
movq -0x68(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq 0x20(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq 0x28(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq 0x30(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq 0x38(%rbp), %r13
movq 0x40(%rbp), %r12
movsd -0x70(%rbp), %xmm1
movq 0x60(%rbp), %r15
movq 0x68(%rbp), %r14
movq 0x70(%rbp), %rbx
movq 0x78(%rbp), %r11
movq 0x88(%rbp), %r10
movq 0x90(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x1e0(%rbp), %rax
movq %rax, (%rsp)
movq -0x1d8(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x1d0(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x1c8(%rbp), %rax
movq %rax, 0x18(%rsp)
movq -0x1c0(%rbp), %rax
movq %rax, 0x20(%rsp)
movq -0x1b8(%rbp), %rax
movq %rax, 0x28(%rsp)
movq -0x1b0(%rbp), %rax
movq %rax, 0x30(%rsp)
movq -0x1a8(%rbp), %rax
movq %rax, 0x38(%rsp)
movq -0x1a0(%rbp), %rax
movq %r13, 0x40(%rsp)
movq %r12, 0x48(%rsp)
movq %r15, 0x50(%rsp)
movq %r14, 0x58(%rsp)
movq %rbx, 0x60(%rsp)
movq %r11, 0x68(%rsp)
movq %r10, 0x70(%rsp)
movq %rax, 0x78(%rsp)
callq 0x2b3010
movq %rax, -0x150(%rbp)
cmpq $0x0, -0x150(%rbp)
jle 0x2b4d91
movq 0x50(%rbp), %rax
movq 0x90(%rbp), %rcx
movq -0x150(%rbp), %rdx
subq $0x1, %rdx
imulq $0x1c, (%rcx,%rdx,8), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpq -0xc0(%rbp), %rax
ja 0x2b4d91
movq -0x140(%rbp), %rax
subq -0xd8(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x140(%rbp)
movq -0xe8(%rbp), %rax
movq 0x90(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x2b4cc8
jmp 0x2b4ce7
leaq 0xdd7fd(%rip), %rdi     # 0x3924cc
leaq 0xdbb59(%rip), %rsi     # 0x39082f
movl $0x206f, %edx           # imm = 0x206F
leaq 0xdd7f6(%rip), %rcx     # 0x3924d8
callq 0x2130
movq $0x0, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0x150(%rbp), %rax
jge 0x2b4d8f
movq 0xa0(%rbp), %rax
movq -0x140(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0xa0(%rbp), %rax
movq -0x140(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shrq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x90(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq 0xa0(%rbp), %rax
movq -0x140(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x140(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x140(%rbp)
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x2b4cf2
jmp 0x2b4d91
jmp 0x2b4d93
jmp 0x2b4d95
movq $0x0, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0x140(%rbp), %rax
jge 0x2b4e2e
movq 0xa0(%rbp), %rax
movq -0x140(%rbp), %rcx
subq -0xd8(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
shrq $0x20, %rdx
movq 0x90(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0xb0(%rbp), %rax
movq 0xa0(%rbp), %rcx
movq 0x90(%rbp), %rdx
movq -0xd8(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
shrl %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
orq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x2b4da0
movq $0x0, -0xd8(%rbp)
movq $0x0, -0xb8(%rbp)
cmpq $0x1, -0x150(%rbp)
jle 0x2b5019
movq $0x0, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0x150(%rbp), %rax
jge 0x2b5017
movq 0xa0(%rbp), %rax
movq 0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2b4ebd
movq 0xa0(%rbp), %rax
movq 0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdx
subq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0xb0(%rbp), %rax
movq 0xa0(%rbp), %rcx
movq 0x90(%rbp), %rdx
movq -0xd8(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
shrl %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
orq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0xa0(%rbp), %rax
movq 0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
shrl %edx
movq -0x80(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xb8(%rbp)
movl %edx, (%rax,%rcx,4)
movq -0xd8(%rbp), %rax
movq -0x150(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jge 0x2b4ffe
movq 0xa0(%rbp), %rax
movq 0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
shrl %eax
movl %eax, %eax
movq %rax, -0xa8(%rbp)
movq 0xa0(%rbp), %rax
movq 0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movq 0x8(%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
shrl %eax
movl %eax, %eax
movq %rax, -0xb0(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movsd -0x60(%rbp), %xmm0
movq -0x40(%rbp), %rcx
movq 0x98(%rbp), %r8
movq -0xa8(%rbp), %r9
movq -0xb0(%rbp), %r11
movq 0xb0(%rbp), %r10
movq -0x80(%rbp), %rax
movq -0xb8(%rbp), %rbx
shlq $0x2, %rbx
addq %rbx, %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x2b3a80
addq -0xb8(%rbp), %rax
movq %rax, -0xb8(%rbp)
jmp 0x2b5000
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x2b4e5d
jmp 0x2b5019
jmp 0x2b501b
movq -0xd8(%rbp), %rax
cmpq -0x140(%rbp), %rax
jge 0x2b5103
movq 0xa0(%rbp), %rax
movq 0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2b507b
movq 0xa0(%rbp), %rax
movq 0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdx
subq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0xb0(%rbp), %rax
movq 0xa0(%rbp), %rcx
movq 0x90(%rbp), %rdx
movq -0xd8(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
shrl %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
orq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0xa0(%rbp), %rax
movq 0x90(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
shrl %edx
movq -0x80(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xb8(%rbp)
movl %edx, (%rax,%rcx,4)
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x2b501b
movq -0xb8(%rbp), %rax
cmpq -0x140(%rbp), %rax
jl 0x2b5115
jmp 0x2b5134
leaq 0xdd52c(%rip), %rdi     # 0x392648
leaq 0xdb70c(%rip), %rsi     # 0x39082f
movl $0x20a8, %edx           # imm = 0x20A8
leaq 0xdd3a9(%rip), %rcx     # 0x3924d8
callq 0x2130
cmpq $0x0, -0xb8(%rbp)
jg 0x2b514e
movq -0xb8(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x2b5291
movq 0x98(%rbp), %rax
movq -0x80(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movq 0xb8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq 0x98(%rbp), %rax
movq -0x80(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq 0xb8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq $0x0, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0xb8(%rbp), %rax
jge 0x2b5286
movq 0x98(%rbp), %rcx
movq -0x80(%rbp), %rax
movq -0xd8(%rbp), %rdx
movslq (%rax,%rdx,4), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rcx
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movl 0x18(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq 0xb8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x2b5233
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movq 0xb8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0xb8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jbe 0x2b526d
movq 0x50(%rbp), %rax
imulq $0x1c, -0xd8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq 0xb8(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x2b526f
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x2b519d
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
nopw (%rax,%rax)