// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_correct1_aux
static correct1_stat_t fmc_correct1_aux(const fmc_opt_t *opt, fmc_hash_t **h, fmc_aux_t *a)
{
	echeap1_t z;
	int l, path_end[FMC_MAX_PATHS], n_paths = 0, max_i = 0, n_failures = 0;
	correct1_stat_t s;

	assert(a->ori.n < 0x10000);
	a->heap.n = a->stack.n = 0;
	s.penalty = s.n_paths = s.n_failures = 0;
	// find the first k-mer
	memset(&z, 0, sizeof(echeap1_t));
	for (z.i = 0, l = 0; z.i < a->seq.n;) {
		if (a->seq.a[z.i].b > 3) l = 0, z.kmer[0] = z.kmer[1] = 0;
		else ++l, append_to_kmer(opt->c.k, z.kmer, a->seq.a[z.i].b);
		if (++z.i == a->seq.n) break;
		if (l >= opt->c.k && kmer_lookup(opt->c.k, opt->c.suf_len, z.kmer, h, a->cache) >= 0) break;
	}
	if (z.i == a->seq.n) return s;
	z.last_solid = 0; z.ec_pos4 = 0; z.k = -1; // the first k-mer is not on the stack
	kv_push(echeap1_t, a->heap, z);
	// search for the best path
	while (a->heap.n) {
		ecbase_t *c;
		int val, is_excessive;
		z = a->heap.a[0];
		a->heap.a[0] = kv_pop(a->heap);
		ks_heapdown_ec(0, a->heap.n, a->heap.a);
		if (n_paths && z.penalty > a->stack.a[path_end[0]].penalty + opt->max_penalty_diff) break;
		if (z.i == a->seq.n) { // end of sequence
			if (fmc_verbose >= 6) fprintf(stderr, "** penalty=%d\n", z.penalty);
			path_end[n_paths++] = z.k;
			if (n_paths == FMC_MAX_PATHS) break;
			continue;
		}
		if (fmc_verbose >= 6) {
			int i;
			fprintf(stderr, "<- [%d] (%d,%c%d), size=%ld, penalty=%d, state=%d, ec_pos4=[", z.k, z.i, "ACGTN"[a->seq.a[z.i].b], a->seq.a[z.i].q,
					a->heap.n, z.penalty, z.k>=0? a->stack.a[z.k].state : -1);
			for (i = 3; i >= 0; --i)
				if (z.ec_pos4>>(i*16)&0xffff) {
					fprintf(stderr, "%d", (int)(z.ec_pos4>>(i*16)&0xffff) - 1);
					if (i) fputc(',', stderr);
				}
			fprintf(stderr, "]\n");
		}
		c = &a->seq.a[z.i];
		max_i = max_i > z.i? max_i : z.i;
		is_excessive = (a->heap.n >= max_i * 3);
		val = kmer_lookup(opt->c.k, opt->c.suf_len, z.kmer, h, a->cache);
		if (val >= 0 && fmc_cell_has_b1(val)) { // present in the hash table
			int b1 = fmc_cell_get_b1(val);
			int b2 = fmc_cell_has_b2(val)? fmc_cell_get_b2(val) : 4;
			int q1 = fmc_cell_get_q1(val);
			int q2 = fmc_cell_get_q2(val);
			int is_solid = (opt->ecQ > 0 && c->q >= opt->ecQ);
			if (b1 == c->b) { // read base matching the consensus
				update_aux(opt->c.k, a, &z, c->b, STATE_M, 0, 0, is_solid);
				if (b2 != 4 && q1 < 20 && !is_solid && !is_excessive) update_aux(opt->c.k, a, &z, b2, STATE_M, q1 > c->oq? q1 : c->oq, 1, 0);
			} else if (c->b > 3) { // read base is "N"
				update_aux(opt->c.k, a, &z, b1, STATE_M, 3, 0, 0); // "N" is not counted as a diff
				if (b2 < 4 && !is_excessive) update_aux(opt->c.k, a, &z, b2, STATE_M, q1, 0, 0);
			} else if (is_solid && (z.i < z.last_solid + opt->c.k || q1>>1 < FMC_Q_1)) { // base is solid and the evidence is weak; reject
				update_aux(opt->c.k, a, &z, c->b, STATE_N, q1, 0, q1 >= opt->ecQ? 1 : 0); // TODO: should we set is_solid???
			} else if (z.ec_pos4>>48 && z.i < (z.ec_pos4>>48) + opt->max_dist4) {
				update_aux(opt->c.k, a, &z, c->b, STATE_N, q1, 0, q1 >= opt->ecQ? 1 : 0); // TODO: should we set is_solid???
			} else if (b2 >= 4 || b2 == c->b) { // no second base or the second base is the read base; two branches
				if (!is_excessive || q1 <= c->q)
					update_aux(opt->c.k, a, &z, c->b, STATE_M, q1,   0, 0);
				if (!is_excessive || q1 >= c->q)
					update_aux(opt->c.k, a, &z, b1,   STATE_M, c->q, 1, is_solid);
			} else { // we are looking at three different bases
				if (!is_excessive || q1 + q2 <= c->q)
					update_aux(opt->c.k, a, &z, c->b, STATE_M, q1 + q2, 0, 0);
				if (!is_excessive || q1 + q2 >= c->q)
					update_aux(opt->c.k, a, &z, b1,   STATE_M, c->q,    1, is_solid);
				if (!is_excessive)
					update_aux(opt->c.k, a, &z, b2,   STATE_M, c->q > q1? c->q : q1, 1, is_solid);
			}
		} else {
			update_aux(opt->c.k, a, &z, c->b < 4? c->b : lrand48()&4, STATE_N, FMC_NOHIT_PEN, 0, 0); // not present in the hash table
			if (n_paths == 0) ++s.n_failures;
			if (++n_failures > a->seq.n && a->heap.n > 1) a->heap.n = 1, n_failures = 0;
		}
		if (fmc_verbose >= 6) fprintf(stderr, "//\n");
	}
	// backtrack
	s.n_paths = n_paths;
	if (n_paths) {
		int j;
		if (fmc_verbose >= 6) { // duplicated computation, but this is for debugging only
			for (j = 0; j < n_paths; ++j) {
				int i;
				fprintf(stderr, "%.2d ", j);
				path_backtrack(&a->stack, path_end[j], &a->seq, &a->tmp[0]);
				for (i = 0; i < a->tmp[0].n; ++i) {
					int s = a->tmp[0].a[i].state;
					fputc(s == STATE_D? '-' : s == STATE_I? "acgtn"[a->tmp[0].a[i].b] : "ACGTN"[a->tmp[0].a[i].b], stderr);
				}
				fprintf(stderr, "\t%d\n", a->stack.a[path_end[j]].penalty - a->stack.a[path_end[0]].penalty);
			}
			fprintf(stderr, "//\n");
		}
		s.penalty = a->stack.a[path_end[0]].penalty;
		path_backtrack(&a->stack, path_end[0], &a->seq, &a->tmp[0]);
		for (j = 1; j < n_paths; ++j) {
			path_backtrack(&a->stack, path_end[j], &a->seq, &a->tmp[1]);
			path_adjustq(a->stack.a[path_end[j]].penalty - a->stack.a[path_end[0]].penalty, &a->tmp[0], &a->tmp[1]);
		}
		fmc_seq_cpy_no_del(&a->seq, &a->tmp[0]);
	}
	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, 0x78(%rsp)
movq %rdi, 0x8(%rsp)
cmpq $0x10000, (%rdx)        # imm = 0x10000
jae 0x8948
movq %rdx, %rbx
andq $0x0, 0x90(%rdx)
andq $0x0, 0x78(%rdx)
leaq 0x90(%rdx), %rax
movq %rax, 0x88(%rsp)
leaq 0x48(%rdx), %rax
movq %rax, 0x40(%rsp)
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %r14
andq $0x0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
xorl %r15d, %r15d
xorl %ebp, %ebp
movslq %r15d, %r12
movq 0x40(%rsp), %rax
movq (%rax), %r13
cmpq %r12, %r13
jbe 0x7ee5
movq 0x58(%rbx), %rax
imulq $0xc, %r12, %rcx
movzwl (%rax,%rcx), %edx
andl $0xf, %edx
cmpw $0x4, %dx
jb 0x7e88
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
xorl %ebp, %ebp
jmp 0x7e9f
incl %ebp
movq 0x8(%rsp), %rax
movswl (%rax), %edi
movq %r14, %rsi
callq 0x9591
movl 0x68(%rsp), %r15d
incl %r15d
movl %r15d, 0x68(%rsp)
movslq %r15d, %r12
cmpq %r12, %r13
je 0x7ee5
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movswl %si, %edi
cmpl %edi, %ebp
jl 0x7e57
sarl $0x10, %esi
movq 0xa8(%rbx), %r8
movq %r14, %rdx
movq 0x78(%rsp), %rcx
callq 0x95ce
testl %eax, %eax
js 0x7e57
movq 0x40(%rsp), %rax
movq (%rax), %r13
cmpq %r12, %r13
jne 0x7ef3
xorl %edx, %edx
xorl %eax, %eax
jmp 0x87f3
andl $0x7, 0x6c(%rsp)
andq $0x0, 0x70(%rsp)
orl $-0x1, 0x64(%rsp)
movq 0x78(%rbx), %rcx
cmpq 0x80(%rbx), %rcx
jne 0x7f42
pushq $0x2
popq %rax
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
cmoveq %rax, %rdx
movq %rdx, 0x80(%rbx)
movq 0x88(%rbx), %rdi
imulq $0x28, %rdx, %rsi
callq 0x2260
movq %rax, 0x88(%rbx)
movq 0x78(%rbx), %rcx
jmp 0x7f49
movq 0x88(%rbx), %rax
movq 0x8(%rsp), %r12
leaq 0x1(%rcx), %rdx
movq %rdx, 0x78(%rbx)
imulq $0x28, %rcx, %rcx
leaq 0x50(%rsp), %rsi
movq 0x20(%rsi), %rdx
movq %rdx, 0x20(%rax,%rcx)
movaps (%rsi), %xmm0
movaps 0x10(%rsi), %xmm1
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movq 0x1a079(%rip), %rbp     # 0x21ff8
movl $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
xorl %r13d, %r13d
movq $0x0, 0x80(%rsp)
movslq %r13d, %rax
leaq (%rsp,%rax,4), %r14
addq $0xa0, %r14
movq 0x78(%rbx), %rax
testq %rax, %rax
je 0x864e
movq 0x88(%rbx), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, 0x70(%rsp)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movaps %xmm1, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
decq %rax
movq %rax, 0x78(%rbx)
imulq $0x28, %rax, %rax
movq 0x20(%rcx,%rax), %rdx
movq %rdx, 0x20(%rcx)
movups (%rcx,%rax), %xmm0
movups 0x10(%rcx,%rax), %xmm1
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
movq 0x78(%rbx), %rsi
movq 0x88(%rbx), %rdx
xorl %edi, %edi
callq 0x6c45
testl %r13d, %r13d
je 0x803f
movq 0xa0(%rbx), %rax
movslq 0xa0(%rsp), %rsi
movq %rsi, %rcx
shlq $0x4, %rcx
movl 0x40(%r12), %edx
addl 0x8(%rax,%rcx), %edx
cmpl %edx, 0x60(%rsp)
jg 0x8667
movslq 0x68(%rsp), %r15
movl 0x1a186(%rip), %eax     # 0x221d0
movq 0x40(%rsp), %rcx
cmpq %r15, (%rcx)
jne 0x808e
cmpl $0x6, %eax
jge 0x8076
movl 0x64(%rsp), %eax
incl %r13d
movl %eax, (%r14)
addq $0x4, %r14
cmpl $0x8, %r13d
jne 0x7fad
jmp 0x865a
movq (%rbp), %rdi
movl 0x60(%rsp), %edx
leaq 0x11b5d(%rip), %rsi     # 0x19be2
xorl %eax, %eax
callq 0x21c0
jmp 0x8059
cmpl $0x6, %eax
jge 0x836a
imulq $0xc, %r15, %rax
addq 0x58(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
cmpl %r15d, %eax
cmovlel %r15d, %eax
movq %rax, 0x38(%rsp)
movq 0x78(%rbx), %r14
movq 0xa8(%rbx), %r8
movl (%r12), %esi
movswl %si, %edi
sarl $0x10, %esi
leaq 0x50(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x95ce
testl %eax, %eax
js 0x80ee
movl %eax, %ebp
shrl $0x5, %ebp
andl $0x1f, %ebp
cmpl $0x1f, %ebp
jne 0x8181
movswl (%r12), %r14d
movq 0x10(%rsp), %rax
movb (%rax), %al
andb $0xf, %al
cmpb $0x3, %al
ja 0x8105
movzbl %al, %ecx
jmp 0x8110
callq 0x2240
movq %rax, %rcx
andl $0x4, %ecx
leaq 0x50(%rsp), %rdx
movl %r14d, %edi
movq %rbx, %rsi
xorl %r8d, %r8d
pushq $0x3f
popq %r9
pushq $0x0
pushq $0x0
callq 0x9a4c
popq %rax
popq %rcx
cmpl $0x1, %r13d
movq 0x80(%rsp), %rax
adcl $0x0, %eax
movq %rax, 0x80(%rsp)
movl 0x30(%rsp), %eax
incl %eax
movl %eax, 0x30(%rsp)
cltq
cmpq %rax, 0x48(%rbx)
movq 0x19e9d(%rip), %rbp     # 0x21ff8
jae 0x8626
cmpq $0x2, 0x78(%rbx)
jb 0x8626
movq $0x1, 0x78(%rbx)
movl $0x0, 0x30(%rsp)
jmp 0x8626
movl 0x34(%r12), %r8d
testl %r8d, %r8d
movq %r14, 0x28(%rsp)
jle 0x81a3
movq 0x10(%rsp), %r10
movzbl 0x2(%r10), %ecx
cmpl %ecx, %r8d
setbe %r12b
jmp 0x81ab
xorl %r12d, %r12d
movq 0x10(%rsp), %r10
movq 0x38(%rsp), %rcx
leal (%rcx,%rcx,2), %esi
movl %eax, %edx
shrl $0xc, %edx
movl %eax, %r14d
andl $0x1f, %r14d
shrl $0xa, %eax
andl $0x3, %eax
leal (,%rbp,2), %r11d
movzbl %r12b, %r9d
movzwl (%r10), %ecx
andl $0xf, %ecx
cmpl %ecx, %edx
jne 0x8277
movq %rsi, %r15
movl %eax, 0x1c(%rsp)
movl %r11d, 0x20(%rsp)
movq 0x8(%rsp), %rax
movswl (%rax), %edi
movq %rbx, %rsi
movl %edx, %ecx
leaq 0x50(%rsp), %rdx
pushq $0x1
popq %r8
movq %r9, %rax
xorl %r9d, %r9d
pushq %rax
pushq $0x0
callq 0x9a4c
popq %rax
popq %rcx
cmpl $0x1f, %r14d
je 0x853b
cmpl $0x9, %ebp
ja 0x853b
testb %r12b, %r12b
movq 0x19dc9(%rip), %rbp     # 0x21ff8
jne 0x854c
cmpq %r15, 0x28(%rsp)
movq 0x8(%rsp), %r12
jae 0x8626
movswl (%r12), %edi
movq 0x10(%rsp), %rax
movzbl 0x3(%rax), %r9d
movl 0x20(%rsp), %r15d
cmpl %r9d, %r15d
cmoval %r15d, %r9d
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl 0x1c(%rsp), %ecx
pushq $0x1
popq %r8
pushq $0x0
jmp 0x861d
movl %edx, 0x4c(%rsp)
cmpw $0x4, %cx
jb 0x82f5
movq %rsi, %r15
movl %eax, 0x1c(%rsp)
movl %r11d, 0x20(%rsp)
movq 0x8(%rsp), %r12
movswl (%r12), %edi
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl 0x4c(%rsp), %ecx
pushq $0x1
popq %r8
pushq $0x3
popq %r9
pushq $0x0
pushq $0x0
callq 0x9a4c
popq %rax
popq %rcx
cmpl $0x1f, %r14d
movq 0x19d37(%rip), %rbp     # 0x21ff8
je 0x8626
cmpq %r15, 0x28(%rsp)
jae 0x8626
movswl (%r12), %edi
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl 0x1c(%rsp), %ecx
pushq $0x1
popq %r8
movl 0x20(%rsp), %r9d
pushq $0x0
pushq $0x0
jmp 0x861f
testl %r9d, %r9d
movq 0x8(%rsp), %r12
je 0x8317
movswl (%r12), %edi
cmpl $0x19, %ebp
jb 0x8342
movl 0x6c(%rsp), %edx
shrl $0x3, %edx
addl %edi, %edx
cmpl %edx, %r15d
jl 0x8342
movq 0x70(%rsp), %rdx
shrq $0x30, %rdx
je 0x8464
movq %rsi, %rdi
movslq 0x48(%r12), %rsi
addq %rsi, %rdx
movq %rdi, %rsi
cmpq %r15, %rdx
jbe 0x8464
movswl (%r12), %edi
xorl %r10d, %r10d
cmpl %r8d, %r11d
setge %r10b
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
xorl %r8d, %r8d
movl %r11d, %r9d
pushq %r10
pushq $0x0
callq 0x9a4c
popq %rax
popq %rcx
jmp 0x8540
movslq 0x64(%rsp), %rdx
pushq $-0x1
popq %rax
movl %eax, %r10d
testq %rdx, %rdx
js 0x838e
movq 0xa0(%rbx), %rax
movq %rdx, %rcx
shlq $0x4, %rcx
movzbl 0xc(%rax,%rcx), %r10d
movq (%rbp), %rdi
imulq $0xc, %r15, %rax
movq 0x58(%rbx), %rcx
movzwl (%rcx,%rax), %esi
andl $0xf, %esi
leaq 0x1102d(%rip), %r8      # 0x193d5
movsbl (%rsi,%r8), %r8d
movzbl 0x2(%rcx,%rax), %r9d
movl 0x60(%rsp), %r11d
subq $0x8, %rsp
leaq 0x1182e(%rip), %rsi     # 0x19bf1
movl %r15d, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq 0x78(%rbx)
callq 0x21c0
addq $0x20, %rsp
movq 0x70(%rsp), %r12
pushq $0x30
popq %r14
pushq $0x3
popq %rbp
pushq $0x1
popq %rax
testl %ebp, %ebp
js 0x843e
movq %r12, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
andq $0xffff, %rdx           # imm = 0xFFFF
jne 0x8405
decl %ebp
addl $-0x10, %r14d
jmp 0x83e7
movq 0x19bec(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
decl %edx
leaq 0x11816(%rip), %rsi     # 0x19c2e
xorl %eax, %eax
callq 0x21c0
pushq $0x1
popq %rax
testl %r14d, %r14d
je 0x83fd
movq 0x19bca(%rip), %rax     # 0x21ff8
movq (%rax), %rsi
pushq $0x2c
popq %rdi
callq 0x2170
pushq $0x1
popq %rax
jmp 0x83fd
movq 0x19bb3(%rip), %rcx     # 0x21ff8
movq (%rcx), %rcx
leaq 0x11728(%rip), %rdi     # 0x19b77
pushq $0x2
popq %rsi
movq %rax, %rdx
callq 0x2310
movq 0x8(%rsp), %r12
jmp 0x8097
cmpl $0x1f, %r14d
movq 0x19b89(%rip), %rbp     # 0x21ff8
pushq $0x1
popq %r8
je 0x84ec
cmpl %ecx, %eax
je 0x84ec
movl %r14d, %r15d
movq %r9, 0x98(%rsp)
movl %eax, 0x1c(%rsp)
addl %r14d, %r15d
movq %rsi, 0x90(%rsp)
movq 0x28(%rsp), %r14
cmpq %rsi, %r14
movl %r11d, 0x20(%rsp)
jb 0x8595
addl %r11d, %r15d
movzbl 0x2(%r10), %r9d
cmpl %r9d, %r15d
ja 0x84de
movswl (%r12), %edi
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl %r15d, %r9d
pushq $0x0
pushq $0x0
callq 0x9a4c
pushq $0x1
popq %r8
addq $0x10, %rsp
movq 0x10(%rsp), %rax
movzbl 0x2(%rax), %r9d
cmpl %r9d, %r15d
jae 0x85c3
jmp 0x8626
movq %r9, %r15
cmpq %rsi, 0x28(%rsp)
jb 0x8556
movzbl 0x2(%r10), %r9d
cmpl %r9d, %r11d
ja 0x8531
movswl (%r12), %edi
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl %r11d, %r9d
pushq $0x0
pushq $0x0
movl %r11d, %r14d
callq 0x9a4c
movl %r14d, %r11d
pushq $0x1
popq %r8
addq $0x10, %rsp
movq 0x10(%rsp), %rax
movzbl 0x2(%rax), %r9d
cmpl %r9d, %r11d
jae 0x857f
jmp 0x8626
movq 0x8(%rsp), %r12
movq 0x19ab1(%rip), %rbp     # 0x21ff8
jmp 0x8626
movq 0x8(%rsp), %r12
jmp 0x8626
movswl (%r12), %edi
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl %r11d, %r9d
pushq $0x0
pushq $0x0
movq %r10, %r14
callq 0x9a4c
pushq $0x1
popq %r8
addq $0x10, %rsp
movzbl 0x2(%r14), %r9d
movswl (%r12), %edi
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl 0x4c(%rsp), %ecx
jmp 0x861b
movswl (%r12), %edi
addl %r11d, %r15d
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl %r15d, %r9d
pushq $0x0
pushq $0x0
callq 0x9a4c
pushq $0x1
popq %r8
addq $0x10, %rsp
movq 0x10(%rsp), %rax
movzbl 0x2(%rax), %r9d
movswl (%r12), %edi
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl 0x4c(%rsp), %ecx
movq 0x98(%rsp), %r15
pushq %r15
pushq $0x1
callq 0x9a4c
popq %rax
popq %rcx
cmpq 0x90(%rsp), %r14
jae 0x8626
movswl (%r12), %edi
movq 0x10(%rsp), %rax
movzbl 0x2(%rax), %r9d
movl 0x20(%rsp), %eax
cmpl %r9d, %eax
cmoval %eax, %r9d
movq %rbx, %rsi
leaq 0x50(%rsp), %rdx
movl 0x1c(%rsp), %ecx
pushq $0x1
popq %r8
pushq %r15
pushq $0x1
callq 0x9a4c
popq %rax
popq %rcx
cmpl $0x6, 0x19ba3(%rip)     # 0x221d0
jl 0x7f9f
movq (%rbp), %rcx
leaq 0x115f3(%rip), %rdi     # 0x19c31
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
callq 0x2310
jmp 0x7f9f
testl %r13d, %r13d
jne 0x8660
xorl %eax, %eax
jmp 0x87eb
pushq $0x8
popq %rax
movl %eax, %r13d
movl 0xa0(%rsp), %esi
cmpl $0x5, 0x19b62(%rip)     # 0x221d0
movq %r13, 0x10(%rsp)
jg 0x8805
movslq %esi, %rcx
movq 0xa0(%rbx), %rax
shlq $0x4, %rcx
movq %rcx, 0x30(%rsp)
movl 0x8(%rax,%rcx), %eax
movq %rax, 0x28(%rsp)
leaq 0x18(%rbx), %rcx
movq 0x88(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq %rcx, 0x20(%rsp)
callq 0x9c86
leaq 0x30(%rbx), %r15
movslq %r13d, %rax
movq %rax, 0x38(%rsp)
movl $0xf0, %r13d
pushq $0x1
popq %rax
cmpq 0x38(%rsp), %rax
jge 0x87ce
movq %rax, 0x78(%rsp)
movslq 0xa0(%rsp,%rax,4), %r14
movq 0x88(%rsp), %rdi
movl %r14d, %esi
movq 0x40(%rsp), %rdx
movq %r15, %rcx
callq 0x9c86
movq 0x18(%rbx), %rax
movq 0xa0(%rbx), %rdx
shlq $0x4, %r14
movl 0x8(%rdx,%r14), %ecx
movq 0x30(%rsp), %rsi
subl 0x8(%rdx,%rsi), %ecx
xorl %esi, %esi
xorl %edx, %edx
movl %esi, 0x8(%rsp)
movslq %esi, %r8
movslq %edx, %rdx
imulq $0xc, %rdx, %rsi
addq $0x4, %rsi
imulq $0xc, %r8, %r9
movzbl %cl, %r10d
cmpq %rdx, %rax
jbe 0x87bc
cmpq %r8, (%r15)
jbe 0x87bc
movq 0x28(%rbx), %r12
movq 0x40(%rbx), %rbp
movl -0x4(%r12,%rsi), %r11d
movl (%rbp,%r9), %edi
movl %edi, %r14d
xorl %r11d, %r14d
testb $0xf, %r14b
je 0x8772
addq %r9, %rbp
movzbl (%r12,%rsi), %edi
cmpl %edi, %ecx
cmovgl %edi, %r10d
movb %r10b, (%r12,%rsi)
movzwl (%rbp), %edi
andl %r13d, %r11d
andl %r13d, %edi
cmpw $0x20, %r11w
jne 0x878e
cmpw $0x20, %di
je 0x8794
incq %rdx
addq $0xc, %rsi
jmp 0x872c
cmpw $0x20, %di
je 0x8796
incl %edx
movl 0x8(%rsp), %esi
incl %esi
jmp 0x8716
movq 0x28(%rbx), %rdi
movzbl (%rdi,%rsi), %r8d
cmpl %r8d, %ecx
cmovlel %r10d, %r8d
movb %r8b, (%rdi,%rsi)
incq %rdx
addq $0xc, %rsi
cmpq %rdx, %rax
ja 0x87a1
movq 0x78(%rsp), %rax
incq %rax
jmp 0x86c5
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x67ba
movq 0x10(%rsp), %rax
shlq $0x20, %rax
addq 0x28(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rbx), %r12
testl %r13d, %r13d
movl $0x0, %eax
cmovgl %r13d, %eax
movq %rax, 0x38(%rsp)
movq %rsi, 0x20(%rsp)
movslq %esi, %rax
leaq 0x10f8b(%rip), %r14     # 0x197b4
movq %rbp, %r15
pushq $0x2d
popq %rbp
movq %rax, 0x30(%rsp)
shlq $0x4, %rax
movq %rax, 0x28(%rsp)
xorl %eax, %eax
movq (%r15), %rcx
cmpq 0x38(%rsp), %rax
je 0x8927
movq %rcx, %rdi
leaq 0x113de(%rip), %rsi     # 0x19c35
movq %rax, %r15
movl %r15d, %edx
xorl %eax, %eax
callq 0x21c0
movq %r15, 0x8(%rsp)
movl 0xa0(%rsp,%r15,4), %eax
movslq %eax, %rsi
movq 0x88(%rsp), %rdi
movq %rsi, 0x78(%rsp)
movq 0x40(%rsp), %rdx
movq %r12, %rcx
callq 0x9c86
xorl %r15d, %r15d
xorl %r13d, %r13d
cmpq %r13, (%r12)
jbe 0x88e0
movq 0x28(%rbx), %rax
movzwl (%rax,%r15), %eax
movl %eax, %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
movq %r14, %rdx
cmpl $0x2, %ecx
je 0x88c1
movl %ebp, %edi
cmpl $0x3, %ecx
je 0x88c8
leaq 0x10b14(%rip), %rdx     # 0x193d5
andl $0xf, %eax
movsbl (%rdx,%rax), %edi
movq 0x19729(%rip), %rax     # 0x21ff8
movq (%rax), %rsi
callq 0x2170
incq %r13
addq $0xc, %r15
jmp 0x8894
movq 0x19711(%rip), %r15     # 0x21ff8
movq (%r15), %rdi
movq 0xa0(%rbx), %rax
movq 0x78(%rsp), %rcx
shlq $0x4, %rcx
movl 0x8(%rax,%rcx), %edx
movq 0x28(%rsp), %rcx
subl 0x8(%rax,%rcx), %edx
leaq 0x12990(%rip), %rsi     # 0x1b29e
xorl %eax, %eax
callq 0x21c0
movq 0x8(%rsp), %rax
incq %rax
movq 0x10(%rsp), %r13
jmp 0x883f
leaq 0x11303(%rip), %rdi     # 0x19c31
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
callq 0x2310
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rsi
jmp 0x867c
leaq 0x11230(%rip), %rdi     # 0x19b7f
leaq 0x10cc5(%rip), %rsi     # 0x1961b
leaq 0x11235(%rip), %rcx     # 0x19b92
movl $0x2e6, %edx            # imm = 0x2E6
callq 0x2120