// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movl $0x0, -0x84(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x10000, (%rax)        # imm = 0x10000
jae 0xb7b4
jmp 0xb7d3
leaq 0x212a4(%rip), %rdi     # 0x2ca5f
leaq 0x20d39(%rip), %rsi     # 0x2c4fb
movl $0x2e6, %edx            # imm = 0x2E6
leaq 0x212a4(%rip), %rcx     # 0x2ca72
callq 0x2140
movq -0x28(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x78(%rax)
movl $0x0, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x2160
movl $0x0, -0x38(%rbp)
movl $0x0, -0x54(%rbp)
movslq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0xb921
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x38(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %eax
cmpl $0x3, %eax
jle 0xb86e
movl $0x0, -0x54(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
jmp 0xb8ae
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
leaq -0x50(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x38(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %edx
callq 0xdc90
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
cltq
movq -0x28(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jne 0xb8c5
jmp 0xb921
movl -0x54(%rbp), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x30, %rcx
sarq $0x30, %rcx
cmpl %ecx, %eax
jl 0xb91c
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x20, %rax
sarq $0x30, %rax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0xa8(%rax), %r8
callq 0xdd10
cmpl $0x0, %eax
jl 0xb91c
jmp 0xb921
jmp 0xb821
movslq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jne 0xb934
jmp 0xc838
movl -0x34(%rbp), %eax
andl $0x7, %eax
orl $0x0, %eax
movl %eax, -0x34(%rbp)
movq $0x0, -0x30(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jne 0xb9d3
movq -0x28(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0xb989
movq -0x28(%rbp), %rax
movq 0x80(%rax), %rax
shlq %rax
movq %rax, -0xe0(%rbp)
jmp 0xb997
movl $0x2, %eax
movq %rax, -0xe0(%rbp)
jmp 0xb997
movq -0xe0(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x28(%rbp), %rax
imulq $0x28, 0x80(%rax), %rsi
callq 0x2270
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x28(%rbp), %rcx
movq 0x78(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x78(%rcx)
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq -0x50(%rbp), %rsi
movl $0x28, %edx
callq 0x2200
jmp 0xba08
movq -0x28(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0xc525
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rsi
leaq -0x50(%rbp), %rdi
movl $0x28, %edx
callq 0x2200
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rsi
movq -0x28(%rbp), %rcx
movq 0x78(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x78(%rcx)
imulq $0x28, %rax, %rax
addq %rax, %rsi
movl $0x28, %edx
callq 0x2200
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rsi
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rdx
xorl %eax, %eax
movl %eax, %edi
callq 0x9e80
cmpl $0x0, -0x84(%rbp)
je 0xbab8
movl -0x40(%rbp), %eax
movq -0x28(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movslq -0x80(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
movq -0x18(%rbp), %rdx
addl 0x40(%rdx), %ecx
cmpl %ecx, %eax
jle 0xbab8
jmp 0xc525
movslq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jne 0xbb17
cmpl $0x6, 0x27713(%rip)     # 0x331e0
jl 0xbaea
movq 0x27522(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movl -0x40(%rbp), %edx
leaq 0x20fdf(%rip), %rsi     # 0x2cac2
movb $0x0, %al
callq 0x21d0
movl -0x3c(%rbp), %ecx
movl -0x84(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x84(%rbp)
cltq
movl %ecx, -0x80(%rbp,%rax,4)
cmpl $0x8, -0x84(%rbp)
jne 0xbb12
jmp 0xc525
jmp 0xba08
cmpl $0x6, 0x276c2(%rip)     # 0x331e0
jl 0xbce8
movq 0x274cd(%rip), %rax     # 0x32ff8
movq (%rax), %rax
movq %rax, -0x108(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x100(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x38(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %eax
movl %eax, %ecx
leaq 0x2082e(%rip), %rax     # 0x2c39b
movsbl (%rax,%rcx), %eax
movl %eax, -0xf8(%rbp)
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x38(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movzbl 0x2(%rax), %eax
movl %eax, -0xf4(%rbp)
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0xf0(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0xe4(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0xbbd4
movq -0x28(%rbp), %rax
movq 0xa0(%rax), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0xc(%rax), %eax
movl %eax, -0x10c(%rbp)
jmp 0xbbe1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x10c(%rbp)
jmp 0xbbe1
movl -0xe4(%rbp), %r10d
movq -0xf0(%rbp), %r11
movl -0xf4(%rbp), %r9d
movl -0xf8(%rbp), %r8d
movl -0xfc(%rbp), %ecx
movl -0x100(%rbp), %edx
movq -0x108(%rbp), %rdi
movl -0x10c(%rbp), %eax
leaq 0x20eb4(%rip), %rsi     # 0x2cad1
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x21d0
movl $0x3, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
jl 0xbcd0
movq -0x30(%rbp), %rax
movl -0xa4(%rbp), %ecx
shll $0x4, %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
je 0xbcba
movq 0x2738b(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl -0xa4(%rbp), %ecx
shll $0x4, %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq $0xffff, %rax           # imm = 0xFFFF
movl %eax, %edx
subl $0x1, %edx
leaq 0x20e7a(%rip), %rsi     # 0x2cb0e
movb $0x0, %al
callq 0x21d0
cmpl $0x0, -0xa4(%rbp)
je 0xbcb8
movq 0x2734d(%rip), %rax     # 0x32ff8
movq (%rax), %rsi
movl $0x2c, %edi
callq 0x2190
jmp 0xbcba
jmp 0xbcbc
movl -0xa4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0xbc3b
movq 0x27321(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0x20d76(%rip), %rsi     # 0x2ca57
movb $0x0, %al
callq 0x21d0
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x38(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x38(%rbp), %eax
jle 0xbd1b
movl -0x88(%rbp), %eax
movl %eax, -0x110(%rbp)
jmp 0xbd24
movl -0x38(%rbp), %eax
movl %eax, -0x110(%rbp)
movl -0x110(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
imull $0x3, -0x88(%rbp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x20, %rax
sarq $0x30, %rax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0xa8(%rax), %r8
callq 0xdd10
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
jl 0xc418
movl -0x9c(%rbp), %eax
sarl $0x5, %eax
andl $0x1f, %eax
cmpl $0x1f, %eax
je 0xc418
movl -0x9c(%rbp), %eax
sarl $0xc, %eax
andl $0x3, %eax
movl %eax, -0xa8(%rbp)
movl -0x9c(%rbp), %eax
andl $0x1f, %eax
cmpl $0x1f, %eax
je 0xbde9
movl -0x9c(%rbp), %eax
sarl $0xa, %eax
andl $0x3, %eax
movl %eax, -0x114(%rbp)
jmp 0xbdf6
movl $0x4, %eax
movl %eax, -0x114(%rbp)
jmp 0xbdf6
movl -0x114(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0x9c(%rbp), %eax
sarl $0x5, %eax
andl $0x1f, %eax
shll %eax
movl %eax, -0xb0(%rbp)
movl -0x9c(%rbp), %eax
andl $0x1f, %eax
shll %eax
movl %eax, -0xb4(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x34(%rcx)
movb %al, -0x115(%rbp)
jle 0xbe54
movq -0x98(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x34(%rcx), %eax
setge %al
movb %al, -0x115(%rbp)
movb -0x115(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xb8(%rbp)
movl -0xa8(%rbp), %eax
movq -0x98(%rbp), %rcx
movw (%rcx), %cx
andw $0xf, %cx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xbfa0
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
movq -0x98(%rbp), %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %ecx
movl -0xb8(%rbp), %eax
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
xorl %r9d, %r9d
movl $0x0, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xe0f0
cmpl $0x4, -0xac(%rbp)
je 0xbf9b
cmpl $0x14, -0xb0(%rbp)
jge 0xbf9b
cmpl $0x0, -0xb8(%rbp)
jne 0xbf9b
cmpl $0x0, -0xa0(%rbp)
jne 0xbf9b
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, -0x12c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x128(%rbp)
movl -0xac(%rbp), %eax
movl %eax, -0x11c(%rbp)
movl -0xb0(%rbp), %eax
movq -0x98(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
cmpl %ecx, %eax
jle 0xbf50
movl -0xb0(%rbp), %eax
movl %eax, -0x130(%rbp)
jmp 0xbf61
movq -0x98(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x130(%rbp)
movl -0x11c(%rbp), %ecx
movq -0x128(%rbp), %rsi
movl -0x12c(%rbp), %edi
movl -0x130(%rbp), %r9d
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
xorl %eax, %eax
movl $0x1, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xe0f0
jmp 0xc413
movq -0x98(%rbp), %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %eax
cmpl $0x3, %eax
jle 0xc054
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
movl -0xa8(%rbp), %ecx
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
movl $0x3, %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xe0f0
cmpl $0x4, -0xac(%rbp)
jge 0xc04f
cmpl $0x0, -0xa0(%rbp)
jne 0xc04f
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
movl -0xac(%rbp), %ecx
movl -0xb0(%rbp), %r9d
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
xorl %eax, %eax
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xe0f0
jmp 0xc411
cmpl $0x0, -0xb8(%rbp)
je 0xc0f1
movl -0x38(%rbp), %eax
movl -0x34(%rbp), %ecx
shrl $0x3, %ecx
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
shlq $0x30, %rdx
sarq $0x30, %rdx
addl %edx, %ecx
cmpl %ecx, %eax
jl 0xc08c
movl -0xb0(%rbp), %eax
sarl %eax
cmpl $0x19, %eax
jge 0xc0f1
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
movq -0x98(%rbp), %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %ecx
movl -0xb0(%rbp), %r9d
movl -0xb0(%rbp), %r8d
movq -0x18(%rbp), %rax
movl 0x34(%rax), %r10d
xorl %eax, %eax
movl $0x1, %edx
cmpl %r10d, %r8d
cmovgel %edx, %eax
leaq -0x50(%rbp), %rdx
xorl %r8d, %r8d
movl $0x0, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xe0f0
jmp 0xc40f
movq -0x30(%rbp), %rax
shrq $0x30, %rax
cmpq $0x0, %rax
je 0xc184
movslq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x30, %rcx
movq -0x18(%rbp), %rdx
movslq 0x48(%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0xc184
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
movq -0x98(%rbp), %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %ecx
movl -0xb0(%rbp), %r9d
movl -0xb0(%rbp), %r8d
movq -0x18(%rbp), %rax
movl 0x34(%rax), %r10d
xorl %eax, %eax
movl $0x1, %edx
cmpl %r10d, %r8d
cmovgel %edx, %eax
leaq -0x50(%rbp), %rdx
xorl %r8d, %r8d
movl $0x0, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xe0f0
jmp 0xc40d
cmpl $0x4, -0xac(%rbp)
jge 0xc1ac
movl -0xac(%rbp), %eax
movq -0x98(%rbp), %rcx
movw (%rcx), %cx
andw $0xf, %cx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xc281
cmpl $0x0, -0xa0(%rbp)
je 0xc1ca
movl -0xb0(%rbp), %eax
movq -0x98(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jg 0xc217
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
movq -0x98(%rbp), %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %ecx
movl -0xb0(%rbp), %r9d
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
xorl %eax, %eax
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xe0f0
cmpl $0x0, -0xa0(%rbp)
je 0xc235
movl -0xb0(%rbp), %eax
movq -0x98(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jl 0xc27c
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
movl -0xa8(%rbp), %ecx
movq -0x98(%rbp), %rax
movzbl 0x2(%rax), %r9d
movl -0xb8(%rbp), %eax
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
movl $0x1, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xe0f0
jmp 0xc40b
cmpl $0x0, -0xa0(%rbp)
je 0xc2a5
movl -0xb0(%rbp), %eax
addl -0xb4(%rbp), %eax
movq -0x98(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jg 0xc2f9
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
movq -0x98(%rbp), %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %ecx
movl -0xb0(%rbp), %r9d
addl -0xb4(%rbp), %r9d
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
xorl %eax, %eax
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xe0f0
cmpl $0x0, -0xa0(%rbp)
je 0xc31d
movl -0xb0(%rbp), %eax
addl -0xb4(%rbp), %eax
movq -0x98(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jl 0xc364
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
movl -0xa8(%rbp), %ecx
movq -0x98(%rbp), %rax
movzbl 0x2(%rax), %r9d
movl -0xb8(%rbp), %eax
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
movl $0x1, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xe0f0
cmpl $0x0, -0xa0(%rbp)
jne 0xc409
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, -0x144(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x140(%rbp)
movl -0xac(%rbp), %eax
movl %eax, -0x134(%rbp)
movq -0x98(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl -0xb0(%rbp), %eax
jle 0xc3c3
movq -0x98(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, -0x148(%rbp)
jmp 0xc3cf
movl -0xb0(%rbp), %eax
movl %eax, -0x148(%rbp)
movl -0x134(%rbp), %ecx
movq -0x140(%rbp), %rsi
movl -0x144(%rbp), %edi
movl -0x148(%rbp), %r9d
movl -0xb8(%rbp), %eax
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
movl $0x1, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xe0f0
jmp 0xc40b
jmp 0xc40d
jmp 0xc40f
jmp 0xc411
jmp 0xc413
jmp 0xc4ff
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x30, %rax
sarq $0x30, %rax
movl %eax, -0x154(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x98(%rbp), %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %eax
cmpl $0x4, %eax
jge 0xc468
movq -0x98(%rbp), %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %eax
movq %rax, -0x160(%rbp)
jmp 0xc478
callq 0x2250
andq $0x4, %rax
movq %rax, -0x160(%rbp)
movq -0x150(%rbp), %rsi
movl -0x154(%rbp), %edi
movq -0x160(%rbp), %rax
movl %eax, %ecx
leaq -0x50(%rbp), %rdx
xorl %r8d, %r8d
movl $0x3f, %r9d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xe0f0
cmpl $0x0, -0x84(%rbp)
jne 0xc4c1
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
cltq
movq -0x28(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jbe 0xc4fd
movq -0x28(%rbp), %rax
cmpq $0x1, 0x78(%rax)
jbe 0xc4fd
movq -0x28(%rbp), %rax
movq $0x1, 0x78(%rax)
movl $0x0, -0x8c(%rbp)
jmp 0xc4ff
cmpl $0x6, 0x26cda(%rip)     # 0x331e0
jl 0xc520
movq 0x26ae9(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0x205f8(%rip), %rsi     # 0x2cb11
movb $0x0, %al
callq 0x21d0
jmp 0xba08
movl -0x84(%rbp), %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x84(%rbp)
je 0xc836
cmpl $0x6, 0x26c9e(%rip)     # 0x331e0
jl 0xc730
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl -0x84(%rbp), %eax
jge 0xc718
movq 0x26a8d(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movl -0xbc(%rbp), %edx
leaq 0x2059a(%rip), %rsi     # 0x2cb15
movb $0x0, %al
callq 0x21d0
movq -0x28(%rbp), %rdi
addq $0x90, %rdi
movslq -0xbc(%rbp), %rax
movl -0x80(%rbp,%rax,4), %esi
movq -0x28(%rbp), %rdx
addq $0x48, %rdx
movq -0x28(%rbp), %rcx
addq $0x18, %rcx
callq 0xe450
movl $0x0, -0xc0(%rbp)
movslq -0xc0(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0xc6b2
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc0(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
shrw $0x4, %ax
andw $0xf, %ax
movzbl %al, %eax
movl %eax, -0xc4(%rbp)
cmpl $0x3, -0xc4(%rbp)
jne 0xc60c
movl $0x2d, %eax
movl %eax, -0x164(%rbp)
jmp 0xc689
cmpl $0x2, -0xc4(%rbp)
jne 0xc64a
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc0(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %eax
movl %eax, %ecx
leaq 0x20056(%rip), %rax     # 0x2c694
movsbl (%rax,%rcx), %eax
movl %eax, -0x168(%rbp)
jmp 0xc67d
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc0(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
andw $0xf, %ax
movzbl %al, %eax
movl %eax, %ecx
leaq 0x1fd28(%rip), %rax     # 0x2c39b
movsbl (%rax,%rcx), %eax
movl %eax, -0x168(%rbp)
movl -0x168(%rbp), %eax
movl %eax, -0x164(%rbp)
movl -0x164(%rbp), %edi
movq 0x26962(%rip), %rax     # 0x32ff8
movq (%rax), %rsi
callq 0x2190
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0xc5b7
movq 0x2693f(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq 0xa0(%rax), %rax
movslq -0xbc(%rbp), %rcx
movslq -0x80(%rbp,%rcx,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
movq -0x28(%rbp), %rax
movq 0xa0(%rax), %rax
movslq -0x80(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subl 0x8(%rax), %edx
leaq 0x21af4(%rip), %rsi     # 0x2e1f1
movb $0x0, %al
callq 0x21d0
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0xc552
movq 0x268d9(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0x203e8(%rip), %rsi     # 0x2cb11
movb $0x0, %al
callq 0x21d0
movq -0x28(%rbp), %rax
movq 0xa0(%rax), %rax
movslq -0x80(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x28(%rbp), %rdi
addq $0x90, %rdi
movl -0x80(%rbp), %esi
movq -0x28(%rbp), %rdx
addq $0x48, %rdx
movq -0x28(%rbp), %rcx
addq $0x18, %rcx
callq 0xe450
movl $0x1, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl -0x84(%rbp), %eax
jge 0xc821
movq -0x28(%rbp), %rdi
addq $0x90, %rdi
movslq -0xbc(%rbp), %rax
movl -0x80(%rbp,%rax,4), %esi
movq -0x28(%rbp), %rdx
addq $0x48, %rdx
movq -0x28(%rbp), %rcx
addq $0x18, %rcx
addq $0x18, %rcx
callq 0xe450
movq -0x28(%rbp), %rax
movq 0xa0(%rax), %rax
movslq -0xbc(%rbp), %rcx
movslq -0x80(%rbp,%rcx,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edi
movq -0x28(%rbp), %rax
movq 0xa0(%rax), %rax
movslq -0x80(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subl 0x8(%rax), %edi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
movq -0x28(%rbp), %rdx
addq $0x18, %rdx
addq $0x18, %rdx
callq 0xe930
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0xc779
movq -0x28(%rbp), %rdi
addq $0x48, %rdi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
callq 0x95e0
jmp 0xc838
movl -0x4(%rbp), %eax
movl %eax, -0xd0(%rbp)
movq -0xc(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movl -0xd0(%rbp), %edx
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopw %cs:(%rax,%rax)