// File: chhylp123[P]hifiasm/inter.cpp
// Function: update_rovlp_chain_qse(ma_ug_t*, long, long, mg_lchain_t*, long, long)
void update_rovlp_chain_qse(ma_ug_t *ug, int64_t sidx, int64_t eidx, mg_lchain_t *a, int64_t a_n, int64_t qlen)
{
	if(eidx - sidx <= 1) return;
	assert(sidx>=0||eidx<a_n);
	// fprintf(stderr, "******[M::%s::] sidx:%ld, eidx:%ld\n", __func__, sidx, eidx);
	int64_t left_r[2], right_r[2], left_q[2], right_q[2], tt; 
	int64_t i, rs, re;//qs or qe might be -1, while rs and re should >= 0
	if(sidx >= 0) {
		get_r_offset(ug, &(a[sidx]), &left_r[0], &left_r[1], &left_q[0], &left_q[1]);
	} else {
		get_r_offset(ug, &(a[0]), &left_r[0], &left_r[1], &left_q[0], &left_q[1]);
	}

	if(eidx < a_n) {
		get_r_offset(ug, &(a[eidx]), &right_r[0], &right_r[1], &right_q[0], &right_q[1]);
	} else {
		get_r_offset(ug, &(a[a_n-1]), &right_r[0], &right_r[1], &right_q[0], &right_q[1]);
	}
	assert((left_q[0] >= 0 && left_q[1] >= 0) || (right_q[0] >= 0 && right_q[1] >= 0)); ///assert(re >= rs);

	if(left_q[0] >= 0 && left_q[1] >= 0 && right_q[0] >= 0 && right_q[1] >= 0) {
		for (i = sidx+1; i < eidx; i++) {
			get_r_offset(ug, &(a[i]), &rs, &re, NULL, NULL);
			a[i].qe = cal_qext_coor(left_r[1], right_r[1], left_q[1], right_q[1], re);
			assert(a[i].qe >= 0 && a[i].qe <= qlen);
			a[i].qs = cal_qext_coor(left_r[0], (a[i].qe<=right_q[0])?re:right_r[0], 
											left_q[0], (a[i].qe<=right_q[0])?a[i].qe:right_q[0], rs);
			assert(a[i].qs >= 0 && a[i].qs <= qlen);
			if(a[i].qs > a[i].qe) {
				tt = a[i].qs; a[i].qs = a[i].qe; a[i].qe = tt;
			}
			left_q[0] = a[i].qs; left_q[1] = a[i].qe;
			left_r[0] = rs; left_r[1] = re;
		}
	}

	if(right_q[0] < 0 || right_q[1] < 0) {
		for (i = sidx+1; i < eidx; i++) {
			get_r_offset(ug, &(a[i]), &rs, &re, NULL, NULL);
			a[i].qe = cal_qext_coor(left_r[1], re, left_q[1], left_q[1] + re - left_r[1], re);
			if(a[i].qe < 0) a[i].qe = 0; if(a[i].qe > qlen) a[i].qe = qlen;
			a[i].qs = cal_qext_coor(left_r[0], (a[i].qe<=left_q[1])?re:left_r[1], 
											left_q[0], (a[i].qe<=left_q[1])?a[i].qe:left_q[1], rs);
			assert(a[i].qs >= 0 && a[i].qs <= qlen);
			if(a[i].qs > a[i].qe) {
				tt = a[i].qs; a[i].qs = a[i].qe; a[i].qe = tt;
			}
			
			left_q[0] = a[i].qs; left_q[1] = a[i].qe;
			left_r[0] = rs; left_r[1] = re;
		}
	}

	if(left_q[0] < 0 || left_q[1] < 0) {
		for (i = eidx-1; i > sidx; i--) {
			get_r_offset(ug, &(a[i]), &rs, &re, NULL, NULL);
			// a[i].qe = right_q[1] - get_offset_adjust(right_r[1]-re, right_r[1]-right_r[0], right_q[1]-right_q[0]);
			// a[i].qs = right_q[0] - (right_r[0]-rs);
			a[i].qe = cal_qext_coor(right_r[0], right_r[1], right_q[0], right_q[1], re);
			assert(a[i].qe >= 0 && a[i].qe <= qlen);
			a[i].qs = cal_qext_coor(rs, right_r[0], right_q[0]-(right_r[0]-rs), right_q[0], rs);
			if(a[i].qs < 0) a[i].qs = 0; if(a[i].qs > qlen) a[i].qs = qlen;
			if(a[i].qs > a[i].qe) {
				tt = a[i].qs; a[i].qs = a[i].qe; a[i].qe = tt;
			}

			right_q[0] = a[i].qs; right_q[1] = a[i].qe;
			right_r[0] = rs; right_r[1] = re;
		}
	}
	// if(left_q[0] < 0) left_q[0] = right_q[0] - (right_r[0] - left_r[0]);
	// if(left_q[1] < 0) left_q[1] = right_q[1] - (right_r[1] - left_r[1]);
	// if(right_q[0] < 0 || right_q[1] < 0) {
	// 	right_q[0] = left_q[0] + (right_r[0] - left_r[0]);
	// 	right_q[1] = left_q[1] + (right_r[1] - left_r[1]);
	// }	
	
	// fprintf(stderr, "******[M::%s::] right_q[0]:%ld, right_q[1]:%ld\n", __func__, right_q[0], right_q[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
subq -0x10(%rbp), %rax
cmpq $0x1, %rax
jg 0x2d9506
jmp 0x2d9e61
movb $0x1, %al
cmpq $0x0, -0x10(%rbp)
movb %al, -0x91(%rbp)
jge 0x2d9526
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
setl %al
movb %al, -0x91(%rbp)
movb -0x91(%rbp), %al
testb $0x1, %al
jne 0x2d9532
jmp 0x2d9534
jmp 0x2d9553
leaq 0xba49c(%rip), %rdi     # 0x3939d7
leaq 0xb72ed(%rip), %rsi     # 0x39082f
movl $0x3c8a, %edx           # imm = 0x3C8A
leaq 0xba53c(%rip), %rcx     # 0x393a8a
callq 0x2130
cmpq $0x0, -0x10(%rbp)
jl 0x2d9589
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
imulq $0x28, -0x10(%rbp), %rax
addq %rax, %rsi
leaq -0x40(%rbp), %rdx
leaq -0x40(%rbp), %rcx
addq $0x8, %rcx
leaq -0x60(%rbp), %r8
leaq -0x60(%rbp), %r9
addq $0x8, %r9
callq 0x2984d0
jmp 0x2d95ae
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x40(%rbp), %rcx
addq $0x8, %rcx
leaq -0x60(%rbp), %r8
leaq -0x60(%rbp), %r9
addq $0x8, %r9
callq 0x2984d0
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x2d95e7
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
imulq $0x28, -0x18(%rbp), %rax
addq %rax, %rsi
leaq -0x50(%rbp), %rdx
leaq -0x50(%rbp), %rcx
addq $0x8, %rcx
leaq -0x70(%rbp), %r8
leaq -0x70(%rbp), %r9
addq $0x8, %r9
callq 0x2984d0
jmp 0x2d961b
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rax
subq $0x1, %rax
imulq $0x28, %rax, %rax
addq %rax, %rsi
leaq -0x50(%rbp), %rdx
leaq -0x50(%rbp), %rcx
addq $0x8, %rcx
leaq -0x70(%rbp), %r8
leaq -0x70(%rbp), %r9
addq $0x8, %r9
callq 0x2984d0
cmpq $0x0, -0x60(%rbp)
jl 0x2d9631
movb $0x1, %al
cmpq $0x0, -0x58(%rbp)
movb %al, -0x92(%rbp)
jge 0x2d965a
xorl %eax, %eax
cmpq $0x0, -0x70(%rbp)
movb %al, -0x93(%rbp)
jl 0x2d964e
cmpq $0x0, -0x68(%rbp)
setge %al
movb %al, -0x93(%rbp)
movb -0x93(%rbp), %al
movb %al, -0x92(%rbp)
movb -0x92(%rbp), %al
testb $0x1, %al
jne 0x2d9666
jmp 0x2d9668
jmp 0x2d9687
leaq 0xba3d0(%rip), %rdi     # 0x393a3f
leaq 0xb71b9(%rip), %rsi     # 0x39082f
movl $0x3c99, %edx           # imm = 0x3C99
leaq 0xba408(%rip), %rcx     # 0x393a8a
callq 0x2130
cmpq $0x0, -0x60(%rbp)
jl 0x2d996d
cmpq $0x0, -0x58(%rbp)
jl 0x2d996d
cmpq $0x0, -0x70(%rbp)
jl 0x2d996d
cmpq $0x0, -0x68(%rbp)
jl 0x2d996d
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x2d996b
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
imulq $0x28, -0x80(%rbp), %rax
addq %rax, %rsi
leaq -0x88(%rbp), %rdx
leaq -0x90(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x2984d0
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x68(%rbp), %rcx
movq -0x90(%rbp), %r8
callq 0x29a310
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rcx
imulq $0x28, -0x80(%rbp), %rax
addq %rax, %rcx
xorl %eax, %eax
cmpl $0x0, 0x18(%rcx)
movb %al, -0x94(%rbp)
jl 0x2d975c
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
cmpq -0x30(%rbp), %rax
setle %al
movb %al, -0x94(%rbp)
movb -0x94(%rbp), %al
testb $0x1, %al
jne 0x2d9768
jmp 0x2d976a
jmp 0x2d9789
leaq 0xba373(%rip), %rdi     # 0x393ae4
leaq 0xb70b7(%rip), %rsi     # 0x39082f
movl $0x3c9f, %edx           # imm = 0x3C9F
leaq 0xba306(%rip), %rcx     # 0x393a8a
callq 0x2130
movq -0x40(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
cmpq -0x70(%rbp), %rax
jg 0x2d97ba
movq -0x90(%rbp), %rax
movq %rax, -0xa8(%rbp)
jmp 0x2d97c5
movq -0x50(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
cmpq -0x70(%rbp), %rax
jg 0x2d980d
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
movq %rax, -0xc0(%rbp)
jmp 0x2d9818
movq -0x70(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xb0(%rbp), %rdx
movq -0xb8(%rbp), %rsi
movq -0xa0(%rbp), %rdi
movq -0xc0(%rbp), %rcx
movq -0x88(%rbp), %r8
callq 0x29a310
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rcx
imulq $0x28, -0x80(%rbp), %rax
addq %rax, %rcx
xorl %eax, %eax
cmpl $0x0, 0x14(%rcx)
movb %al, -0xc1(%rbp)
jl 0x2d9888
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
cmpq -0x30(%rbp), %rax
setle %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x2d9894
jmp 0x2d9896
jmp 0x2d98b5
leaq 0xba267(%rip), %rdi     # 0x393b04
leaq 0xb6f8b(%rip), %rsi     # 0x39082f
movl $0x3ca2, %edx           # imm = 0x3CA2
leaq 0xba1da(%rip), %rcx     # 0x393a8a
callq 0x2130
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x20(%rbp), %rcx
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jle 0x2d991c
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x2d96bf
jmp 0x2d996d
cmpq $0x0, -0x70(%rbp)
jl 0x2d997f
cmpq $0x0, -0x68(%rbp)
jge 0x2d9c33
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x2d9c31
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
imulq $0x28, -0x80(%rbp), %rax
addq %rax, %rsi
leaq -0x88(%rbp), %rdx
leaq -0x90(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x2984d0
movq -0x38(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x58(%rbp), %rcx
addq -0x90(%rbp), %rcx
subq -0x38(%rbp), %rcx
movq -0x90(%rbp), %r8
callq 0x29a310
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jge 0x2d9a24
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movl $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
cmpq -0x30(%rbp), %rax
jle 0x2d9a4f
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
cmpq -0x58(%rbp), %rax
jg 0x2d9a80
movq -0x90(%rbp), %rax
movq %rax, -0xd8(%rbp)
jmp 0x2d9a8b
movq -0x38(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
cmpq -0x58(%rbp), %rax
jg 0x2d9ad3
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
movq %rax, -0xf0(%rbp)
jmp 0x2d9ade
movq -0x58(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xe0(%rbp), %rdx
movq -0xe8(%rbp), %rsi
movq -0xd0(%rbp), %rdi
movq -0xf0(%rbp), %rcx
movq -0x88(%rbp), %r8
callq 0x29a310
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rcx
imulq $0x28, -0x80(%rbp), %rax
addq %rax, %rcx
xorl %eax, %eax
cmpl $0x0, 0x14(%rcx)
movb %al, -0xf1(%rbp)
jl 0x2d9b4e
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
cmpq -0x30(%rbp), %rax
setle %al
movb %al, -0xf1(%rbp)
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x2d9b5a
jmp 0x2d9b5c
jmp 0x2d9b7b
leaq 0xb9fa1(%rip), %rdi     # 0x393b04
leaq 0xb6cc5(%rip), %rsi     # 0x39082f
movl $0x3cb2, %edx           # imm = 0x3CB2
leaq 0xb9f14(%rip), %rcx     # 0x393a8a
callq 0x2130
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x20(%rbp), %rcx
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jle 0x2d9be2
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x2d998b
jmp 0x2d9c33
cmpq $0x0, -0x60(%rbp)
jl 0x2d9c45
cmpq $0x0, -0x58(%rbp)
jge 0x2d9e61
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x10(%rbp), %rax
jle 0x2d9e5f
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
imulq $0x28, -0x80(%rbp), %rax
addq %rax, %rsi
leaq -0x88(%rbp), %rdx
leaq -0x90(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x2984d0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rcx
movq -0x90(%rbp), %r8
callq 0x29a310
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rcx
imulq $0x28, -0x80(%rbp), %rax
addq %rax, %rcx
xorl %eax, %eax
cmpl $0x0, 0x18(%rcx)
movb %al, -0xf2(%rbp)
jl 0x2d9cee
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
cmpq -0x30(%rbp), %rax
setle %al
movb %al, -0xf2(%rbp)
movb -0xf2(%rbp), %al
testb $0x1, %al
jne 0x2d9cfa
jmp 0x2d9cfc
jmp 0x2d9d1b
leaq 0xb9de1(%rip), %rdi     # 0x393ae4
leaq 0xb6b25(%rip), %rsi     # 0x39082f
movl $0x3cc2, %edx           # imm = 0x3CC2
leaq 0xb9d74(%rip), %rcx     # 0x393a8a
callq 0x2130
movq -0x88(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x50(%rbp), %rax
subq -0x88(%rbp), %rax
subq %rax, %rdx
movq -0x70(%rbp), %rcx
movq -0x88(%rbp), %r8
callq 0x29a310
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, 0x14(%rax)
jge 0x2d9d7e
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movl $0x0, 0x14(%rax)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
cmpq -0x30(%rbp), %rax
jle 0x2d9da9
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x20(%rbp), %rcx
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jle 0x2d9e10
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
imulq $0x28, -0x80(%rbp), %rcx
addq %rcx, %rax
movslq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x80(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x2d9c51
jmp 0x2d9e61
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw (%rax,%rax)