// File: chhylp123[P]hifiasm/inter.cpp
// Function: gl_rchain_lin_contain(overlap_region_alloc*, kv_ul_ov_t*, ul_ov_t*, kv_rtrace_t*, ul_idx_t const*, ug_opt_t const*, long, double, long, long, long, long, Chain_Data*, bit_extz_t*, unsigned long*, long, All_reads*, char*, UC_Read*, long, double, long)
int64_t gl_rchain_lin_contain(overlap_region_alloc* ol, kv_ul_ov_t *res, ul_ov_t *ex, kv_rtrace_t *trace, 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, Chain_Data* dp, bit_extz_t *exz, uint64_t *a,
int64_t trans_sc, All_reads *ridx, char* qstr, UC_Read *tu, int64_t rid, double e_rate, int64_t need_srt)
{
	if(res->n == 0) return 0;
    uint32_t li_v, rev_n, is_fc, cc; int32_t *f, *c_n, *c_sc, *rch, *ssc; int64_t *p, *t, res_n = res->n, st, max_ii, max, max_n; 
    int64_t mm_ovlp, x, i, j, k, sc, csc, mm_sc, mm_idx, mm_n, sn, n_skip, end_j, plus; ul_ov_t *li, *lj, rev_t; rtrace_iter tc;
    resize_Chain_Data(dp, res_n, NULL);
    t = dp->tmp; f = dp->score; p = dp->pre; c_n = dp->occ; 
	c_sc = rch = dp->self_length; ssc = dp->indels;
	if(need_srt) {
        radix_sort_ul_ov_srt_qe(res->a, res->a + res_n);
        for (i = 1, j = 0; i <= res_n; i++) {
			res->a[i-1].qs = ((uint32_t)-1)-res->a[i-1].qs;
            if (i == res_n || res->a[i].qe != res->a[j].qe) {
                if(i - j > 1) radix_sort_ul_ov_srt_qs(res->a+j, res->a+i);
                j = i;
            }
        }
    }

	memset(t, 0, (res_n*sizeof((*t)))); 
	for (i = st = plus = 0, max_ii = -1; i < res_n; ++i) {
        li = &(res->a[i]); li_v = (li->tn<<1)|li->rev; li->qs = ((uint32_t)-1)-li->qs;
		rch[i] = INT32_MAX; ssc[i] = INT32_MIN; a[i] = ((uint64_t)-1); 
        mm_ovlp = max_ovlp_src_contain(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;
		// if(li->tn == 20171 || li->tn == 20209 || li->tn == 20204) {
		// 	fprintf(stderr, "\n[i::%ld] (id::%u)%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\tmax_d::%ld\n", i, li->tn,
        //             (int)Get_NAME_LENGTH(R_INF, res->a[i].tn), Get_NAME(R_INF, res->a[i].tn), 
		// 			"+-"[res->a[i].rev], res->a[i].qs, res->a[i].qe, res->a[i].ts, res->a[i].te,
		// 			!res->a[i].el, x+G_CHAIN_INDEL);
		// }
        x = find_ul_ov_max(i, res->a, x+G_CHAIN_INDEL); 
		// if(li->tn == 20171 || li->tn == 20209 || li->tn == 20204) {
		// 	fprintf(stderr, "[i::%ld] (id::%u)%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\tmax_j::%ld\n", i, li->tn,
        //             (int)Get_NAME_LENGTH(R_INF, res->a[i].tn), Get_NAME(R_INF, res->a[i].tn), 
		// 			"+-"[res->a[i].rev], res->a[i].qs, res->a[i].qe, res->a[i].ts, res->a[i].te,
		// 			!res->a[i].el, x);
		// }
        csc = li->qe - li->qs; csc -= (((int64_t)li->sec)*trans_sc);
        // mm_sc = csc; mm_idx = -1; mm_n = 1;
		mm_sc = INT32_MIN; mm_idx = -1; mm_n = 0; is_fc = 0;
        n_skip = 0; end_j = -1; tc.k = INT32_MAX;
        if ((x-st) > max_iter) st = x-max_iter;
        for (j = x; j >= st; --j) { // collect potential destination vertices
            lj = &(res->a[j]); 
			if(lj->qe <= li->qs) break;//even this pair has a overlap, its length will be very small; just ignore
			sc = connect_detect(res->a, res->n, i, j, ridx, rch, uref, uopt, bw, diff_ec_ul, p, f, &tc,
																trace, qstr, tu, ol, exz, e_rate, trans_sc, &cc);
			if(sc == INT32_MIN) continue;
			sn = c_n[j] + 1;
			// if(li->tn == 6312 || li->tn == 6322 || li->tn == 6317 || li->tn == 6319/** && lj->tn == 6329**/) {
			// 	fprintf(stderr, "(id::%u)%.*s\t%c\t(id::%u)%.*s\t%c\tsc::%ld\tsn::%ld\tc_n[j]::%d\tmsc::%ld\ti::%ld\tj::%ld\tm_idx::%ld\n", 
			// 		li->tn,	(int)Get_NAME_LENGTH(R_INF, li->tn), Get_NAME(R_INF, li->tn), "+-"[li->rev],
			// 		lj->tn,	(int)Get_NAME_LENGTH(R_INF, lj->tn), Get_NAME(R_INF, lj->tn), "+-"[lj->rev], 
			// 		sc, sn, c_n[j], mm_sc, i, j, mm_idx);
			// }
			// if(li->tn == 20209) {
			// 	fprintf(stderr, "[i::%ld] (id::%u)%.*s\t%c\tj::%ld\tsc::%ld\tsn::%ld\n", i, li->tn,
            //         (int)Get_NAME_LENGTH(R_INF, res->a[i].tn), Get_NAME(R_INF, res->a[i].tn), 
			// 		"+-"[res->a[i].rev], j, sc, sn);
			// }
			if((sc > mm_sc) || ((sc == mm_sc) && (sn > mm_n))) {
				mm_sc = sc, mm_idx = j; mm_n = sn; is_fc = cc;
				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 || (res->a[i].qe>(res->a[max_ii].qe+max_dis))) {//too long
            max = INT32_MIN; max_n = INT32_MIN; max_ii = -1;
            for (j = i - 1; (j >= st) && (res->a[i].qe<=(max_dis+res->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 = &(res->a[max_ii]); 
            if(lj->qe > li->qs/** && lj->qs < li->qs**/) {
				///as max_ii < end_j, get_rid_backward_cigar_err still works
				sc = connect_detect(res->a, res->n, i, max_ii, ridx, rch, uref, uopt, bw, diff_ec_ul, p, f, &tc,
																trace, qstr, tu, ol, exz, e_rate, trans_sc, &cc);
				if(sc != INT32_MIN) {
					sn = c_n[max_ii] + 1;
					// if(li->tn == 6312 || li->tn == 6322 || li->tn == 6317 || li->tn == 6319/** && lj->tn == 6329**/) {
					// 	fprintf(stderr, "(id::%u)%.*s\t%c\t(id::%u)%.*s\t%c\tsc::%ld\tsn::%ld\tc_n[j]::%d\tmsc::%ld\ti::%ld\tmax_ii::%ld\tm_idx::%ld\n", 
					// 		li->tn,	(int)Get_NAME_LENGTH(R_INF, li->tn), Get_NAME(R_INF, li->tn), "+-"[li->rev],
					// 		lj->tn,	(int)Get_NAME_LENGTH(R_INF, lj->tn), Get_NAME(R_INF, lj->tn), "+-"[lj->rev], 
					// 		sc, sn, c_n[j], mm_sc, i, max_ii, mm_idx);
					// }
					if((sc > mm_sc) || ((sc == mm_sc) && (sn > mm_n))) {
                        mm_sc = sc; mm_idx = max_ii; mm_n = sn; is_fc = cc;
                    }
				}
            }
        }

		sc = csc; sn = 1;///for i itself
		if((sc > mm_sc) || ((sc == mm_sc) && (sn > mm_n))) {
			mm_sc = sc, mm_idx = -1; mm_n = sn; is_fc = 0;
		}

        if(mm_sc < 0) {
            mm_sc = csc; mm_idx = -1; mm_n = 1;
        }

		// if(li->tn == 6317) {
		// 	fprintf(stderr, "+(id::%u)%.*s\t%c\tmm_idx::%ld\tmm_sc::%ld\tmm_n::%ld\n", 
		// 		li->tn,	(int)Get_NAME_LENGTH(R_INF, li->tn), Get_NAME(R_INF, li->tn), "+-"[li->rev], mm_idx, mm_sc, mm_n);
		// }

		if(mm_idx >= 0) {
			///mo meed to update mm_sc and is_fc
			propagate_transitive_reduction(uref, uopt, ridx, bw, diff_ec_ul, res->a, x+1, i, rch, f, p, c_n, t, &mm_sc, &mm_idx, &mm_n);
		}
		// if(li->tn == 6317) {
		// 	fprintf(stderr, "-(id::%u)%.*s\t%c\tmm_idx::%ld\tmm_sc::%ld\tmm_n::%ld\n", 
		// 		li->tn,	(int)Get_NAME_LENGTH(R_INF, li->tn), Get_NAME(R_INF, li->tn), "+-"[li->rev], mm_idx, mm_sc, mm_n);
		// }
		// collapse_contain(res->a, res_n, i, &mm_idx, &mm_sc, p, c_sc, end_j);

        f[i] = mm_sc; p[i] = mm_idx; c_n[i] = mm_n; 
		if(mm_idx < 0 || ((ssc[mm_idx] < mm_sc) && (is_fc == 0))) ssc[i] = mm_sc;
		else ssc[i] = ssc[mm_idx];

        if ((max_ii < 0) || ((res->a[i].qe<=max_dis+res->a[max_ii].qe) && (f[max_ii]<f[i]))) {
            max_ii = i;
        }
        if(ssc[i] < plus) plus = ssc[i];//minmun negative
		// if(li->tn == 20171 || li->tn == 20209 || li->tn == 20204) {
		// 	fprintf(stderr, "[i::%ld]\tf::%d\tp::%ld\n", i, f[i], p[i]);
		// }
        
    }

	for (i = 0; i < res_n; ++i) {///make all f[] positive
        ssc[i] -= plus; t[i] = ((uint64_t)ssc[i])<<32; t[i] += (i<<1);
    }

	int64_t n_v, n_u, n_v0; 
    radix_sort_gfa64i(t, t + res_n); plus = 0;
    for (k = res_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; ) {
            ex[n_v++] = res->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]));
        c_n[n_u] = n_v-n_v0; c_sc[n_u] = sc; n_u++; if(sc < plus) plus = sc;
    }
    // fprintf(stderr, "---[M::%s] n_u:%ld, n_v:%ld\n", __func__, n_u, n_v);
    for (k = 0, n_v = n_v0 = 0; k < n_u; k++) {
        n_v0 = n_v; n_v += c_n[k];
        res->a[k].qn = c_sc[k]-plus;//score
        res->a[k].ts = n_v0; res->a[k].te = n_v;///idx
        // fprintf(stderr, "[M::%s] k:%ld, c_sc:%d\n", __func__, k, c_sc[k]);

        rev_n = c_n[k]>>1; 
        ///we need to consider contained reads; so determining qs is not such easy
        // res->a[k].qs = (uint32_t)-1; res->a[k].qe = ex[n_v0].qe;
        for (i = 0; i < rev_n; i++) {
            rev_t = ex[n_v0+i]; ex[n_v0+i] = ex[n_v-i-1]; ex[n_v-i-1] = rev_t;
            // if(res->a[k].qs > ex[n_v0+i].qs) res->a[k].qs = ex[n_v0+i].qs;
            // if(res->a[k].qs > ex[n_v-i-1].qs) res->a[k].qs = ex[n_v-i-1].qs;
            ex[n_v0+i].sec = ex[n_v-i-1].sec = SEC_MODE; 
        }
        if(c_n[k]&1) {
            // if(res->a[k].qs > ex[n_v0+i].qs) res->a[k].qs = ex[n_v0+i].qs;
            ex[n_v0+i].sec = SEC_MODE; 
        }
		// flat_contain(ex+n_v0, n_v-n_v0);
		res->a[k].te = res->a[k].ts + flat_contain(ridx, uref, uopt, bw, diff_ec_ul, qlen, max_skip, max_iter, max_dis, 
		ex + res->a[k].ts, res->a[k].te - res->a[k].ts, f, ssc, p, t, &(res->a[k]));
    }
    res->n = n_u; 
    radix_sort_ul_ov_srt_qn(res->a, res->a + res->n);//sort by score

	// if(res->n > 0) {
	// 	fprintf(stderr, "[M::%s::rid->%ld] qlen::%ld, q::[%u, %u), sc::%u\n", 
	// 	__func__, rid, qlen, res->a[res->n-1].qs, res->a[res->n-1].qe, res->a[res->n-1].qn);
	// }
    return n_v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
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)
movq %r9, -0x60(%rbp)
movsd %xmm0, -0x68(%rbp)
movsd %xmm1, -0x70(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2b6016
movq $0x0, -0x30(%rbp)
jmp 0x2b7444
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xc0(%rbp)
movq 0x38(%rbp), %rdi
movq -0xc0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x226f0
movq 0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xb8(%rbp)
movq 0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq 0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb0(%rbp)
movq 0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x90(%rbp)
movq 0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xa0(%rbp)
movq %rax, -0x98(%rbp)
movq 0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, 0x78(%rbp)
je 0x2b61cb
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
imulq $0x1c, -0xc0(%rbp), %rax
addq %rax, %rsi
callq 0x27b350
movq $0x1, -0xf8(%rbp)
movq $0x0, -0x100(%rbp)
movq -0xf8(%rbp), %rax
cmpq -0xc0(%rbp), %rax
jg 0x2b61c9
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq -0xf8(%rbp), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl 0x4(%rax), %ecx
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq -0xf8(%rbp), %rdx
subq $0x1, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0xf8(%rbp), %rax
cmpq -0xc0(%rbp), %rax
je 0x2b6165
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xf8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x100(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
je 0x2b61b0
movq -0xf8(%rbp), %rax
subq -0x100(%rbp), %rax
cmpq $0x1, %rax
jle 0x2b61a2
movq -0x40(%rbp), %rax
movq (%rax), %rdi
imulq $0x1c, -0x100(%rbp), %rax
addq %rax, %rdi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
imulq $0x1c, -0xf8(%rbp), %rax
addq %rax, %rsi
callq 0x27b890
movq -0xf8(%rbp), %rax
movq %rax, -0x100(%rbp)
jmp 0x2b61b2
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x2b60d8
jmp 0x2b61cb
movq -0xb8(%rbp), %rdi
movq -0xc0(%rbp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x2100
movq $0x0, -0x150(%rbp)
movq $0x0, -0xc8(%rbp)
movq $0x0, -0xf8(%rbp)
movq $-0x1, -0xd0(%rbp)
movq -0xf8(%rbp), %rax
cmpq -0xc0(%rbp), %rax
jge 0x2b6d34
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xf8(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movl 0xc(%rax), %eax
shll %eax
movq -0x158(%rbp), %rcx
movl 0x18(%rcx), %ecx
shrl $0x1f, %ecx
orl %ecx, %eax
movl %eax, -0x74(%rbp)
movq -0x158(%rbp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl 0x4(%rax), %ecx
movq -0x158(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xa0(%rbp), %rax
movq -0xf8(%rbp), %rcx
movl $0x7fffffff, (%rax,%rcx,4) # imm = 0x7FFFFFFF
movq -0xa8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movl $0x80000000, (%rax,%rcx,4) # imm = 0x80000000
movq 0x48(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq $-0x1, (%rax,%rcx,8)
movq -0x60(%rbp), %rdi
movl -0x74(%rbp), %esi
xorl $0x1, %esi
callq 0x2b2850
movq %rax, -0xe8(%rbp)
movq -0x158(%rbp), %rax
movl 0x4(%rax), %eax
addq -0xe8(%rbp), %rax
cvtsi2sd %rax, %xmm0
mulsd -0x68(%rbp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
cmpq 0x10(%rbp), %rax
jge 0x2b6306
movq 0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x158(%rbp), %rax
movl 0x4(%rax), %eax
addq -0xe8(%rbp), %rax
addq -0xf0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq 0x18(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jle 0x2b6348
movq 0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf0(%rbp)
movq -0xf8(%rbp), %rax
movl %eax, %edi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq -0xf0(%rbp), %rax
addq $0x80, %rax
movl %eax, %edx
callq 0x28cf00
cltq
movq %rax, -0xf0(%rbp)
movq -0x158(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x158(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, %eax
movq %rax, -0x118(%rbp)
movq -0x158(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, %eax
movl %eax, %ecx
imulq 0x50(%rbp), %rcx
movq -0x118(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x118(%rbp)
movq $-0x80000000, -0x120(%rbp) # imm = 0x80000000
movq $-0x1, -0x128(%rbp)
movq $0x0, -0x130(%rbp)
movl $0x0, -0x7c(%rbp)
movq $0x0, -0x140(%rbp)
movq $-0x1, -0x148(%rbp)
movq $0x7fffffff, -0x218(%rbp) # imm = 0x7FFFFFFF
movq -0xf0(%rbp), %rax
subq -0xc8(%rbp), %rax
cmpq 0x28(%rbp), %rax
jle 0x2b642a
movq -0xf0(%rbp), %rax
subq 0x28(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
cmpq -0xc8(%rbp), %rax
jl 0x2b66c7
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x100(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x158(%rbp), %rcx
cmpl 0x4(%rcx), %eax
ja 0x2b6480
jmp 0x2b66c7
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0xf8(%rbp), %rdx
movq -0x100(%rbp), %rcx
movq 0x58(%rbp), %r8
movq -0xa0(%rbp), %r9
movq -0x58(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x258(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x250(%rbp)
movsd -0x68(%rbp), %xmm0
movq -0xb0(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x50(%rbp), %r12
movq 0x60(%rbp), %r15
movq 0x68(%rbp), %r14
movq -0x38(%rbp), %rbx
movq 0x40(%rbp), %r11
movsd -0x70(%rbp), %xmm1
movq 0x50(%rbp), %r10
leaq -0x218(%rbp), %r13
leaq -0x80(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x260(%rbp), %rax
movq %rax, (%rsp)
movq -0x258(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x250(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x248(%rbp), %rax
movq %rax, 0x18(%rsp)
movq -0x240(%rbp), %rax
movq %rax, 0x20(%rsp)
movq -0x238(%rbp), %rax
movq %r13, 0x28(%rsp)
movq %r12, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movq %r14, 0x40(%rsp)
movq %rbx, 0x48(%rsp)
movq %r11, 0x50(%rsp)
movq %r10, 0x58(%rsp)
movq %rax, 0x60(%rsp)
callq 0x2b2210
movq %rax, -0x110(%rbp)
cmpq $-0x80000000, -0x110(%rbp) # imm = 0x80000000
jne 0x2b65a1
jmp 0x2b66b0
movq -0x90(%rbp), %rax
movq -0x100(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl $0x1, %eax
cltq
movq %rax, -0x138(%rbp)
movq -0x110(%rbp), %rax
cmpq -0x120(%rbp), %rax
jg 0x2b65ee
movq -0x110(%rbp), %rax
cmpq -0x120(%rbp), %rax
jne 0x2b663c
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jle 0x2b663c
movq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x130(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x7c(%rbp)
cmpq $0x0, -0x140(%rbp)
jle 0x2b663a
movq -0x140(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x140(%rbp)
jmp 0x2b6675
movq -0xb8(%rbp), %rax
movq -0x100(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0xf8(%rbp), %rax
jne 0x2b6673
movq -0x140(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x140(%rbp)
cmpq 0x20(%rbp), %rax
jle 0x2b6671
jmp 0x2b66c7
jmp 0x2b6673
jmp 0x2b6675
movq -0xb0(%rbp), %rax
movq -0x100(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x2b66ae
movq -0xf8(%rbp), %rdx
movq -0xb8(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq -0x100(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x2b66b0
movq -0x100(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x100(%rbp)
jmp 0x2b6438
movq -0x100(%rbp), %rax
movq %rax, -0x148(%rbp)
cmpq $0x0, -0xd0(%rbp)
jl 0x2b6716
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xf8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0xd0(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addq 0x30(%rbp), %rcx
cmpq %rcx, %rax
jle 0x2b6862
movq $-0x80000000, -0xd8(%rbp) # imm = 0x80000000
movq $-0x80000000, -0xe0(%rbp) # imm = 0x80000000
movq $-0x1, -0xd0(%rbp)
movq -0xf8(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rcx
xorl %eax, %eax
cmpq -0xc8(%rbp), %rcx
movb %al, -0x261(%rbp)
jl 0x2b679e
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xf8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x30(%rbp), %rcx
movq -0x40(%rbp), %rdx
movq (%rdx), %rdx
imulq $0x1c, -0x100(%rbp), %rsi
addq %rsi, %rdx
movl 0x8(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
setle %al
movb %al, -0x261(%rbp)
movb -0x261(%rbp), %al
testb $0x1, %al
jne 0x2b67ad
jmp 0x2b6860
movq -0xd8(%rbp), %rax
movq -0x88(%rbp), %rcx
movq -0x100(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
cmpq %rcx, %rax
jl 0x2b6807
movq -0xd8(%rbp), %rax
movq -0x88(%rbp), %rcx
movq -0x100(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
cmpq %rcx, %rax
jne 0x2b6847
movq -0xe0(%rbp), %rax
movq -0x90(%rbp), %rcx
movq -0x100(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
cmpq %rcx, %rax
jge 0x2b6847
movq -0x88(%rbp), %rax
movq -0x100(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
movq %rax, -0xd8(%rbp)
movq -0x90(%rbp), %rax
movq -0x100(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
movq %rax, -0xe0(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0x2b6849
movq -0x100(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x100(%rbp)
jmp 0x2b6749
jmp 0x2b6862
cmpq $0x0, -0xd0(%rbp)
jl 0x2b6a56
movq -0xd0(%rbp), %rax
cmpq -0x148(%rbp), %rax
jge 0x2b6a56
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xd0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x158(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x2b6a54
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0xf8(%rbp), %rdx
movq -0xd0(%rbp), %rcx
movq 0x58(%rbp), %r8
movq -0xa0(%rbp), %r9
movq -0x58(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x290(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x288(%rbp)
movsd -0x68(%rbp), %xmm0
movq -0xb0(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x50(%rbp), %r12
movq 0x60(%rbp), %r15
movq 0x68(%rbp), %r14
movq -0x38(%rbp), %rbx
movq 0x40(%rbp), %r11
movsd -0x70(%rbp), %xmm1
movq 0x50(%rbp), %r10
leaq -0x218(%rbp), %r13
leaq -0x80(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x298(%rbp), %rax
movq %rax, (%rsp)
movq -0x290(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x288(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x280(%rbp), %rax
movq %rax, 0x18(%rsp)
movq -0x278(%rbp), %rax
movq %rax, 0x20(%rsp)
movq -0x270(%rbp), %rax
movq %r13, 0x28(%rsp)
movq %r12, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movq %r14, 0x40(%rsp)
movq %rbx, 0x48(%rsp)
movq %r11, 0x50(%rsp)
movq %r10, 0x58(%rsp)
movq %rax, 0x60(%rsp)
callq 0x2b2210
movq %rax, -0x110(%rbp)
cmpq $-0x80000000, -0x110(%rbp) # imm = 0x80000000
je 0x2b6a52
movq -0x90(%rbp), %rax
movq -0xd0(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl $0x1, %eax
cltq
movq %rax, -0x138(%rbp)
movq -0x110(%rbp), %rax
cmpq -0x120(%rbp), %rax
jg 0x2b6a20
movq -0x110(%rbp), %rax
cmpq -0x120(%rbp), %rax
jne 0x2b6a50
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jle 0x2b6a50
movq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x130(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0x2b6a52
jmp 0x2b6a54
jmp 0x2b6a56
movq -0x118(%rbp), %rax
movq %rax, -0x110(%rbp)
movq $0x1, -0x138(%rbp)
movq -0x110(%rbp), %rax
cmpq -0x120(%rbp), %rax
jg 0x2b6a9f
movq -0x110(%rbp), %rax
cmpq -0x120(%rbp), %rax
jne 0x2b6acd
movq -0x138(%rbp), %rax
cmpq -0x130(%rbp), %rax
jle 0x2b6acd
movq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
movq $-0x1, -0x128(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x130(%rbp)
movl $0x0, -0x7c(%rbp)
cmpq $0x0, -0x120(%rbp)
jge 0x2b6afb
movq -0x118(%rbp), %rax
movq %rax, -0x120(%rbp)
movq $-0x1, -0x128(%rbp)
movq $0x1, -0x130(%rbp)
cmpq $0x0, -0x128(%rbp)
jl 0x2b6bbf
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq 0x58(%rbp), %rdx
movq 0x10(%rbp), %rcx
movsd -0x68(%rbp), %xmm0
movq -0x40(%rbp), %rax
movq (%rax), %r8
movq -0xf0(%rbp), %rax
addq $0x1, %rax
movl %eax, %r9d
movq -0xf8(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq -0xa0(%rbp), %r13
movq -0x88(%rbp), %r12
movq -0xb0(%rbp), %r15
movq -0x90(%rbp), %r14
movq -0xb8(%rbp), %rbx
leaq -0x120(%rbp), %r11
leaq -0x128(%rbp), %r10
leaq -0x130(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movq -0x2a8(%rbp), %rax
movq %rax, (%rsp)
movq -0x2a0(%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)
callq 0x2b5cc0
movq -0x120(%rbp), %rax
movl %eax, %edx
movq -0x88(%rbp), %rax
movq -0xf8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x128(%rbp), %rdx
movq -0xb0(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x130(%rbp), %rax
movl %eax, %edx
movq -0x90(%rbp), %rax
movq -0xf8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
cmpq $0x0, -0x128(%rbp)
jl 0x2b6c37
movq -0xa8(%rbp), %rax
movq -0x128(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
cmpq -0x120(%rbp), %rax
jge 0x2b6c53
cmpl $0x0, -0x7c(%rbp)
jne 0x2b6c53
movq -0x120(%rbp), %rax
movl %eax, %edx
movq -0xa8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x2b6c75
movq -0xa8(%rbp), %rax
movq -0x128(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0xa8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
cmpq $0x0, -0xd0(%rbp)
jl 0x2b6cd9
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xf8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x30(%rbp), %rcx
movq -0x40(%rbp), %rdx
movq (%rdx), %rdx
imulq $0x1c, -0xd0(%rbp), %rsi
addq %rsi, %rdx
movl 0x8(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jg 0x2b6ce7
movq -0x88(%rbp), %rax
movq -0xd0(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x88(%rbp), %rcx
movq -0xf8(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x2b6ce7
movq -0xf8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xa8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
cmpq -0x150(%rbp), %rax
jge 0x2b6d1b
movq -0xa8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
movq %rax, -0x150(%rbp)
jmp 0x2b6d1d
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x2b6210
movq $0x0, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
cmpq -0xc0(%rbp), %rax
jge 0x2b6dcd
movq -0x150(%rbp), %rsi
movq -0xa8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movslq (%rax,%rcx,4), %rdx
subq %rsi, %rdx
movl %edx, (%rax,%rcx,4)
movq -0xa8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movslq (%rax,%rcx,4), %rdx
shlq $0x20, %rdx
movq -0xb8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0xf8(%rbp), %rdx
shlq %rdx
movq -0xb8(%rbp), %rax
movq -0xf8(%rbp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x2b6d3f
movq -0xb8(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x27ae10
movq $0x0, -0x150(%rbp)
movq -0xc0(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x108(%rbp)
movq $0x0, -0x228(%rbp)
movq $0x0, -0x220(%rbp)
cmpq $0x0, -0x108(%rbp)
jl 0x2b7026
movq -0x220(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0xb8(%rbp), %rax
movq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrl %eax
movl %eax, %eax
movq %rax, -0xf8(%rbp)
xorl %eax, %eax
cmpq $0x0, -0xf8(%rbp)
movb %al, -0x2a9(%rbp)
jl 0x2b6e8f
movq -0xb8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x2a9(%rbp)
movb -0x2a9(%rbp), %al
testb $0x1, %al
jne 0x2b6e9e
jmp 0x2b6f24
movq -0x40(%rbp), %rax
movq (%rax), %rcx
imulq $0x1c, -0xf8(%rbp), %rax
addq %rax, %rcx
movq -0x48(%rbp), %rax
movq -0x220(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x220(%rbp)
imulq $0x1c, %rdx, %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 -0xb8(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
orq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0xb0(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xf8(%rbp)
jmp 0x2b6e5a
movq -0x230(%rbp), %rax
cmpq -0x220(%rbp), %rax
jne 0x2b6f39
jmp 0x2b700f
cmpq $0x0, -0xf8(%rbp)
jge 0x2b6f62
movq -0xb8(%rbp), %rax
movq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
sarq $0x20, %rax
movq %rax, -0x2b8(%rbp)
jmp 0x2b6f94
movq -0xb8(%rbp), %rax
movq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
sarq $0x20, %rax
movq -0x88(%rbp), %rcx
movq -0xf8(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
subq %rcx, %rax
movq %rax, -0x2b8(%rbp)
movq -0x2b8(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x220(%rbp), %rax
subq -0x230(%rbp), %rax
movl %eax, %edx
movq -0x90(%rbp), %rax
movq -0x228(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x110(%rbp), %rax
movl %eax, %edx
movq -0x98(%rbp), %rax
movq -0x228(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x228(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x228(%rbp)
movq -0x110(%rbp), %rax
cmpq -0x150(%rbp), %rax
jge 0x2b700d
movq -0x110(%rbp), %rax
movq %rax, -0x150(%rbp)
jmp 0x2b700f
movq -0x108(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x2b6e21
movq $0x0, -0x108(%rbp)
movq $0x0, -0x230(%rbp)
movq $0x0, -0x220(%rbp)
movq -0x108(%rbp), %rax
cmpq -0x228(%rbp), %rax
jge 0x2b740b
movq -0x220(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x90(%rbp), %rax
movq -0x108(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
addq -0x220(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x98(%rbp), %rax
movq -0x108(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
subq -0x150(%rbp), %rax
movl %eax, %ecx
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x108(%rbp), %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x230(%rbp), %rax
movl %eax, %ecx
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x108(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq -0x220(%rbp), %rax
movl %eax, %ecx
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x108(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x90(%rbp), %rax
movq -0x108(%rbp), %rcx
movl (%rax,%rcx,4), %eax
sarl %eax
movl %eax, -0x78(%rbp)
movq $0x0, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movl -0x78(%rbp), %ecx
cmpq %rcx, %rax
jge 0x2b7273
movq -0x48(%rbp), %rax
movq -0x230(%rbp), %rcx
addq -0xf8(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x17c(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x174(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x16c(%rbp)
movl 0x18(%rax), %eax
movl %eax, -0x164(%rbp)
movq -0x48(%rbp), %rcx
movq -0x220(%rbp), %rax
subq -0xf8(%rbp), %rax
subq $0x1, %rax
imulq $0x1c, %rax, %rax
addq %rax, %rcx
movq -0x48(%rbp), %rax
movq -0x230(%rbp), %rdx
addq -0xf8(%rbp), %rdx
imulq $0x1c, %rdx, %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 -0x48(%rbp), %rax
movq -0x220(%rbp), %rcx
subq -0xf8(%rbp), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq -0x17c(%rbp), %rcx
movq %rcx, (%rax)
movq -0x174(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x16c(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x164(%rbp), %ecx
movl %ecx, 0x18(%rax)
movq -0x48(%rbp), %rax
movq -0x220(%rbp), %rcx
subq -0xf8(%rbp), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movl %ecx, 0x18(%rax)
movq -0x48(%rbp), %rax
movq -0x230(%rbp), %rcx
addq -0xf8(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movl %ecx, 0x18(%rax)
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x2b7115
movq -0x90(%rbp), %rax
movq -0x108(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2b72b7
movq -0x48(%rbp), %rax
movq -0x230(%rbp), %rcx
addq -0xf8(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movl %ecx, 0x18(%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x108(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq %rax, -0x2c0(%rbp)
movq 0x58(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq 0x10(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movsd -0x68(%rbp), %xmm0
movq 0x18(%rbp), %r8
movq 0x20(%rbp), %r9
movq 0x28(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq 0x30(%rbp), %r13
movq -0x48(%rbp), %r12
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x108(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
imulq $0x1c, %rax, %rax
addq %rax, %r12
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x108(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x108(%rbp), %r10
addq %r10, %rcx
subl 0x10(%rcx), %eax
movl %eax, %eax
movl %eax, %r15d
movq -0x88(%rbp), %r14
movq -0xa8(%rbp), %rbx
movq -0xb0(%rbp), %r11
movq -0xb8(%rbp), %r10
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x108(%rbp), %rcx
addq %rcx, %rax
movq -0x2d8(%rbp), %rcx
movq %rax, -0x2c8(%rbp)
movq -0x2d0(%rbp), %rax
movq %rax, (%rsp)
movq -0x2c8(%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)
callq 0x2b52b0
movq %rax, %rcx
movq -0x2c0(%rbp), %rax
addq %rcx, %rax
movl %eax, %ecx
movq -0x40(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x108(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x2b7047
movq -0x228(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq -0x40(%rbp), %rax
imulq $0x1c, 0x8(%rax), %rax
addq %rax, %rsi
callq 0x27c310
movq -0x220(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)