// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: cal_exact_batch(overlap_region*, ul_ov_t*, unsigned long, long, unsigned long*, unsigned long*, unsigned long*, unsigned long*, unsigned long*, unsigned long*, ma_ug_t*)
int64_t cal_exact_batch(overlap_region *z, ul_ov_t *sa, uint64_t sn, int64_t ylen, uint64_t *q0l, uint64_t *t0l, uint64_t *e0l, uint64_t *q1l, uint64_t *t1l, uint64_t *e1l, ma_ug_t *ug)
{
	int64_t wn = z->w_list.n, wk, xk, yk, is_t, is_f, err0, err1, tot, mask_win = 0; window_list *m; bit_extz_t ez; 
    int64_t qs, qe, ts, te, rev = !!(z->y_pos_strand), qoff, toff, elen, sube;
	tot = z->non_homopolymer_errors;
	if(!tot) {
		(*q0l) = (*q1l) = z->x_pos_e+1-z->x_pos_s;
		(*t0l) = (*t1l) = z->y_pos_e+1-z->y_pos_s;
		(*e0l) = (*e1l) = z->x_pos_e+1-z->x_pos_s;
		return 0;
	}
	(*q0l) = (*t0l) = (*e0l) = (*q1l) = (*t1l) = (*e1l) = (uint64_t)-1;
	wk = xk = yk = -1; if(!wn) return INT32_MAX;

	///forward
	(*q0l) = (*t0l) = (*e0l) = err0 = 0;
	wk = 0; xk = z->w_list.a[wk].x_start; yk = z->w_list.a[wk].y_start; is_t = 0;
	if((xk == z->x_pos_s) && (yk == z->y_pos_s)) is_t = 1;
	if((!is_t) && (sn > 0)) {///if the flanking unmapped regions could be masked
		qs = z->x_pos_s; qe = xk; 
		if(!rev) {
			ts = z->y_pos_s; te = yk;
		} else {
			ts = ylen - yk; te = ylen - z->y_pos_s; 
		}
		is_t = is_mask_err_full(sa, sn, qs, qe, ts, te);
		if(is_t) {
			(*q0l) += qe - qs; (*t0l) += te - ts; (*e0l) = 0;
		}
	}
	if(is_t) {
		for (; wk < wn; wk++) {		
			m = &(z->w_list.a[wk]); 
			qs = m->x_start; qe = m->x_end+1;
			if(!rev) {
				ts = m->y_start; te = m->y_end+1;
			} else {
				ts = ylen-(m->y_end+1); te = ylen-m->y_start;
			}

			if((is_ualn_win((*m))) || ((is_est_aln((*m))) && (m->error > 0))) {///unmapped 				
				if(is_mask_err_full(sa, sn, qs, qe, ts, te)) {
					(*q0l) += qe - qs; (*t0l) += te - ts; (*e0l) = 0; mask_win = 1;
					continue;
				}
				break;
			} 
			if(m->error == 0) {///an exactly matched window
				(*q0l) += qe - qs; (*t0l) += te - ts; (*e0l) += qe - qs;
				continue;
			}
			set_bit_extz_t(ez, (*z), wk); 
			is_f = cal_exact_len(&ez, rev, sa, sn, ylen, &qoff, &toff, &elen, &sube, 0);
			(*q0l) += qoff; (*t0l) += toff; err0 += sube;
			///exactly match
			if(elen == qoff && elen == toff) (*e0l) += elen;
			else (*e0l) = elen;
			if(!is_f) break;
		}
	}


	///backward
	(*q1l) = (*t1l) = (*e1l) = err1 = 0;
	wk = wn-1; xk = z->w_list.a[wk].x_end+1; yk = z->w_list.a[wk].y_end+1; is_t = 0;
	if((xk == (z->x_pos_e+1)) && (yk == (z->y_pos_e+1))) is_t = 1;
	if((!is_t) && (sn > 0)) {///if the flanking unmapped regions could be masked
		qs = xk; qe = z->x_pos_e+1;
		if(!rev) {
			ts = yk; te = z->y_pos_e+1;
		} else {
			ts = ylen-(z->y_pos_e+1); te = ylen-yk;
		}
		is_t = is_mask_err_full(sa, sn, qs, qe, ts, te);
        if(is_t) {
            (*q1l) += qe - qs; (*t1l) += te - ts; (*e1l) = 0;
        }
	}
	if(is_t) {
		for (; wk >= 0; wk--) {
			m = &(z->w_list.a[wk]); 
			qs = m->x_start; qe = m->x_end+1;
			if(!rev) {
				ts = m->y_start; te = m->y_end+1;
			} else {
				ts = ylen-(m->y_end+1); te = ylen-m->y_start;
			}

			if((is_ualn_win((*m))) || ((is_est_aln((*m))) && (m->error > 0))) {///unmapped 				
				if(is_mask_err_full(sa, sn, qs, qe, ts, te)) {
					(*q1l) += qe - qs; (*t1l) += te - ts; (*e1l) = 0; mask_win = 1;
					continue;
				}
				break;
			} 
			if(m->error == 0) {///an exactly matched window
				(*q1l) += qe - qs; (*t1l) += te - ts; (*e1l) += qe - qs;
				continue;
			}
			set_bit_extz_t(ez, (*z), wk); 
			is_f = cal_exact_len(&ez, rev, sa, sn, ylen, &qoff, &toff, &elen, &sube, 1);
			(*q1l) += qoff; (*t1l) += toff; err1 += sube;
			///exactly match
			if(elen == qoff && elen == toff) (*e1l) += elen;
			else (*e1l) = elen;
			if(!is_f) break;
		}
	}

	if((*q0l) >= (z->x_pos_e+1-z->x_pos_s) && (*t0l) >= (z->y_pos_e+1-z->y_pos_s)) {
		// if((!(((*q0l) == (*q1l)) && ((*t0l) == (*t1l)) && (err0 == err1)))/** || (!(err0 == tot))**/) {
		// 	fprintf(stderr, "[M::%s]\tutg%.6u%c\txl::%u\tx::[%u,\t%u)\t%c\tutg%.6u%c\tyl::%u\ty::[%u,\t%u)\terr::%u\twn::%u\n", 
        //     __func__, 
		// 	z->x_id+1, "lc"[ug->u.a[z->x_id].circ], ug->u.a[z->x_id].len, z->x_pos_s, z->x_pos_e+1,
		// 	"+-"[z->y_pos_strand],
		// 	z->y_id+1, "lc"[ug->u.a[z->y_id].circ], ug->u.a[z->y_id].len, z->y_pos_s, z->y_pos_e+1,
		// 	z->non_homopolymer_errors, (uint32_t)z->w_list.n);
		// 	uint64_t k;
		// 	for (k = 0; k < z->w_list.n; k++) {
		// 		m = &(z->w_list.a[k]);
		// 		fprintf(stderr, "k::%ld[M::%s]\tutg%.6u%c\twx::[%u,\t%u)\t%c\tutg%.6u%c\twy::[%u,\t%u)\terr::%d\tualn::%u\test::%u\n", k, __func__, 
		// 		z->x_id+1, "lc"[ug->u.a[z->x_id].circ], m->x_start, m->x_end+1,
		// 		"+-"[z->y_pos_strand], 
		// 		z->y_id+1, "lc"[ug->u.a[z->y_id].circ], m->y_start, m->y_end+1, m->error, 
		// 		(is_ualn_win((*m))), (is_est_aln((*m))));
		// 	}
		// 	fprintf(stderr, "[M::%s]\tutg%.6ul\tutg%.6ul\terr0::%ld\terr1::%ld\ttot::%ld\n", __func__, 
		// 	z->x_id+1, z->y_id+1, err0, err1, tot);
		// 	fprintf(stderr, "[M::%s]\tutg%.6ul\tq0l::%lu\tt0l::%lu\te0l::%lu\tutg%.6ul\tq1l::%lu\tt1l::%lu\te1l::%lu\n", __func__, 
		// 		z->x_id+1, *q0l, *t0l, *e0l, z->y_id+1, *q1l, *t1l, *e1l);
		// }
		assert(((*q0l) == (*q1l)) && ((*t0l) == (*t1l)) && (err0 == err1));
		assert((mask_win) || (err0 == tot));
		return 0;
	}

	// if(!(err0+err1 < tot)) {
	// 	fprintf(stderr, "[M::%s]\tutg%.6ul\tutg%.6ul\terr0::%ld\terr1::%ld\ttot::%ld\n", __func__, 
	// 	z->x_id+1, z->y_id+1, err0, err1, tot);
	// 	fprintf(stderr, "[M::%s]\tutg%.6ul\tq0l::%lu\tt0l::%lu\te0l::%lu\tutg%.6ul\tq1l::%lu\tt1l::%lu\te1l::%lu\n", __func__, 
	// 		z->x_id+1, *q0l, *t0l, *e0l, z->y_id+1, *q1l, *t1l, *e1l);
	// }
	
	assert(err0+err1 < tot);
	return tot-(err0+err1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rcx, 0x40(%rsp)
movq %rdx, (%rsp)
movq %rsi, 0x38(%rsp)
movq 0x1b8(%rsp), %r11
movq 0x1b0(%rsp), %r12
movq 0x1a8(%rsp), %rbp
movq 0x1a0(%rsp), %r10
movl 0x1c(%rdi), %eax
movq $0x0, 0x58(%rsp)
movl %eax, 0x24(%rsp)
testl %eax, %eax
setne %al
movl 0x30(%rdi), %edx
testq %rdx, %rdx
je 0x1cb183
movq 0x48(%rdi), %rsi
movq $-0x1, %rcx
movq %rcx, (%r11)
movq %rcx, (%r12)
movq %rcx, (%rbp)
movq %rcx, (%r10)
movq %rcx, (%r9)
movq %rcx, (%r8)
movq %rsi, 0x30(%rsp)
testq %rsi, %rsi
je 0x1cb1ae
movq %rdx, 0x88(%rsp)
movq 0x58(%rsp), %rcx
movb %al, %cl
movq %rcx, 0x58(%rsp)
xorl %eax, %eax
movq %rax, (%r10)
movq %rax, (%r9)
movq %rax, (%r8)
movq 0x58(%rdi), %r15
movslq (%r15), %rsi
movslq 0x8(%r15), %rcx
movl 0x4(%rdi), %edx
movb $0x1, %r10b
movq %rsi, %r14
subq %rdx, %r14
jne 0x1cb138
movl 0x14(%rdi), %r10d
xorl %eax, %eax
cmpq %r10, %rcx
setne %r10b
sete %al
cmpq $0x0, (%rsp)
movq %r9, 0x50(%rsp)
movq %rdi, 0x18(%rsp)
movq %r8, 0x8(%rsp)
je 0x1cb253
testb %r10b, %r10b
je 0x1cb253
cmpl $0x0, 0x24(%rsp)
movq %r15, 0x10(%rsp)
movq %r14, 0x28(%rsp)
je 0x1cb1b8
movq 0x40(%rsp), %r8
movq %r8, %rax
subq %rcx, %rax
movl 0x14(%rdi), %r10d
movq %r8, %rcx
subq %r10, %rcx
jmp 0x1cb1bb
movl 0x8(%rdi), %eax
subl 0x4(%rdi), %eax
incl %eax
movq %rax, (%rbp)
movq %rax, (%r8)
movl 0x18(%rdi), %ecx
subl 0x14(%rdi), %ecx
incl %ecx
movq %rcx, (%r12)
movq %rcx, (%r9)
movq %rax, (%r11)
movq %rax, (%r10)
xorl %eax, %eax
jmp 0x1cb9c7
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jmp 0x1cb9c7
movl 0x14(%rdi), %eax
movq (%rsp), %r13
negq %r13
movq 0x38(%rsp), %rdi
leaq 0x14(%rdi), %r10
movb $0x1, %r11b
movl $0x1, %r14d
cmpl %edx, -0x10(%r10)
ja 0x1cb1f4
movl -0xc(%r10), %r15d
cmpq %rsi, %r15
jb 0x1cb1f4
movl -0x4(%r10), %r15d
cmpq %r15, %rax
jb 0x1cb1f4
movl (%r10), %r15d
cmpq %r15, %rcx
jbe 0x1cb210
cmpq (%rsp), %r14
setb %r11b
leaq (%r14,%r13), %r15
incq %r15
incq %r14
addq $0x1c, %r10
cmpq $0x1, %r15
jne 0x1cb1d4
testb $0x1, %r11b
je 0x1cb531
movq 0x8(%rsp), %r8
movq 0x28(%rsp), %rdx
movq %rdx, (%r8)
subq %rax, %rcx
addq %rcx, (%r9)
movq 0x1a0(%rsp), %rax
movq $0x0, (%rax)
movl $0x1, %eax
movq 0x18(%rsp), %rdi
movq 0x1b8(%rsp), %r11
movq 0x10(%rsp), %r15
cmpq $0x0, 0x30(%rsp)
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1cb51d
movq (%rsp), %r15
negq %r15
movq 0x38(%rsp), %rax
addq $0x14, %rax
movq %rax, 0x60(%rsp)
movq $0x0, 0x48(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x28(%rsp)
movq 0x58(%rdi), %r8
movq %rbp, %r9
shlq $0x5, %r9
leaq (%r8,%r9), %r11
cmpl $0x0, 0x24(%rsp)
je 0x1cb2c1
movslq 0xc(%r11), %r10
movq %r10, %rax
notq %rax
movq 0x40(%rsp), %rcx
addq %rcx, %rax
movslq 0x8(%r11), %r12
subq %r12, %rcx
jmp 0x1cb2d2
movl 0x8(%r11), %r12d
movslq %r12d, %rax
movslq 0xc(%r11), %r10
movq %r10, %rcx
incq %rcx
movslq 0x4(%r8,%r9), %rbx
leaq 0x1(%rbx), %rdx
movl (%r8,%r9), %r14d
movslq %r14d, %rsi
movswl 0x14(%r11), %r13d
movl 0x1c(%r11), %edi
cmpl $0x7fff, %r13d          # imm = 0x7FFF
jne 0x1cb30c
testl %edi, %edi
jne 0x1cb3e5
xorl %edi, %edi
cmpw $0x0, 0x12(%r11)
jns 0x1cb3e5
jmp 0x1cb345
testl %edi, %edi
setne %r11b
testw %r13w, %r13w
movq %r12, 0x10(%rsp)
movq %r15, %r12
movq %rbx, %r15
movq %rbp, %rbx
movq %r10, %rbp
setle %r10b
orb %r11b, %r10b
movq %rbp, %r10
movq %rbx, %rbp
movq %r15, %rbx
movq %r12, %r15
movq 0x10(%rsp), %r12
jne 0x1cb3db
cmpq $0x0, (%rsp)
je 0x1cb55c
movb $0x1, %dil
movl $0x1, %r8d
movq 0x60(%rsp), %r11
movq 0x50(%rsp), %r9
movl -0x10(%r11), %r10d
cmpq %rsi, %r10
ja 0x1cb386
movl -0xc(%r11), %r10d
cmpq %rdx, %r10
jb 0x1cb386
movl -0x4(%r11), %r10d
cmpq %r10, %rax
jb 0x1cb386
movl (%r11), %r10d
cmpq %r10, %rcx
jbe 0x1cb3a2
cmpq (%rsp), %r8
setb %dil
leaq (%r15,%r8), %r10
incq %r10
incq %r8
addq $0x1c, %r11
cmpq $0x1, %r10
jne 0x1cb363
testb $0x1, %dil
movq 0x18(%rsp), %rdi
movq 0x1a0(%rsp), %r10
je 0x1cb566
subq %rsi, %rdx
movq 0x8(%rsp), %r8
addq %rdx, (%r8)
subq %rax, %rcx
addq %rcx, (%r9)
movl $0x1, %eax
movq %rax, 0x48(%rsp)
xorl %edx, %edx
jmp 0x1cb50a
testw %r13w, %r13w
je 0x1cb4e4
movl 0x18(%r8,%r9), %eax
addq %rax, %rax
movq 0x18(%rsp), %rcx
addq 0x70(%rcx), %rax
movq %rax, 0x148(%rsp)
movl %edi, %eax
movq %rax, 0x140(%rsp)
movq %rax, 0x138(%rsp)
movl %r14d, 0xac(%rsp)
movl %ebx, 0xb0(%rsp)
movl %r12d, 0xa0(%rsp)
movl %r10d, 0xa4(%rsp)
movl %r13d, 0xbc(%rsp)
movl %r13d, 0xb8(%rsp)
leaq 0x90(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq (%rsp), %rcx
movq 0x40(%rsp), %r8
leaq 0x80(%rsp), %r9
pushq $0x0
leaq 0x70(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
callq 0x1cad4e
addq $0x20, %rsp
movq 0x80(%rsp), %rsi
movq 0x8(%rsp), %r8
addq %rsi, (%r8)
movq 0x78(%rsp), %rdx
movq 0x50(%rsp), %r9
addq %rdx, (%r9)
movq 0x70(%rsp), %rcx
xorq %rcx, %rsi
movq %rcx, %rdi
xorq %rdx, %rdi
orq %rsi, %rdi
movq 0x1a0(%rsp), %rsi
jne 0x1cb4c3
movq (%rsi), %rcx
addq %rdx, %rcx
movq 0x28(%rsp), %rdx
addq 0x68(%rsp), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rsi)
testq %rax, %rax
movq 0x18(%rsp), %rdi
jne 0x1cb50d
jmp 0x1cb56b
subq %rsi, %rdx
movq 0x8(%rsp), %r8
addq %rdx, (%r8)
subq %rax, %rcx
movq 0x50(%rsp), %r9
addq %rcx, (%r9)
movq 0x1a0(%rsp), %r10
addq (%r10), %rdx
movq 0x18(%rsp), %rdi
movq %rdx, (%r10)
incq %rbp
cmpq 0x30(%rsp), %rbp
jne 0x1cb290
jmp 0x1cb56b
movq $0x0, 0x28(%rsp)
movq $0x0, 0x48(%rsp)
jmp 0x1cb587
movq $0x0, 0x28(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %r8
movq 0x1b8(%rsp), %r11
movq 0x10(%rsp), %r15
jmp 0x1cb587
movq 0x50(%rsp), %r9
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %r8
movq 0x58(%rdi), %r15
movq 0x1b0(%rsp), %r12
movq 0x1a8(%rsp), %rbp
movq 0x1b8(%rsp), %r11
xorl %esi, %esi
movq %rsi, (%r11)
movq %rsi, (%r12)
movq %rsi, (%rbp)
movq 0x30(%rsp), %rax
leaq -0x1(%rax), %r14
movq %r14, %rdx
shlq $0x5, %rdx
movslq 0x4(%r15,%rdx), %rcx
incq %rcx
movslq 0xc(%r15,%rdx), %r11
incq %r11
movl 0x8(%rdi), %eax
incl %eax
movb $0x1, %r10b
movq %rax, %rdx
subq %rcx, %rdx
jne 0x1cb5d8
movl 0x18(%rdi), %r10d
incl %r10d
xorl %esi, %esi
cmpq %r10, %r11
setne %r10b
sete %sil
cmpq $0x0, (%rsp)
je 0x1cb69b
testb %r10b, %r10b
je 0x1cb69b
movq %r14, 0x10(%rsp)
movl 0x18(%rdi), %r10d
incl %r10d
movq 0x40(%rsp), %r13
movq %r13, %rsi
subq %r10, %rsi
subq %r11, %r13
cmpl $0x0, 0x24(%rsp)
cmoveq %r11, %rsi
cmoveq %r10, %r13
movq (%rsp), %r8
negq %r8
movq 0x38(%rsp), %r10
leaq 0x14(%r10), %r15
movb $0x1, %r10b
movl $0x1, %r11d
movl -0x10(%r15), %r14d
cmpq %rcx, %r14
ja 0x1cb64c
cmpl %eax, -0xc(%r15)
jb 0x1cb64c
movl -0x4(%r15), %r14d
cmpq %r14, %rsi
jb 0x1cb64c
movl (%r15), %r14d
cmpq %r14, %r13
jbe 0x1cb668
cmpq (%rsp), %r11
setb %r10b
leaq (%r8,%r11), %r14
incq %r14
incq %r11
addq $0x1c, %r15
cmpq $0x1, %r14
jne 0x1cb62c
testb $0x1, %r10b
je 0x1cb964
movq %rdx, (%rbp)
subq %rsi, %r13
addq %r13, (%r12)
movq 0x1b8(%rsp), %rcx
movq $0x0, (%rcx)
movl $0x1, %esi
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r14
cmpq $0x0, 0x30(%rsp)
setg %cl
andb %sil, %cl
cmpb $0x1, %cl
jne 0x1cb95f
movq (%rsp), %r13
negq %r13
movq 0x38(%rsp), %rax
addq $0x14, %rax
movq %rax, 0x60(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq 0x58(%rax), %r8
movq %r14, %r9
shlq $0x5, %r9
leaq (%r8,%r9), %r11
cmpl $0x0, 0x24(%rsp)
movq %r14, 0x10(%rsp)
je 0x1cb709
movslq 0xc(%r11), %rdi
movq %rdi, %rax
notq %rax
movq 0x40(%rsp), %rcx
addq %rcx, %rax
movslq 0x8(%r11), %rbx
subq %rbx, %rcx
jmp 0x1cb71a
movl 0x8(%r11), %ebx
movslq %ebx, %rax
movslq 0xc(%r11), %rdi
movq %rdi, %rcx
incq %rcx
movslq 0x4(%r8,%r9), %r14
leaq 0x1(%r14), %rdx
movl (%r8,%r9), %ebp
movslq %ebp, %rsi
movswl 0x14(%r11), %r12d
movl 0x1c(%r11), %r15d
cmpl $0x7fff, %r12d          # imm = 0x7FFF
jne 0x1cb756
testl %r15d, %r15d
jne 0x1cb81c
xorl %r15d, %r15d
cmpw $0x0, 0x12(%r11)
jns 0x1cb81c
jmp 0x1cb771
testl %r15d, %r15d
setne %r11b
testw %r12w, %r12w
movq %rdi, %r10
setle %dil
orb %r11b, %dil
jne 0x1cb80f
cmpq $0x0, (%rsp)
je 0x1cb96e
movb $0x1, %dil
movl $0x1, %r8d
movq 0x60(%rsp), %r9
movq 0x1b0(%rsp), %r12
movq 0x1a8(%rsp), %rbp
movl -0x10(%r9), %r10d
cmpq %rsi, %r10
ja 0x1cb7bd
movl -0xc(%r9), %r10d
cmpq %rdx, %r10
jb 0x1cb7bd
movl -0x4(%r9), %r10d
cmpq %r10, %rax
jb 0x1cb7bd
movl (%r9), %r10d
cmpq %r10, %rcx
jbe 0x1cb7d9
cmpq (%rsp), %r8
setb %dil
leaq (%r8,%r13), %r10
incq %r10
incq %r8
addq $0x1c, %r9
cmpq $0x1, %r10
jne 0x1cb79a
testb $0x1, %dil
movq 0x1b8(%rsp), %rdi
movq 0x10(%rsp), %r8
je 0x1cb97e
subq %rsi, %rdx
addq %rdx, (%rbp)
subq %rax, %rcx
addq %rcx, (%r12)
movl $0x1, %eax
movq %rax, 0x48(%rsp)
xorl %edx, %edx
jmp 0x1cb94d
movq %r10, %rdi
testw %r12w, %r12w
je 0x1cb91f
movl 0x18(%r8,%r9), %eax
addq %rax, %rax
movq 0x18(%rsp), %rcx
addq 0x70(%rcx), %rax
movq %rax, 0x148(%rsp)
movl %r15d, %eax
movq %rax, 0x140(%rsp)
movq %rax, 0x138(%rsp)
movl %ebp, 0xac(%rsp)
movl %r14d, 0xb0(%rsp)
movl %ebx, 0xa0(%rsp)
movl %edi, 0xa4(%rsp)
movl %r12d, 0xbc(%rsp)
movl %r12d, 0xb8(%rsp)
leaq 0x90(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq (%rsp), %rcx
movq 0x40(%rsp), %r8
leaq 0x80(%rsp), %r9
pushq $0x1
leaq 0x70(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
callq 0x1cad4e
addq $0x20, %rsp
movq 0x80(%rsp), %rsi
movq 0x1a8(%rsp), %rbp
addq %rsi, (%rbp)
movq 0x78(%rsp), %rdx
movq 0x1b0(%rsp), %r12
addq %rdx, (%r12)
movq 0x70(%rsp), %rcx
xorq %rcx, %rsi
movq %rcx, %rdi
xorq %rdx, %rdi
orq %rsi, %rdi
movq 0x1b8(%rsp), %rsi
jne 0x1cb901
movq (%rsi), %rcx
addq %rdx, %rcx
movq 0x30(%rsp), %rdx
addq 0x68(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rsi)
testq %rax, %rax
movq 0x10(%rsp), %r8
jne 0x1cb950
jmp 0x1cb97e
subq %rsi, %rdx
movq 0x1a8(%rsp), %rbp
addq %rdx, (%rbp)
subq %rax, %rcx
movq 0x1b0(%rsp), %r12
addq %rcx, (%r12)
movq 0x1b8(%rsp), %rdi
addq (%rdi), %rdx
movq 0x10(%rsp), %r8
movq %rdx, (%rdi)
leaq -0x1(%r8), %r14
testq %r8, %r8
jg 0x1cb6ce
jmp 0x1cb97e
xorl %r10d, %r10d
jmp 0x1cb997
xorl %r10d, %r10d
movq 0x8(%rsp), %r8
jmp 0x1cb997
movq 0x1b0(%rsp), %r12
movq 0x1a8(%rsp), %rbp
movq 0x18(%rsp), %rdi
movl 0x8(%rdi), %eax
incl %eax
movq 0x50(%rsp), %r9
movq 0x8(%rsp), %r8
movq 0x30(%rsp), %r10
movq (%r8), %rcx
subl 0x4(%rdi), %eax
cmpq %rax, %rcx
movq 0x88(%rsp), %rsi
jb 0x1cb9ba
movq (%r9), %rax
movl 0x18(%rdi), %edx
subl 0x14(%rdi), %edx
incl %edx
cmpq %rdx, %rax
jae 0x1cb9d9
addq 0x28(%rsp), %r10
subq %r10, %rsi
jle 0x1cba1d
movq %rsi, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq (%rbp), %rcx
movq 0x28(%rsp), %rcx
jne 0x1cba3c
cmpq (%r12), %rax
jne 0x1cba3c
cmpq %r10, %rcx
jne 0x1cba3c
xorl %eax, %eax
cmpq $0x0, 0x48(%rsp)
jne 0x1cb9c7
cmpq %rsi, %rcx
je 0x1cb9c7
leaq 0x76498(%rip), %rdi     # 0x241e9d
leaq 0x7424f(%rip), %rsi     # 0x23fc5b
leaq 0x763ef(%rip), %rcx     # 0x241e02
movl $0x2ee3, %edx           # imm = 0x2EE3
callq 0x2110
leaq 0x76495(%rip), %rdi     # 0x241eb9
leaq 0x74230(%rip), %rsi     # 0x23fc5b
leaq 0x763d0(%rip), %rcx     # 0x241e02
movl $0x2eee, %edx           # imm = 0x2EEE
callq 0x2110
leaq 0x76384(%rip), %rdi     # 0x241dc7
leaq 0x74211(%rip), %rsi     # 0x23fc5b
leaq 0x763b1(%rip), %rcx     # 0x241e02
movl $0x2ee2, %edx           # imm = 0x2EE2
callq 0x2110