// File: /workspace/github_c_makefile_star2_O0/lh3[P]miniprot/align.c
// Function: mp_extra_cal
static void mp_extra_cal(mp_reg1_t *r, const mp_mapopt_t *opt, const uint8_t *nt, int32_t l_nt, const char *aa, int32_t qlen, int32_t has_spsc)
{
	int32_t k, i, j, l, nl = 0, al = 0, ft, n_intron, has_stop;
	int32_t blen0, n_iden0, phase0, qs0, n_fs0, n_stop0, score0;
	int64_t vs0;
	uint8_t aa_ambi = ns_tab_aa20['X'], aa_stop = ns_tab_aa20['*'];
	char acceptor0[2];
	mp_extra_t *e = r->p;
	mp_feat_t *f;

	has_stop = (r->qe == qlen && r->p->dist_stop == 0); // IMPORTANT: call mp_extra_stop() before this function
	for (k = 0, n_intron = 0; k < r->p->n_cigar; ++k) {
		int32_t op = r->p->cigar[k]&0xf;
		if (op == NS_CIGAR_N || op == NS_CIGAR_U || op == NS_CIGAR_V)
			++n_intron;
	}
	r->n_exon = n_intron + 1;
	r->n_feat = r->n_exon + (!!has_stop);
	r->feat = Kcalloc(0, mp_feat_t, r->n_feat);

	e->blen = e->n_iden = e->n_plus = e->n_fs = e->n_stop = e->dp_max = 0;
	blen0 = n_iden0 = score0 = n_fs0 = n_stop0 = 0, phase0 = 0;
	vs0 = r->vs, qs0 = r->qs;
	acceptor0[0] = acceptor0[1] = 0;
	for (k = 0, ft = 0; k < e->n_cigar; ++k) {
		int32_t op = e->cigar[k]&0xf, len = e->cigar[k]>>4, len3 = len * 3;
		if (op == NS_CIGAR_M) {
			for (i = nl, j = al, l = 0; l < len; ++l, ++j, i += 3) {
				uint8_t nt_aa, aa_aa, codon = nt[i]<<4 | nt[i+1]<<2 | nt[i+2];
				int32_t s;
				nt_aa = nt[i] > 3 || nt[i+1] > 3 || nt[i+2] > 3? aa_ambi : ns_tab_codon[codon];
				aa_aa = ns_tab_aa20[(uint8_t)aa[j]];
				s = opt->mat[nt_aa * opt->asize + aa_aa];
				e->n_stop += (nt_aa == aa_stop);
				e->n_iden += (nt_aa == aa_aa);
				e->n_plus += (s > 0);
				e->dp_max += s;
			}
			nl += len3, al += len, e->blen += len3;
		} else if (op == NS_CIGAR_I) {
			e->dp_max -= opt->go + opt->ge * len;
			al += len, e->blen += len3;
		} else if (op == NS_CIGAR_D) {
			for (i = nl, l = 0; l < len; ++l, i += 3) { // we need to count in-frame stop codons in deletions
				uint8_t codon = nt[i]<<4 | nt[i+1]<<2 | nt[i+2];
				uint8_t nt_aa = nt[i] > 3 || nt[i+1] > 3 || nt[i+2] > 3? aa_ambi : ns_tab_codon[codon];
				e->n_stop += (nt_aa == aa_stop);
			}
			e->dp_max -= opt->go + opt->ge * len;
			nl += len3, e->blen += len3;
		} else if (op == NS_CIGAR_F) {
			e->dp_max -= opt->fs;
			nl += len, e->blen += len, e->n_fs++;
		} else if (op == NS_CIGAR_G) {
			e->dp_max -= opt->fs;
			nl += len, ++al, e->blen += 3, e->n_fs++;
		} else if (op == NS_CIGAR_N || op == NS_CIGAR_U || op == NS_CIGAR_V) { // intron
			if (op == NS_CIGAR_U || op == NS_CIGAR_V) { // phase-1 or phase-2 intron
				uint8_t n1, n2, n3, codon, nt_aa, aa_aa;
				int32_t s;
				if (op == NS_CIGAR_U) n1 = nt[nl], n2 = nt[nl + len - 2], n3 = nt[nl + len - 1];
				else n1 = nt[nl], n2 = nt[nl + 1], n3 = nt[nl + len - 1];
				codon = n1<<4 | n2<<2 | n3;
				nt_aa = n1 > 3 || n2 > 3 || n3 > 3? ns_tab_aa20['X'] : ns_tab_codon[codon];
				aa_aa = ns_tab_aa20[(uint8_t)aa[al]];
				s = opt->mat[nt_aa * opt->asize + aa_aa];
				//printf("%c:%c, score=%d\n", ns_tab_aa_i2c[nt_aa], ns_tab_aa_i2c[aa_aa], s);
				e->n_stop += (nt_aa == aa_stop);
				e->n_iden += (nt_aa == aa_aa);
				e->n_plus += (s > 0);
				e->dp_max += s;
				e->blen += 3;
			}
			// calculate r->feat
			f = &r->feat[ft++];
			f->type = MP_FEAT_CDS;
			f->vs = vs0, f->qs = qs0, f->qe = r->qs + al, f->n_fs = n_fs0, f->n_stop = n_stop0, f->phase = phase0;
			f->blen = e->blen - blen0, f->n_iden = e->n_iden - n_iden0, f->n_fs = e->n_fs - n_fs0, f->n_stop = e->n_stop - n_stop0, f->score = e->dp_max - score0;
			if (ft > 1) f->acceptor[0] = acceptor0[0], f->acceptor[1] = acceptor0[1];
			if (op == NS_CIGAR_N) {
				f->ve = r->vs + nl;
				vs0 = r->vs + nl + len, phase0 = 0;
			} else if (op == NS_CIGAR_U) {
				f->ve = r->vs + nl + 1;
				vs0 = r->vs + nl + len - 2, phase0 = 2;
			} else if (op == NS_CIGAR_V) {
				f->ve = r->vs + nl + 2;
				vs0 = r->vs + nl + len - 1, phase0 = 1;
			}
			f->donor[0] = f->ve - r->vs     < l_nt? ns_tab_nt_i2c[nt[f->ve - r->vs]]     : '.';
			f->donor[1] = f->ve - r->vs + 1 < l_nt? ns_tab_nt_i2c[nt[f->ve - r->vs + 1]] : '.';
			qs0 = f->qe, n_fs0 = e->n_fs, n_stop0 = e->n_stop, score0 = e->dp_max, blen0 = e->blen, n_iden0 = e->n_iden;
			acceptor0[0] = vs0 - r->vs >= 2? ns_tab_nt_i2c[nt[vs0 - r->vs - 2]] : '.';
			acceptor0[1] = vs0 - r->vs >= 1? ns_tab_nt_i2c[nt[vs0 - r->vs - 1]] : '.';
			// progress length
			nl += len, al += (op != NS_CIGAR_N);
		}
	}
	// update the last exon and possibly stop codon
	f = &r->feat[ft++];
	f->type = MP_FEAT_CDS;
	f->vs = vs0, f->ve = r->vs + nl, f->qs = qs0, f->qe = r->qs + al, f->phase = phase0;
	f->blen = e->blen - blen0, f->n_iden = e->n_iden - n_iden0, f->n_fs = e->n_fs - n_fs0, f->n_stop = e->n_stop - n_stop0, f->score = e->dp_max - score0;
	if (ft > 1) f->acceptor[0] = acceptor0[0], f->acceptor[1] = acceptor0[1];
	if (has_stop) {
		int64_t ve_mRNA = has_stop? r->ve + 3 : r->ve;
		f = &r->feat[ft++];
		f->type = MP_FEAT_STOP;
		f->vs = ve_mRNA - 3, f->ve = ve_mRNA, f->qs = f->qe = r->qe + al, f->phase = 0, f->n_fs = 0;
		f->blen = 3, f->n_iden = 0;
	}
	// check errors
	if (nl != r->ve - r->vs || al != r->qe - r->qs) {
		if (mp_verbose >= 2)
			fprintf(stderr, "Warning: unknown issue with --spsc (%d!=%d or %d!=%d)\n", nl, (int)(r->ve - r->vs), al, r->qe - r->qs);
		free(r->p); free(r->feat);
		r->p = 0, r->feat = 0;
	}
	assert(has_spsc == 1 || (nl == r->ve - r->vs && al == r->qe - r->qs));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
leaq 0x1cef6(%rip), %rax     # 0x267f0
movb 0x58(%rax), %al
movb %al, -0x79(%rbp)
leaq 0x1cee9(%rip), %rax     # 0x267f0
movb 0x2a(%rax), %al
movb %al, -0x7a(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
xorl %eax, %eax
cmpl -0x2c(%rbp), %ecx
movb %al, -0xc1(%rbp)
jne 0x9945
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
cmpl $0x0, 0x20(%rax)
sete %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x50(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x30(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x60(%rcx), %rcx
cmpl 0xc(%rcx), %eax
jge 0x99bb
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x30(%rbp), %rcx
movl 0x30(%rax,%rcx,4), %eax
andl $0xf, %eax
movl %eax, -0x94(%rbp)
cmpl $0x3, -0x94(%rbp)
je 0x99a5
cmpl $0xc, -0x94(%rbp)
je 0x99a5
cmpl $0xd, -0x94(%rbp)
jne 0x99ae
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x99b0
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x9961
movl -0x4c(%rbp), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
cmpl $0x0, -0x50(%rbp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
addl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movslq 0x18(%rax), %rsi
xorl %eax, %eax
movl %eax, %edi
movl $0x38, %edx
callq 0xab60
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x88(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x88(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x88(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x88(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x88(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x88(%rbp), %rax
movl $0x0, 0x14(%rax)
movl $0x0, -0x68(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x0, -0x5c(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x60(%rbp)
movb $0x0, -0x7b(%rbp)
movb $0x0, -0x7c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x30(%rbp), %eax
movq -0x88(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0xa58d
movq -0x88(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl 0x30(%rax,%rcx,4), %eax
andl $0xf, %eax
movl %eax, -0x98(%rbp)
movq -0x88(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl 0x30(%rax,%rcx,4), %eax
shrl $0x4, %eax
movl %eax, -0x9c(%rbp)
imull $0x3, -0x9c(%rbp), %eax
movl %eax, -0xa0(%rbp)
cmpl $0x0, -0x98(%rbp)
jne 0x9cf3
movl -0x40(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x9c(%rbp), %eax
jge 0x9cc3
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x4, %eax
movq -0x18(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movb %al, -0xa3(%rbp)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0x9bad
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0x9bad
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jle 0x9bb9
movzbl -0x79(%rbp), %eax
movl %eax, -0xc8(%rbp)
jmp 0x9bd3
movzbl -0xa3(%rbp), %eax
movl %eax, %ecx
leaq 0x1ce27(%rip), %rax     # 0x269f0
movzbl (%rax,%rcx), %eax
movl %eax, -0xc8(%rbp)
movl -0xc8(%rbp), %eax
movb %al, -0xa1(%rbp)
movq -0x28(%rbp), %rax
movslq -0x38(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x1cbfc(%rip), %rax     # 0x267f0
movb (%rax,%rcx), %al
movb %al, -0xa2(%rbp)
movq -0x10(%rbp), %rax
movzbl -0xa1(%rbp), %ecx
movq -0x10(%rbp), %rdx
imull 0x94(%rdx), %ecx
movzbl -0xa2(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movsbl 0xa8(%rax,%rcx), %eax
movl %eax, -0xa8(%rbp)
movzbl -0xa1(%rbp), %eax
movzbl -0x7a(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x88(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movzbl -0xa1(%rbp), %eax
movzbl -0xa2(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x88(%rbp), %rax
addl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
cmpl $0x0, -0xa8(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x88(%rbp), %rax
addl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movl -0xa8(%rbp), %ecx
movq -0x88(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x34(%rbp)
jmp 0x9b23
movl -0xa0(%rbp), %eax
addl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x9c(%rbp), %eax
addl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0xa0(%rbp), %ecx
movq -0x88(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
jmp 0xa57d
cmpl $0x1, -0x98(%rbp)
jne 0x9d46
movq -0x10(%rbp), %rax
movl 0x64(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x68(%rax), %eax
imull -0x9c(%rbp), %eax
addl %eax, %edx
movq -0x88(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movl -0x9c(%rbp), %eax
addl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0xa0(%rbp), %ecx
movq -0x88(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
jmp 0xa57b
cmpl $0x2, -0x98(%rbp)
jne 0x9e9f
movl -0x40(%rbp), %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x9c(%rbp), %eax
jge 0x9e55
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x4, %eax
movq -0x18(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movb %al, -0xa9(%rbp)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0x9dea
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jg 0x9dea
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jle 0x9df6
movzbl -0x79(%rbp), %eax
movl %eax, -0xcc(%rbp)
jmp 0x9e10
movzbl -0xa9(%rbp), %eax
movl %eax, %ecx
leaq 0x1cbea(%rip), %rax     # 0x269f0
movzbl (%rax,%rcx), %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movb %al, -0xaa(%rbp)
movzbl -0xaa(%rbp), %eax
movzbl -0x7a(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x88(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x34(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x34(%rbp)
jmp 0x9d60
movq -0x10(%rbp), %rax
movl 0x64(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x68(%rax), %eax
imull -0x9c(%rbp), %eax
addl %eax, %edx
movq -0x88(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movl -0xa0(%rbp), %eax
addl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0xa0(%rbp), %ecx
movq -0x88(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
jmp 0xa579
cmpl $0xa, -0x98(%rbp)
jne 0x9ef2
movq -0x10(%rbp), %rax
movl 0x70(%rax), %edx
movq -0x88(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movl -0x9c(%rbp), %eax
addl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x9c(%rbp), %ecx
movq -0x88(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movq -0x88(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
jmp 0xa577
cmpl $0xb, -0x98(%rbp)
jne 0x9f4b
movq -0x10(%rbp), %rax
movl 0x70(%rax), %edx
movq -0x88(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movl -0x9c(%rbp), %eax
addl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x88(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x14(%rax)
movq -0x88(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
jmp 0xa575
cmpl $0x3, -0x98(%rbp)
je 0x9f6a
cmpl $0xc, -0x98(%rbp)
je 0x9f6a
cmpl $0xd, -0x98(%rbp)
jne 0xa573
cmpl $0xc, -0x98(%rbp)
je 0x9f80
cmpl $0xd, -0x98(%rbp)
jne 0xa16d
cmpl $0xc, -0x98(%rbp)
jne 0x9fd4
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0xab(%rbp)
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl -0x9c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0xac(%rbp)
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl -0x9c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0xad(%rbp)
jmp 0xa017
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0xab(%rbp)
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0xac(%rbp)
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl -0x9c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0xad(%rbp)
movzbl -0xab(%rbp), %eax
shll $0x4, %eax
movzbl -0xac(%rbp), %ecx
shll $0x2, %ecx
orl %ecx, %eax
movzbl -0xad(%rbp), %ecx
orl %ecx, %eax
movb %al, -0xae(%rbp)
movzbl -0xab(%rbp), %eax
cmpl $0x3, %eax
jg 0xa060
movzbl -0xac(%rbp), %eax
cmpl $0x3, %eax
jg 0xa060
movzbl -0xad(%rbp), %eax
cmpl $0x3, %eax
jle 0xa073
leaq 0x1c789(%rip), %rax     # 0x267f0
movzbl 0x58(%rax), %eax
movl %eax, -0xd0(%rbp)
jmp 0xa08d
movzbl -0xae(%rbp), %eax
movl %eax, %ecx
leaq 0x1c96d(%rip), %rax     # 0x269f0
movzbl (%rax,%rcx), %eax
movl %eax, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
movb %al, -0xaf(%rbp)
movq -0x28(%rbp), %rax
movslq -0x44(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x1c742(%rip), %rax     # 0x267f0
movb (%rax,%rcx), %al
movb %al, -0xb0(%rbp)
movq -0x10(%rbp), %rax
movzbl -0xaf(%rbp), %ecx
movq -0x10(%rbp), %rdx
imull 0x94(%rdx), %ecx
movzbl -0xb0(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movsbl 0xa8(%rax,%rcx), %eax
movl %eax, -0xb4(%rbp)
movzbl -0xaf(%rbp), %eax
movzbl -0x7a(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x88(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movzbl -0xaf(%rbp), %eax
movzbl -0xb0(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x88(%rbp), %rax
addl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
cmpl $0x0, -0xb4(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x88(%rbp), %rax
addl 0x2c(%rax), %ecx
movl %ecx, 0x2c(%rax)
movl -0xb4(%rbp), %ecx
movq -0x88(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x88(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x48(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x48(%rbp)
movslq %ecx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movw $0x0, 0x18(%rax)
movq -0x78(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, (%rax)
movl -0x60(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x34(%rax), %ecx
addl -0x44(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x64(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x68(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x5c(%rbp), %eax
movw %ax, %cx
movq -0x90(%rbp), %rax
movw %cx, 0x1a(%rax)
movq -0x88(%rbp), %rax
movl 0x14(%rax), %ecx
subl -0x54(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x88(%rbp), %rax
movl 0x28(%rax), %ecx
subl -0x58(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x88(%rbp), %rax
movl 0x18(%rax), %ecx
subl -0x64(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x88(%rbp), %rax
movl 0x1c(%rax), %ecx
subl -0x68(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x88(%rbp), %rax
movl 0x4(%rax), %ecx
subl -0x6c(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x24(%rax)
cmpl $0x1, -0x48(%rbp)
jle 0xa28b
movb -0x7c(%rbp), %cl
movq -0x90(%rbp), %rax
movb %cl, 0x32(%rax)
movb -0x7b(%rbp), %cl
movq -0x90(%rbp), %rax
movb %cl, 0x33(%rax)
cmpl $0x3, -0x98(%rbp)
jne 0xa2d7
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movslq -0x40(%rbp), %rax
addq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x40(%rbp), %rcx
addq %rcx, %rax
movslq -0x9c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x5c(%rbp)
jmp 0xa37b
cmpl $0xc, -0x98(%rbp)
jne 0xa328
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movslq -0x40(%rbp), %rax
addq %rax, %rcx
addq $0x1, %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x40(%rbp), %rcx
addq %rcx, %rax
movslq -0x9c(%rbp), %rcx
addq %rcx, %rax
subq $0x2, %rax
movq %rax, -0x78(%rbp)
movl $0x2, -0x5c(%rbp)
jmp 0xa379
cmpl $0xd, -0x98(%rbp)
jne 0xa377
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movslq -0x40(%rbp), %rax
addq %rax, %rcx
addq $0x2, %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x40(%rbp), %rcx
addq %rcx, %rax
movslq -0x9c(%rbp), %rcx
addq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x78(%rbp)
movl $0x1, -0x5c(%rbp)
jmp 0xa379
jmp 0xa37b
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
subq 0x40(%rcx), %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
jge 0xa3c8
leaq 0x1c002(%rip), %rax     # 0x263a0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x90(%rbp), %rdx
movq 0x8(%rdx), %rdx
movq -0x8(%rbp), %rsi
subq 0x40(%rsi), %rdx
movzbl (%rcx,%rdx), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0xd4(%rbp)
jmp 0xa3d5
movl $0x2e, %eax
movl %eax, -0xd4(%rbp)
jmp 0xa3d5
movl -0xd4(%rbp), %eax
movb %al, %cl
movq -0x90(%rbp), %rax
movb %cl, 0x30(%rax)
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
subq 0x40(%rcx), %rax
addq $0x1, %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
jge 0xa439
leaq 0x1bf92(%rip), %rax     # 0x263a0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x90(%rbp), %rdx
movq 0x8(%rdx), %rdx
movq -0x8(%rbp), %rsi
subq 0x40(%rsi), %rdx
movzbl 0x1(%rcx,%rdx), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0xd8(%rbp)
jmp 0xa446
movl $0x2e, %eax
movl %eax, -0xd8(%rbp)
jmp 0xa446
movl -0xd8(%rbp), %eax
movb %al, %cl
movq -0x90(%rbp), %rax
movb %cl, 0x31(%rax)
movq -0x90(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x88(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x88(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x68(%rbp)
movq -0x88(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x88(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x88(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x78(%rbp), %rax
movq -0x8(%rbp), %rcx
subq 0x40(%rcx), %rax
cmpq $0x2, %rax
jl 0xa4e6
leaq 0x1bee1(%rip), %rax     # 0x263a0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x78(%rbp), %rdx
movq -0x8(%rbp), %rsi
subq 0x40(%rsi), %rdx
subq $0x2, %rdx
movzbl (%rcx,%rdx), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0xdc(%rbp)
jmp 0xa4f3
movl $0x2e, %eax
movl %eax, -0xdc(%rbp)
jmp 0xa4f3
movl -0xdc(%rbp), %eax
movb %al, -0x7c(%rbp)
movq -0x78(%rbp), %rax
movq -0x8(%rbp), %rcx
subq 0x40(%rcx), %rax
cmpq $0x1, %rax
jl 0xa53c
leaq 0x1be8b(%rip), %rax     # 0x263a0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x78(%rbp), %rdx
movq -0x8(%rbp), %rsi
subq 0x40(%rsi), %rdx
subq $0x1, %rdx
movzbl (%rcx,%rdx), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0xe0(%rbp)
jmp 0xa549
movl $0x2e, %eax
movl %eax, -0xe0(%rbp)
jmp 0xa549
movl -0xe0(%rbp), %eax
movb %al, -0x7b(%rbp)
movl -0x9c(%rbp), %eax
addl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
cmpl $0x3, -0x98(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
addl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0xa575
jmp 0xa577
jmp 0xa579
jmp 0xa57b
jmp 0xa57d
jmp 0xa57f
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x9ab3
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x48(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x48(%rbp)
movslq %ecx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movw $0x0, 0x18(%rax)
movq -0x78(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movslq -0x40(%rbp), %rax
addq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x60(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x34(%rax), %ecx
addl -0x44(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x5c(%rbp), %eax
movw %ax, %cx
movq -0x90(%rbp), %rax
movw %cx, 0x1a(%rax)
movq -0x88(%rbp), %rax
movl 0x14(%rax), %ecx
subl -0x54(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x88(%rbp), %rax
movl 0x28(%rax), %ecx
subl -0x58(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x88(%rbp), %rax
movl 0x18(%rax), %ecx
subl -0x64(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x88(%rbp), %rax
movl 0x1c(%rax), %ecx
subl -0x68(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x88(%rbp), %rax
movl 0x4(%rax), %ecx
subl -0x6c(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x24(%rax)
cmpl $0x1, -0x48(%rbp)
jle 0xa6ab
movb -0x7c(%rbp), %cl
movq -0x90(%rbp), %rax
movb %cl, 0x32(%rax)
movb -0x7b(%rbp), %cl
movq -0x90(%rbp), %rax
movb %cl, 0x33(%rax)
cmpl $0x0, -0x50(%rbp)
je 0xa79a
cmpl $0x0, -0x50(%rbp)
je 0xa6d0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
addq $0x3, %rax
movq %rax, -0xe8(%rbp)
jmp 0xa6df
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x48(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x48(%rbp)
movslq %ecx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movw $0x1, 0x18(%rax)
movq -0xc0(%rbp), %rcx
subq $0x3, %rcx
movq -0x90(%rbp), %rax
movq %rcx, (%rax)
movq -0xc0(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl -0x44(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x90(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x90(%rbp), %rax
movw $0x0, 0x1a(%rax)
movq -0x90(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x90(%rbp), %rax
movl $0x3, 0x2c(%rax)
movq -0x90(%rbp), %rax
movl $0x0, 0x28(%rax)
movslq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
movq -0x8(%rbp), %rdx
subq 0x40(%rdx), %rcx
cmpq %rcx, %rax
jne 0xa7c8
movl -0x44(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
movq -0x8(%rbp), %rdx
subl 0x34(%rdx), %ecx
cmpl %ecx, %eax
je 0xa847
leaq 0x1bf09(%rip), %rax     # 0x266d8
cmpl $0x2, (%rax)
jl 0xa815
movq 0x1b81d(%rip), %rax     # 0x25ff8
movq (%rax), %rdi
movl -0x40(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x8(%rbp), %rcx
subq 0x40(%rcx), %rax
movl %eax, %ecx
movl -0x44(%rbp), %r8d
movq -0x8(%rbp), %rax
movl 0x38(%rax), %r9d
movq -0x8(%rbp), %rax
subl 0x34(%rax), %r9d
leaq 0x16e80(%rip), %rsi     # 0x2168e
movb $0x0, %al
callq 0x21f0
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
cmpl $0x1, 0x10(%rbp)
je 0xa87b
movslq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
movq -0x8(%rbp), %rdx
subq 0x40(%rdx), %rcx
cmpq %rcx, %rax
jne 0xa87d
movl -0x44(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
movq -0x8(%rbp), %rdx
subl 0x34(%rdx), %ecx
cmpl %ecx, %eax
jne 0xa87d
jmp 0xa89c
leaq 0x16e41(%rip), %rdi     # 0x216c5
leaq 0x16d6c(%rip), %rsi     # 0x215f7
movl $0xc8, %edx
leaq 0x16e6c(%rip), %rcx     # 0x21703
callq 0x2180
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)