// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Process_Read.cpp
// Function: debug_retrieve_rc_sub(ug_opt_t const*, all_ul_t*, All_reads const*, ul_idx_t*, unsigned int)
void debug_retrieve_rc_sub(const ug_opt_t *uopt, all_ul_t *ref, const All_reads *R_INF, ul_idx_t *ul, uint32_t n_step)
{
	uint64_t i, step, s, e, occ, qc, rc;
	UC_Read f, r; 
	init_UC_Read(&f); init_UC_Read(&r);
	kvec_t(char) ss; kv_init(ss);
	if(ref) {
		for (i = 0, occ = 0; i < ref->n; i++) {
			retrieve_ul_t(&f, NULL, ref, i, 0, 0, -1);
			retrieve_ul_t(&r, NULL, ref, i, 1, 0, -1);

			kv_resize(char, ss, ref->a[i].rlen); 
			ss.n = ref->a[i].rlen;
			memcpy(ss.a, r.seq, ss.n); 
			reverse_complement(ss.a, ss.n);
			if(memcmp(ss.a, f.seq, ss.n)) {
				fprintf(stderr, "1-Wrong whole reverse-read, id: %lu\n", i);
				// for (s = 0; s < ss.n; s++) {
				// 	if(ss.a[s] != f.seq[s]) {
				// 		fprintf(stderr,"s:%lu, ss.a[s]:%c, f.seq[s]:%c, r.seq[rs]:%c\n", s, ss.a[s], f.seq[s], r.seq[ref->a[i].rlen - s - 1]);
				// 	}
				// }
			}

			step = ss.n/n_step;
			if(step <= 0) step = 1;

			for (s = 0; s < ss.n; s += step) {
				e = MIN(s+step, ss.n);
				retrieve_ul_t(NULL, ss.a, ref, i, 0, s, e-s);
				if(memcmp(ss.a, f.seq + s, e - s)) {
					fprintf(stderr, "1-Wrong sub forward-read, id: %lu, [%lu, %lu)\n", i, s, e);
				}

				retrieve_ul_t(NULL, ss.a, ref, i, 1, s, e-s);
				if(memcmp(ss.a, r.seq + s, e - s)) {
					fprintf(stderr, "1-Wrong sub reverse-read, id: %lu, [%lu, %lu)\n", i, s, e);
					// uint64_t dk; char *tf = ss.a; char *rf = r.seq + s;
					// for (dk = 0; dk < e - s; dk++) {
					// 	if(tf[dk] != rf[dk]) {
					// 		fprintf(stderr,"dk:%lu, tf[dk]:%c, rf[dk]:%c\n", 
					// 					dk, tf[dk], rf[dk]);
					// 	}
					// }
				}
				occ++;
			}
		}
		fprintf(stderr, "[M::%s::# checking: %lu] ==> all_ul_t\n", __func__, occ);
	}


	if(R_INF) {
		for (i = 0, occ = 0; i < R_INF->total_reads; i++) {
			recover_UC_Read(&f, R_INF, i);
			recover_UC_Read_RC(&r, (All_reads*)R_INF, i);
			kv_resize(char, ss, Get_READ_LENGTH((*R_INF), i)); 
			ss.n = Get_READ_LENGTH((*R_INF), i);
			memcpy(ss.a, r.seq, ss.n); 
			reverse_complement(ss.a, ss.n);
			if(memcmp(ss.a, f.seq, ss.n)) fprintf(stderr, "2-Wrong whole reverse-read, id: %lu\n", i);

			step = ss.n/n_step;
			if(step <= 0) step = 1;
			for (s = 0; s < ss.n; s += step) {
				e = MIN(s+step, ss.n);
				recover_UC_Read_sub_region(ss.a, s, e-s, 0, (All_reads*)R_INF, i);
				if(memcmp(ss.a, f.seq + s, e - s)) fprintf(stderr, "2-Wrong sub forward-read, id: %lu, [%lu, %lu)\n", i, s, e);

				recover_UC_Read_sub_region(ss.a, s, e-s, 1, (All_reads*)R_INF, i);
				if(memcmp(ss.a, r.seq + s, e - s)) fprintf(stderr, "2-Wrong sub reverse-read, id: %lu, [%lu, %lu)\n", i, s, e);
				occ++;
			}
		}
		fprintf(stderr, "[M::%s::# checking: %lu] ==> All_reads\n", __func__, occ);
	}

	if(ul) {

		uint8_t *sset = NULL; CALLOC(sset, R_INF->total_reads);
		for (i = 0; i < ul->ug->u.n; i++) {
			for (s = 0; s < ul->ug->u.a[i].n; s++){
				sset[ul->ug->u.a[i].a[s]>>33] = 1;
			}
		}

		kvec_t_u64_warp buf; memset(&buf, 0, sizeof(buf)); int64_t pi = 0;
		// produce_u_cov(ul, 0, (uint8_t)-1, (uint64_t)-1, &buf);
		// produce_u_cov(ul, 0, 0, ul->ug->u.a[0].len>>1, &buf);

		for (i = 0, occ = 0; i < ul->ug->u.n; i++) {
			kv_resize(char, ss, ul->ug->u.a[i].len); ss.n = ul->ug->u.a[i].len;
			retrieve_u_seq(&f, NULL, &(ul->ug->u.a[i]), 0, 0, -1, NULL);
			produce_u_seq(ss.a, &(ul->ug->u.a[i]), &r);
			if(memcmp(ss.a, f.seq, ss.n)) fprintf(stderr, "4-Wrong whole reverse-read, id: %lu\n", i);
			retrieve_u_seq(&r, NULL, &(ul->ug->u.a[i]), 1, 0, -1, NULL);
			
			memcpy(ss.a, r.seq, ss.n); 
			reverse_complement(ss.a, ss.n);
			if(memcmp(ss.a, f.seq, ss.n)) fprintf(stderr, "3-Wrong whole reverse-read, id: %lu\n", i);

			produce_u_cov(ul, i, (uint8_t)-1, (uint64_t)-1, uopt->sources, uopt->min_ovlp, uopt->max_hang, uopt->gap_fuzz, sset, &buf);
			step = ss.n/n_step;
    		if(step <= 0) step = 1;

			for (s = 0; s < ss.n; s += step) {
				e = MIN(s+step, ss.n);
				retrieve_u_seq(NULL, ss.a, &(ul->ug->u.a[i]), 0, s, e-s, NULL);
				if(memcmp(ss.a, f.seq + s, e - s)) fprintf(stderr, "3-Wrong sub forward-read, id: %lu, [%lu, %lu)\n", i, s, e);

				retrieve_u_seq(NULL, ss.a, &(ul->ug->u.a[i]), 1, s, e-s, NULL);
				if(memcmp(ss.a, r.seq + s, e - s)) fprintf(stderr, "3-Wrong sub reverse-read, id: %lu, [%lu, %lu)\n", i, s, e);
				
				/**if(ul->ug->u.a[i].n > 1)**/ {
					rc = produce_u_cov(ul, i, 0, s, uopt->sources, uopt->min_ovlp, uopt->max_hang, uopt->gap_fuzz, sset, &buf);

					qc = retrieve_u_cov(ul, i, 0, s, 0, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);
					pi++;
					qc = retrieve_u_cov(ul, i, 0, s, 0, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);
					pi--;
					qc = retrieve_u_cov(ul, i, 0, s, 0, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);
					pi++;
					qc = retrieve_u_cov(ul, i, 0, s, 1, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);
					pi--;
					qc = retrieve_u_cov(ul, i, 0, s, 1, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);




					rc = produce_u_cov(ul, i, 1, s, uopt->sources, uopt->min_ovlp, uopt->max_hang, uopt->gap_fuzz, sset, &buf);
					qc = retrieve_u_cov(ul, i, 1, s, 0, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);
					pi++;
					qc = retrieve_u_cov(ul, i, 1, s, 0, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);
					pi--;
					qc = retrieve_u_cov(ul, i, 1, s, 0, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);
					pi++;
					qc = retrieve_u_cov(ul, i, 1, s, 1, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);
					pi--;
					qc = retrieve_u_cov(ul, i, 1, s, 1, &pi);
					if(rc != qc) fprintf(stderr, "4-Wrong coverage, id: %lu, rc:%lu, qc:%lu, pos:%lu\n", i, rc, qc, s);
				}
				occ++;
			}
		}
	
		kv_destroy(buf.a); free(sset);
		fprintf(stderr, "[M::%s::# checking: %lu] ==> ma_utg_v\n", __func__, occ);
	}

	destory_UC_Read(&f); destory_UC_Read(&r);
	kv_destroy(ss);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %r8d, 0x5c(%rsp)
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x6bd1
leaq 0xb0(%rsp), %rdi
callq 0x6bd1
xorl %r14d, %r14d
pushq $0x1
popq %r15
movl $0x0, %eax
movq %rax, 0x48(%rsp)
testq %r12, %r12
movq %rbx, 0x30(%rsp)
movq %r13, 0x40(%rsp)
jne 0xaab1
testq %r13, %r13
jne 0xad40
testq %rbx, %rbx
jne 0xaf9c
movq 0x90(%rsp), %rdi
callq 0x2220
movq 0xb0(%rsp), %rdi
callq 0x2220
movq %r14, %rdi
callq 0x2220
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
movq $0x0, 0x60(%rsp)
xorl %r14d, %r14d
movq $0x0, 0x48(%rsp)
movq %r12, 0x80(%rsp)
cmpq 0x50(%r12), %rcx
jae 0xaff7
orq $-0x1, (%rsp)
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
movq %r12, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
movq %rcx, %rbx
callq 0x9a1b
orq $-0x1, (%rsp)
leaq 0xb0(%rsp), %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rbx, %rcx
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0x9a1b
movq 0x48(%r12), %rax
movq %rbx, 0x38(%rsp)
imulq $0x58, %rbx, %rbx
movl 0x18(%rax,%rbx), %edx
cmpq %rdx, 0x48(%rsp)
jae 0xab85
leaq -0x1(%rdx), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %r14, %rdi
movq %rsi, 0x48(%rsp)
callq 0x2370
movq %rax, %r14
movq 0x48(%r12), %rax
movl 0x18(%rax,%rbx), %edx
movq 0xb0(%rsp), %rsi
movq %r14, %rdi
movq %rdx, %rbx
callq 0x2160
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7964
movq 0x90(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x21a0
testl %eax, %eax
jne 0xad1e
movl %ebx, %eax
xorl %edx, %edx
movl 0x5c(%rsp), %ecx
divl %ecx
cmpl %ecx, %ebx
cmovbl %r15d, %eax
xorl %esi, %esi
movq %rax, %rdi
xorl %r13d, %r13d
movq %rbx, %rdx
movq %rbx, 0x28(%rsp)
movq %rax, 0x50(%rsp)
cmpq %rdi, %rdx
movq %rdi, %rbx
cmovbq %rdx, %rbx
cmpq %rdx, %r13
movq 0x38(%rsp), %rcx
jae 0xad0c
movq %rdi, 0x70(%rsp)
movq %rsi, 0x78(%rsp)
addq %rsi, %rbx
leaq (%rax,%r13), %rbp
cmpq %rdx, %rbp
cmovbq %rbp, %rdx
movq %rdx, 0x68(%rsp)
movq %rbx, (%rsp)
xorl %edi, %edi
movq %r14, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
movq %r13, %r9
movq %rcx, %r15
callq 0x9a1b
movq 0x90(%rsp), %rsi
addq %r13, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x21a0
testl %eax, %eax
jne 0xacba
movq %rbx, (%rsp)
xorl %edi, %edi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
pushq $0x1
popq %r8
movq %r13, %r9
callq 0x9a1b
movq 0xb0(%rsp), %rsi
addq %r13, %rsi
movq %r14, %r12
movq %r14, %rdi
movq %rbx, %rdx
callq 0x21a0
testl %eax, %eax
jne 0xace2
incq 0x60(%rsp)
movq 0x50(%rsp), %rax
movq 0x70(%rsp), %rdi
addq %rax, %rdi
movq 0x78(%rsp), %rsi
subq %rax, %rsi
movq %rbp, %r13
movq %r12, %r14
pushq $0x1
popq %r15
movq 0x80(%rsp), %r12
movq 0x28(%rsp), %rdx
jmp 0xabe3
movq 0x24831f(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7c15(%rip), %rsi    # 0x1e28e0
movq %r15, %rdx
movq %r13, %rcx
movq 0x68(%rsp), %r8
xorl %eax, %eax
callq 0x22b0
jmp 0xac4c
movq 0x2482f7(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7c1c(%rip), %rsi    # 0x1e290f
movq 0x38(%rsp), %rdx
movq %r13, %rcx
movq 0x68(%rsp), %r8
xorl %eax, %eax
callq 0x22b0
jmp 0xac84
incq %rcx
movq 0x30(%rsp), %rbx
movq 0x40(%rsp), %r13
jmp 0xaad0
movq 0x2482bb(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7b8c(%rip), %rsi    # 0x1e28bb
movq 0x38(%rsp), %rdx
xorl %eax, %eax
callq 0x22b0
jmp 0xabbe
movl 0x5c(%rsp), %eax
movq %rax, 0x60(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x50(%rsp)
cmpq 0x50(%r13), %r12
jae 0xb020
leaq 0x90(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x715e
leaq 0xb0(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x7215
movq 0x18(%r13), %rax
movq (%rax,%r12,8), %rbp
cmpq %rbp, 0x48(%rsp)
jae 0xade3
decq %rbp
movq %rbp, %rax
shrq %rax
orq %rbp, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %r14, %rdi
movq %rsi, 0x48(%rsp)
callq 0x2370
movq %rax, %r14
movq 0x18(%r13), %rax
movq (%rax,%r12,8), %rbp
movq 0xb0(%rsp), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x2160
movq %r14, %rdi
movq %rbp, %rsi
callq 0x7964
movq 0x90(%rsp), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x21a0
testl %eax, %eax
jne 0xaf7c
movq %r12, 0x38(%rsp)
movq %rbp, %rax
xorl %edx, %edx
movq 0x60(%rsp), %rcx
divq %rcx
movq %rax, %rdx
cmpq %rcx, %rbp
pushq $0x1
popq %rax
cmovbq %rax, %rdx
xorl %ecx, %ecx
movq %rdx, %rsi
xorl %r12d, %r12d
movq %rbp, %rax
movq %rbp, 0x68(%rsp)
movq %rdx, 0x28(%rsp)
cmpq %rsi, %rax
movq %rsi, %rbp
cmovbq %rax, %rbp
cmpq %rax, %r12
jae 0xaf6f
movq %rsi, 0x70(%rsp)
movq %rcx, 0x78(%rsp)
addq %rcx, %rbp
leaq (%r12,%rdx), %r15
cmpq %rax, %r15
movq %rax, %rbx
cmovbq %r15, %rbx
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
movq %r13, %r8
movq 0x38(%rsp), %r13
movq %r13, %r9
callq 0x6c9e
movq 0x90(%rsp), %rsi
addq %r12, %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x21a0
testl %eax, %eax
jne 0xaf21
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
pushq $0x1
popq %rcx
movq 0x40(%rsp), %r8
movq %r13, %r9
callq 0x6c9e
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %r14, %r13
movq %r14, %rdi
movq %rbp, %rdx
callq 0x21a0
testl %eax, %eax
jne 0xaf47
incq 0x50(%rsp)
movq 0x28(%rsp), %rdx
movq 0x70(%rsp), %rsi
addq %rdx, %rsi
movq 0x78(%rsp), %rcx
subq %rdx, %rcx
movq %r15, %r12
movq %r13, %r14
movq 0x30(%rsp), %rbx
pushq $0x1
popq %r15
movq 0x40(%rsp), %r13
movq 0x68(%rsp), %rax
jmp 0xae50
movq 0x2480b8(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7a6e(%rip), %rsi    # 0x1e29a0
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x22b0
jmp 0xaeb3
movq 0x248092(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7a77(%rip), %rsi    # 0x1e29cf
movq 0x38(%rsp), %rdx
movq %r12, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x22b0
jmp 0xaee9
movq 0x38(%rsp), %r12
incq %r12
jmp 0xad55
movq 0x24805d(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d79ee(%rip), %rsi    # 0x1e297b
movq %r12, %rdx
xorl %eax, %eax
callq 0x22b0
jmp 0xae1c
movq 0x50(%r13), %rdi
pushq $0x1
popq %rsi
callq 0x2120
movq %rax, 0x40(%rsp)
movq (%rbx), %rax
movq (%rax), %rcx
xorl %edx, %edx
movq 0x40(%rsp), %r10
cmpq %rcx, %rdx
je 0xb049
movq 0x10(%rax), %rdi
imulq $0x28, %rdx, %r8
leaq (%rdi,%r8), %rsi
movl 0x10(%rdi,%r8), %edi
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0xaff2
movq 0x18(%rsi), %r9
movq (%r9,%r8,8), %r9
shrq $0x21, %r9
movb $0x1, (%r10,%r9)
incq %r8
jmp 0xafd7
incq %rdx
jmp 0xafba
movq 0x247fe2(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7936(%rip), %rsi    # 0x1e293e
leaq 0x1d7956(%rip), %rdx    # 0x1e2965
movq 0x60(%rsp), %rcx
xorl %eax, %eax
callq 0x22b0
jmp 0xaa6b
movq 0x247fb9(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d79cd(%rip), %rsi    # 0x1e29fe
leaq 0x1d792d(%rip), %rdx    # 0x1e2965
movq 0x50(%rsp), %rcx
xorl %eax, %eax
callq 0x22b0
jmp 0xaa74
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rcx
movaps %xmm0, 0x10(%rcx)
leaq 0x20(%rsp), %rdx
andq $0x0, (%rdx)
movaps %xmm0, (%rcx)
pushq $-0x1
popq %r12
xorl %ecx, %ecx
xorl %r13d, %r13d
cmpq (%rax), %rcx
jae 0xb782
movq 0x10(%rax), %rdx
movq %rcx, 0x30(%rsp)
imulq $0x28, %rcx, %rbp
movl (%rdx,%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, 0x48(%rsp)
jae 0xb0f0
decq %rcx
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %r14, %rdi
movq %rsi, 0x48(%rsp)
callq 0x2370
movq %rax, %r14
movq (%rbx), %rax
movq 0x10(%rax), %rdx
movl (%rdx,%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x28(%rsp)
jmp 0xb0f5
movq %rcx, 0x28(%rsp)
addq %rbp, %rdx
andq $0x0, (%rsp)
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x9f29
movq (%rbx), %rax
movq 0x10(%rax), %rsi
addq %rbp, %rsi
movq %r14, %rdi
movq %rbp, %r12
leaq 0xb0(%rsp), %rbp
movq %rbp, %rdx
callq 0xa8d8
movq 0x90(%rsp), %rsi
movq %r14, %rdi
movq 0x28(%rsp), %rdx
callq 0x21a0
testl %eax, %eax
jne 0xb73e
movq (%rbx), %rax
movq 0x10(%rax), %rdx
movq %r12, 0x50(%rsp)
addq %r12, %rdx
andq $0x0, (%rsp)
movq %rbp, %rdi
xorl %esi, %esi
movl %r15d, %ecx
xorl %r8d, %r8d
pushq $-0x1
popq %r12
movq %r12, %r9
callq 0x9f29
movq 0xb0(%rsp), %rsi
movq %r14, %rdi
movq 0x28(%rsp), %rbp
movq %rbp, %rdx
callq 0x2160
movq %r14, %rdi
movq %rbp, %rsi
callq 0x7964
movq 0x90(%rsp), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x21a0
testl %eax, %eax
jne 0xb760
movq 0x88(%rsp), %rax
movq 0x8(%rax), %r8
movslq 0x44(%rax), %r9
movslq 0x40(%rax), %rax
leaq 0xd0(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq %rax, (%rsp)
movq %rbx, %rdi
movq 0x30(%rsp), %rsi
movl $0xff, %edx
movq %r12, %rcx
callq 0xa504
movl %ebp, %eax
xorl %edx, %edx
movl 0x5c(%rsp), %ecx
divl %ecx
cmpl %ecx, %ebp
cmovbl %r15d, %eax
xorl %edx, %edx
movq %rax, %rsi
xorl %r12d, %r12d
movq %rbp, %rcx
movq 0x50(%rsp), %rbp
movq %r14, 0x60(%rsp)
movq %rcx, 0x28(%rsp)
movq %rax, 0x80(%rsp)
cmpq %rsi, %rcx
movq %rsi, %r15
cmovbq %rcx, %r15
cmpq %rcx, %r12
jae 0xb726
movq %rsi, 0x38(%rsp)
movq %r13, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
addq %rdx, %r15
addq %r12, %rax
cmpq %rcx, %rax
movq %rcx, %r13
movq %rax, 0x68(%rsp)
cmovbq %rax, %r13
movq (%rbx), %rax
movq 0x10(%rax), %rdx
addq %rbp, %rdx
andq $0x0, (%rsp)
xorl %edi, %edi
movq %r14, %rsi
xorl %ecx, %ecx
movq %r12, %r8
movq %r15, %r9
callq 0x9f29
movq 0x90(%rsp), %rsi
addq %r12, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x21a0
testl %eax, %eax
jne 0xb538
movq (%rbx), %rax
movq 0x10(%rax), %rdx
addq %rbp, %rdx
andq $0x0, (%rsp)
xorl %edi, %edi
movq %r14, %rsi
pushq $0x1
popq %rcx
movq %r12, %r8
movq %r15, %r9
callq 0x9f29
movq 0xb0(%rsp), %rsi
addq %r12, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x21a0
testl %eax, %eax
movq 0x30(%rsp), %r14
jne 0xb560
movq 0x88(%rsp), %rax
movq 0x8(%rax), %r8
movslq 0x44(%rax), %r9
movslq 0x40(%rax), %rax
leaq 0xd0(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0xa504
movq %rbx, %r15
movl %eax, %ebx
movl %eax, %r13d
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
xorl %r8d, %r8d
leaq 0x20(%rsp), %rbp
movq %rbp, %r9
callq 0xa105
cmpl %eax, %ebx
jne 0xb586
incq 0x20(%rsp)
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rbp, %r9
callq 0xa105
cmpl %eax, %r13d
movq %r15, %rbx
jne 0xb5af
decq 0x20(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rbp, %r9
callq 0xa105
cmpl %eax, %r13d
movq %rbp, %r9
movq %r14, %rbp
pushq $0x1
popq %r15
jne 0xb5d8
incq 0x20(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
xorl %edx, %edx
movq %r12, %rcx
movl %r15d, %r8d
movq %r9, %r14
callq 0xa105
cmpl %eax, %r13d
jne 0xb607
decq 0x20(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
xorl %edx, %edx
movq %r12, %rcx
movl %r15d, %r8d
movq %r14, %r9
callq 0xa105
cmpl %eax, %r13d
jne 0xb630
movq 0x88(%rsp), %rax
movq 0x8(%rax), %r8
movslq 0x44(%rax), %r9
movslq 0x40(%rax), %rax
leaq 0xd0(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq %rax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movl %r15d, %edx
movq %r12, %rcx
callq 0xa504
movl %r15d, %r14d
movq %rbx, %r15
movl %eax, %ebx
movl %eax, %r13d
movq %r15, %rdi
movq %rbp, %rsi
movl %r14d, %edx
movq %r12, %rcx
xorl %r8d, %r8d
leaq 0x20(%rsp), %r9
callq 0xa105
cmpl %eax, %ebx
jne 0xb659
incq 0x20(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movl %r14d, %edx
movq %r12, %rcx
xorl %r8d, %r8d
leaq 0x20(%rsp), %r9
callq 0xa105
cmpl %eax, %r13d
movq %r15, %rbx
movq %rbp, %r15
jne 0xb682
decq 0x20(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movq %r12, %rcx
xorl %r8d, %r8d
leaq 0x20(%rsp), %rbp
movq %rbp, %r9
callq 0xa105
cmpl %eax, %r13d
jne 0xb6ab
incq 0x20(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movq %r12, %rcx
movl %r14d, %r8d
movq %rbp, %r9
callq 0xa105
cmpl %eax, %r13d
jne 0xb6d4
decq 0x20(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movq %r12, %rcx
movl %r14d, %r8d
movq %rbp, %r9
callq 0xa105
cmpl %eax, %r13d
jne 0xb6fd
movq 0x78(%rsp), %r13
incq %r13
movq 0x80(%rsp), %rax
movq 0x38(%rsp), %rsi
addq %rax, %rsi
movq 0x70(%rsp), %rdx
subq %rax, %rdx
movq 0x68(%rsp), %r12
movq 0x60(%rsp), %r14
movq 0x50(%rsp), %rbp
movq 0x28(%rsp), %rcx
jmp 0xb230
movq 0x247aa1(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7527(%rip), %rsi    # 0x1e2a70
movq 0x30(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x22b0
jmp 0xb2a6
movq 0x247a79(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d752e(%rip), %rsi    # 0x1e2a9f
movq %r14, %rdx
movq %r12, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x22b0
jmp 0xb2eb
movl %eax, %r8d
movq 0x247a50(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7534(%rip), %rsi    # 0x1e2ace
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
jmp 0xb355
movl %eax, %r8d
movq 0x247a27(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d750b(%rip), %rsi    # 0x1e2ace
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
jmp 0xb37c
movl %eax, %r8d
movq 0x2479fe(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d74e2(%rip), %rsi    # 0x1e2ace
movq %rbp, %rdx
movq %r13, %rcx
movq %r9, %r14
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
movq %r14, %r9
jmp 0xb3aa
movl %eax, %r8d
movq 0x2479cf(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d74b3(%rip), %rsi    # 0x1e2ace
movq %rbp, %rdx
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
jmp 0xb3ce
movl %eax, %r8d
movq 0x2479a6(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d748a(%rip), %rsi    # 0x1e2ace
movq %rbp, %rdx
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
jmp 0xb3f2
movl %eax, %r8d
movq 0x24797d(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7461(%rip), %rsi    # 0x1e2ace
movq %rbp, %rdx
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
jmp 0xb45e
movl %eax, %r8d
movq 0x247954(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7438(%rip), %rsi    # 0x1e2ace
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
jmp 0xb48b
movl %eax, %r8d
movq 0x24792b(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d740f(%rip), %rsi    # 0x1e2ace
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
jmp 0xb4b5
movl %eax, %r8d
movq 0x247902(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d73e6(%rip), %rsi    # 0x1e2ace
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
jmp 0xb4da
movl %eax, %r8d
movq 0x2478d9(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d73bd(%rip), %rsi    # 0x1e2ace
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r9
xorl %eax, %eax
callq 0x22b0
jmp 0xb4ff
movq 0x30(%rsp), %rcx
incq %rcx
movq (%rbx), %rax
pushq $0x1
popq %r15
pushq $-0x1
popq %r12
jmp 0xb06d
movq 0x24789b(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d72d7(%rip), %rsi    # 0x1e2a26
movq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x22b0
jmp 0xb151
movq 0x247879(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d72da(%rip), %rsi    # 0x1e2a4b
movq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x22b0
jmp 0xb1ba
movq 0xe0(%rsp), %rdi
callq 0x2220
movq 0x40(%rsp), %rdi
callq 0x2220
movq 0x247840(%rip), %rax    # 0x252fe0
movq (%rax), %rdi
leaq 0x1d7358(%rip), %rsi    # 0x1e2b02
leaq 0x1d71b4(%rip), %rdx    # 0x1e2965
movq %r13, %rcx
xorl %eax, %eax
callq 0x22b0
jmp 0xaa7d