// File: /workspace/github_cpp_makefile_star2_O3/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 0x1365ef
movsd %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r14, %rdi
callq 0xc49f6
movq %r14, 0x8(%rsp)
movq %r14, 0xf8(%rbx)
movq 0x26caf7(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x21c582(%rip), %rsi    # 0x244a75
leaq 0x21c58c(%rip), %rdx    # 0x244a86
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x22b0
movq $0x1, 0xb4(%rbx)
movl 0xb0(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x1bfc8b(%rip), %rsi    # 0x1e81ae
movq %rbx, %rdx
callq 0x108f2c
movq 0x8(%rbx), %rax
cmpq $0x0, (%rax)
jne 0x2853a
xorl %r13d, %r13d
jmp 0x2855c
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 0x28546
movq 0x26ca7d(%rip), %rbp    # 0x294fe0
movq (%rbp), %rdi
leaq 0x21c52d(%rip), %rsi    # 0x244a9b
leaq 0x21c511(%rip), %r12    # 0x244a86
xorl %r14d, %r14d
movq %r12, %rdx
movq %r13, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x22b0
movq 0x88(%rbx), %rax
movq %r15, (%rax,%r13,8)
movq %rbp, %r13
movl %r15d, 0x6c(%rbx)
movl %r15d, 0x68(%rbx)
movl %r15d, %eax
imulq $0x18, %rax, %rdi
callq 0x2280
movq %rax, 0x70(%rbx)
movq (%rbp), %rdi
leaq 0x21c4fc(%rip), %rsi    # 0x244ab5
movq %r12, %rdx
xorl %eax, %eax
callq 0x22b0
andq $0x0, 0xb4(%rbx)
movl 0xb0(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x1bfbcf(%rip), %rsi    # 0x1e81ae
movq %rbx, %rdx
callq 0x108f2c
movl 0x68(%rbx), %r15d
movl %r15d, 0x94(%rbx)
movl %r15d, 0x90(%rbx)
imulq $0x18, %r15, %rdi
callq 0x2280
movq %rax, 0x98(%rbx)
movq (%rbp), %rdi
leaq 0x21c4b2(%rip), %rsi    # 0x244ac6
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, 0x90(%rbx)
movabsq $0x100000000, %r12      # imm = 0x100000000
je 0x28692
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), %r14d
addq $0x18, %rcx
addq %r12, %rax
cmpq %r14, %rdx
jb 0x2863a
movq 0x98(%rbx), %rdi
imulq $0x18, %r14, %rsi
addq %rdi, %rsi
callq 0x1a1df3
movl 0x90(%rbx), %edx
movabsq $0x7fffffff00000000, %r10 # imm = 0x7FFFFFFF00000000
testq %rdx, %rdx
jne 0x286c2
xorl %r15d, %r15d
jmp 0x2884f
pushq $0x1
popq %r14
xorl %r13d, %r13d
movl %edx, %ecx
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %eax, %eax
cmpq %rdx, %r14
je 0x286f5
movq 0x98(%rbx), %rdx
imulq $0x18, %rax, %rsi
movq (%rdx,%rsi), %rsi
imulq $0x18, %r14, %rdi
cmpq (%rdx,%rdi), %rsi
je 0x287a2
movq %r14, %rbp
subq %rax, %rbp
jbe 0x2875e
movq 0x70(%rbx), %rdx
imulq $0x18, %rax, %rcx
movq 0x98(%rbx), %rsi
movq (%rsi,%rcx), %r8
movq 0x8(%rsi,%rcx), %rdi
movq %rdi, %r9
shlq $0x20, %r9
andq %r10, %r9
shrq $0x20, %rdi
orq %r9, %rdi
imulq $0x18, %rdi, %rdi
cmpq (%rdx,%rdi), %r8
jne 0x28dce
addq %rcx, %rsi
addq %rdi, %rdx
movq 0x10(%rdx), %r8
movq %r8, 0x10(%rsi)
movupd (%rdx), %xmm0
movupd %xmm0, (%rsi)
movq 0x70(%rbx), %rdx
movq %rax, (%rdx,%rdi)
incq %rax
addq $0x18, %rcx
cmpq %rax, %r14
jne 0x28705
cmpq %r12, %r13
jne 0x28792
leaq (,%r13,2), %r12
testq %r13, %r13
pushq $0x2
popq %rax
cmoveq %rax, %r12
leaq (,%r12,8), %rsi
movq %r15, %rdi
callq 0x2370
movabsq $0x7fffffff00000000, %r10 # imm = 0x7FFFFFFF00000000
movq %rax, %r15
movq %rbp, (%r15,%r13,8)
incq %r13
movl 0x90(%rbx), %ecx
movq %r14, %rax
leaq 0x1(%r14), %rsi
movl %ecx, %edx
cmpq %rdx, %r14
movq %rsi, %r14
jb 0x286d3
testq %r13, %r13
movabsq $0x100000000, %r12      # imm = 0x100000000
je 0x28848
leaq (%r15,%r13,8), %rsi
movq %r15, %rdi
callq 0x19dd99
movq %r13, %xmm0
punpckldq 0x208aa0(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x208aa8(%rip), %xmm0   # 0x231290
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x217394(%rip), %xmm1   # 0x23fb90
cvttsd2si %xmm1, %rax
movq %rax, %rcx
subsd 0x208afc(%rip), %xmm1   # 0x231308
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 0x28848
movl %eax, 0xbc(%rbx)
movq 0x26c791(%rip), %r13    # 0x294fe0
movq %r15, %rdi
callq 0x2220
movq (%r13), %rdi
movl 0xbc(%rbx), %ecx
leaq 0x21c2d5(%rip), %rsi    # 0x244b3d
leaq 0x21c217(%rip), %r15    # 0x244a86
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
movq (%r13), %rdi
leaq 0x21c2d5(%rip), %rsi    # 0x244b59
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
movq %r12, 0xb4(%rbx)
movl 0xb0(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x1bf905(%rip), %rsi    # 0x1e81ae
movq %rbx, %rdx
callq 0x108f2c
movq (%r13), %rdi
leaq 0x21c2ae(%rip), %rsi    # 0x244b6a
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, 0xb0(%rbx)
jle 0x2891e
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x38b4b
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 0x288d5
movq 0x70(%rbx), %rdi
callq 0x2220
movq 0x88(%rbx), %rdi
callq 0x2220
movq 0x18(%rbx), %rdi
callq 0x2220
movq (%r13), %rdi
leaq 0x21c234(%rip), %rsi    # 0x244b7b
leaq 0x21c138(%rip), %rdx    # 0x244a86
xorl %eax, %eax
callq 0x22b0
movl 0x94(%rbx), %ecx
movq 0x8(%rbx), %rax
movq (%rax), %rax
cmpq %rcx, %rax
jbe 0x289b0
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
movl (%rax), %eax
movq 0x8(%rsp), %rsi
movl %eax, 0x90(%rbx)
testl %eax, %eax
je 0x289ed
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 0x289c4
movq (%rsi), %r15
movl 0xb0(%rbx), %esi
testl %esi, %esi
jle 0x28aa1
xorl %eax, %eax
pushq $0x1
popq %rcx
pushq $0x1c
popq %rdx
movq 0x20(%rbx), %rdi
imulq $0x68, %rax, %r8
movq 0x20(%rdi,%r8), %r10
testq %r10, %r10
je 0x28a92
leaq (%rdi,%r8), %rsi
addq $0x18, %rsi
movq %rdx, %rdi
xorl %r9d, %r9d
movq %rcx, %r8
cmpq %r10, %r8
je 0x28a3f
movq (%rsi), %r11
movl (%r11,%rdi), %ebp
imulq $0x1c, %r9, %r14
cmpl (%r11,%r14), %ebp
je 0x28a80
cmpq %r9, %r8
jbe 0x28a7d
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 0x8(%rsi), %r10
movq %r8, %r9
incq %r8
addq $0x1c, %rdi
cmpq %r10, %r8
jbe 0x28a29
movl 0xb0(%rbx), %esi
incq %rax
movslq %esi, %rdi
cmpq %rdi, %rax
jl 0x28a06
movq (%r13), %rdi
leaq 0x21c0e0(%rip), %rsi    # 0x244b8c
leaq 0x21bfd3(%rip), %rdx    # 0x244a86
xorl %eax, %eax
callq 0x22b0
movl 0xb0(%rbx), %edi
movq 0x8(%rbx), %rax
movq (%rax), %rcx
leaq 0x1bfe66(%rip), %rsi    # 0x1e8934
movq %rbx, %rdx
callq 0x108f2c
movq 0x8(%rsp), %r11
cmpq %r15, 0x8(%r11)
jae 0x28b32
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(%r11)
movq 0x10(%r11), %rdi
imulq $0x30, %rax, %rsi
callq 0x2370
movq 0x8(%rsp), %r11
movq %rax, 0x10(%r11)
movl 0x90(%rbx), %eax
testl %eax, %eax
je 0x28d34
xorl %r15d, %r15d
movsd 0x20d22d(%rip), %xmm3   # 0x235d78
xorpd %xmm4, %xmm4
movq 0x98(%rbx), %r13
imulq $0x18, %r15, %rcx
movq 0x8(%r13,%rcx), %rsi
testl %esi, %esi
jns 0x28d26
addq %rcx, %r13
movq 0x20(%rbx), %rdx
movq (%r13), %r9
movl %r9d, %ecx
imulq $0x68, %rcx, %r8
movq %rsi, %rbp
shlq $0x20, %rbp
movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000
andq %rcx, %rbp
movq %rsi, %rdi
shrq $0x20, %rdi
orq %rdi, %rbp
movq 0x18(%rdx,%r8), %rcx
imulq $0x1c, %rbp, %r10
shrq $0x20, %r9
cmpl (%rcx,%r10), %r9d
jne 0x28e0c
leaq (%rdx,%r8), %r12
addq $0x18, %r12
movq 0x8(%r12), %rdx
cmpq %rdx, %rbp
jae 0x28d26
movabsq $0x1c00000000, %rax     # imm = 0x1C00000000
imulq %rax, %rsi
imulq $0x1c, %rdi, %r14
addq %rsi, %r14
movl (%rcx,%r14), %eax
cmpl %eax, 0x4(%r13)
jne 0x28d20
cmpl 0xc(%rcx,%r14), %eax
je 0x28d10
cmpl $-0x1, 0x4(%rcx,%r14)
jne 0x28c06
cmpl $-0x1, 0x8(%rcx,%r14)
je 0x28d10
movq (%r11), %rcx
movq 0x10(%r11), %rax
cmpq 0x8(%r11), %rcx
jne 0x28c49
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
pushq $0x2
popq %rcx
cmoveq %rcx, %rdx
movq %rdx, 0x8(%r11)
imulq $0x30, %rdx, %rsi
movq %rax, %rdi
callq 0x2370
xorpd %xmm4, %xmm4
movsd 0x20d13b(%rip), %xmm3   # 0x235d78
movq 0x8(%rsp), %r11
movq %rax, 0x10(%r11)
movq (%r11), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r11)
imulq $0x30, %rcx, %rdx
movb 0x28(%rax,%rdx), %cl
andb $-0x40, %cl
orb $0x3, %cl
movb %cl, 0x28(%rax,%rdx)
movq (%r12), %rcx
movl 0x18(%rcx,%r14), %ecx
shrl $0x19, %ecx
andb $0x40, %cl
orb $0x3, %cl
movb %cl, 0x28(%rax,%rdx)
movq (%r12), %rcx
movl (%rcx,%r14), %esi
movl %esi, 0x8(%rax,%rdx)
movl 0x4(%rcx,%r14), %esi
movl %esi, (%rax,%rdx)
movl 0x8(%rcx,%r14), %edi
movl %edi, 0x4(%rax,%rdx)
movl 0xc(%rcx,%r14), %r8d
movl %r8d, 0x14(%rax,%rdx)
movl 0x10(%rcx,%r14), %r8d
movl %r8d, 0xc(%rax,%rdx)
movl 0x14(%rcx,%r14), %r9d
movl %r9d, 0x10(%rax,%rdx)
subl %esi, %edi
cvtsi2sd %rdi, %xmm0
movl 0x18(%rcx,%r14), %esi
movl $0x3fffffff, %edi       # imm = 0x3FFFFFFF
andl %edi, %esi
cvtsi2sd %esi, %xmm1
subsd %xmm1, %xmm0
subl %r8d, %r9d
cvtsi2sd %r9, %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,%rdx)
ucomisd %xmm4, %xmm1
jbe 0x28ded
movq 0x8(%r12), %rdx
incq %rbp
addq $0x1c, %r14
cmpq %rdx, %rbp
jb 0x28bd9
movl 0x90(%rbx), %eax
incq %r15
movl %eax, %ecx
cmpq %rcx, %r15
jb 0x28b4f
movq 0x26c2a5(%rip), %r12    # 0x294fe0
movq (%r12), %rdi
leaq 0x21be61(%rip), %rsi    # 0x244ba7
leaq 0x21bd39(%rip), %rdx    # 0x244a86
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, 0xb0(%rbx)
jle 0x28d84
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 0x28d64
movq 0x98(%rbx), %rdi
callq 0x2220
movq 0x20(%rbx), %rdi
callq 0x2220
movq (%r12), %rbx
callq 0x1365ef
subsd 0x10(%rsp), %xmm0
leaq 0x2136c0(%rip), %rsi    # 0x23c46f
leaq 0x21bcd0(%rip), %rdx    # 0x244a86
movq %rbx, %rdi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
leaq 0x21bd0d(%rip), %rdi    # 0x244ae2
leaq 0x216e7f(%rip), %rsi    # 0x23fc5b
leaq 0x21bd22(%rip), %rcx    # 0x244b05
movl $0x5653, %edx           # imm = 0x5653
callq 0x2110
leaq 0x21bda9(%rip), %rdi    # 0x244b9d
leaq 0x216e60(%rip), %rsi    # 0x23fc5b
leaq 0x21bd03(%rip), %rcx    # 0x244b05
movl $0x569a, %edx           # imm = 0x569A
callq 0x2110
leaq 0x20df53(%rip), %rdi    # 0x236d66
leaq 0x216e41(%rip), %rsi    # 0x23fc5b
leaq 0x21bce4(%rip), %rcx    # 0x244b05
movl $0x5691, %edx           # imm = 0x5691
callq 0x2110