// File: chhylp123[P]hifiasm/inter.cpp
// Function: dd_ul_vec_t(ul_idx_t const*, mg_lchain_t*, long, ul_vec_t*, long)
void dd_ul_vec_t(const ul_idx_t *uref, mg_lchain_t *a, int64_t a_n, ul_vec_t *rch, int64_t ulid)
{
	int64_t k, l, ovlp, novlp, tt, rs, re; uint64_t i; uc_block_t *z; mg_lchain_t *p, *c;
	for (l = 0, k = 1; k <= a_n; k++) {
		if(k == a_n || a[k].score != a[l].score) { ///x[k] and x[l] come from the same unitig
			renew_mg_lchains(uref->ug, a + l, k - l, ulid);
			l = k;
		}
	}

	
	for (i = 0; i < rch->bb.n; i++) {
		rch->bb.a[i].pidx = 0xfffffffe;
		rch->bb.a[i].aidx = rch->bb.a[i].pdis = (uint32_t)-1;
	}

	for (k = 0; k < a_n; k++) {
		if(a[k].dist_pre >= 0) {///not a new alignment
			z = &(rch->bb.a[a[k].dist_pre]); 
			assert(z->hid == (a[k].v>>1) && z->rev == (a[k].v&1));
			if((int64_t)z->qs == a[k].qs && (int64_t)z->qe == a[k].qe && (int64_t)z->ts == a[k].rs && (int64_t)z->te == a[k].re) {
				z->pidx = k; z->pchain = 1;
			} else {
				ovlp = novlp = tt = 0;
				ovlp = ((MIN((int64_t)z->qe, a[k].qe) > MAX((int64_t)z->qs, a[k].qs))? (MIN((int64_t)z->qe, a[k].qe)-MAX((int64_t)z->qs, a[k].qs)):0);
				tt += ovlp;
				novlp += (a[k].qe - a[k].qs - ovlp) + (z->qe - z->qs - ovlp);

				ovlp = ((MIN((int64_t)z->te, a[k].re) > MAX((int64_t)z->ts, a[k].rs))? (MIN((int64_t)z->te, a[k].re)-MAX((int64_t)z->ts, a[k].rs)):0);
				tt += ovlp;
				novlp += (a[k].re - a[k].rs - ovlp) + (z->te - z->ts - ovlp);
				if(novlp > 8 || novlp > (tt*0.01)) {
					kv_pushp(uc_block_t, rch->bb, &z); 
					z->hid = (a[k].v>>1); z->rev = (a[k].v&1); 
					z->pchain = 2; z->base = 0; z->el = 1;
					z->qs = a[k].qs; z->qe = a[k].qe;
					z->te = a[k].re; z->ts = a[k].rs;
					z->pidx = k;
					z->aidx = z->pdis = (uint32_t)-1;
				} else {
					z->qs = a[k].qs; z->qe = a[k].qe;
					z->te = a[k].re; z->ts = a[k].rs;
					z->pidx = k; z->pchain = 1;
				}
			}
		} else {
			kv_pushp(uc_block_t, rch->bb, &z); 
			z->hid = (a[k].v>>1); z->rev = (a[k].v&1); 
			z->pchain = 2; z->base = 0; z->el = 1;
			z->qs = a[k].qs; z->qe = a[k].qe;
			z->te = a[k].re; z->ts = a[k].rs;
			z->pidx = k;
			z->aidx = z->pdis = (uint32_t)-1;
		}
	}

	for (i = k = 0; i < rch->bb.n; i++) {
		if(rch->bb.a[i].pidx == 0xfffffffe && (rch->bb.a[i].pchain != 1 || rch->bb.a[i].pchain != 0)) continue;
		rch->bb.a[k++] = rch->bb.a[i];
	}
	rch->bb.n = k;

	radix_sort_uc_block_t_qe_srt(rch->bb.a, rch->bb.a + rch->bb.n);
	for (l = 0, k = 1; k <= (int64_t)rch->bb.n; k++) {
		if(k == (int64_t)rch->bb.n || rch->bb.a[k].qe != rch->bb.a[l].qe) {
			if(k - l > 1) radix_sort_uc_block_t_qs_srt(rch->bb.a+l, rch->bb.a+k);
			for (; l < k; l++) {
				if(rch->bb.a[l].pidx == 0xfffffffe) {
					rch->bb.a[l].pidx = (uint32_t)-1;
				} else {
					a[rch->bb.a[l].pidx].dist_pre = l;
				}
			}
		}
	}

	// for (i = 0; i < rch->bb.n; i++) {
	// 	if(rch->bb.a[i].pidx == 0xfffffffe) {
	// 		rch->bb.a[i].pidx = (uint32_t)-1;
	// 	} else {
	// 		a[rch->bb.a[i].pidx].dist_pre = i;
	// 	}
	// }
	// fprintf(stderr, "\n[M::%s::]\n", __func__);
	for (i = 0, k = -1; i < rch->bb.n; i++) {
		if(rch->bb.a[i].pidx == (uint32_t)-1) continue;
		if(k < 0) k = i;///in case there is only one UL-to-HiFi alignment
		if(a[rch->bb.a[i].pidx].hash_pre == (uint32_t)-1) {
			rch->bb.a[i].pidx = (uint32_t)-1;
			continue;
		}
		c = &(a[rch->bb.a[i].pidx]); p = &(a[a[rch->bb.a[i].pidx].hash_pre]);
		rch->bb.a[i].pidx = a[a[rch->bb.a[i].pidx].hash_pre].dist_pre; 
		rch->bb.a[rch->bb.a[i].pidx].aidx = i;
		tt = g_adjacent_dis_mul(uref->r_ug->rg, NULL, -1, -1, 
			((rch->bb.a[i].hid<<1)|((uint32_t)rch->bb.a[i].rev))^1, 
			((rch->bb.a[rch->bb.a[i].pidx].hid<<1)|((uint32_t)rch->bb.a[rch->bb.a[i].pidx].rev))^1);
		if(tt >= 0) {
			rch->bb.a[i].pdis = tt;
			// get_r_offset(uref->ug, p, NULL, &rs, NULL, NULL);
			// get_r_offset(uref->ug, c, NULL, &re, NULL, NULL);
			// fprintf(stderr, "+i->%lu: dis->%u, record_dis->%ld\n", i, rch->bb.a[i].pdis, re-rs);
		} else {
			rs = p->off + uref->ug->g->seq[p->score>>1].len;
			re = c->off + uref->ug->g->seq[c->score>>1].len;
			if(re >= rs) rch->bb.a[i].pdis = re - rs;
			else rch->bb.a[i].pdis = (uint32_t)-1;
			// fprintf(stderr, "-i->%lu: dis->%u\n", i, rch->bb.a[i].pdis);
		}

		k = i;
		// if(rch->bb.a[i].base || rch->bb.a[i].pchain == 0 || rch->bb.a[i].el == 0) {
		// 	fprintf(stderr, "+++(%lu) base:%u, pchain:%u, el:%u\n", 
		// 	i, rch->bb.a[i].base, rch->bb.a[i].pchain, rch->bb.a[i].el);
		// }
	}

	///make sure if this UL read has been done
	uint32_t sp = (uint32_t)-1, ep = (uint32_t)-1;
	for (l = 0 ; k >= 0; ) {
		// fprintf(stderr, "k->%ld\n", k);
		if(sp == (uint32_t)-1 || rch->bb.a[k].qe <= sp) {
            if(sp != (uint32_t)-1) l += ep - sp;
            sp = rch->bb.a[k].qs; ep = rch->bb.a[k].qe;
        } else {
            sp = MIN(sp, rch->bb.a[k].qs);
        }
		if(rch->bb.a[k].pidx == (uint32_t)-1) k = -1;
		else k = rch->bb.a[k].pidx;
	}

	if(sp != (uint32_t)-1) l += ep - sp;
	if(l == (int64_t)rch->rlen) rch->dd = 1;


	///debug_ssb
	// for (k = 0; (uint32_t)k < rch->bb.n; k++) {
	// 	if(rch->bb.a[k].pidx != (uint32_t)-1) {
	// 		if((rch->bb.a[k].pidx >= 0) && (rch->bb.a[k].pidx < rch->bb.n) && 
	// 					(rch->bb.a[rch->bb.a[k].pidx].aidx == k)) {
	// 			;
	// 		} else {
	// 			fprintf(stderr, "[M::%s::k->%ld] +rch->bb.n::%u\n", __func__, k, (uint32_t)rch->bb.n);
	// 			for (l = 0; (uint32_t)l < rch->bb.n; l++) {
	// 				fprintf(stderr, "[M::%.*s::k->%lu] q::[%u, %u), t::[%u, %u), pidx::%u, aidx::%u\n", 
	// 				(int)Get_NAME_LENGTH(R_INF, rch->bb.a[l].hid), Get_NAME(R_INF, rch->bb.a[l].hid), l, 
	// 				rch->bb.a[l].qs, rch->bb.a[l].qe, rch->bb.a[l].ts, rch->bb.a[l].te, 
	// 				rch->bb.a[l].pidx, rch->bb.a[l].aidx);
	// 			}
	// 			exit(1);
	// 		}
	// 	}

	// 	if(rch->bb.a[k].aidx != (uint32_t)-1) {
	// 		if((rch->bb.a[k].aidx >= 0) && (rch->bb.a[k].aidx < rch->bb.n) && 
	// 					(rch->bb.a[rch->bb.a[k].aidx].pidx == k)) {
	// 			;
	// 		} else {
	// 			fprintf(stderr, "[M::%s::k->%ld] -rch->bb.n::%u\n", __func__, k, (uint32_t)rch->bb.n);
	// 			for (l = 0; (uint32_t)l < rch->bb.n; l++) {
	// 				fprintf(stderr, "[M::%.*s::k->%lu] q::[%u, %u), t::[%u, %u), pidx::%u, aidx::%u\n", 
	// 				(int)Get_NAME_LENGTH(R_INF, rch->bb.a[l].hid), Get_NAME(R_INF, rch->bb.a[l].hid), l, 
	// 				rch->bb.a[l].qs, rch->bb.a[l].qe, rch->bb.a[l].ts, rch->bb.a[l].te, 
	// 				rch->bb.a[l].pidx, rch->bb.a[l].aidx);
	// 			}
	// 			exit(1);
	// 		}
	// 	}
	// }

	// if(ulid == 292) {
	// 	for (i = 0; i < rch->bb.n; i++) {
	// 		fprintf(stderr, "(%lu) qs:%u, qe:%u, ts:%u, te:%u, pidx:%u\n", i, 
	// 		rch->bb.a[i].qs, rch->bb.a[i].qe, rch->bb.a[i].ts, rch->bb.a[i].te, rch->bb.a[i].pidx);
	// 	}
	// }

	// for (i = 0; i < rch->bb.n; i++) {
	// 	if(rch->bb.a[i].pidx == (uint32_t)-1) continue;
	// 	if(rch->bb.a[i].base || rch->bb.a[i].pchain == 0 || rch->bb.a[i].el == 0) {
	// 		fprintf(stderr, "(%lu) base:%u, pchain:%u, el:%u\n", 
	// 		i, rch->bb.a[i].base, rch->bb.a[i].pchain, rch->bb.a[i].el);
	// 	}
	// 	assert((!(rch->bb.a[i].base)) && (rch->bb.a[i].pchain) && (rch->bb.a[i].el));
	// 	assert((!(rch->bb.a[rch->bb.a[i].pidx].base)) && (rch->bb.a[rch->bb.a[i].pidx].pchain) 
	// 														&& (rch->bb.a[rch->bb.a[i].pidx].el));
	// }
	// int64_t exact = 0, inexact = 0; uc_block_t *z;
	// for (k = 0; k < a_n; k++) {
	// 	// fprintf(stderr, "(%ld) a->qs:%d, a->qe:%d, a->rs:%d, a->re:%d\n", k, a[k].qs, a[k].qe, a[k].rs, a[k].re);
	// 	if(a[k].dist_pre < 0) continue;
	// 	z = &(rch->bb.a[a[k].dist_pre]);
	// 	assert(z->hid == (a[k].v>>1) && z->rev == (a[k].v&1));
	// 	if((int64_t)z->qs == a[k].qs && (int64_t)z->qe == a[k].qe && (int64_t)z->ts == a[k].rs && (int64_t)z->te == a[k].re) {
	// 		exact++;
	// 	} else {
	// 		inexact++;
	// 		// fprintf(stderr, "+z->qs:%u, z->qe:%u, z->ts:%u, z->te:%u\n", z->qs, z->qe, z->ts, z->te);
	// 		// fprintf(stderr, "-a->qs:%d, a->qe:%d, a->rs:%d, a->re:%d\n\n", a[k].qs, a[k].qe, a[k].rs, a[k].re);
	// 	}
	// }
	// fprintf(stderr, "[M::%s::exact->%ld, inexact->%ld]\n", __func__, exact, inexact);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x1, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jg 0x2db1ef
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x2db1b3
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x38(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x1c(%rcx), %eax
je 0x2db1df
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
imulq $0x28, -0x38(%rbp), %rax
addq %rax, %rsi
movq -0x30(%rbp), %rdx
subq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x2dab30
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x2db1e1
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x2db17f
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2db258
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
movl $0xfffffffe, 0x14(%rax) # imm = 0xFFFFFFFE
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x2db1f7
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x2dbb07
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, 0x20(%rax)
jl 0x2db972
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x20(%rcx), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rax
movl 0x8(%rax), %edx
shrl %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x89(%rbp)
jne 0x2db2f6
movq -0x70(%rbp), %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
andl $0x1, %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x2db302
jmp 0x2db304
jmp 0x2db323
leaq 0xb8988(%rip), %rdi     # 0x393c93
leaq 0xb551d(%rip), %rsi     # 0x39082f
movl $0x3dd7, %edx           # imm = 0x3DD7
leaq 0xb89a3(%rip), %rcx     # 0x393cc1
callq 0x2130
movq -0x70(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x14(%rcx), %rcx
cmpq %rcx, %rax
jne 0x2db3b5
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x18(%rcx), %rcx
cmpq %rcx, %rax
jne 0x2db3b5
movq -0x70(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0xc(%rcx), %rcx
cmpq %rcx, %rax
jne 0x2db3b5
movq -0x70(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x10(%rcx), %rcx
cmpq %rcx, %rax
jne 0x2db3b5
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $-0x20, %cl
orb $0x1, %cl
movb %cl, 0x20(%rax)
jmp 0x2db96d
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x18(%rcx), %rcx
cmpq %rcx, %rax
jg 0x2db3f9
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x98(%rbp)
jmp 0x2db410
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x70(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x14(%rcx), %rcx
cmpq %rcx, %rax
jl 0x2db44a
movq -0x70(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0xa8(%rbp)
jmp 0x2db461
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
movq -0xa8(%rbp), %rcx
cmpq %rcx, %rax
jle 0x2db526
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x18(%rcx), %rcx
cmpq %rcx, %rax
jg 0x2db4a4
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0xb0(%rbp)
jmp 0x2db4bb
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x70(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x14(%rcx), %rcx
cmpq %rcx, %rax
jl 0x2db4f5
movq -0x70(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0xc0(%rbp)
jmp 0x2db50c
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq -0xc0(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xc8(%rbp)
jmp 0x2db531
xorl %eax, %eax
movq %rax, -0xc8(%rbp)
jmp 0x2db531
movq -0xc8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
subl 0x14(%rcx), %eax
cltq
subq -0x40(%rbp), %rax
movq -0x70(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x70(%rbp), %rdx
subl 0x4(%rdx), %ecx
movl %ecx, %ecx
subq -0x40(%rbp), %rcx
addq %rcx, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x70(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x10(%rcx), %rcx
cmpq %rcx, %rax
jg 0x2db5b7
movq -0x70(%rbp), %rax
movl 0x10(%rax), %eax
movq %rax, -0xd0(%rbp)
jmp 0x2db5ce
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movslq 0x10(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x70(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0xc(%rcx), %rcx
cmpq %rcx, %rax
jl 0x2db608
movq -0x70(%rbp), %rax
movl 0xc(%rax), %eax
movq %rax, -0xe0(%rbp)
jmp 0x2db61f
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movslq 0xc(%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
movq -0xe0(%rbp), %rcx
cmpq %rcx, %rax
jle 0x2db6e4
movq -0x70(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0x10(%rcx), %rcx
cmpq %rcx, %rax
jg 0x2db662
movq -0x70(%rbp), %rax
movl 0x10(%rax), %eax
movq %rax, -0xe8(%rbp)
jmp 0x2db679
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movslq 0x10(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x70(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movslq 0xc(%rcx), %rcx
cmpq %rcx, %rax
jl 0x2db6b3
movq -0x70(%rbp), %rax
movl 0xc(%rax), %eax
movq %rax, -0xf8(%rbp)
jmp 0x2db6ca
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movslq 0xc(%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rax
movq -0xf8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x100(%rbp)
jmp 0x2db6ef
xorl %eax, %eax
movq %rax, -0x100(%rbp)
jmp 0x2db6ef
movq -0x100(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
subl 0xc(%rcx), %eax
cltq
subq -0x40(%rbp), %rax
movq -0x70(%rbp), %rcx
movl 0x10(%rcx), %ecx
movq -0x70(%rbp), %rdx
subl 0xc(%rdx), %ecx
movl %ecx, %ecx
subq -0x40(%rbp), %rcx
addq %rcx, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x8, -0x48(%rbp)
jg 0x2db772
cvtsi2sdq -0x48(%rbp), %xmm0
cvtsi2sdq -0x50(%rbp), %xmm1
movsd 0xb00cc(%rip), %xmm2    # 0x38b830
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2db8f6
jmp 0x2db774
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jne 0x2db7e3
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x2db7a5
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
shlq %rax
movq %rax, -0x108(%rbp)
jmp 0x2db7b3
movl $0x2, %eax
movq %rax, -0x108(%rbp)
jmp 0x2db7b3
movq -0x108(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x20(%rbp), %rax
imulq $0x24, 0x28(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rdx
movq 0x20(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x20(%rdx)
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
shrl %ecx
movq -0x70(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
movb %al, %dl
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $0x1, %dl
shlb $0x5, %dl
andb $-0x21, %cl
orb %dl, %cl
movb %cl, 0x20(%rax)
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $-0x20, %cl
orb $0x2, %cl
movb %cl, 0x20(%rax)
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $-0x41, %cl
orb $0x0, %cl
movb %cl, 0x20(%rax)
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, 0x20(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x70(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x70(%rbp), %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
jmp 0x2db96b
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $-0x20, %cl
orb $0x1, %cl
movb %cl, 0x20(%rax)
jmp 0x2db96d
jmp 0x2dbaf4
jmp 0x2db974
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jne 0x2db9e3
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x2db9a5
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
shlq %rax
movq %rax, -0x110(%rbp)
jmp 0x2db9b3
movl $0x2, %eax
movq %rax, -0x110(%rbp)
jmp 0x2db9b3
movq -0x110(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x20(%rbp), %rax
imulq $0x24, 0x28(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rdx
movq 0x20(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x20(%rdx)
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
shrl %ecx
movq -0x70(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
movb %al, %dl
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $0x1, %dl
shlb $0x5, %dl
andb $-0x21, %cl
orb %dl, %cl
movb %cl, 0x20(%rax)
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $-0x20, %cl
orb $0x2, %cl
movb %cl, 0x20(%rax)
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $-0x41, %cl
orb $0x0, %cl
movb %cl, 0x20(%rax)
movq -0x70(%rbp), %rax
movb 0x20(%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, 0x20(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x70(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x70(%rbp), %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
jmp 0x2dbaf6
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x2db260
movq $0x0, -0x30(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2dbbc4
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
cmpl $-0x2, 0x14(%rax)
jne 0x2dbb7b
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
andb $0x1f, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x2dbb79
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
andb $0x1f, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2dbb7b
jmp 0x2dbbb3
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rsi
imulq $0x24, -0x68(%rbp), %rax
addq %rax, %rsi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
imulq $0x24, %rax, %rax
addq %rax, %rdi
movl $0x24, %edx
callq 0x2180
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x2dbb17
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x20(%rbp), %rax
imulq $0x24, 0x20(%rax), %rax
addq %rax, %rsi
callq 0x27d610
movq $0x0, -0x38(%rbp)
movq $0x1, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jg 0x2dbd07
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x20(%rcx), %rax
je 0x2dbc4d
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x38(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
je 0x2dbcf4
movq -0x30(%rbp), %rax
subq -0x38(%rbp), %rax
cmpq $0x1, %rax
jle 0x2dbc80
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
imulq $0x24, -0x38(%rbp), %rax
addq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rsi
imulq $0x24, -0x30(%rbp), %rax
addq %rax, %rsi
callq 0x27dae0
jmp 0x2dbc82
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x2dbcf2
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x38(%rbp), %rcx
addq %rcx, %rax
cmpl $-0x2, 0x14(%rax)
jne 0x2dbcbb
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x38(%rbp), %rcx
addq %rcx, %rax
movl $0xffffffff, 0x14(%rax) # imm = 0xFFFFFFFF
jmp 0x2dbce2
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rdx
movq 0x30(%rdx), %rdx
imulq $0x24, -0x38(%rbp), %rsi
addq %rsi, %rdx
movl 0x14(%rdx), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
jmp 0x2dbce4
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2dbc82
jmp 0x2dbcf4
jmp 0x2dbcf6
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x2dbc01
movq $0x0, -0x68(%rbp)
movq $-0x1, -0x30(%rbp)
movq -0x68(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2dbfed
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
cmpl $-0x1, 0x14(%rax)
jne 0x2dbd44
jmp 0x2dbfdc
cmpq $0x0, -0x30(%rbp)
jge 0x2dbd53
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x68(%rbp), %rdx
addq %rdx, %rcx
movl 0x14(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x24(%rax)
jne 0x2dbd93
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
movl $0xffffffff, 0x14(%rax) # imm = 0xFFFFFFFF
jmp 0x2dbfdc
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x68(%rbp), %rdx
addq %rdx, %rcx
movl 0x14(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movq 0x30(%rdx), %rdx
imulq $0x24, -0x68(%rbp), %rsi
addq %rsi, %rdx
movl 0x14(%rdx), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x24(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movq 0x30(%rdx), %rdx
imulq $0x24, -0x68(%rbp), %rsi
addq %rsi, %rdx
movl 0x14(%rdx), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x24(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %ecx
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x68(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rdx
movq 0x30(%rdx), %rdx
imulq $0x24, -0x68(%rbp), %rsi
addq %rsi, %rdx
movl 0x14(%rdx), %edx
imulq $0x24, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %r8d
shll %r8d
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
orl %eax, %r8d
xorl $0x1, %r8d
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x68(%rbp), %rdx
addq %rdx, %rcx
movl 0x14(%rcx), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %r9d
shll %r9d
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x68(%rbp), %rdx
addq %rdx, %rcx
movl 0x14(%rcx), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
orl %eax, %r9d
xorl $0x1, %r9d
xorl %eax, %eax
movl %eax, %esi
movq $-0x1, %rcx
movq %rcx, %rdx
callq 0x2daf30
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jl 0x2dbf2e
movq -0x50(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
jmp 0x2dbfd4
movq -0x78(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0x78(%rbp), %rdx
movl 0x1c(%rdx), %edx
sarl %edx
movslq %edx, %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addl %ecx, %eax
cltq
movq %rax, -0x58(%rbp)
movq -0x80(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0x80(%rbp), %rdx
movl 0x1c(%rdx), %edx
sarl %edx
movslq %edx, %rdx
movl (%rcx,%rdx,8), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addl %ecx, %eax
cltq
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x58(%rbp), %rax
jl 0x2dbfbb
movq -0x60(%rbp), %rax
subq -0x58(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
jmp 0x2dbfd2
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x68(%rbp), %rcx
addq %rcx, %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
jmp 0x2dbfd4
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x2dbd17
movl $0xffffffff, -0x84(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x88(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
jl 0x2dc115
cmpl $-0x1, -0x84(%rbp)
je 0x2dc038
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x84(%rbp), %eax
ja 0x2dc08b
cmpl $-0x1, -0x84(%rbp)
je 0x2dc057
movl -0x88(%rbp), %eax
subl -0x84(%rbp), %eax
movl %eax, %eax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x84(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x88(%rbp)
jmp 0x2dc0d9
movl -0x84(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
imulq $0x24, -0x30(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
ja 0x2dc0b4
movl -0x84(%rbp), %eax
movl %eax, -0x114(%rbp)
jmp 0x2dc0cd
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x114(%rbp)
movl -0x114(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x30(%rbp), %rcx
addq %rcx, %rax
cmpl $-0x1, 0x14(%rax)
jne 0x2dc0f9
movq $-0x1, -0x30(%rbp)
jmp 0x2dc110
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x30(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq %rax, -0x30(%rbp)
jmp 0x2dc009
cmpl $-0x1, -0x84(%rbp)
je 0x2dc134
movl -0x88(%rbp), %eax
subl -0x84(%rbp), %eax
movl %eax, %eax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x18(%rcx), %ecx
cmpq %rcx, %rax
jne 0x2dc14c
movq -0x20(%rbp), %rax
movb $0x1, 0x50(%rax)
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)