// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: gen_cns_chain_linear(ul_ov_t*, long, asg_t const*, R_to_U*, long, long, double, Chain_Data*, long, long, long, unsigned long, unsigned long, unsigned long)
uint64_t gen_cns_chain_linear(ul_ov_t *a, int64_t a_n, /**ul_ov_t *ab,**/ const asg_t *rg, R_to_U *ri, int64_t qlen, int64_t bw, double diff_thre, Chain_Data* dp, 
int64_t max_skip, int64_t max_iter, int64_t max_dis, uint64_t mqs, uint64_t mqe, uint64_t ulid)
{
	if(a_n == 0) return 0;
	uint32_t li_v, lj_v; int32_t *f, *c_n, *len; int64_t *p, *t, st, max_ii, max, qo, cL, sn, ln, csn, mm_sn, cln, mm_ln; 
	int64_t mm_ovlp, x, i, j, sc, csc, mm_sc, mm_idx, n_skip, end_j, ch_sc, cn_sn, ch_ln, ch_i; ul_ov_t *li, *lj; 
	resize_Chain_Data(dp, a_n, NULL); 
	t = dp->tmp; f = dp->score; p = dp->pre; c_n = dp->occ; len = dp->indels;
        
	radix_sort_ul_ov_srt_qe(a, a + a_n);
    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;
        }
    }

	memset(t, 0, (a_n*sizeof((*t)))); 
	ch_sc = ch_i = cn_sn = INT32_MIN; ch_ln = INT32_MAX;
	for (i = st = 0, max_ii = -1; i < a_n; ++i) {
        li = &(a[i]); 
        mm_ovlp = max_ovlp(rg, ((li->tn<<1)|li->rev)^1);        
        x = (li->qs + mm_ovlp)*diff_thre; 
        if(x < bw) x = bw; 
        x += li->qs + mm_ovlp;
        if (x > qlen+1) x = qlen+1;
        x = find_ul_ov_max(i, a, x+G_CHAIN_INDEL); 

		csc = 0; csn = 1; cln = 0; 
		if(is_contain_r((*ri), li->tn)) {csc = -1; csn = 0; cln = rg->seq[li->tn].len;}
        mm_sc = INT32_MIN+1; mm_sn = INT32_MIN+1; mm_ln = INT32_MAX; 
		mm_idx = -1; n_skip = 0; end_j = -1; 

		li_v = (li->tn<<1)|li->rev; li_v ^= 1;
        if ((x-st) > max_iter) st = x-max_iter;
		for (j = x; j >= st; --j) { // collect potential destination vertices
			lj = &(a[j]); 
			if(lj->qe+G_CHAIN_INDEL <= li->qs) break;//even this pair has a overlap, its length will be very small; just ignore
			if(f[j] == INT32_MIN) continue;///could not reach the left end
			sc = sn = ln = INT32_MIN;
			if(lj->qs <= li->qs && lj->qe <= li->qe) {///not contained
				lj_v = (lj->tn<<1)|lj->rev; lj_v ^= 1;
				qo = infer_rovlp(li, lj, NULL, NULL, NULL, NULL);
				if(gconnect_test(rg, li_v, lj_v, bw, diff_thre, qo)) {
					sc = f[j] + csc; sn = c_n[j] + csn; ln = len[j] + cln;
				}
			}
			if(sc == INT32_MIN) continue;
			if((sc > mm_sc) || ((sc == mm_sc) && (sn > mm_sn)) || 
				((sc == mm_sc) && (sn == mm_sn) && (ln < mm_ln))) {
				mm_sc = sc, mm_idx = j, mm_sn = sn, mm_ln = ln;
				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_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_ii = j;
                }
            }
        }
                
        if (max_ii >= 0 && max_ii < end_j) {///just have a try with a[i]<->a[max_ii]
			lj = &(a[max_ii]); 
			if(((lj->qe+G_CHAIN_INDEL)>li->qs) && (lj->qs<=li->qs) && (lj->qe<=li->qe) && (f[max_ii]!=INT32_MIN)) {
				lj_v = (lj->tn<<1)|lj->rev; lj_v ^= 1; sc = sn = ln = INT32_MIN;
				qo = infer_rovlp(li, lj, NULL, NULL, NULL, NULL);
				if(gconnect_test(rg, li_v, lj_v, bw, diff_thre, qo)) {
					sc = f[max_ii] + csc; sn = c_n[max_ii] + csn; ln = len[max_ii] + cln;
				}
				if(sc != INT32_MIN) {
					if((sc > mm_sc) || ((sc == mm_sc) && (sn > mm_sn)) || 
						((sc == mm_sc) && (sn == mm_sn) && (ln < mm_ln))) {
						mm_sc = sc, mm_idx = max_ii, mm_sn = sn, mm_ln = ln;
					}
				}
			}
		}

		if((mm_idx == -1) && (((int64_t)li->qs) > ((int64_t)(mqs+bw)))) {
			mm_sc = mm_idx = mm_sn = INT32_MIN; mm_ln = INT32_MAX;
		}
		if((mm_sc==(INT32_MIN+1))) {
			mm_sc = csc; mm_sn = csn; mm_ln = cln;
		}

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

		if((mm_sc!=INT32_MIN) && (((int64_t)(a[i].qe+bw))>=((int64_t)(mqe)))) {
			if((mm_sc > ch_sc) || ((mm_sc == ch_sc) && (mm_sn > cn_sn)) || 
				((mm_sc == ch_sc) && (mm_sn == cn_sn) && (mm_ln < ch_ln))) {
				ch_sc = mm_sc; ch_i = i; cn_sn = mm_sn; ch_ln = mm_ln;
			}
		}
		// if(ulid == 442462) {
		// 	fprintf(stderr, "[M::%s::id->%u::%.*s] i::%ld, q::[%u, %u), t::[%u, %u), is_cr::%u, mm_idx::%ld, end::%u\n", 
		// 	__func__, li->tn, (int)Get_NAME_LENGTH(R_INF, li->tn), Get_NAME(R_INF, li->tn), i, 
		// 	li->qs, li->qe, li->ts, li->te, !!(is_contain_r((*ri), li->tn)), mm_idx, !!(((int64_t)(a[i].qe+bw))>=((int64_t)(mqe))));
		// }
    }
	// if(ulid == 442462) {
	// 	fprintf(stderr, "[M::%s::] ch_i::%ld, mqs::%lu, mqe::%lu\n", 
	// 	__func__, ch_i, mqs, mqe);
	// }
	if(ch_i == INT32_MIN) return 0;

	i = ch_i; cL = 0;
    while (i >= 0) {t[cL++] = i; i = p[i];}
	for (i = 0; i < cL; i++) a[i] = a[t[cL-i-1]];
	return cL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movsd %xmm0, 0xa0(%rsp)
