// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: gen_src_shared_interval_simple(unsigned int, ma_ug_t*, unsigned long*, unsigned long, kv_ul_ov_t*)
uint32_t gen_src_shared_interval_simple(uint32_t src, ma_ug_t *ug, uint64_t *flt, uint64_t flt_n, kv_ul_ov_t *res)
{
	uint32_t st, v, w, i, k, z, nv, nw, nz, rn; asg_arc_t *av, *aw, *az;
	ul_ov_t s1, s2, s3, s4, s5; rn = res->n; 

	st = src<<1; 
	v = st; av = asg_arc_a(ug->g, v); nv = asg_arc_n(ug->g, v);
	for (i = 0; i < nv; i++) {
        if(av[i].del) continue;
		if((av[i].v>>1) == (st>>1)) continue;
		w = av[i].v;
		cal_s_interval(ug, &(av[i]), &s1);
		if(s1.qn == src && s1.tn != src) kv_push(ul_ov_t, *res, s1);

		aw = asg_arc_a(ug->g, (w^1)); 
		nw = asg_arc_n(ug->g, (w^1));
		for (k = 0; k < nw; k++) {
			if(aw[k].del) continue;
			if((aw[k].v>>1) == (st>>1)) continue;

			cal_s_interval(ug, &(aw[k]), &s2);
			if(!cal_x_interval(ug, &s1, &s2, &s3)) continue;
			if(s3.qn == src && s3.tn != src) kv_push(ul_ov_t, *res, s3);

			az = asg_arc_a(ug->g, (aw[k].v^1)); 
			nz = asg_arc_n(ug->g, (aw[k].v^1));
			for (z = 0; z < nz; z++) {
				if(az[z].del) continue;
				cal_s_interval(ug, &(az[z]), &s4);
				if(!cal_x_interval(ug, &s3, &s4, &s5)) continue;
				if(s5.qn == src && s5.tn != src) kv_push(ul_ov_t, *res, s5);
			}
		}
    }

	st ^= 1; 
	v = st; av = asg_arc_a(ug->g, v); nv = asg_arc_n(ug->g, v);
	for (i = 0; i < nv; i++) {
        if(av[i].del) continue;
		if((av[i].v>>1) == (st>>1)) continue;
		w = av[i].v;
		cal_s_interval(ug, &(av[i]), &s1);
		if(s1.qn == src && s1.tn != src) kv_push(ul_ov_t, *res, s1);

		aw = asg_arc_a(ug->g, (w^1)); 
		nw = asg_arc_n(ug->g, (w^1));
		for (k = 0; k < nw; k++) {
			if(aw[k].del) continue;
			if((aw[k].v>>1) == (st>>1)) continue;

			cal_s_interval(ug, &(aw[k]), &s2);
			if(!cal_x_interval(ug, &s1, &s2, &s3)) continue;
			if(s3.qn == src && s3.tn != src) kv_push(ul_ov_t, *res, s3);

			az = asg_arc_a(ug->g, (aw[k].v^1)); 
			nz = asg_arc_n(ug->g, (aw[k].v^1));
			for (z = 0; z < nz; z++) {
				if(az[z].del) continue;
				cal_s_interval(ug, &(az[z]), &s4);
				if(!cal_x_interval(ug, &s3, &s4, &s5)) continue;
				if(s5.qn == src && s5.tn != src) kv_push(ul_ov_t, *res, s5);
			}
		}
    }

	radix_sort_ul_ov_srt_tn(res->a + rn, res->a + res->n);
	if(res->n > rn) {
		uint64_t os, oe, ovlpq, ovlpt, is_cov, fi = 0;
		for (k = rn + 1, i = rn; k <= res->n; k++) {
			if(k == res->n || res->a[k].tn != res->a[i].tn) {
				for (; fi < flt_n && (flt[fi]>>32) < res->a[i].tn; fi++);
				if(fi < flt_n && (flt[fi]>>32) == res->a[i].tn) {
					// on = k - i;
					if(k - i > 1) {
						for (v = i; v < k; v++) {
							if(res->a[v].tn == (uint32_t)-1) continue;
							for (z = i; z < k; z++) {
								if(v == z) continue;
								if(res->a[z].tn == (uint32_t)-1) continue;
								if(res->a[v].rev != res->a[z].rev) continue;

								os = MAX(res->a[v].qs, res->a[z].qs); 
								oe = MIN(res->a[v].qe, res->a[z].qe);
								if(oe <= os) continue;
								ovlpq = oe - os;

								os = MAX(res->a[v].ts, res->a[z].ts); 
								oe = MIN(res->a[v].te, res->a[z].te);
								if(oe <= os) continue;
								ovlpt = oe - os;

								is_cov = 0;
								if(((ovlpq == (res->a[v].qe-res->a[v].qs)) && (ovlpt == (res->a[v].te-res->a[v].ts))) || 
								((ovlpq == (res->a[z].qe-res->a[z].qs)) && (ovlpt == (res->a[z].te-res->a[z].ts)))) {
									is_cov = 1;
								}

								if(!is_cov) {
									if(ovlpq <= ((res->a[v].qe-res->a[v].qs)*0.95)) continue;
									if(ovlpq <= ((res->a[z].qe-res->a[z].qs)*0.95)) continue;
									if(ovlpt <= ((res->a[v].te-res->a[v].ts)*0.95)) continue;
									if(ovlpt <= ((res->a[z].te-res->a[z].ts)*0.95)) continue;
								}
					
								if(res->a[v].qs > res->a[z].qs) res->a[v].qs = res->a[z].qs;
								if(res->a[v].qe < res->a[z].qe) res->a[v].qe = res->a[z].qe;
								if(res->a[v].ts > res->a[z].ts) res->a[v].ts = res->a[z].ts;
								if(res->a[v].te < res->a[z].te) res->a[v].te = res->a[z].te;
								res->a[z].tn = (uint32_t)-1; ///on--;
							}
						}
						// if(on > 1) radix_sort_ul_ov_srt_qs(res->a + i, res->a + k);
					}
				} else {
					for (v = i; v < k; v++) res->a[v].tn = (uint32_t)-1;
				}
				i = k;
			}
		}
		for (k = z = rn; k < res->n; k++) {
			if(res->a[k].tn == (uint32_t)-1) continue;
			res->a[z] = res->a[k]; res->a[z].sec = ((uint32_t)(0x3fffffff));
			z++;
		}
		res->n = z;
	}
	return res->n - rn;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rcx, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movq %r8, 0x8(%rsp)
movq 0x8(%r8), %rax
movq %rax, 0x88(%rsp)
movq %rdi, 0x10(%rsp)
addl %edi, %edi
movq %rsi, 0x20(%rsp)
movq 0x18(%rsi), %rcx
movq 0x8(%rcx), %rax
movq 0x28(%rcx), %rcx
movq (%rcx,%rdi,8), %rdx
testl %edx, %edx
je 0x1c9fc3
movq %rdi, 0x50(%rsp)
movq %rdx, %rcx
shrq $0x20, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, 0x1c(%rsp)
movl %edx, %eax
movq %rax, 0x40(%rsp)
xorl %eax, %eax
leaq 0xac(%rsp), %r12
movq %rax, 0x48(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x28(%rsp), %rcx
cmpl $0x0, 0xc(%rcx,%rax,8)
js 0x1c9f9a
movq 0x28(%rsp), %rcx
leaq (%rcx,%rax,8), %rsi
movl 0x8(%rsi), %r14d
movl %r14d, %eax
shrl %eax
cmpl 0x1c(%rsp), %eax
je 0x1c9f9a
movq 0x20(%rsp), %rdi
leaq 0x5c(%rsp), %rdx
callq 0x1c83c0
movq 0x10(%rsp), %rax
cmpl %eax, 0x5c(%rsp)
jne 0x1c9d13
movq 0x10(%rsp), %rax
cmpl %eax, 0x68(%rsp)
je 0x1c9d13
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
cmpq 0x10(%rdx), %rcx
jne 0x1c9ce4
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq 0x8(%rsp), %rbx
movq %rdx, 0x10(%rbx)
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movdqu 0x5c(%rsp), %xmm0
movupd 0x68(%rsp), %xmm1
movupd %xmm1, 0xc(%rax,%rdx)
movdqu %xmm0, (%rax,%rdx)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rcx
xorq $0x1, %r14
movq (%rcx,%r14,8), %rcx
testl %ecx, %ecx
je 0x1c9f9a
movq %rcx, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x3, %rdx
addq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movl %ecx, %eax
movq %rax, 0x38(%rsp)
xorl %ebp, %ebp
leaq (,%rbp,2), %rax
addq %rbp, %rax
movq 0x30(%rsp), %rcx
cmpl $0x0, 0xc(%rcx,%rax,8)
js 0x1c9f8c
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax,8), %r13
movl 0x8(%r13), %r14d
movl %r14d, %eax
shrl %eax
cmpl 0x1c(%rsp), %eax
je 0x1c9f8c
movq 0x20(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rbx
leaq 0x10c(%rsp), %r12
movq %r12, %rdx
callq 0x1c83c0
leaq 0x5c(%rsp), %rsi
movq %r12, %rdx
movq %rbx, %r12
leaq 0xf0(%rsp), %rbx
movq %r12, %rcx
callq 0x1c850b
testl %eax, %eax
je 0x1c9f8c
movq 0x10(%rsp), %rax
cmpl %eax, 0xac(%rsp)
jne 0x1c9e70
movq 0x10(%rsp), %rax
cmpl %eax, 0xb8(%rsp)
je 0x1c9e70
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
cmpq 0x10(%rdx), %rcx
jne 0x1c9e37
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq 0x8(%rsp), %rbx
movq %rdx, 0x10(%rbx)
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rcx
leaq 0xf0(%rsp), %rbx
leaq 0x1(%rcx), %rdx
movq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movdqu 0xac(%rsp), %xmm0
movupd 0xb8(%rsp), %xmm1
movupd %xmm1, 0xc(%rax,%rdx)
movdqu %xmm0, (%rax,%rdx)
movl 0x8(%r13), %r14d
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rcx
xorl $0x1, %r14d
movq (%rcx,%r14,8), %rcx
testl %ecx, %ecx
je 0x1c9f8c
movq %rcx, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %r15
shlq $0x3, %r15
addq 0x8(%rax), %r15
movl %ecx, %r14d
cmpl $0x0, 0xc(%r15)
js 0x1c9f7f
movq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1c83c0
movq %r12, %rsi
movq %rbx, %rdx
leaq 0x90(%rsp), %rcx
callq 0x1c850b
testl %eax, %eax
je 0x1c9f7f
movq 0x10(%rsp), %rax
cmpl %eax, 0x90(%rsp)
jne 0x1c9f7f
movq 0x10(%rsp), %rax
cmpl %eax, 0x9c(%rsp)
je 0x1c9f7f
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
cmpq 0x10(%rdx), %rcx
jne 0x1c9f4a
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq 0x8(%rsp), %rbx
movq %rdx, 0x10(%rbx)
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rcx
leaq 0xf0(%rsp), %rbx
leaq 0x1(%rcx), %rdx
movq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movdqu 0x90(%rsp), %xmm0
movupd 0x9c(%rsp), %xmm1
movupd %xmm1, 0xc(%rax,%rdx)
movdqu %xmm0, (%rax,%rdx)
addq $0x18, %r15
decq %r14
jne 0x1c9ea3
incq %rbp
cmpq 0x38(%rsp), %rbp
jne 0x1c9d51
movq 0x48(%rsp), %rax
incq %rax
cmpq 0x40(%rsp), %rax
jne 0x1c9c45
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rcx), %rax
movq 0x28(%rcx), %rcx
movq 0x50(%rsp), %rdi
movl %edi, %edx
movq 0x8(%rcx,%rdx,8), %rcx
testl %ecx, %ecx
je 0x1ca36d
movq %rcx, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,8), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, 0x1c(%rsp)
movl %ecx, %eax
movq %rax, 0x40(%rsp)
xorl %eax, %eax
leaq 0xac(%rsp), %r12
movq %rax, 0x48(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x28(%rsp), %rcx
cmpl $0x0, 0xc(%rcx,%rax,8)
js 0x1ca35a
movq 0x28(%rsp), %rcx
leaq (%rcx,%rax,8), %rsi
movl 0x8(%rsi), %r14d
movl %r14d, %eax
shrl %eax
cmpl 0x1c(%rsp), %eax
je 0x1ca35a
movq 0x20(%rsp), %rdi
leaq 0x5c(%rsp), %rdx
callq 0x1c83c0
movq 0x10(%rsp), %rax
cmpl %eax, 0x5c(%rsp)
jne 0x1ca0d3
movq 0x10(%rsp), %rax
cmpl %eax, 0x68(%rsp)
je 0x1ca0d3
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
cmpq 0x10(%rdx), %rcx
jne 0x1ca0a4
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq 0x8(%rsp), %rbx
movq %rdx, 0x10(%rbx)
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movdqu 0x5c(%rsp), %xmm0
movupd 0x68(%rsp), %xmm1
movupd %xmm1, 0xc(%rax,%rdx)
movdqu %xmm0, (%rax,%rdx)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rcx
xorq $0x1, %r14
movq (%rcx,%r14,8), %rcx
testl %ecx, %ecx
je 0x1ca35a
movq %rcx, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x3, %rdx
addq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movl %ecx, %eax
movq %rax, 0x38(%rsp)
xorl %ebp, %ebp
leaq (,%rbp,2), %rax
addq %rbp, %rax
movq 0x30(%rsp), %rcx
cmpl $0x0, 0xc(%rcx,%rax,8)
js 0x1ca34c
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax,8), %r15
movl 0x8(%r15), %r14d
movl %r14d, %eax
shrl %eax
cmpl 0x1c(%rsp), %eax
je 0x1ca34c
movq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rbx
leaq 0x10c(%rsp), %r12
movq %r12, %rdx
callq 0x1c83c0
leaq 0x5c(%rsp), %rsi
movq %r12, %rdx
movq %rbx, %r12
leaq 0xf0(%rsp), %rbx
movq %r12, %rcx
callq 0x1c850b
testl %eax, %eax
je 0x1ca34c
movq 0x10(%rsp), %rax
cmpl %eax, 0xac(%rsp)
jne 0x1ca230
movq 0x10(%rsp), %rax
cmpl %eax, 0xb8(%rsp)
je 0x1ca230
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
cmpq 0x10(%rdx), %rcx
jne 0x1ca1f7
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq 0x8(%rsp), %rbx
movq %rdx, 0x10(%rbx)
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rcx
leaq 0xf0(%rsp), %rbx
leaq 0x1(%rcx), %rdx
movq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movdqu 0xac(%rsp), %xmm0
movupd 0xb8(%rsp), %xmm1
movupd %xmm1, 0xc(%rax,%rdx)
movdqu %xmm0, (%rax,%rdx)
movl 0x8(%r15), %r14d
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rcx
xorl $0x1, %r14d
movq (%rcx,%r14,8), %rcx
testl %ecx, %ecx
je 0x1ca34c
movq %rcx, %rdx
shrq $0x20, %rdx
leaq (%rdx,%rdx,2), %r15
shlq $0x3, %r15
addq 0x8(%rax), %r15
movl %ecx, %r14d
cmpl $0x0, 0xc(%r15)
js 0x1ca33f
movq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1c83c0
movq %r12, %rsi
movq %rbx, %rdx
leaq 0x90(%rsp), %rcx
callq 0x1c850b
testl %eax, %eax
je 0x1ca33f
movq 0x10(%rsp), %rax
cmpl %eax, 0x90(%rsp)
jne 0x1ca33f
movq 0x10(%rsp), %rax
cmpl %eax, 0x9c(%rsp)
je 0x1ca33f
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
cmpq 0x10(%rdx), %rcx
jne 0x1ca30a
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rdx
movq 0x8(%rsp), %rbx
movq %rdx, 0x10(%rbx)
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rdx, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, (%rbx)
movq 0x8(%rbx), %rcx
leaq 0xf0(%rsp), %rbx
leaq 0x1(%rcx), %rdx
movq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movdqu 0x90(%rsp), %xmm0
movupd 0x9c(%rsp), %xmm1
movupd %xmm1, 0xc(%rax,%rdx)
movdqu %xmm0, (%rax,%rdx)
addq $0x18, %r15
decq %r14
jne 0x1ca263
incq %rbp
cmpq 0x38(%rsp), %rbp
jne 0x1ca111
movq 0x48(%rsp), %rax
incq %rax
cmpq 0x40(%rsp), %rax
jne 0x1ca005
movq 0x88(%rsp), %r14
movl %r14d, %r15d
leaq (%r15,%r15,8), %rax
leaq (%rax,%rax,2), %rdi
addq %r15, %rdi
movq 0x8(%rsp), %rbx
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
addq %rsi, %rdi
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rsi
addq %rcx, %rsi
callq 0x19e855
movq 0x8(%rbx), %rax
cmpq %r15, %rax
jbe 0x1ca907
leal 0x1(%r14), %r12d
cmpq %r12, %rax
movq 0x80(%rsp), %r9
movq 0x78(%rsp), %r10
jb 0x1ca893
xorl %edx, %edx
movq 0x66eaa(%rip), %xmm0    # 0x231280
movapd 0x66eb2(%rip), %xmm1    # 0x231290
movsd 0x671b2(%rip), %xmm2    # 0x231598
movdqa 0x66ed2(%rip), %xmm3    # 0x2312c0
movdqa 0x66eda(%rip), %xmm4    # 0x2312d0
movdqa 0x66ee2(%rip), %xmm5    # 0x2312e0
pcmpeqd %xmm6, %xmm6
movl %r14d, %r11d
movq %rax, 0xd0(%rsp)
movq %r15, 0xc8(%rsp)
cmpq %r12, %rax
je 0x1ca44a
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
leaq (%r12,%r12,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %r12, %rsi
movl 0xc(%rcx,%rsi), %esi
movl %r11d, %edi
leaq (%rdi,%rdi,8), %r8
leaq (%r8,%r8,2), %r8
addq %rdi, %r8
cmpl 0xc(%rcx,%r8), %esi
je 0x1ca887
movl %r12d, %r8d
cmpq %r9, %rdx
jae 0x1ca75e
movq 0x8(%rsp), %rcx
movq (%rcx), %rsi
movl %r11d, %r13d
leaq (,%r13,8), %rcx
addq %r13, %rcx
leaq (%rcx,%rcx,2), %rcx
addq %r13, %rcx
movq %rsi, 0x28(%rsp)
movl 0xc(%rsi,%rcx), %esi
movq (%r10,%rdx,8), %rdi
shrq $0x20, %rdi
cmpq %rsi, %rdi
jae 0x1ca499
incq %rdx
cmpq %rdx, %r9
jne 0x1ca47c
movq %r9, %rdx
jmp 0x1ca75e
cmpl %esi, %edi
jne 0x1ca75e
movl %r12d, %esi
subl %r11d, %esi
setbe %dil
cmpl $0x2, %esi
setb %sil
orb %dil, %sil
jne 0x1ca884
movq %r12, 0xd8(%rsp)
movq 0x28(%rsp), %rax
addq %rcx, %rax
addq $0x18, %rax
movq %rax, 0xe8(%rsp)
movq %r13, %r10
subq %r8, %r10
xorl %r11d, %r11d
movq %r8, 0x40(%rsp)
leaq (,%r13,8), %rax
addq %r13, %rax
leaq (%rax,%rax,2), %rax
movq %r13, 0x48(%rsp)
addq %r13, %rax
movq 0x28(%rsp), %rcx
cmpl $-0x1, 0xc(%rcx,%rax)
je 0x1ca710
movq 0x28(%rsp), %rcx
leaq (%rcx,%rax), %r15
addq %rcx, %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq 0xe8(%rsp), %r13
xorl %ebp, %ebp
cmpq %rbp, %r11
je 0x1ca659
cmpl $-0x1, -0xc(%r13)
je 0x1ca659
movl (%r13), %eax
xorl 0x18(%r15), %eax
js 0x1ca659
movl 0x4(%r15), %r14d
movl -0x14(%r13), %edi
cmpl %edi, %r14d
movl %edi, %eax
cmoval %r14d, %eax
movl -0x10(%r13), %r9d
movq 0x10(%rsp), %rcx
movl (%rcx), %esi
cmpl %r9d, %esi
movl %r9d, %ecx
cmovbl %esi, %ecx
cmpl %eax, %ecx
jbe 0x1ca659
movq 0x10(%rsp), %rbx
movl 0x8(%rbx), %r12d
movl -0x8(%r13), %r8d
cmpl %r8d, %r12d
movl %r8d, 0x1c(%rsp)
movl %r12d, 0x20(%rsp)
cmoval %r12d, %r8d
movl -0x4(%r13), %r12d
movl 0xc(%rbx), %ebx
cmpl %r12d, %ebx
movl %r12d, 0x38(%rsp)
movl %ebx, 0x30(%rsp)
cmovbl %ebx, %r12d
cmpl %r8d, %r12d
jbe 0x1ca659
movq %r15, %rbx
movl %eax, %r15d
movl %ecx, %eax
subq %r15, %rax
movq %rbx, %r15
movl %r8d, %ecx
movl %r12d, %r12d
subq %rcx, %r12
movl %esi, %ecx
subl %r14d, %ecx
movl 0x30(%rsp), %r8d
subl 0x20(%rsp), %r8d
cmpq %rcx, %rax
jne 0x1ca5e8
cmpq %r8, %r12
je 0x1ca613
movq %r8, 0x50(%rsp)
movl %r9d, %ebx
subl %edi, %ebx
movl 0x38(%rsp), %r8d
subl 0x1c(%rsp), %r8d
movq %rbx, 0xe0(%rsp)
cmpq %rbx, %rax
movq 0x50(%rsp), %rbx
jne 0x1ca66e
cmpq %r8, %r12
jne 0x1ca66e
cmpl %edi, %r14d
jbe 0x1ca620
movq 0x10(%rsp), %rax
movl %edi, -0x4(%rax)
cmpl %r9d, %esi
movl 0x38(%rsp), %eax
movl 0x1c(%rsp), %ecx
jae 0x1ca635
movq 0x10(%rsp), %rsi
movl %r9d, (%rsi)
cmpl %ecx, 0x20(%rsp)
jbe 0x1ca643
movq 0x10(%rsp), %rsi
movl %ecx, 0x8(%rsi)
cmpl %eax, 0x30(%rsp)
jae 0x1ca651
movq 0x10(%rsp), %rcx
movl %eax, 0xc(%rcx)
movl $0xffffffff, -0xc(%r13) # imm = 0xFFFFFFFF
decq %rbp
addq $0x1c, %r13
cmpq %rbp, %r10
jne 0x1ca52b
jmp 0x1ca710
movq %rax, %xmm8
punpckldq %xmm0, %xmm8    # xmm8 = xmm8[0],xmm0[0],xmm8[1],xmm0[1]
subpd %xmm1, %xmm8
movapd %xmm8, %xmm7
unpckhpd %xmm8, %xmm7            # xmm7 = xmm7[1],xmm8[1]
movl %ecx, %eax
cvtsi2sd %rax, %xmm9
addsd %xmm8, %xmm7
mulsd %xmm2, %xmm9
ucomisd %xmm7, %xmm9
jae 0x1ca659
movl 0xe0(%rsp), %eax
xorps %xmm8, %xmm8
cvtsi2sd %rax, %xmm8
mulsd %xmm2, %xmm8
ucomisd %xmm7, %xmm8
jae 0x1ca659
movq %r12, %xmm8
punpckldq %xmm0, %xmm8    # xmm8 = xmm8[0],xmm0[0],xmm8[1],xmm0[1]
subpd %xmm1, %xmm8
movapd %xmm8, %xmm7
unpckhpd %xmm8, %xmm7            # xmm7 = xmm7[1],xmm8[1]
xorps %xmm9, %xmm9
cvtsi2sd %rbx, %xmm9
addsd %xmm8, %xmm7
mulsd %xmm2, %xmm9
ucomisd %xmm7, %xmm9
jae 0x1ca659
xorps %xmm8, %xmm8
cvtsi2sd %r8, %xmm8
mulsd %xmm2, %xmm8
ucomisd %xmm7, %xmm8
jb 0x1ca613
jmp 0x1ca659
movq 0x48(%rsp), %r13
incq %r13
decq %r11
movq 0x40(%rsp), %r8
cmpq %r8, %r13
jne 0x1ca4e5
movq 0xd8(%rsp), %r12
movl %r12d, %r11d
movq 0x88(%rsp), %r14
movq 0x80(%rsp), %r9
movq 0x78(%rsp), %r10
movq 0xd0(%rsp), %rax
movq 0xc8(%rsp), %r15
jmp 0x1ca887
cmpl %r11d, %r12d
jbe 0x1ca884
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movl %r11d, %edi
movq %rdi, %rsi
notq %rsi
addq %r8, %rsi
movq %rsi, %xmm7
pshufd $0x44, %xmm7, %xmm7     # xmm7 = xmm7[0,1,0,1]
subq %rdi, %r8
addq $0x3, %r8
andq $-0x4, %r8
leaq (%rdi,%rdi,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %rdi, %rsi
leaq (%rcx,%rsi), %rdi
addq $0x60, %rdi
xorl %ecx, %ecx
movq %rcx, %xmm8
pshufd $0x44, %xmm8, %xmm8     # xmm8 = xmm8[0,1,0,1]
movdqa %xmm8, %xmm10
por %xmm4, %xmm10
movdqa %xmm7, %xmm9
pxor %xmm5, %xmm9
pxor %xmm5, %xmm10
movdqa %xmm10, %xmm11
pcmpgtd %xmm9, %xmm11
pcmpeqd %xmm9, %xmm10
pshufd $0xf5, %xmm10, %xmm12   # xmm12 = xmm10[1,1,3,3]
pand %xmm11, %xmm12
pshufd $0xf5, %xmm11, %xmm10   # xmm10 = xmm11[1,1,3,3]
por %xmm12, %xmm10
movd %xmm10, %esi
notl %esi
testb $0x1, %sil
je 0x1ca802
movl $0xffffffff, -0x54(%rdi) # imm = 0xFFFFFFFF
pxor %xmm6, %xmm10
pextrw $0x4, %xmm10, %esi
testb $0x1, %sil
je 0x1ca81a
movl $0xffffffff, -0x38(%rdi) # imm = 0xFFFFFFFF
por %xmm3, %xmm8
pxor %xmm5, %xmm8
movdqa %xmm8, %xmm10
pcmpgtd %xmm9, %xmm10
pcmpeqd %xmm9, %xmm8
pshufd $0xf5, %xmm8, %xmm9     # xmm9 = xmm8[1,1,3,3]
pand %xmm10, %xmm9
pshufd $0xf5, %xmm10, %xmm8    # xmm8 = xmm10[1,1,3,3]
por %xmm9, %xmm8
pxor %xmm6, %xmm8
pextrw $0x0, %xmm8, %esi
testb $0x1, %sil
je 0x1ca861
movl $0xffffffff, -0x1c(%rdi) # imm = 0xFFFFFFFF
pextrw $0x4, %xmm8, %esi
testb $0x1, %sil
je 0x1ca873
movl $0xffffffff, (%rdi)     # imm = 0xFFFFFFFF
addq $0x4, %rcx
addq $0x70, %rdi
cmpq %rcx, %r8
jne 0x1ca7a5
movl %r12d, %r11d
incl %r12d
cmpq %r12, %rax
jae 0x1ca415
leal 0x1(%r14), %r9d
movl %r14d, %ecx
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
leaq (%r15,%r15,8), %rsi
leaq (%rsi,%rsi,2), %rsi
addq %r15, %rsi
cmpl $-0x1, 0xc(%rdx,%rsi)
je 0x1ca8f1
addq %rdx, %rsi
movl %ecx, %edi
leaq (%rdi,%rdi,8), %r8
leaq (%r8,%r8,2), %r8
addq %rdi, %r8
movdqu (%rsi), %xmm0
movupd 0xc(%rsi), %xmm1
movupd %xmm1, 0xc(%rdx,%r8)
movdqu %xmm0, (%rdx,%r8)
movq 0x8(%rsp), %rax
movq (%rax), %rdx
orl $0x3fffffff, 0x18(%rdx,%r8) # imm = 0x3FFFFFFF
incl %ecx
movq 0x8(%rax), %rax
movl %r9d, %r15d
incl %r9d
cmpq %r15, %rax
ja 0x1ca89a
movl %ecx, %eax
movq 0x8(%rsp), %rcx
movq %rax, 0x8(%rcx)
subl %r14d, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq