// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: gen_trans_base_count(ug_trans_t*, kv_u_trans_t*)
void gen_trans_base_count(ug_trans_t *p, kv_u_trans_t *res)
{
	double index_time = yak_realtime();
	// ha_flt_tab = NULL;
	uint64_t i, k, l, occ, m, cc; kv_ul_ov_t *bl = NULL; 
	u_trans_t *z; ha_mzl_t *tz;
	clean_u_trans_t_idx_adv(res, p->ug, p->rg); p->filter = res;
	fprintf(stderr, "[M::%s::] ==> 0\n", __func__);
	p->is_cnt = 1; p->is_ovlp = 0; 
	kt_for(p->n_thread, worker_for_trans_ovlp, p, p->ug->u.n);
	for (i = l = 0; i < p->ug->u.n; i++) {
		occ = p->idx_n.a[i]; p->idx_n.a[i] = l; l += occ;
	}
	fprintf(stderr, "[M::%s::] i::%lu, l::%lu\n", __func__, i, l);
	p->idx_n.a[i] = l;
	p->idx_a.n = p->idx_a.m = l; MALLOC(p->idx_a.a, p->idx_a.n);
	fprintf(stderr, "[M::%s::] ==> 1\n", __func__);
	p->is_cnt = 0; p->is_ovlp = 0; 
	kt_for(p->n_thread, worker_for_trans_ovlp, p, p->ug->u.n);
	p->srt_a.n = p->srt_a.m = p->idx_a.n; MALLOC(p->srt_a.a, p->srt_a.n);
	fprintf(stderr, "[M::%s::] p->idx_a.n::%lu \n", __func__, (uint64_t)p->idx_a.n);
	// memcpy(p->srt_a.a, p->idx_a.a, p->srt_a.n*sizeof((*(p->srt_a.a))));
	for (i = 0; i < p->srt_a.n; i++) {
		p->srt_a.a[i] = p->idx_a.a[i];
		p->srt_a.a[i].pos = (uint32_t)i;
		p->srt_a.a[i].rid = i>>32;
	}
	radix_sort_ha_mzl_t_srt(p->srt_a.a, p->srt_a.a + p->srt_a.n);
	kvec_t(uint64_t) cut; kv_init(cut);
	for (k = 1, l = 0; k <= p->srt_a.n; k++) {
		if(k == p->srt_a.n || p->srt_a.a[l].x != p->srt_a.a[k].x) {
			for (i = l; i < k; i++) {
				m = p->srt_a.a[i].rid; m <<= 32; m |= p->srt_a.a[i].pos;
				assert(p->srt_a.a[i].x == p->idx_a.a[m].x);
				p->srt_a.a[i] = p->idx_a.a[m]; p->idx_a.a[m].x = i;
			}
			kv_push(uint64_t, cut, (k - l));
			l = k;
		}
	}

	if(cut.n > 0) {
		radix_sort_gfa64(cut.a, cut.a + cut.n);
		m = cut.n * 0.0002; cc = cut.a[cut.n-1] + 1;
		if(m > 0 && m <= cut.n) cc = cut.a[cut.n-m] + 1;
		if(cc < (uint64_t)p->mini_cut) p->mini_cut = cc;
	}
	kv_destroy(cut);
	fprintf(stderr, "[M::%s::] p->mini_cut::%d \n", __func__, p->mini_cut);
	
	fprintf(stderr, "[M::%s::] ==> 2\n", __func__);
	p->is_cnt = 0; p->is_ovlp = 1; 
	kt_for(p->n_thread, worker_for_trans_ovlp, p, p->ug->u.n);
	fprintf(stderr, "[M::%s::] ==> 3\n", __func__);
	for (i = 0; (int64_t)i < p->n_thread; i++) {
		ha_ovec_destroy(p->hab[i]);
		free(p->ll[i].lo.a); free(p->ll[i].srt.a.a); free(p->ll[i].tc.a);
	}
	free(p->idx_a.a); free(p->idx_n.a); free(p->hab); 
	// destory_bubbles(p->bub); free(p->bub);

	fprintf(stderr, "[M::%s::] ==> 4\n", __func__);
	///make results consistent
	kv_resize(ha_mzl_t, p->srt_a, p->ug->u.n); p->srt_a.n = p->ug->u.n;
	for (i = 0; i < p->srt_a.n; i++) {
		tz = &(p->srt_a.a[i]);
		tz->x = (uint64_t)-1; tz->rev = 0;
		tz->pos = tz->rid = tz->span = 0;
	}
	// memset(p->srt_a.a, 0, sizeof((*(p->srt_a.a)))*p->srt_a.n);
	for (i = 0, occ = res->n; (int64_t)i < p->n_thread; i++) {
		bl = &(p->ll[i].tk); 
		if(!(bl->n)) continue;
		for (k = 1, l = 0; k <= bl->n; k++) {
			if(k == bl->n || bl->a[k].qn != bl->a[l].qn) {
				if(k > l) {
					tz = &(p->srt_a.a[bl->a[l].qn]);
					tz->x = bl->a[l].qn; tz->x <<= 32; tz->x |= i;
					tz->rid = l>>32; tz->pos = (uint32_t)l; tz->rev = 1;
					occ += (k - l);
				}
				l = k;
			}
		}
	}
	fprintf(stderr, "[M::%s::] ==> 5\n", __func__);
	kt_for(p->n_thread, worker_for_sysm_trans_ovlp, p, p->ug->u.n);
	// assert(p->srt_a.n <= p->ug->u.n); 
	// radix_sort_ha_mzl_t_srt(p->srt_a.a, p->srt_a.a + p->srt_a.n);
	kv_resize(u_trans_t, *res, occ); 
	for (i = 0; i < p->srt_a.n; i++) {
		tz = &(p->srt_a.a[i]);
		if(!(tz->rev)) continue;
		bl = &(p->ll[(uint32_t)(tz->x)].tk);
		k = tz->rid; k <<= 32; k += tz->pos;
		assert(bl->a[k].qn == (tz->x>>32));
		for (; (k < bl->n) && (bl->a[k].qn == (tz->x>>32)); k++) {
			if(bl->a[k].qn == bl->a[k].tn) continue;
			if(bl->a[k].qs == (uint32_t)-1 && bl->a[k].qe == (uint32_t)-1) continue;
			
			kv_pushp(u_trans_t, *res, &z);
			z->f = RC_3; z->rev = bl->a[k].rev; z->del = 0; 
			z->qn = bl->a[k].qn; z->qs = bl->a[k].qs; z->qe = bl->a[k].qe;
			z->tn = bl->a[k].tn; z->ts = bl->a[k].ts; z->te = bl->a[k].te;
			z->nw = cal_trans_ov_w(&(bl->a[k])); assert(z->nw > 0);
			// if(z->nw <= 0) res->n--;
		}
	}
	fprintf(stderr, "[M::%s::] ==> 6\n", __func__);
	for (i = 0; (int64_t)i < p->n_thread; i++) free(p->ll[i].tk.a);
	free(p->srt_a.a); free(p->ll);
	fprintf(stderr, "[M::%s::%.3f] ==> Qualification\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1303c7
movsd %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r14, %rdi
callq 0xc3b24
movq %r14, 0x8(%rsp)
movq %r14, 0xf8(%rbx)
movq 0x261047(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
leaq 0x20f802(%rip), %rsi    # 0x2387a5
leaq 0x20f80c(%rip), %rdx    # 0x2387b6
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x22b0
movq $0x1, 0xb4(%rbx)
movl 0xb0(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x1b477c(%rip), %rsi    # 0x1dd74f
movq %rbx, %rdx
callq 0x1047b4
movq 0x8(%rbx), %rax
cmpq $0x0, (%rax)
jne 0x28fea
xorl %r13d, %r13d
jmp 0x2900c
movq 0x88(%rbx), %rcx
xorl %r13d, %r13d
xorl %edx, %edx
movq (%rcx,%r13,8), %r15
addq %rdx, %r15
movq %rdx, (%rcx,%r13,8)
incq %r13
movq %r15, %rdx
cmpq (%rax), %r13
jb 0x28ff6
movq 0x260fcd(%rip), %r14    # 0x289fe0
movq (%r14), %rdi
leaq 0x20f7ae(%rip), %rsi    # 0x2387cb
leaq 0x20f792(%rip), %r12    # 0x2387b6
movq %r12, %rdx
movq %r13, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x22b0
movq 0x88(%rbx), %rax
movq %r15, (%rax,%r13,8)
movl %r15d, 0x6c(%rbx)
movl %r15d, 0x68(%rbx)
movl %r15d, %eax
imulq $0x18, %rax, %rdi
callq 0x2280
movq %rax, 0x70(%rbx)
movq (%r14), %rdi
leaq 0x20f784(%rip), %rsi    # 0x2387e5
movq %r12, %rdx
xorl %eax, %eax
callq 0x22b0
andq $0x0, 0xb4(%rbx)
movl 0xb0(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x1b46c8(%rip), %rsi    # 0x1dd74f
movq %rbx, %rdx
callq 0x1047b4
movl 0x68(%rbx), %r15d
movl %r15d, 0x94(%rbx)
movl %r15d, 0x90(%rbx)
imulq $0x18, %r15, %rdi
callq 0x2280
movq %rax, 0x98(%rbx)
movq (%r14), %rdi
leaq 0x20f73b(%rip), %rsi    # 0x2387f6
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x22b0
movl 0x90(%rbx), %esi
movabsq $0x100000000, %r9       # imm = 0x100000000
testq %rsi, %rsi
je 0x2913a
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
movq 0x70(%rbx), %rsi
movq 0x98(%rbx), %rdi
movq 0x10(%rsi,%rcx), %r8
movq %r8, 0x10(%rdi,%rcx)
movupd (%rsi,%rcx), %xmm0
movupd %xmm0, (%rdi,%rcx)
movq 0x98(%rbx), %rsi
movl 0x8(%rsi,%rcx), %edi
addq %rax, %rdi
movq %rdi, 0x8(%rsi,%rcx)
movq 0x98(%rbx), %rsi
andq $-0x80000000, 0x8(%rsi,%rcx) # imm = 0x80000000
incq %rdx
movl 0x90(%rbx), %esi
addq $0x18, %rcx
addq %r9, %rax
cmpq %rsi, %rdx
jb 0x290e3
movq 0x98(%rbx), %rdi
imulq $0x18, %rsi, %rsi
addq %rdi, %rsi
callq 0x19910c
movl 0x90(%rbx), %edx
xorl %r15d, %r15d
movabsq $0x7fffffff00000000, %r11 # imm = 0x7FFFFFFF00000000
movl $0x0, %r13d
testq %rdx, %rdx
je 0x29256
pushq $0x1
popq %r14
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %ecx, %ecx
cmpq %rdx, %r14
je 0x2919f
movq 0x98(%rbx), %rdx
imulq $0x18, %rcx, %rsi
movq (%rdx,%rsi), %rsi
imulq $0x18, %r14, %rdi
cmpq (%rdx,%rdi), %rsi
je 0x29240
movq %r14, %r12
subq %rcx, %r12
jbe 0x29208
imulq $0x18, %rcx, %rdx
movq 0x70(%rbx), %rdi
movq 0x98(%rbx), %rsi
movq (%rsi,%rdx), %r9
movq 0x8(%rsi,%rdx), %r8
movq %r8, %r10
shlq $0x20, %r10
andq %r11, %r10
shrq $0x20, %r8
orq %r10, %r8
imulq $0x18, %r8, %r8
cmpq (%rdi,%r8), %r9
jne 0x29898
addq %rdx, %rsi
addq %r8, %rdi
movq 0x10(%rdi), %r9
movq %r9, 0x10(%rsi)
movupd (%rdi), %xmm0
movupd %xmm0, (%rsi)
movq 0x70(%rbx), %rsi
movq %rcx, (%rsi,%r8)
incq %rcx
addq $0x18, %rdx
cmpq %rcx, %r14
jne 0x291ab
cmpq %rbp, %r13
jne 0x29236
movq %r15, %rdi
movq %r11, %r15
movq %rbp, %rax
addq %rbp, %rbp
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rbp
leaq (,%rbp,8), %rsi
callq 0x2370
movq %r15, %r11
movq %rax, %r15
movq %r12, (%r15,%r13,8)
incq %r13
movq %r14, %rcx
leaq 0x1(%r14), %rsi
movl 0x90(%rbx), %edx
cmpq %rdx, %r14
movq %rsi, %r14
jb 0x2917d
testq %r13, %r13
je 0x292e0
leaq (%r15,%r13,8), %rsi
movq %r15, %rdi
callq 0x194fef
movq %r13, %xmm0
punpckldq 0x1fbfc8(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1fbfd0(%rip), %xmm0   # 0x225250
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x20a62c(%rip), %xmm1   # 0x2338c0
cvttsd2si %xmm1, %rax
movq %rax, %rcx
subsd 0x1fbfc4(%rip), %xmm1   # 0x225268
sarq $0x3f, %rcx
cvttsd2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq -0x1(%rdx), %rax
negq %rdx
cmpq %r13, %rax
pushq $-0x1
popq %rax
cmovbq %rdx, %rax
addq %r13, %rax
movq (%r15,%rax,8), %rax
incq %rax
movslq 0xbc(%rbx), %rcx
cmpq %rcx, %rax
jae 0x292e0
movl %eax, 0xbc(%rbx)
movq %r15, %rdi
callq 0x2220
movq 0x260cf1(%rip), %r14    # 0x289fe0
movq (%r14), %rdi
movl 0xbc(%rbx), %ecx
leaq 0x20f56e(%rip), %rsi    # 0x23886d
leaq 0x20f4b0(%rip), %r15    # 0x2387b6
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rdi
leaq 0x20f56f(%rip), %rsi    # 0x238889
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0xb4(%rbx)
movl 0xb0(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x1b4406(%rip), %rsi    # 0x1dd74f
movq %rbx, %rdx
callq 0x1047b4
movq (%r14), %rdi
leaq 0x20f53f(%rip), %rsi    # 0x23889a
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, 0xb0(%rbx)
jle 0x293bd
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x395cd
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2220
movq 0x20(%rbx), %rax
movq 0x58(%rax,%r14), %rdi
callq 0x2220
movq 0x20(%rbx), %rax
movq 0x30(%rax,%r14), %rdi
callq 0x2220
incq %r15
movslq 0xb0(%rbx), %rax
addq $0x68, %r14
cmpq %rax, %r15
jl 0x29374
movq 0x70(%rbx), %rdi
callq 0x2220
movq 0x88(%rbx), %rdi
callq 0x2220
movq 0x18(%rbx), %rdi
callq 0x2220
movq 0x260bfe(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
leaq 0x20f4bf(%rip), %rsi    # 0x2388ab
leaq 0x20f3c3(%rip), %rdx    # 0x2387b6
xorl %eax, %eax
callq 0x22b0
movl 0x94(%rbx), %ecx
movq 0x8(%rbx), %rax
movq (%rax), %rax
cmpq %rcx, %rax
jbe 0x2944f
decl %eax
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
orl %eax, %ecx
incl %ecx
movl %ecx, 0x94(%rbx)
movq 0x98(%rbx), %rdi
imulq $0x18, %rcx, %rsi
callq 0x2370
movq %rax, 0x98(%rbx)
movq 0x8(%rbx), %rax
movq (%rax), %rax
movl %eax, 0x90(%rbx)
shlq $0x20, %rax
je 0x29490
pushq $0x10
popq %rax
xorl %ecx, %ecx
movq 0x98(%rbx), %rdx
orq $-0x1, -0x10(%rdx,%rax)
movb $0x0, (%rdx,%rax)
andq $0x0, -0x8(%rdx,%rax)
incq %rcx
movl 0x90(%rbx), %edx
addq $0x18, %rax
cmpq %rdx, %rcx
jb 0x29467
movq 0x8(%rsp), %rax
movq (%rax), %r15
cmpl $0x0, 0xb0(%rbx)
jle 0x2954c
xorl %eax, %eax
pushq $0x1
popq %rcx
pushq $0x1c
popq %rdx
movq 0x20(%rbx), %rsi
imulq $0x68, %rax, %rdi
cmpq $0x0, 0x20(%rsi,%rdi)
je 0x29539
addq %rdi, %rsi
addq $0x18, %rsi
movq 0x8(%rsi), %r10
testq %r10, %r10
je 0x29539
movq %rdx, %rdi
xorl %r9d, %r9d
movq %rcx, %r8
cmpq %r10, %r8
je 0x294ec
movq (%rsi), %r10
movl (%r10,%rdi), %r11d
imulq $0x1c, %r9, %r14
cmpl (%r10,%r14), %r11d
je 0x29529
cmpq %r9, %r8
jbe 0x29526
movq 0x98(%rbx), %r10
movq (%rsi), %r11
imulq $0x1c, %r9, %r14
movl (%r11,%r14), %r11d
imulq $0x18, %r11, %r14
shlq $0x20, %r11
orq %rax, %r11
movq %r11, (%r10,%r14)
subq %r9, %r15
rolq $0x20, %r9
btsq $0x1f, %r9
movq %r9, 0x8(%r10,%r14)
addq %r8, %r15
movq %r8, %r9
incq %r8
movq 0x8(%rsi), %r10
addq $0x1c, %rdi
cmpq %r10, %r8
jbe 0x294d6
incq %rax
movslq 0xb0(%rbx), %rsi
cmpq %rsi, %rax
jl 0x294ad
movq 0x260a8d(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
leaq 0x20f35f(%rip), %rsi    # 0x2388bc
leaq 0x20f252(%rip), %rdx    # 0x2387b6
xorl %eax, %eax
callq 0x22b0
movl 0xb0(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x1b4947(%rip), %rsi    # 0x1ddec6
movq %rbx, %rdx
callq 0x1047b4
movq 0x8(%rsp), %r10
cmpq %r15, 0x8(%r10)
jae 0x295e3
decq %r15
movq %r15, %rax
shrq %rax
orq %r15, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x10, %rax
orq %rcx, %rax
incq %rax
movq %rax, 0x8(%r10)
movq 0x10(%r10), %rdi
imulq $0x30, %rax, %rsi
callq 0x2370
movq 0x8(%rsp), %r10
movq %rax, 0x10(%r10)
cmpl $0x0, 0x90(%rbx)
je 0x297f9
xorl %r15d, %r15d
movl $0x3fffffff, %r11d      # imm = 0x3FFFFFFF
movsd 0x20057f(%rip), %xmm3   # 0x229b80
xorpd %xmm4, %xmm4
movq 0x98(%rbx), %r13
imulq $0x18, %r15, %rcx
movq 0x8(%r13,%rcx), %rax
testl %eax, %eax
jns 0x297e7
addq %rcx, %r13
movq 0x20(%rbx), %rcx
movq (%r13), %rdi
movl %edi, %edx
imulq $0x68, %rdx, %rsi
movq %rax, %rbp
shlq $0x20, %rbp
movabsq $0x7fffffff00000000, %rdx # imm = 0x7FFFFFFF00000000
andq %rdx, %rbp
movq %rax, %rdx
shrq $0x20, %rdx
orq %rdx, %rbp
movq 0x18(%rcx,%rsi), %r8
imulq $0x1c, %rbp, %r9
shrq $0x20, %rdi
cmpl (%r8,%r9), %edi
jne 0x298d6
leaq (%rcx,%rsi), %r12
addq $0x18, %r12
cmpq 0x8(%r12), %rbp
jae 0x297e7
movabsq $0x1c00000000, %rcx     # imm = 0x1C00000000
imulq %rcx, %rax
imulq $0x1c, %rdx, %rcx
leaq (%rax,%rcx), %r14
addq $0xc, %r14
movq (%r12), %rax
movl -0xc(%rax,%r14), %ecx
cmpl %ecx, 0x4(%r13)
jne 0x297e7
cmpl (%rax,%r14), %ecx
je 0x297d5
cmpl $-0x1, -0x8(%rax,%r14)
jne 0x296c1
cmpl $-0x1, -0x4(%rax,%r14)
je 0x297d5
movq 0x8(%r10), %rax
cmpq %rax, (%r10)
jne 0x29704
leaq (%rax,%rax), %rcx
testq %rax, %rax
pushq $0x2
popq %rax
cmoveq %rax, %rcx
movq %rcx, 0x8(%r10)
movq 0x10(%r10), %rdi
imulq $0x30, %rcx, %rsi
callq 0x2370
xorpd %xmm4, %xmm4
movsd 0x20048b(%rip), %xmm3   # 0x229b80
movl $0x3fffffff, %r11d      # imm = 0x3FFFFFFF
movq 0x8(%rsp), %r10
movq %rax, 0x10(%r10)
movq (%r10), %rcx
movq 0x10(%r10), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%r10)
imulq $0x30, %rcx, %rcx
movb 0x28(%rax,%rcx), %dl
andb $-0x40, %dl
orb $0x3, %dl
movb %dl, 0x28(%rax,%rcx)
movq (%r12), %rdx
movl 0xc(%rdx,%r14), %edx
shrl $0x19, %edx
andb $0x40, %dl
orb $0x3, %dl
movb %dl, 0x28(%rax,%rcx)
movq (%r12), %rdx
movl -0xc(%rdx,%r14), %esi
movl %esi, 0x8(%rax,%rcx)
movl -0x8(%rdx,%r14), %esi
movl %esi, (%rax,%rcx)
movl -0x4(%rdx,%r14), %esi
movl %esi, 0x4(%rax,%rcx)
movl (%rdx,%r14), %esi
movl %esi, 0x14(%rax,%rcx)
movl 0x4(%rdx,%r14), %esi
movl %esi, 0xc(%rax,%rcx)
movl 0x8(%rdx,%r14), %esi
movl %esi, 0x10(%rax,%rcx)
movl -0x4(%rdx,%r14), %esi
movl 0x8(%rdx,%r14), %edi
subl -0x8(%rdx,%r14), %esi
cvtsi2sd %rsi, %xmm0
movl 0xc(%rdx,%r14), %esi
andl %r11d, %esi
cvtsi2sd %esi, %xmm1
subl 0x4(%rdx,%r14), %edi
subsd %xmm1, %xmm0
cvtsi2sd %rdi, %xmm2
subsd %xmm1, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm1, %xmm0
addsd %xmm1, %xmm2
movapd %xmm0, %xmm1
cmplesd %xmm2, %xmm1
andpd %xmm1, %xmm0
andnpd %xmm2, %xmm1
orpd %xmm0, %xmm1
movlpd %xmm1, 0x20(%rax,%rcx)
ucomisd %xmm4, %xmm1
jbe 0x298b7
incq %rbp
addq $0x1c, %r14
cmpq 0x8(%r12), %rbp
jb 0x29690
incq %r15
movl 0x90(%rbx), %eax
cmpq %rax, %r15
jb 0x29605
movq 0x2607e0(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
leaq 0x20f0cd(%rip), %rsi    # 0x2388d7
leaq 0x20efa5(%rip), %rdx    # 0x2387b6
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, 0xb0(%rbx)
jle 0x29848
pushq $0x18
popq %r14
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x2220
incq %r15
movslq 0xb0(%rbx), %rax
addq $0x68, %r14
cmpq %rax, %r15
jl 0x29828
movq 0x98(%rbx), %rdi
callq 0x2220
movq 0x20(%rbx), %rdi
callq 0x2220
movq 0x26077c(%rip), %rax    # 0x289fe0
movq (%rax), %rbx
callq 0x1303c7
subsd 0x10(%rsp), %xmm0
leaq 0x2069ea(%rip), %rsi    # 0x230263
leaq 0x20ef36(%rip), %rdx    # 0x2387b6
movq %rbx, %rdi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
leaq 0x20ef73(%rip), %rdi    # 0x238812
leaq 0x20a0e5(%rip), %rsi    # 0x23398b
leaq 0x20ef88(%rip), %rcx    # 0x238835
movl $0x5653, %edx           # imm = 0x5653
callq 0x2110
leaq 0x20f00f(%rip), %rdi    # 0x2388cd
leaq 0x20a0c6(%rip), %rsi    # 0x23398b
leaq 0x20ef69(%rip), %rcx    # 0x238835
movl $0x569a, %edx           # imm = 0x569A
callq 0x2110
leaq 0x201299(%rip), %rdi    # 0x22ab76
leaq 0x20a0a7(%rip), %rsi    # 0x23398b
leaq 0x20ef4a(%rip), %rcx    # 0x238835
movl $0x5691, %edx           # imm = 0x5691
callq 0x2110