movq %r9, 0x50(%rsp)
movq %r8, 0xb8(%rsp)
testq %rsi, %rsi
je 0x1dc5c8
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %rcx, 0xe0(%rsp)
movq 0x120(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x3ecb0
movq 0x28(%r14), %rbx
movq (%r14), %rax
movq %rax, 0x38(%rsp)
movq 0x8(%r14), %rbp
movq 0x20(%r14), %rax
movq %rax, 0x90(%rsp)
movq 0x10(%r14), %rax
movq %rax, 0x88(%rsp)
leaq (%r12,%r12,8), %rax
leaq (%rax,%rax,2), %rsi
addq %r13, %rsi
addq %r12, %rsi
movq %r13, %rdi
callq 0x19e2b4
testq %r12, %r12
jle 0x1dc5cd
movq %r15, 0x40(%rsp)
movq %rbx, 0x68(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %r12, %rbx
negq %rbx
leaq 0x1c(%r13), %r14
movl $0x1, %r15d
xorl %edi, %edi
movq %rbx, %rax
addq %r15, %rax
je 0x1dbd48
movl 0x8(%r14), %eax
leaq (%rdi,%rdi,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rdi, %rcx
cmpl 0x8(%r13,%rcx), %eax
jne 0x1dbd48
movq %rdi, %rax
jmp 0x1dbd70
movq %r15, %rcx
subq %rdi, %rcx
movq %r15, %rax
cmpq $0x2, %rcx
jl 0x1dbd70
leaq (%rdi,%rdi,8), %rax
leaq (%rax,%rax,2), %rax
addq %r13, %rdi
addq %rax, %rdi
movq %r14, %rsi
callq 0x19e55c
movq %r15, %rax
leaq (%rbx,%r15), %rcx
incq %rcx
incq %r15
addq $0x1c, %r14
movq %rax, %rdi
cmpq $0x1, %rcx
jne 0x1dbd25
leaq (,%r12,8), %rdx
movq 0x68(%rsp), %rdi
xorl %esi, %esi
callq 0x20e0
incq 0xb8(%rsp)
movq 0x78(%rsp), %rax
addq 0x50(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq -0x14(%r13), %rbx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0xb0(%rsp)
movq $-0x80000000, 0xa8(%rsp) # imm = 0x80000000
movq $-0x1, 0xc8(%rsp)
movq $-0x80000000, 0x70(%rsp) # imm = 0x80000000
movq $-0x80000000, 0x80(%rsp) # imm = 0x80000000
xorl %edi, %edi
movq $-0x1, %r8
movq $0x0, 0x58(%rsp)
movq %r13, 0xd8(%rsp)
movq 0x40(%rsp), %r15
movq %r12, 0xd0(%rsp)
movq %rbp, 0xc0(%rsp)
movq %r8, 0x8(%rsp)
movq %rbx, 0x98(%rsp)
movq 0x58(%rsp), %rbx
leaq (%rdi,%rdi,8), %rax
leaq (%rax,%rax,2), %r10
addq %rdi, %r10
movl 0xc(%r13,%r10), %eax
movl 0x18(%r13,%r10), %ecx
shrdl $0x1f, %eax, %ecx
xorl $0x1, %ecx
movq 0x28(%r15), %rax
movq (%rax,%rcx,8), %rcx
movq %rcx, %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
andq %rdx, %rax
je 0x1dbea7
movq 0x8(%r15), %rdx
shrq $0x20, %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %rcx
addq $0xc, %rcx
xorl %edx, %edx
xorl %esi, %esi
movl %esi, %r9d
movl (%rcx,%rdx), %r8d
cmpl %r8d, %esi
movl %r8d, %esi
cmoval %r9d, %esi
testl %r8d, %r8d
cmovsl %r9d, %esi
addq $0x18, %rdx
cmpq %rdx, %rax
jne 0x1dbe82
movl %esi, %eax
jmp 0x1dbea9
xorl %eax, %eax
addq %r13, %r10
movq %r10, (%rsp)
movl 0x4(%r10), %ecx
addq %rax, %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0xa0(%rsp), %xmm0
cvttsd2si %xmm0, %rdx
movq 0x50(%rsp), %rax
cmpq %rax, %rdx
cmovleq %rax, %rdx
addq %rcx, %rdx
movq 0xb8(%rsp), %rax
cmpq %rax, %rdx
cmovgeq %rax, %rdx
subl $-0x80, %edx
movq %rdi, 0x30(%rsp)
movq %r13, %rsi
callq 0x1a83b5
movq (%rsp), %rdi
movl 0xc(%rdi), %ecx
movq 0xe0(%rsp), %rdx
cmpq %rcx, (%rdx)
jbe 0x1dbf47
movq 0x8(%rdx), %rdx
cmpl $0x0, (%rdx,%rcx,4)
movq 0x38(%rsp), %r9
movl $0x0, %r11d
js 0x1dbf6d
movq 0x20(%r15), %rdx
movl (%rdx,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %rdx, 0x48(%rsp)
movq $-0x1, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
jmp 0x1dbf89
movl $0x1, %edx
movq %rdx, 0x20(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x38(%rsp), %r9
xorl %r11d, %r11d
jmp 0x1dbf89
movl $0x1, %edx
movq %rdx, 0x20(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x8(%rsp), %rsi
cltq
movl 0x18(%rdi), %edx
shrdl $0x1f, %ecx, %edx
xorl $0x1, %edx
movl %edx, 0x64(%rsp)
movq %rax, %rcx
subq %rbx, %rcx
movq %rax, %r8
movq 0x130(%rsp), %rdx
subq %rdx, %r8
cmpq %rdx, %rcx
cmovleq %rbx, %r8
movq %r8, 0x58(%rsp)
cmpq %rax, %r8
jle 0x1dbfe5
movq $-0x1, 0x10(%rsp)
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
movq $-0x7fffffff, %r8       # imm = 0x80000001
movq $-0x7fffffff, %r12      # imm = 0x80000001
jmp 0x1dc1c1
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %r15
addq %r13, %r15
addq %rax, %r15
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq $-0x7fffffff, %r13      # imm = 0x80000001
movq $-0x1, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq %rax, %rbp
movq $-0x7fffffff, %r14      # imm = 0x80000001
movl 0x8(%r15), %eax
leal 0x80(%rax), %edx
movl 0x4(%rdi), %ecx
cmpl %ecx, %edx
jbe 0x1dc1b5
cmpl (%r9,%rbp,4), %r11d
jo 0x1dc041
cmpl %ecx, 0x4(%r15)
ja 0x1dc041
cmpl 0x8(%rdi), %eax
jbe 0x1dc06a
movq %r14, %r8
movq %rbx, %r10
movq %r13, %r12
leaq -0x1(%rbp), %rax
addq $-0x1c, %r15
movq %r12, %r13
movq %r10, %rbx
movq %r8, %r14
cmpq 0x58(%rsp), %rbp
movq %rax, %rbp
jg 0x1dc01b
jmp 0x1dc1c1
movl 0xc(%r15), %eax
movl 0x18(%r15), %r12d
shrdl $0x1f, %eax, %r12d
xorl $0x1, %r12d
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x6ea22
movq 0x40(%rsp), %rdi
movl 0x64(%rsp), %esi
movl %r12d, %edx
movq 0x50(%rsp), %rcx
movsd 0xa0(%rsp), %xmm0
movq %rax, %r8
callq 0x1dbbdf
testq %rax, %rax
je 0x1dc0e1
movq 0x38(%rsp), %r9
movslq (%r9,%rbp,4), %r12
addq 0x28(%rsp), %r12
cmpq $-0x80000000, %r12      # imm = 0x80000000
movl $0x0, %r11d
movq 0x8(%rsp), %rsi
jne 0x1dc100
movq %r14, %r8
movq %rbx, %r10
movq %r13, %r12
jmp 0x1dc0f7
movq %r14, %r8
movq %rbx, %r10
movq %r13, %r12
movq 0x38(%rsp), %r9
xorl %r11d, %r11d
movq 0x8(%rsp), %rsi
movq (%rsp), %rdi
jmp 0x1dc04a
movq 0x90(%rsp), %rax
movslq (%rax,%rbp,4), %r8
addq 0x20(%rsp), %r8
movq 0x88(%rsp), %rax
movslq (%rax,%rbp,4), %r10
addq 0x48(%rsp), %r10
cmpq %r13, %r12
movq (%rsp), %rdi
jg 0x1dc141
jne 0x1dc132
cmpq %r14, %r8
jg 0x1dc141
cmpq %r13, %r12
jne 0x1dc183
cmpq %r14, %r8
jne 0x1dc183
cmpq %rbx, %r10
jge 0x1dc183
xorl %eax, %eax
movq 0x18(%rsp), %rcx
testq %rcx, %rcx
setg %al
subq %rax, %rcx
movq %rcx, 0x18(%rsp)
movq %rbp, 0x10(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax,%rbp,8), %rax
testq %rax, %rax
js 0x1dc04a
movq 0x68(%rsp), %rcx
movq 0x30(%rsp), %rdx
movq %rdx, (%rcx,%rax,8)
jmp 0x1dc04a
movq 0x68(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq %rcx, (%rax,%rbp,8)
jne 0x1dc1aa
movq 0x18(%rsp), %rax
cmpq 0x128(%rsp), %rax
jge 0x1dc1b5
incq %rax
movq %rax, 0x18(%rsp)
movq %r14, %r8
movq %rbx, %r10
movq %r13, %r12
jmp 0x1dc15b
movq %r14, %r8
movq %rbx, %r10
movq %rbp, %rax
movq %r13, %r12
movq %r10, 0x18(%rsp)
movq %r8, %rbp
testq %rsi, %rsi
movq 0xd8(%rsp), %r13
movq 0x40(%rsp), %r15
movq 0x138(%rsp), %r10
movq 0x98(%rsp), %rbx
js 0x1dc20f
movq (%rsp), %rcx
movl 0x8(%rcx), %ecx
movq 0x8(%rsp), %rsi
leaq (%rsi,%rsi,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rsi, %rdx
movl 0x8(%r13,%rdx), %edx
addq %r10, %rdx
cmpq %rcx, %rdx
jge 0x1dc27e
movq $-0x1, %r8
movq 0x58(%rsp), %rcx
cmpq %rcx, 0x30(%rsp)
jle 0x1dc37e
movq (%rsp), %rcx
movl 0x8(%rcx), %ecx
movq $-0x1, 0x8(%rsp)
movq $-0x80000000, %rdx      # imm = 0x80000000
movq %rbx, %rsi
movq 0xc8(%rsp), %rdi
movl (%rsi), %r8d
addq %r10, %r8
cmpq %rcx, %r8
jl 0x1dc27e
movslq (%r9,%rdi,4), %r8
cmpq %r8, %rdx
movq 0x8(%rsp), %r14
cmovlq %rdi, %r14
movq %r14, 0x8(%rsp)
cmovleq %r8, %rdx
leaq -0x1(%rdi), %r8
addq $-0x1c, %rsi
cmpq 0x58(%rsp), %rdi
movq %r8, %rdi
jg 0x1dc248
movq 0x8(%rsp), %r8
testq %r8, %r8
js 0x1dc37e
cmpq %rax, %r8
jge 0x1dc37e
leaq (%r8,%r8,8), %rax
leaq (%rax,%rax,2), %rsi
addq %r8, %rsi
movl 0x8(%r13,%rsi), %eax
leal 0x80(%rax), %edx
movq (%rsp), %rcx
movl 0x4(%rcx), %ecx
cmpl %ecx, %edx
jbe 0x1dc37e
addq %r13, %rsi
cmpl %ecx, 0x4(%rsi)
ja 0x1dc37e
movq (%rsp), %rcx
cmpl 0x8(%rcx), %eax
ja 0x1dc37e
cmpl (%r9,%r8,4), %r11d
jo 0x1dc37e
movl 0xc(%rsi), %eax
movl 0x18(%rsi), %r14d
shrdl $0x1f, %eax, %r14d
xorl $0x1, %r14d
movq (%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x6ea22
movq %r15, %rdi
movl 0x64(%rsp), %esi
movl %r14d, %edx
movq 0x50(%rsp), %rcx
movsd 0xa0(%rsp), %xmm0
movq %rax, %r8
callq 0x1dbbdf
testq %rax, %rax
je 0x1dc35f
movq 0x38(%rsp), %r9
movq 0x8(%rsp), %r8
movslq (%r9,%r8,4), %rdx
movq 0x28(%rsp), %r11
addq %r11, %rdx
cmpq $-0x80000000, %rdx      # imm = 0x80000000
movq 0x138(%rsp), %r10
movq 0x98(%rsp), %rbx
jne 0x1dc4ef
movq 0x40(%rsp), %r15
jmp 0x1dc37e
movq 0x40(%rsp), %r15
movq 0x38(%rsp), %r9
movq 0x138(%rsp), %r10
movq 0x98(%rsp), %rbx
movq 0x8(%rsp), %r8
cmpq $-0x1, 0x10(%rsp)
je 0x1dc3a2
movq %rbp, %rcx
movq 0x18(%rsp), %rax
movq %r12, %rdx
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %r11
movq 0x20(%rsp), %rsi
jmp 0x1dc3f1
movq (%rsp), %rax
movl 0x4(%rax), %eax
movq $-0x1, 0x10(%rsp)
cmpq %rax, 0x78(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %r11
movq 0x20(%rsp), %rsi
jge 0x1dc3e6
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq $-0x80000000, %rcx      # imm = 0x80000000
movq $-0x80000000, %rdx      # imm = 0x80000000
movq $-0x80000000, 0x10(%rsp) # imm = 0x80000000
jmp 0x1dc3f1
movq %rbp, %rcx
movq 0x18(%rsp), %rax
movq %r12, %rdx
cmpq $-0x7fffffff, %rdx      # imm = 0x80000001
cmoveq %rsi, %rcx
cmoveq 0x48(%rsp), %rax
cmovneq %rdx, %r11
movl %r11d, (%r9,%rdi,4)
movq 0x10(%rsp), %rdx
movq 0xc0(%rsp), %rbp
movq %rdx, (%rbp,%rdi,8)
movq 0x90(%rsp), %rdx
movl %ecx, (%rdx,%rdi,4)
movq 0x88(%rsp), %rdx
movl %eax, (%rdx,%rdi,4)
testq %r8, %r8
movq 0xd0(%rsp), %r12
js 0x1dc468
movq (%rsp), %rdx
movl 0x8(%rdx), %edx
leaq (%r8,%r8,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %r8, %rsi
movl 0x8(%r13,%rsi), %esi
addq %r10, %rsi
cmpq %rdx, %rsi
jl 0x1dc46b
movl (%r9,%r8,4), %edx
cmpl (%r9,%rdi,4), %edx
jge 0x1dc46b
movq %rdi, %r8
cmpq $-0x80000000, %r11      # imm = 0x80000000
je 0x1dc4d5
movq (%rsp), %rdx
movl 0x8(%rdx), %edx
addq 0x50(%rsp), %rdx
cmpq 0x148(%rsp), %rdx
jl 0x1dc4d5
cmpq 0x80(%rsp), %r11
jg 0x1dc4b8
jne 0x1dc49d
cmpq 0x70(%rsp), %rcx
jg 0x1dc4b8
cmpq 0x80(%rsp), %r11
jne 0x1dc4d5
cmpq 0x70(%rsp), %rcx
jne 0x1dc4d5
cmpq 0xb0(%rsp), %rax
jge 0x1dc4d5
movq %r11, 0x80(%rsp)
movq %rcx, 0x70(%rsp)
movq %rax, 0xb0(%rsp)
movq %rdi, 0xa8(%rsp)
incq %rdi
incq 0xc8(%rsp)
addq $0x1c, %rbx
cmpq %r12, %rdi
jne 0x1dbe1f
jmp 0x1dc564
movq 0x90(%rsp), %rax
movslq (%rax,%r8,4), %rcx
movq 0x20(%rsp), %rsi
addq %rsi, %rcx
movq 0x88(%rsp), %rax
movslq (%rax,%r8,4), %rax
addq 0x48(%rsp), %rax
cmpq %r12, %rdx
movq 0x40(%rsp), %r15
movq 0x30(%rsp), %rdi
jg 0x1dc52d
jne 0x1dc537
cmpq %rbp, %rcx
jle 0x1dc537
movq %r12, %rdx
movq %r8, 0x10(%rsp)
jmp 0x1dc3f1
cmpq %r12, %rdx
jne 0x1dc37e
cmpq %rbp, %rcx
jne 0x1dc37e
cmpq 0x18(%rsp), %rax
jge 0x1dc37e
movq %rbp, %rcx
movq %r12, %rdx
movq %r8, 0x10(%rsp)
jmp 0x1dc391
movq 0xa8(%rsp), %rax
testq %rax, %rax
js 0x1dc5c8
xorl %r14d, %r14d
movq 0x68(%rsp), %r8
movq %rax, (%r8,%r14,8)
incq %r14
movq (%rbp,%rax,8), %rax
testq %rax, %rax
jns 0x1dc579
leaq -0x1(%r14), %rax
movq %r14, %rcx
movq %r13, %rdx
movq -0x8(%r8,%rcx,8), %rsi
leaq (%rsi,%rsi,8), %rdi
leaq (%rdi,%rdi,2), %rdi
addq %rsi, %rdi
movupd (%r13,%rdi), %xmm0
movups 0xc(%r13,%rdi), %xmm1
movups %xmm1, 0xc(%rdx)
movupd %xmm0, (%rdx)
addq $0x1c, %rdx
decq %rcx
addq $-0x1, %rax
jb 0x1dc594
jmp 0x1dc5e1
xorl %r14d, %r14d
jmp 0x1dc5e1
shlq $0x3, %r12
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20e0
movq %r14, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq