// File: chhylp123[P]hifiasm/inter.cpp
// Function: infer_read_ovlp(ul_idx_t const*, overlap_region_alloc*, kv_ul_ov_t*, kv_ul_ov_t*, double, long, ug_opt_t const*, ul_contain*, void*)
uint64_t infer_read_ovlp(const ul_idx_t *uref, overlap_region_alloc* olist, kv_ul_ov_t *in, kv_ul_ov_t *res, double diff_ec_ul, int64_t winLen, const ug_opt_t *uopt, ul_contain *ct, void *km)
{
	uint64_t t, k, l, t_0, pb, cut = res->n, c_occ = 0;; 
	ma_ug_t *ug = uref->ug;
	ma_utg_t *u = NULL; 
	overlap_region* o = NULL;
	ul_ov_t *z = NULL;
	utg_ct_t p;
	// res->n = 0;
	for (t = 0; t < in->n; t++) {
		if(!(in->a[t].tn&(uint32_t)(0x80000000))) {///uid
			u = &(ug->u.a[in->a[t].tn]); o = &(olist->list[in->a[t].qn]);
			assert(o->y_id == in->a[t].tn);
			for (k = l = 0, pb = res->n+2; k < u->n; k++) {
				p.x = u->a[k]>>32; 
				p.s = l; p.e = l + Get_READ_LENGTH(R_INF, (u->a[k]>>33));
				l += (uint32_t)u->a[k];
				if(p.e <= in->a[t].ts) continue;
				if(p.s >= in->a[t].te) break;
				t_0 = gen_contain_chain(uref, &p, o, res, -1, -1, km);	
				assert(t_0 > 0);
				// if(t_0 == 0) {
				// 	fprintf(stderr, "ERROR-2, o->x_id:%u, o->y_id:%u, k:%lu, u->n:%lu, p.s:%u, p.e:%u, ts:%u, te:%u, rev:%u\n", 
				// 	o->x_id, o->y_id, k, (uint64_t)u->n, p.s, p.e, in->a[t].ts, in->a[t].te, in->a[t].rev);
				// }
				res->a[res->n-1].el = in->a[t].el;
				res->a[res->n-1].sec = in->a[t].sec;
				res->a[res->n-1].tn <<= 1; 
				res->a[res->n-1].tn >>= 1;
				res->a[res->n-1].qn = o->x_id;
				if(res->n >= pb) {
					if(in->a[t].rev == 0) {
						// if(res->a[res->n-1].qs > res->a[res->n-2].qe) fprintf(stderr, "ERROR-3\n");
						if(!(res->a[res->n-2].qs<=res->a[res->n-1].qs && res->a[res->n-1].qs <= res->a[res->n-2].qe 
							&& res->a[res->n-2].qe <= res->a[res->n-1].qe)) {
								fprintf(stderr, "ERROR-3\n");
						}
						// if(res->a[res->n-1].qs == res->a[res->n-2].qe) {
						// 	if(res->a[res->n-2].qe < in->a[t].qe) res->a[res->n-2].qe++;
						// 	else if(res->a[res->n-1].qs > 0) res->a[res->n-1].qs--;
						// }
					} else {
						if(!(res->a[res->n-1].qs<=res->a[res->n-2].qs && res->a[res->n-2].qs <= res->a[res->n-1].qe 
							&& res->a[res->n-1].qe <= res->a[res->n-2].qe)) {
								fprintf(stderr, "ERROR-4\n");
						}
					}
					
					// debug_infer_read_ovlp(uopt, diff_ec_ul, 
					// 	in->a[t].rev?&(res->a[res->n-2]):&(res->a[res->n-1]), 
					// 			in->a[t].rev?&(res->a[res->n-1]):&(res->a[res->n-2]), u, k, k-1);
				}
			}
		} else {///rid
			kv_push(ul_ov_t, *res, in->a[t]);
			// res->a[res->n-1].tn <<= 1; 
			// res->a[res->n-1].tn >>= 1;
			res->a[res->n-1].qn = o->x_id;
			c_occ++;
		}
	}
	if(res->n != cut) {
		radix_sort_ul_ov_srt_qe(res->a + cut, res->a + res->n);
		if(c_occ) {
			int64_t ci, cn = cut;
			for (k = cut; k < res->n; k++) {
				z = &(res->a[k]);
				if(z->tn&((uint32_t)(0x80000000))) continue;
				if(ct->is_c.a[z->tn] == 0) continue;

				for (ci = k+1; ci < (int64_t)(res->n); ci++) {
					if(res->a[ci].qe > z->qe) break;
					if(res->a[ci].qn == (uint32_t)-1) continue;
					if(!(res->a[ci].tn&((uint32_t)(0x80000000)))) continue;
					if(z->qs <= res->a[ci].qs && z->qe >= res->a[ci].qe) {
						if(check_contain_pair(uopt, (res->a[ci].tn<<1)>>1, z->tn,  1)) {
							res->a[ci].qn = (uint32_t)-1;
						}
					}
				}

				for (ci = k-1; ci >= cn; ci--) {
					if(res->a[ci].qe <= z->qs) break;
					if(res->a[ci].qn == (uint32_t)-1) continue;
					if(!(res->a[ci].tn&((uint32_t)(0x80000000)))) continue;
					if(z->qs <= res->a[ci].qs && z->qe >= res->a[ci].qe) {
						if(check_contain_pair(uopt, (res->a[ci].tn<<1)>>1, z->tn,  1)) {
							res->a[ci].qn = (uint32_t)-1;
						}
					}
				}
			}

			// debug_contain_ovlps(res->a+cut, res->n-cut, uopt);

			for (k = l = cut; k < res->n; k++) {
				if(res->a[k].qn == (uint32_t)-1) continue;
				if(k != l) {
					res->a[l] = res->a[k];
				}
				res->a[l].tn <<= 1; res->a[l].tn >>= 1;
				++l;
			}
			res->n = l;
		}
	}

	return res->n - cut;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x290a98
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
jne 0x290999
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x40(%rbp), %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x40(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x40(%rbp), %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jne 0x290565
jmp 0x290584
leaq 0x100c02(%rip), %rdi    # 0x39116e
leaq 0x1002bc(%rip), %rsi    # 0x39082f
movl $0xc42, %edx            # imm = 0xC42
leaq 0x100c06(%rip), %rcx    # 0x391185
callq 0x2130
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x2, %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
jae 0x290994
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x9c(%rbp)
movq -0x50(%rbp), %rax
movl %eax, -0x98(%rbp)
movq -0x50(%rbp), %rax
leaq 0x134ce9(%rip), %rcx    # 0x3c52d0
movq 0x18(%rcx), %rcx
movq -0x80(%rbp), %rdx
movq 0x18(%rdx), %rdx
movq -0x48(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
shrq $0x21, %rdx
addq (%rcx,%rdx,8), %rax
movl %eax, -0x94(%rbp)
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x94(%rbp), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x40(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
ja 0x290642
jmp 0x290983
movl -0x98(%rbp), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x40(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x14(%rcx), %eax
jb 0x290661
jmp 0x290994
movq -0x8(%rbp), %rdi
movq -0x88(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq 0x18(%rbp), %r9
leaq -0x9c(%rbp), %rsi
movsd 0xf1bf5(%rip), %xmm0    # 0x382278
movq $-0x1, %r8
callq 0x28e230
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jbe 0x29069c
jmp 0x2906bb
leaq 0x100b7a(%rip), %rdi    # 0x39121d
leaq 0x100185(%rip), %rsi    # 0x39082f
movl $0xc4a, %edx            # imm = 0xC4A
leaq 0x100acf(%rip), %rcx    # 0x391185
callq 0x2130
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %edx
shrl $0x1e, %edx
andl $0x1, %edx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
andl $0x1, %edx
shll $0x1e, %edx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
shll %ecx
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
shrl %ecx
movl %ecx, 0xc(%rax)
movq -0x88(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rdx
movq 0x8(%rdx), %rdx
subq $0x1, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x60(%rbp), %rax
jb 0x290981
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2908b1
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x2, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq -0x20(%rbp), %rdx
movq 0x8(%rdx), %rdx
subq $0x1, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
ja 0x290894
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq -0x20(%rbp), %rdx
movq 0x8(%rdx), %rdx
subq $0x2, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
ja 0x290894
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x2, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq -0x20(%rbp), %rdx
movq 0x8(%rdx), %rdx
subq $0x1, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jbe 0x2908ac
movq 0x133745(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0xf73b9(%rip), %rsi     # 0x387c5e
movb $0x0, %al
callq 0x22a0
jmp 0x29097f
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq -0x20(%rbp), %rdx
movq 0x8(%rdx), %rdx
subq $0x2, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
ja 0x290965
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x2, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq -0x20(%rbp), %rdx
movq 0x8(%rdx), %rdx
subq $0x1, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
ja 0x290965
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq -0x20(%rbp), %rdx
movq 0x8(%rdx), %rdx
subq $0x2, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jbe 0x29097d
movq 0x133674(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0xfd918(%rip), %rsi     # 0x38e28e
movb $0x0, %al
callq 0x22a0
jmp 0x29097f
jmp 0x290981
jmp 0x290983
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2905a4
jmp 0x290a85
jmp 0x29099b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x290a08
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2909cc
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0xb8(%rbp)
jmp 0x2909da
movl $0x2, %eax
movq %rax, -0xb8(%rbp)
jmp 0x2909da
movq -0xb8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
imulq $0x1c, 0x10(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
imulq $0x1c, -0x40(%rbp), %rax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rsi
movq 0x8(%rsi), %rdx
movq %rdx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movl 0x18(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq -0x88(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rdx
movq 0x8(%rdx), %rdx
subq $0x1, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x290a87
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x2904c5
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x68(%rbp), %rax
je 0x290e9d
movq -0x20(%rbp), %rax
movq (%rax), %rdi
imulq $0x1c, -0x68(%rbp), %rax
addq %rax, %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
imulq $0x1c, 0x8(%rax), %rax
addq %rax, %rsi
callq 0x27b350
cmpq $0x0, -0x70(%rbp)
je 0x290e9b
movq -0x68(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x290dcc
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
je 0x290b30
jmp 0x290dbb
movq 0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x90(%rbp), %rcx
movl 0xc(%rcx), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x290b50
jmp 0x290dbb
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x290c85
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x90(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jbe 0x290b9a
jmp 0x290c85
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
cmpl $-0x1, (%rax)
jne 0x290bb6
jmp 0x290c6e
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
jne 0x290bda
jmp 0x290c6e
movq -0x90(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0xa8(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
ja 0x290c6c
movq -0x90(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0xa8(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jb 0x290c6c
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %esi
shll %esi
shrl %esi
movq -0x90(%rbp), %rax
movl 0xc(%rax), %edx
movl $0x1, %ecx
callq 0x28fce0
cmpl $0x0, %eax
je 0x290c6a
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x290c6c
jmp 0x290c6e
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x290b5f
movq -0x48(%rbp), %rax
subq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
cmpq -0xb0(%rbp), %rax
jl 0x290db9
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x90(%rbp), %rcx
cmpl 0x4(%rcx), %eax
ja 0x290cce
jmp 0x290db9
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
cmpl $-0x1, (%rax)
jne 0x290cea
jmp 0x290da2
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
jne 0x290d0e
jmp 0x290da2
movq -0x90(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0xa8(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
ja 0x290da0
movq -0x90(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0xa8(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jb 0x290da0
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %esi
shll %esi
shrl %esi
movq -0x90(%rbp), %rax
movl 0xc(%rax), %edx
movl $0x1, %ecx
callq 0x28fce0
cmpl $0x0, %eax
je 0x290d9e
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0xa8(%rbp), %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x290da0
jmp 0x290da2
movq -0xa8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x290c94
jmp 0x290dbb
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x290aef
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x290e8f
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x48(%rbp), %rcx
addq %rcx, %rax
cmpl $-0x1, (%rax)
jne 0x290e00
jmp 0x290e7e
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x290e44
movq -0x20(%rbp), %rax
movq (%rax), %rcx
imulq $0x1c, -0x48(%rbp), %rax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x50(%rbp), %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movl 0x18(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
shll %ecx
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
shrl %ecx
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x290dd8
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x290e9d
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x68(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)