// File: chhylp123[P]hifiasm/inter.cpp
// Function: filter_by_reliable_ovlp(unsigned int, kv_u_trans_t*, st_mt_t*, overlap_region_alloc*, ul_idx_t const*, double, unsigned int)
void filter_by_reliable_ovlp(uint32_t id, kv_u_trans_t *idx, st_mt_t *sp, overlap_region_alloc* ol, const ul_idx_t *udb, double sec_rate, uint32_t pre_filter)
{
	u_trans_t *a; uint64_t n, k, l, s, e, s0, e0, z, ov, rr; overlap_region *m, t;
	a = u_trans_a(*idx, id); n = u_trans_n(*idx, id);
	for (k = sp->n = 0; k < n; k++) {
		if(a[k].del) continue;
		if(a[k].f == RC_0 || a[k].f == RC_1) {
			z = a[k].tn; z <<= 1; z |= a[k].rev; z <<= 32; z |= k;
			kv_push(uint64_t, *sp, z);
			// fprintf(stderr, "***utg%.6u%c\t%u\t%u\t%u\t%c\tutg%.6u%c\t%u\t%u\t%u\n", 
			// 	a[k].qn+1, "lc"[udb->ug->u.a[a[k].qn].circ], udb->ug->u.a[a[k].qn].len, a[k].qs, a[k].qe, "+-"[a[k].rev],
			// 	a[k].tn+1, "lc"[udb->ug->u.a[a[k].tn].circ], udb->ug->u.a[a[k].tn].len, a[k].ts, a[k].te);
		}
	}
	if(!sp->n) return;
	for (k = 0; k < ol->length; k++) {
		if((!pre_filter) || (ol->list[k].x_pos_strand)) {///corresponding to the overlaps within idx
			z = ol->list[k].y_id; z <<= 1; z |= ol->list[k].y_pos_strand; 
			z <<= 32; z |= k; z |= ((uint64_t)0x80000000);
			kv_push(uint64_t, *sp, z);
			ol->list[k].x_pos_strand = 0;
		}
	}
	radix_sort_gfa64(sp->a, sp->a + sp->n);
	for (k = 1, l = 0; k <= sp->n; k++) {
		if(k == sp->n || (sp->a[l]>>32)!=(sp->a[k]>>32)) {
			if((k - l > 1) && (!(sp->a[l]&((uint64_t)0x80000000)))) {
				for (z = l; z < k; z++) {
					if(!(sp->a[z]&((uint64_t)0x80000000))) continue;
					rr = (uint32_t)(sp->a[z]-((uint64_t)0x80000000));
					ol->list[rr].x_pos_strand = 1;
				}
			}
			l = k;
		}
	}

	for (k = sp->n = 0; k < n; k++) {
		if(a[k].del) continue;
		if(a[k].f == RC_0 || a[k].f == RC_1) {
			kv_push(uint64_t, *sp, (((uint64_t)a[k].qs)<<32)|((uint64_t)a[k].qe));
		}
	}
	if(sp->n > 1) {
		radix_sort_gfa64(sp->a, sp->a + sp->n);
		for (k = z = 0; k < sp->n; k++) {
			s = sp->a[k]>>32; e = (uint32_t)sp->a[k];
			if(z > 0 && s <= ((uint32_t)sp->a[z-1])) {
				if(e > ((uint32_t)sp->a[z-1])) {
					sp->a[z-1] >>= 32; sp->a[z-1] <<= 32; sp->a[z-1] |= e;
				}
			} else {
				sp->a[z++] = sp->a[k];
			}
		}
		sp->n = z;
	}

	for (k = rr = 0; k < ol->length; k++) {
		m = &(ol->list[k]);
		if(m->x_pos_strand == 0) {
			s = m->x_pos_s; e = m->x_pos_e + 1; l = 0; 
			for (z = 0; z < sp->n; z++) {
				s0 = sp->a[z]>>32; e0 = (uint32_t)sp->a[z];
				ov = ((MIN(e, e0) > MAX(s, s0))? (MIN(e, e0) - MAX(s, s0)):0);
				l += ov;
				if((l) && (l > ((e-s)*sec_rate))) break;
			}
			if(z < sp->n) {
				// fprintf(stderr, ">[M::%s] utg%.6u%c -> utg%.6u%c\n", __func__, id+1, "lc"[udb->ug->u.a[id].circ], 
				// m->y_id+1, "lc"[udb->ug->u.a[m->y_id].circ]);
				continue;///filter by the overlaps of id/m->x_id
			}
			///filter by the overlaps of m->y_id
			if(filter_by_reliable_ovlp0(u_trans_a(*idx, m->y_id), u_trans_n(*idx, m->y_id), 
			m->y_pos_strand?udb->ug->u.a[m->y_id].len-m->y_pos_e-1:m->y_pos_s, 
			m->y_pos_strand?udb->ug->u.a[m->y_id].len-m->y_pos_s:m->y_pos_e+1, sec_rate)) {
				// fprintf(stderr, "<[M::%s] utg%.6u%c -> utg%.6u%c\n", __func__, id+1, "lc"[udb->ug->u.a[id].circ], 
				// m->y_id+1, "lc"[udb->ug->u.a[m->y_id].circ]);
				continue;
			}
		}
		m->x_pos_strand = 0;
		if(rr != k) {
			t = ol->list[k];
            ol->list[k] = ol->list[rr];
            ol->list[rr] = t;
		}
		// fprintf(stderr, ">>>utg%.6u%c\t%u\t%u\t%u\t%c\tutg%.6u%c\t%u\t%u\t%u\n", 
		// 		ol->list[rr].x_id+1, "lc"[udb->ug->u.a[ol->list[rr].x_id].circ], udb->ug->u.a[ol->list[rr].x_id].len, 
		// 		ol->list[rr].x_pos_s, ol->list[rr].x_pos_e+1, "+-"[ol->list[rr].y_pos_strand],
		// 		ol->list[rr].y_id+1, "lc"[udb->ug->u.a[ol->list[rr].y_id].circ], udb->ug->u.a[ol->list[rr].y_id].len, 
		// 		ol->list[rr].y_pos_s, ol->list[rr].y_pos_e+1);
		rr++;
	}
	// if(id == 1576) {
		// fprintf(stderr, "[M::%s] utg%.6ul, ol->length0::%lu, ol->length::%lu\n", __func__, id+1, ol->length, rr);
	// }
	ol->length = rr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movsd %xmm0, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x4(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x2bc5b0
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x2bc47e
jmp 0x2bc59f
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2bc4b4
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x2bc59d
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
shlq %rax
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
orq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
shlq $0x20, %rax
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rax
orq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2bc57a
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2bc539
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x148(%rbp)
jmp 0x2bc547
movl $0x2, %eax
movq %rax, -0x148(%rbp)
jmp 0x2bc547
movq -0x148(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x80(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x2bc59d
jmp 0x2bc59f
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2bc455
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2bc5bf
jmp 0x2bcf62
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x2bc724
cmpl $0x0, -0x34(%rbp)
je 0x2bc5fb
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x50(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
je 0x2bc711
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
shlq %rax
movq %rax, -0x80(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
orq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
shlq $0x20, %rax
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rax
orq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
movabsq $0x80000000, %rax       # imm = 0x80000000
orq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2bc6d7
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2bc696
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x150(%rbp)
jmp 0x2bc6a4
movl $0x2, %eax
movq %rax, -0x150(%rbp)
jmp 0x2bc6a4
movq -0x150(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x80(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x50(%rbp), %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
jmp 0x2bc713
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2bc5c7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x27a9b0
movq $0x1, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x2bc87d
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
je 0x2bc7a6
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x50(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
je 0x2bc86a
movq -0x50(%rbp), %rax
subq -0x58(%rbp), %rax
cmpq $0x1, %rax
jbe 0x2bc862
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x58(%rbp), %rdx
movabsq $0x80000000, %rax       # imm = 0x80000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
jne 0x2bc862
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x2bc860
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x80(%rbp), %rdx
movabsq $0x80000000, %rax       # imm = 0x80000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
jne 0x2bc810
jmp 0x2bc852
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movabsq $0x80000000, %rcx       # imm = 0x80000000
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x90(%rbp), %rcx
addq %rcx, %rax
movl $0x1, 0xc(%rax)
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x2bc7e4
jmp 0x2bc862
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x2bc86c
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2bc757
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x2bc9ba
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x2bc8b9
jmp 0x2bc9a9
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2bc8ef
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
andb $0x3f, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x2bc9a7
jmp 0x2bc8f1
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2bc962
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2bc921
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x158(%rbp)
jmp 0x2bc92f
movl $0x2, %eax
movq %rax, -0x158(%rbp)
jmp 0x2bc92f
movq -0x158(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, %edx
shlq $0x20, %rdx
movq -0x40(%rbp), %rax
imulq $0x30, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
orq %rax, %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x2bc9a7
jmp 0x2bc9a9
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2bc890
movq -0x18(%rbp), %rax
cmpq $0x1, (%rax)
jbe 0x2bcb22
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x27a9b0
movq $0x0, -0x80(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2bcb17
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x80(%rbp)
jbe 0x2bcad9
movq -0x60(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x80(%rbp), %rdx
subq $0x1, %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
cmpq %rcx, %rax
ja 0x2bcad9
movq -0x68(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x80(%rbp), %rdx
subq $0x1, %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x2bcad7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
shrq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x68(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
subq $0x1, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x2bcb04
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x80(%rbp)
movq %rdx, (%rax,%rcx,8)
jmp 0x2bcb06
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2bc9fb
movq -0x80(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x90(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x2bcf53
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x50(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x2bce9b
movq -0x98(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x60(%rbp)
movq -0x98(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, -0x68(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2bcd4b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x78(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x78(%rbp), %rax
ja 0x2bcbf8
movq -0x68(%rbp), %rax
movq %rax, -0x160(%rbp)
jmp 0x2bcc03
movq -0x78(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jb 0x2bcc28
movq -0x60(%rbp), %rax
movq %rax, -0x170(%rbp)
jmp 0x2bcc33
movq -0x70(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x168(%rbp), %rax
movq -0x170(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x2bccb2
movq -0x68(%rbp), %rax
cmpq -0x78(%rbp), %rax
ja 0x2bcc5d
movq -0x68(%rbp), %rax
movq %rax, -0x178(%rbp)
jmp 0x2bcc68
movq -0x78(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jb 0x2bcc8d
movq -0x60(%rbp), %rax
movq %rax, -0x188(%rbp)
jmp 0x2bcc98
movq -0x70(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x180(%rbp), %rax
movq -0x188(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x190(%rbp)
jmp 0x2bccbd
xorl %eax, %eax
movq %rax, -0x190(%rbp)
jmp 0x2bccbd
movq -0x190(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x2bcd38
movq -0x58(%rbp), %xmm0
movaps 0xc5323(%rip), %xmm3    # 0x382010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0xc5327(%rip), %xmm2    # 0x382020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x68(%rbp), %rax
movq -0x60(%rbp), %rcx
subq %rcx, %rax
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd -0x30(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2bcd38
jmp 0x2bcd4b
jmp 0x2bcd3a
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x2bcba2
movq -0x80(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2bcd5d
jmp 0x2bcf42
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x98(%rbp), %rdx
movl 0x10(%rdx), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x1a0(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x98(%rbp), %rcx
movl 0x10(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x198(%rbp)
movq -0x98(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x2bcdf1
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x98(%rbp), %rcx
movl 0x10(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x98(%rbp), %rcx
subl 0x18(%rcx), %eax
subl $0x1, %eax
movl %eax, -0x1a4(%rbp)
jmp 0x2bce01
movq -0x98(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x1a4(%rbp)
movl -0x1a4(%rbp), %eax
movl %eax, %eax
movq %rax, -0x1b0(%rbp)
movq -0x98(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x2bce52
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x98(%rbp), %rcx
movl 0x10(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x98(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, -0x1b4(%rbp)
jmp 0x2bce65
movq -0x98(%rbp), %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
movl %eax, -0x1b4(%rbp)
movq -0x1b0(%rbp), %rdx
movq -0x198(%rbp), %rsi
movq -0x1a0(%rbp), %rdi
movl -0x1b4(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movsd -0x30(%rbp), %xmm0
callq 0x2bc1c0
cmpq $0x0, %rax
je 0x2bce99
jmp 0x2bcf42
jmp 0x2bce9b
movq -0x98(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x90(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x2bcf30
movq -0x20(%rbp), %rax
movq (%rax), %rsi
imulq $0xa8, -0x50(%rbp), %rax
addq %rax, %rsi
leaq -0x140(%rbp), %rdi
movl $0xa8, %edx
callq 0x2180
movq -0x20(%rbp), %rax
movq (%rax), %rsi
imulq $0xa8, -0x90(%rbp), %rax
addq %rax, %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdi
imulq $0xa8, -0x50(%rbp), %rax
addq %rax, %rdi
movl $0xa8, %edx
callq 0x2180
movq -0x20(%rbp), %rax
movq (%rax), %rdi
imulq $0xa8, -0x90(%rbp), %rax
addq %rax, %rdi
leaq -0x140(%rbp), %rsi
movl $0xa8, %edx
callq 0x2180
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2bcb35
movq -0x90(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopl (%rax,%rax)