// File: /workspace/github_c_makefile_star2_O3/lh3[P]miniprot/format.c
// Function: mp_write_residue
static void mp_write_residue(kstring_t *out, const mp_idx_t *mi, const mp_mapopt_t *opt, const char *aa, const mp_reg1_t *r)
{
	const mp_extra_t *e = r->p;
	int32_t k, w, w4, al = r->qs, nl = 0, l_tmp = 8; // enough to keep "##ATN\t\0"
	int32_t max_flank = opt->max_intron_flank;
	int64_t l_nt;
	uint8_t *nt;
	char *str[5];
	if (e == 0) return;
	for (k = 0; k < e->n_cigar; ++k) { // estimate the string length
		int32_t op = e->cigar[k]&0xf, len = e->cigar[k]>>4, len3 = len * 3;
		if (op == NS_CIGAR_M || op == NS_CIGAR_I || op == NS_CIGAR_D) l_tmp += len3;
		else if (op == NS_CIGAR_F || op == NS_CIGAR_G) l_tmp += len;
		else if (op == NS_CIGAR_N || op == NS_CIGAR_U || op == NS_CIGAR_V) {
			int32_t intron_len = op == NS_CIGAR_N? len : len - 3;
			l_tmp += intron_len <= max_flank * 2? len : max_flank * 2 + 20;
		}
	}
	l_tmp += 3;
	str[0] = Kmalloc(0, char, 5 * l_tmp);
	str[1] = str[0] + l_tmp;
	str[2] = str[1] + l_tmp;
	str[3] = str[2] + l_tmp;
	str[4] = str[3] + l_tmp;
	strcpy(str[0], "##ATN\t");
	strcpy(str[1], "##ATA\t");
	strcpy(str[2], "##AAS\t");
	strcpy(str[3], "##AQA\t");
	strcpy(str[4], "##STA\t");
	nt = Kmalloc(0, uint8_t, r->ve - r->vs + 3);
	l_nt = mp_ntseq_get_by_v(mi->nt, r->vid, r->vs, r->ve + 3, nt);
	assert(l_nt >= r->ve - r->vs);
	for (k = 0, w = w4 = 6; k < e->n_cigar; ++k) {
		int32_t i, j, l, op = e->cigar[k]&0xf, len = e->cigar[k]>>4, len3 = len * 3;
		assert(w < l_tmp);
		if (op == NS_CIGAR_M) {
			for (i = nl, j = al, l = 0; l < len; ++l, ++j, i += 3, w += 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? ns_tab_aa20['X'] : ns_tab_codon[codon];
				aa_aa = ns_tab_aa20[(uint8_t)aa[j]];
				s = opt->mat[nt_aa * opt->asize + aa_aa];
				str[0][w] = "ACGTN"[nt[i]], str[0][w+1] = "ACGTN"[nt[i+1]], str[0][w+2] = "ACGTN"[nt[i+2]];
				str[1][w] = str[4][w4++] = ns_tab_aa_i2c[nt_aa], str[1][w+1] = str[1][w+2] = '.';
				str[2][w] = nt_aa == aa_aa? '|' : s > 0? '+' : ' ', str[2][w+1] = ' ', str[2][w+2] = ' ';
				str[3][w] = toupper(aa[j]), str[3][w+1] = str[3][w+2] = ' ';
			}
			nl += len3, al += len;
		} else if (op == NS_CIGAR_I) {
			for (j = 0; j < len; ++j, w += 3) {
				str[0][w] = str[0][w+1] = str[0][w+2] = '-';
				str[1][w] = '-', str[1][w+1] = str[1][w+2] = '.';
				str[2][w] = str[2][w+1] = str[2][w+2] = ' ';
				str[3][w] = toupper(aa[al + j]), str[3][w+1] = str[3][w+2] = ' ';
			}
			al += len;
		} else if (op == NS_CIGAR_D) {
			for (l = 0, i = nl; l < len; ++l, i += 3, w += 3) {
				uint8_t nt_aa, codon = nt[i]<<4 | nt[i+1]<<2 | nt[i+2];
				nt_aa = nt[i] > 3 || nt[i+1] > 3 || nt[i+2] > 3? ns_tab_aa20['X'] : ns_tab_codon[codon];
				str[0][w] = "ACGTN"[nt[i]], str[0][w+1] = "ACGTN"[nt[i+1]], str[0][w+2] = "ACGTN"[nt[i+2]];
				str[1][w] = str[4][w4++] = ns_tab_aa_i2c[nt_aa], str[1][w+1] = str[1][w+2] = '.';
				str[2][w] = str[2][w+1] = str[2][w+2] = ' ';
				str[3][w] = '-', str[3][w+1] = str[3][w+2] = ' ';
			}
			nl += len3;
		} else if (op == NS_CIGAR_F) {
			for (l = 0, i = nl; l < len; ++l, ++i, ++w)
				str[0][w] = "ACGTN"[nt[i]], str[1][w] = '!', str[2][w] = str[3][w] = ' ';
			nl += len;
		} else if (op == NS_CIGAR_G) {
			for (l = 0, i = nl; l < len; ++l, ++i, ++w) {
				str[0][w] = "ACGTN"[nt[i]], str[1][w] = '$', str[2][w] = ' ';
				str[3][w] = l == 0? toupper(aa[al]) : ' ';
			}
			nl += len, ++al;
		} else if (op == NS_CIGAR_N || op == NS_CIGAR_U || op == NS_CIGAR_V) {
			int32_t intron_len = op == NS_CIGAR_N? len : len - 3;
			if (op == NS_CIGAR_U || op == NS_CIGAR_V) { // phase-1 or phase-2 intron; print the first half of split codon
				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];
				str[0][w] = "ACGTN"[nt[nl]];
				str[1][w] = str[4][w4++] = ns_tab_aa_i2c[nt_aa];
				str[2][w] = nt_aa == aa_aa? '|' : s > 0? '+' : ' ';
				str[3][w] = toupper(aa[al]);
				++w, ++nl;
				if (op == NS_CIGAR_V) {
					str[0][w] = "ACGTN"[nt[nl]], str[1][w] = '.', str[2][w] = str[3][w] = ' ';
					++w, ++nl;
				}
				++al;
			}
			if (intron_len <= max_flank * 2) {
				for (l = 0, i = nl; l < intron_len; ++l, ++i, ++w)
					str[0][w] = "acgtn"[nt[i]], str[1][w] = str[2][w] = str[3][w] = ' ';
			} else {
				int32_t il;
				for (l = 0, i = nl; l < max_flank; ++l, ++i, ++w)
					str[0][w] = "acgtn"[nt[i]], str[1][w] = str[2][w] = str[3][w] = ' ';
				str[0][w] = '~', str[1][w] = str[2][w] = ' ', str[3][w++] = ' ';
				il = snprintf(&str[0][w], l_tmp - w, "%d", intron_len);
				for (l = 0; l < il; ++l, ++w)
					str[1][w] = str[2][w] = str[3][w] = ' ';
				str[0][w] = '~', str[1][w] = str[2][w] = ' ', str[3][w++] = ' ';
				for (l = 0, i = nl + intron_len - max_flank; l < max_flank; ++l, ++i, ++w)
					str[0][w] = "acgtn"[nt[i]], str[1][w] = str[2][w] = str[3][w] = ' ';
			}
			nl += intron_len;
			if (op == NS_CIGAR_U || op == NS_CIGAR_V) { // phase-1 or phase-2 intron; print the second half of split codon
				str[0][w] = "ACGTN"[nt[nl]], str[1][w] = '.', str[2][w] = str[3][w] = ' ';
				++w, ++nl;
				if (op == NS_CIGAR_U) {
					str[0][w] = "ACGTN"[nt[nl]], str[1][w] = '.', str[2][w] = str[3][w] = ' ';
					++w, ++nl;
				}
			}
		}
	}
	assert(nl == r->ve - r->vs);
	if (l_nt == r->ve - r->vs + 3 && str[4][w4-1] != '*') { // then print one more codon
		uint8_t n1 = nt[nl], n2 = nt[nl + 1], n3 = nt[nl + 2], nt_aa, codon;
		codon = n1<<4 | n2<<2 | n3;
		nt_aa = n1 > 3 || n2 > 3 || n3 > 3? ns_tab_aa20['X'] : ns_tab_codon[codon];
		str[0][w] = "ACGTN"[n1], str[0][w+1] = "ACGTN"[n2], str[0][w+2] = "ACGTN"[n3];
		str[1][w] = str[4][w4++] = ns_tab_aa_i2c[nt_aa], str[1][w+1] = str[1][w+2] = '.';
		str[2][w] = str[2][w+1] = str[2][w+2] = ' ';
		str[3][w] = str[3][w+1] = str[3][w+2] = ' ';
		w += 3;
	}
	str[0][w] = str[1][w] = str[2][w] = str[3][w] = 0, str[4][w4] = 0;
	kfree(0, nt);
	if (opt->flag & MP_F_SHOW_RESIDUE)
		mp_sprintf_lite(out, "%s\n%s\n%s\n%s\n", str[0], str[1], str[2], str[3]);
	if (opt->flag & MP_F_SHOW_TRANS)
		mp_sprintf_lite(out, "%s\n", str[4]);
	kfree(0, str[0]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rcx, 0x90(%rsp)
movq 0x60(%r8), %r11
testq %r11, %r11
je 0x111e5
movq %r8, %r15
movq %rdi, 0xd0(%rsp)
movq %rdx, 0xc0(%rsp)
movl 0x9c(%rdx), %edx
movslq 0xc(%r11), %rax
testq %rax, %rax
movq %rdx, 0x98(%rsp)
movq %r11, 0x30(%rsp)
jle 0x111f7
leal (%rdx,%rdx), %ecx
leal 0x14(,%rdx,2), %edx
movl $0x8, %r14d
xorl %ebx, %ebx
movl 0x30(%r11,%rbx,4), %r9d
movl %r9d, %r8d
andl $0xf, %r8d
movl %r9d, %edi
shrl $0x4, %edi
cmpl $0x2, %r8d
ja 0x1119d
leal (%rdi,%rdi,2), %edi
addl %edi, %r14d
jmp 0x111d4
andl $0xe, %r9d
cmpl $0xa, %r9d
je 0x111ce
cmpl $0x3, %r8d
setne %r10b
cmpl $0xc, %r9d
setne %r9b
testb %r9b, %r10b
jne 0x111d4
leal -0x3(%rdi), %r9d
cmpl $0x3, %r8d
cmovel %edi, %r9d
cmpl %ecx, %r9d
cmovgl %edx, %edi
addl %r14d, %edi
movl %edi, %r14d
incq %rbx
cmpq %rbx, %rax
jne 0x1117d
movq %rsi, %r13
addl $0x3, %r14d
jmp 0x11200
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r13
movl $0xb, %r14d
movl 0x34(%r15), %r12d
leal (%r14,%r14,4), %eax
movslq %eax, %rsi
xorl %edi, %edi
callq 0x84a5
movq %r14, 0x40(%rsp)
movslq %r14d, %r14
leaq (%rax,%r14), %rsi
leaq (%rsi,%r14), %rdi
movq %r15, %rbp
leaq (%rdi,%r14), %r15
movl $0x54412323, %edx       # imm = 0x54412323
movl %edx, (%rax)
movl $0x94e54, 0x3(%rax)     # imm = 0x94E54
movl $0x94154, %ecx          # imm = 0x94154
movl %ecx, 0x3(%rax,%r14)
movq %rax, %rbx
movl %edx, (%rax,%r14)
movl $0x95341, 0x3(%r14,%rsi) # imm = 0x95341
movq %rsi, 0x20(%rsp)
movl $0x41412323, (%r14,%rsi) # imm = 0x41412323
movl $0x94151, 0x3(%r14,%rdi) # imm = 0x94151
movq %rdi, 0x78(%rsp)
movl $0x51412323, (%r14,%rdi) # imm = 0x51412323
movl %ecx, 0x3(%r14,%r15)
movl $0x54532323, (%r14,%r15) # imm = 0x54532323
movq 0x48(%rbp), %rsi
subq 0x40(%rbp), %rsi
addq $0x3, %rsi
xorl %edi, %edi
callq 0x84a5
movq 0x18(%r13), %rdi
movq %rax, %r8
movl 0x30(%rbp), %esi
movq 0x40(%rbp), %rdx
movq 0x48(%rbp), %rcx
addq $0x3, %rcx
movq %rax, 0x28(%rsp)
callq 0xc6d2
movq 0x48(%rbp), %rsi
movq %rbp, 0x108(%rsp)
subq 0x40(%rbp), %rsi
movq %rax, 0x110(%rsp)
cmpq %rsi, %rax
jl 0x12192
movq %r15, %r10
leaq (%r15,%r14), %rcx
movq %rcx, 0x70(%rsp)
xorl %edx, %edx
movq 0x30(%rsp), %rdi
cmpl $0x0, 0xc(%rdi)
jle 0x11fb2
movq 0x98(%rsp), %rax
addl %eax, %eax
movl %eax, 0xcc(%rsp)
leaq (%rbx,%r14,2), %rax
movq %rax, 0x88(%rsp)
leaq (%r14,%r14,2), %rax
leaq (%rbx,%rax), %rcx
movq %rcx, 0x80(%rsp)
movq 0x28(%rsp), %r9
leaq 0x2(%r9), %rcx
movq %rcx, 0xe0(%rsp)
leaq (%rbx,%r14,4), %rcx
movq %rcx, 0xd8(%rsp)
leaq 0x2(%rbx), %rcx
movq %rcx, 0xb8(%rsp)
leaq 0x2(%rbx,%r14), %rcx
movq %rcx, 0xb0(%rsp)
leaq 0x2(%rbx,%r14,2), %rcx
movq %rcx, 0xa8(%rsp)
leaq 0x2(%rbx,%rax), %rcx
movq %rcx, 0xa0(%rsp)
leaq 0x1(%rbx,%rax), %rax
movq %rax, 0xf8(%rsp)
leaq 0x1(%rbx,%r14,2), %rax
movq %rax, 0xf0(%rsp)
leaq 0x1(%rbx,%r14), %rax
movq %rax, 0xe8(%rsp)
movl $0x6, %ecx
leaq 0x815e(%rip), %rax      # 0x19500
addq $0x58, %rax
movq %rax, 0x100(%rsp)
movb $0x20, %r11b
leaq 0x40aa(%rip), %r13      # 0x15462
xorl %edx, %edx
movl $0x6, %r15d
movl $0x0, 0x8(%rsp)
movq %rbx, 0x60(%rsp)
movq %r10, 0x38(%rsp)
movq 0x40(%rsp), %r8
cmpl %r8d, %ecx
jge 0x12173
movq %rdx, 0x50(%rsp)
movl 0x30(%rdi,%rdx,4), %esi
movl %esi, %ebp
andl $0xf, %ebp
movl %esi, %edi
shrl $0x4, %edi
cmpl $0xb, %ebp
ja 0x1142b
leal (%rdi,%rdi,2), %r14d
movl %ebp, %eax
leaq 0x3edf(%rip), %rdx      # 0x152e4
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
movq %rdi, 0x48(%rsp)
jmpq *%rax
movl %r14d, 0x68(%rsp)
cmpl $0x10, %esi
jae 0x118fb
movq 0x30(%rsp), %rdi
jmp 0x11ace
movq %rcx, %r8
cmpl $0x3, %ebp
setne %al
andl $0xe, %esi
cmpl $0xc, %esi
setne %cl
testb %cl, %al
jne 0x118f3
leal -0x3(%rdi), %edx
cmpl $0x3, %ebp
cmovel %edi, %edx
cmpl $0xc, %esi
movl 0x8(%rsp), %eax
movl %edx, 0x58(%rsp)
movq %rsi, 0x48(%rsp)
jne 0x11be7
movl %r15d, 0x1c(%rsp)
addl %eax, %edi
cmpl $0xc, %ebp
movslq %edi, %rdx
movl %eax, %ecx
leaq -0x2(%r9,%rdx), %rax
movslq %ecx, %r15
leaq 0x1(%r9,%r15), %rcx
cmoveq %rax, %rcx
movzbl (%r9,%r15), %eax
movq 0x100(%rsp), %rdi
movq %rdi, %rsi
cmpq $0x3, %rax
ja 0x114cb
movb (%rcx), %cl
movq %rdi, %rsi
cmpb $0x3, %cl
ja 0x114cb
movb -0x1(%r9,%rdx), %dl
movq %rdi, %rsi
cmpb $0x3, %dl
ja 0x114cb
movl %eax, %esi
shlb $0x4, %sil
shlb $0x2, %cl
orb %dl, %sil
orb %cl, %sil
movzbl %sil, %esi
addq 0x7b0d(%rip), %rsi      # 0x18fd8
movzbl (%rsi), %ecx
movl %r12d, 0xc(%rsp)
movslq %r12d, %rdx
movq %rdx, 0x68(%rsp)
movq 0x90(%rsp), %r13
movzbl (%r13,%rdx), %edx
leaq 0x8010(%rip), %rsi      # 0x19500
movzbl (%rsi,%rdx), %edx
movq 0xc0(%rsp), %rdi
movl 0x94(%rdi), %esi
imull %ecx, %esi
addl %edx, %esi
movslq %esi, %rsi
leaq 0x27df(%rip), %r9       # 0x13cf0
movb (%rax,%r9), %al
cmpb $0x0, 0xa8(%rdi,%rsi)
movq %r8, %rbx
movslq %ebx, %r14
movq 0x60(%rsp), %rsi
movb %al, (%rsi,%r14)
movl $0x20, %eax
movl $0x2b, %esi
cmovgl %esi, %eax
cmpb %dl, %cl
leaq 0x7c86(%rip), %rdx      # 0x191c8
movq (%rdx), %rdx
movb (%rdx,%rcx), %cl
movslq 0x1c(%rsp), %rdx
movq 0x70(%rsp), %rsi
movb %cl, (%rsi,%rdx)
movq 0x20(%rsp), %rdx
movb %cl, (%rdx,%r14)
movl $0x7c, %ecx
cmovel %ecx, %eax
movq 0x78(%rsp), %r12
movb %al, (%r12,%r14)
callq 0x2030
leaq 0x1(%r14), %rcx
incq %r15
movq (%rax), %rax
movq 0x68(%rsp), %rdx
movsbq (%r13,%rdx), %rdx
movb (%rax,%rdx,4), %al
movq 0x38(%rsp), %rdi
movb %al, (%rdi,%r14)
cmpl $0xd, %ebp
jne 0x11bf4
movq 0x28(%rsp), %r9
movzbl (%r9,%r15), %eax
leaq 0x2741(%rip), %rsi      # 0x13cf0
movb (%rax,%rsi), %al
movq 0x60(%rsp), %rsi
movb %al, (%rsi,%rcx)
movq 0x20(%rsp), %r10
movb $0x2e, (%r10,%rcx)
movb $0x20, %r11b
movb %r11b, (%rdi,%rcx)
movb %r11b, (%r12,%rcx)
addl $0x2, %ebx
movl 0x8(%rsp), %eax
addl $0x2, %eax
movq %rbx, %rcx
leaq 0x3e7f(%rip), %r13      # 0x15462
jmp 0x11c0b
movl %r14d, 0x68(%rsp)
cmpl $0x10, %esi
jb 0x1174f
movl %r12d, 0xc(%rsp)
movq %rcx, 0x10(%rsp)
movslq %ecx, %rax
movslq %r15d, %rcx
movslq 0x8(%rsp), %rdx
addq 0xe0(%rsp), %rdx
addq 0xd8(%rsp), %rcx
movq %rsi, %r9
movq 0xb8(%rsp), %rsi
addq %rax, %rsi
movq 0xb0(%rsp), %rdi
addq %rax, %rdi
movq 0xa8(%rsp), %r8
addq %rax, %r8
addq 0xa0(%rsp), %rax
shrl $0x4, %r9d
leaq (%r9,%r9,2), %r9
xorl %r10d, %r10d
leaq 0x80a7(%rip), %r13      # 0x19700
movzbl -0x2(%rdx,%r10), %r11d
movl %r11d, %ebx
shlb $0x4, %bl
movb -0x1(%rdx,%r10), %r14b
movb (%rdx,%r10), %bpl
movl %r15d, %r12d
leal (,%r14,4), %r15d
orb %bl, %r15b
orb %bpl, %r15b
movzbl %r15b, %ebx
addq %r13, %rbx
cmpb $0x4, %bpl
leaq 0x265f(%rip), %rbp      # 0x13cf0
leaq 0x7e68(%rip), %r15      # 0x19500
leaq 0x58(%r15), %r15
cmovaeq %r15, %rbx
cmpb $0x4, %r14b
cmovaeq %r15, %rbx
cmpq $0x4, %r11
cmovaeq %r15, %rbx
movl %r12d, %r15d
movzbl (%rbx), %ebx
movb (%r11,%rbp), %r11b
movb %r11b, -0x2(%rsi,%r10)
movzbl -0x1(%rdx,%r10), %r11d
movb (%r11,%rbp), %r11b
movb %r11b, -0x1(%rsi,%r10)
movzbl (%rdx,%r10), %r11d
movb (%r11,%rbp), %r11b
leaq 0x7aea(%rip), %r14      # 0x191c8
movb %r11b, (%rsi,%r10)
movq (%r14), %r11
movb (%r11,%rbx), %r11b
movb %r11b, (%rcx)
movb %r11b, -0x2(%rdi,%r10)
movb $0x20, %r11b
movw $0x2e2e, -0x1(%rdi,%r10) # imm = 0x2E2E
movb %r11b, (%r8,%r10)
movw $0x2020, -0x2(%r8,%r10) # imm = 0x2020
movw $0x202d, -0x2(%rax,%r10) # imm = 0x202D
movb %r11b, (%rax,%r10)
addq $0x3, %r10
incq %rcx
incl %r15d
cmpl %r10d, %r9d
jne 0x11659
movq 0x10(%rsp), %rcx
addl %r10d, %ecx
movq 0x38(%rsp), %r10
movq 0x28(%rsp), %r9
movq 0x40(%rsp), %r8
movl 0xc(%rsp), %r12d
movq 0x60(%rsp), %rbx
leaq 0x3d13(%rip), %r13      # 0x15462
movl 0x68(%rsp), %eax
addl %eax, 0x8(%rsp)
jmp 0x118cd
cmpl $0x10, %esi
jb 0x11837
movq %r8, %r14
movl %r15d, 0x1c(%rsp)
movq %rcx, %rbx
movq %rdi, %r15
callq 0x2030
movl %r12d, %edx
movq %rbx, %r12
movslq %ebx, %rcx
movl %edx, %ebp
movslq %edx, %rdx
addq 0x90(%rsp), %rdx
leaq (%r15,%r15,2), %rsi
movq 0xb8(%rsp), %rdi
addq %rcx, %rdi
movq 0xb0(%rsp), %r8
addq %rcx, %r8
movq 0xa8(%rsp), %r9
addq %rcx, %r9
addq 0xa0(%rsp), %rcx
xorl %r10d, %r10d
movw $0x2020, %r11w          # imm = 0x2020
movb $0x2d, (%rdi,%r10)
movw $0x2d2d, -0x2(%rdi,%r10) # imm = 0x2D2D
movw $0x2e2d, -0x2(%r8,%r10) # imm = 0x2E2D
movb $0x2e, (%r8,%r10)
movb $0x20, (%r9,%r10)
movw %r11w, -0x2(%r9,%r10)
movq (%rax), %r11
movsbq (%rdx), %rbx
movb (%r11,%rbx,4), %r11b
movb %r11b, -0x2(%rcx,%r10)
movw $0x2020, %r11w          # imm = 0x2020
movw %r11w, -0x1(%rcx,%r10)
incq %rdx
addq $0x3, %r10
cmpq %r10, %rsi
jne 0x117c3
movq %r12, %rcx
addl %r10d, %ecx
movq 0x28(%rsp), %r9
movl %ebp, %r12d
movq 0x60(%rsp), %rbx
movl 0x1c(%rsp), %r15d
movb $0x20, %r11b
movq %r14, %r8
movq 0x38(%rsp), %r10
movq 0x48(%rsp), %rdi
addl %r12d, %edi
movl %edi, %r12d
jmp 0x118cd
cmpl $0x10, %esi
jb 0x118c5
movq %rsi, %r14
movq 0x20(%rsp), %rsi
movq %rcx, 0x10(%rsp)
movslq %ecx, %rax
movslq 0x8(%rsp), %rcx
addq %r9, %rcx
leaq (%rbx,%rax), %rdx
addq %rax, %rsi
movq 0x80(%rsp), %rdi
addq %rax, %rdi
addq 0x88(%rsp), %rax
shrl $0x4, %r14d
xorl %r8d, %r8d
leaq 0x2469(%rip), %rbp      # 0x13cf0
movzbl (%rcx,%r8), %r9d
movb (%r9,%rbp), %r9b
movb %r9b, (%rdx,%r8)
movb $0x21, (%rsi,%r8)
movb %r11b, (%rdi,%r8)
movb %r11b, (%rax,%r8)
incq %r8
cmpl %r8d, %r14d
jne 0x11887
movq 0x10(%rsp), %rcx
addl %r8d, %ecx
movq 0x38(%rsp), %r10
movq 0x28(%rsp), %r9
movq 0x40(%rsp), %r8
movq 0x48(%rsp), %rdi
addl 0x8(%rsp), %edi
movl %edi, 0x8(%rsp)
movq 0x50(%rsp), %rdx
movq 0x30(%rsp), %rdi
jmp 0x11f6f
cmpl $0x10, %esi
jae 0x11ae6
movl 0x8(%rsp), %eax
movq 0x30(%rsp), %rdi
jmp 0x11bcf
movq %r8, %rcx
jmp 0x11f60
movq %rcx, %rbx
movq %rsi, %r14
callq 0x2030
movq %rax, 0x58(%rsp)
movq %rbx, 0x10(%rsp)
movslq %ebx, %rcx
movl %r15d, 0x1c(%rsp)
movslq %r15d, %rax
movslq 0x8(%rsp), %rsi
movl %r12d, 0xc(%rsp)
movslq %r12d, %rdi
addq 0x90(%rsp), %rdi
addq 0xe0(%rsp), %rsi
addq 0xd8(%rsp), %rax
movq 0xb8(%rsp), %rdx
leaq (%rdx,%rcx), %r8
movq 0xb0(%rsp), %rdx
leaq (%rdx,%rcx), %r9
movq 0xa8(%rsp), %rdx
leaq (%rdx,%rcx), %r10
addq 0xa0(%rsp), %rcx
shrl $0x4, %r14d
leaq (%r14,%r14,2), %r14
xorl %r11d, %r11d
xorl %ebp, %ebp
movzbl -0x2(%rsi,%r11), %ebx
movl %ebx, %r15d
shlb $0x4, %r15b
movb -0x1(%rsi,%r11), %r12b
movb (%rsi,%r11), %r13b
leal (,%r12,4), %edx
orb %r15b, %dl
orb %r13b, %dl
movzbl %dl, %edx
addq 0x7631(%rip), %rdx      # 0x18fd8
cmpb $0x4, %r13b
leaq 0x7b4e(%rip), %r13      # 0x19500
leaq 0x58(%r13), %r15
cmovaeq %r15, %rdx
cmpb $0x4, %r12b
cmovaeq %r15, %rdx
cmpq $0x4, %rbx
cmovaeq %r15, %rdx
movzbl (%rdx), %r15d
movzbl (%rdi,%rbp), %edx
movzbl (%r13,%rdx), %r12d
movq 0xc0(%rsp), %r13
movl 0x94(%r13), %edx
imull %r15d, %edx
addl %r12d, %edx
movslq %edx, %rdx
cmpb $0x0, 0xa8(%r13,%rdx)
leaq 0x22ef(%rip), %r13      # 0x13cf0
movb (%rbx,%r13), %dl
movb %dl, -0x2(%r8,%r11)
movzbl -0x1(%rsi,%r11), %edx
movb (%rdx,%r13), %dl
movb %dl, -0x1(%r8,%r11)
movzbl (%rsi,%r11), %edx
movb (%rdx,%r13), %dl
movb %dl, (%r8,%r11)
leaq 0x779b(%rip), %rdx      # 0x191c8
movq (%rdx), %rdx
movb (%rdx,%r15), %dl
movb %dl, (%rax,%rbp)
movb %dl, -0x2(%r9,%r11)
movw $0x2e2e, -0x1(%r9,%r11) # imm = 0x2E2E
movl $0x2b, %ebx
jg 0x11a50
movl $0x20, %ebx
cmpb %r12b, %r15b
movl $0x7c, %edx
cmovel %edx, %ebx
movb %bl, -0x2(%r10,%r11)
movw $0x2020, %r15w          # imm = 0x2020
movw %r15w, -0x1(%r10,%r11)
movq 0x58(%rsp), %rdx
movq (%rdx), %rdx
movsbq (%rdi,%rbp), %rbx
movb (%rdx,%rbx,4), %dl
movb %dl, -0x2(%rcx,%r11)
movw %r15w, -0x1(%rcx,%r11)
incq %rbp
addq $0x3, %r11
cmpl %r11d, %r14d
jne 0x11979
movl 0x1c(%rsp), %r15d
addl %ebp, %r15d
movq 0x10(%rsp), %rcx
addl %r11d, %ecx
movq 0x60(%rsp), %rbx
movq 0x38(%rsp), %r10
movq 0x28(%rsp), %r9
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %r8
movl 0xc(%rsp), %r12d
movb $0x20, %r11b
leaq 0x3994(%rip), %r13      # 0x15462
movl 0x68(%rsp), %eax
addl %eax, 0x8(%rsp)
movq 0x48(%rsp), %rax
addl %r12d, %eax
movl %eax, %r12d
jmp 0x11bdd
movl %r15d, 0x1c(%rsp)
movl %r12d, 0xc(%rsp)
movslq %r12d, %rax
movq %rax, 0x58(%rsp)
movq %rcx, %rax
movq %rcx, 0x10(%rsp)
movslq %eax, %r10
movslq 0x8(%rsp), %r12
addq %r9, %r12
leaq (%rbx,%r10), %rdx
movq 0x20(%rsp), %rax
leaq (%rax,%r10), %r13
movq 0x88(%rsp), %rax
leaq (%rax,%r10), %r15
addq 0x80(%rsp), %r10
shrl $0x4, %esi
xorl %r14d, %r14d
movq %rdx, 0x68(%rsp)
movzbl (%r12,%r14), %eax
leaq 0x21ad(%rip), %rcx      # 0x13cf0
movb (%rax,%rcx), %al
movb %al, (%rdx,%r14)
movb $0x24, (%r13,%r14)
movb $0x20, (%r15,%r14)
movb $0x20, %al
testl %r14d, %r14d
jne 0x11b8d
movq %rsi, %rbp
movq %r10, %rbx
callq 0x2030
movq %rbx, %r10
movq %rbp, %rsi
movb $0x20, %r11b
movq (%rax), %rax
movq 0x90(%rsp), %rcx
movq 0x58(%rsp), %rdx
movsbq (%rcx,%rdx), %rcx
movq 0x68(%rsp), %rdx
movb (%rax,%rcx,4), %al
movb %al, (%r10,%r14)
incq %r14
cmpl %r14d, %esi
jne 0x11b37
movq 0x10(%rsp), %rcx
addl %r14d, %ecx
movq 0x60(%rsp), %rbx
movq 0x38(%rsp), %r10
movq 0x28(%rsp), %r9
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %r8
movl 0xc(%rsp), %r12d
movl 0x1c(%rsp), %r15d
leaq 0x3897(%rip), %r13      # 0x15462
movl 0x8(%rsp), %eax
movq 0x48(%rsp), %rdx
addl %eax, %edx
incl %r12d
movl %edx, 0x8(%rsp)
movq 0x50(%rsp), %rdx
jmp 0x11f6f
movq %r8, %rcx
movq %r10, %rdi
movq 0x20(%rsp), %r10
jmp 0x11c29
movl %r15d, %eax
movq 0x28(%rsp), %r9
movb $0x20, %r11b
leaq 0x385c(%rip), %r13      # 0x15462
movq 0x20(%rsp), %r10
movq 0x48(%rsp), %rsi
movl 0x1c(%rsp), %r15d
incl %r15d
movl 0xc(%rsp), %r12d
incl %r12d
movq 0x60(%rsp), %rbx
movl 0x58(%rsp), %edx
cmpl 0xcc(%rsp), %edx
jle 0x11d6e
movl %eax, 0x8(%rsp)
movq 0x98(%rsp), %r10
testl %r10d, %r10d
movl %r12d, 0xc(%rsp)
jle 0x11cb3
movq %rdi, %r14
movb $0x20, %r11b
movq %rcx, 0x10(%rsp)
movslq %ecx, %rax
movslq 0x8(%rsp), %rcx
addq %r9, %rcx
leaq (%rbx,%rax), %rdx
movq 0x80(%rsp), %rsi
addq %rax, %rsi
movq 0x88(%rsp), %rdi
addq %rax, %rdi
addq 0x20(%rsp), %rax
xorl %r8d, %r8d
movzbl (%rcx,%r8), %r9d
movb (%r9,%r13), %r9b
movb %r9b, (%rdx,%r8)
movb %r11b, (%rsi,%r8)
movb %r11b, (%rdi,%r8)
movb %r11b, (%rax,%r8)
incq %r8
cmpl %r8d, %r10d
jne 0x11c84
movq 0x10(%rsp), %rcx
addl %r8d, %ecx
movb $0x20, %r11b
movq %r14, %rdi
movq %rcx, 0x10(%rsp)
movslq %ecx, %r12
movb $0x7e, (%rbx,%r12)
movq 0x78(%rsp), %rax
movb %r11b, (%rax,%r12)
movq 0x20(%rsp), %rax
movb %r11b, (%rax,%r12)
movq %rbx, %rax
leal 0x1(%r12), %ebx
movq %rdi, %r14
movb %r11b, (%rdi,%r12)
leaq (%rax,%r12), %rdi
incq %rdi
movq 0x40(%rsp), %rax
subl %ebx, %eax
movslq %eax, %rsi
leaq 0x36ec(%rip), %rdx      # 0x153e5
movl 0x58(%rsp), %ecx
xorl %eax, %eax
callq 0x2120
testl %eax, %eax
jle 0x11df8
movq 0xf8(%rsp), %rcx
addq %r12, %rcx
movq 0xf0(%rsp), %rdx
addq %r12, %rdx
movq 0xe8(%rsp), %rsi
addq %r12, %rsi
shlq $0x20, %r12
movabsq $0x100000000, %r8       # imm = 0x100000000
addq %r8, %r12
movl %eax, %eax
xorl %edi, %edi
movb $0x20, %r11b
movb %r11b, (%rcx,%rdi)
movb %r11b, (%rdx,%rdi)
movb %r11b, (%rsi,%rdi)
incq %rdi
addq %r8, %r12
cmpl %edi, %eax
jne 0x11d45
movq 0x10(%rsp), %rax
leal (%rax,%rdi), %ebx
incl %ebx
sarq $0x20, %r12
jmp 0x11dfe
testl %edx, %edx
jle 0x11ee1
movb $0x20, %r11b
movq %rcx, 0x10(%rsp)
movl %edx, %r8d
movl %eax, %edx
movslq %ecx, %rax
movl %edx, 0x8(%rsp)
movslq %edx, %rcx
addq %r9, %rcx
leaq (%rbx,%rax), %rdx
movq 0x80(%rsp), %rsi
addq %rax, %rsi
movq 0x88(%rsp), %rdi
addq %rax, %rdi
movq %r10, %r14
addq %r10, %rax
movl %r8d, %r8d
xorl %r9d, %r9d
movzbl (%rcx,%r9), %r10d
movb (%r10,%r13), %r10b
movb %r10b, (%rdx,%r9)
movb %r11b, (%rsi,%r9)
movb %r11b, (%rdi,%r9)
movb %r11b, (%rax,%r9)
incq %r9
cmpl %r9d, %r8d
jne 0x11db6
movq 0x10(%rsp), %rcx
addl %r9d, %ecx
movb $0x20, %r11b
movl 0x8(%rsp), %eax
movq %r14, %r10
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %r9
jmp 0x11ebd
incq %r12
movb $0x20, %r11b
movq 0x20(%rsp), %r8
movl %ebx, %ecx
incl %ecx
movq 0x60(%rsp), %rbx
movb $0x7e, (%rbx,%r12)
movq 0x78(%rsp), %rax
movb %r11b, (%rax,%r12)
movb %r11b, (%r8,%r12)
movb %r11b, (%r14,%r12)
movq 0x98(%rsp), %r10
testl %r10d, %r10d
movl 0x58(%rsp), %edx
jle 0x11ec8
movq %rcx, %rax
movl %edx, %ecx
subl %r10d, %ecx
addl 0x8(%rsp), %ecx
movb $0x20, %r11b
movq %rax, 0x10(%rsp)
cltq
movslq %ecx, %rcx
movq 0x28(%rsp), %rdx
movq %rdx, %r14
addq %rdx, %rcx
leaq (%rbx,%rax), %rdx
movq 0x80(%rsp), %rsi
addq %rax, %rsi
movq 0x88(%rsp), %rdi
addq %rax, %rdi
addq %r8, %rax
xorl %r8d, %r8d
movl 0xc(%rsp), %r12d
movzbl (%rcx,%r8), %r9d
movb (%r9,%r13), %r9b
movb %r9b, (%rdx,%r8)
movb %r11b, (%rsi,%r8)
movb %r11b, (%rdi,%r8)
movb %r11b, (%rax,%r8)
incq %r8
cmpl %r8d, %r10d
jne 0x11e80
movq 0x10(%rsp), %rcx
addl %r8d, %ecx
movb $0x20, %r11b
movl 0x8(%rsp), %eax
movq 0x20(%rsp), %r10
movq %r14, %r9
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x58(%rsp), %edx
jmp 0x11ee1
movq %r14, %rdi
movq 0x28(%rsp), %r9
movl 0xc(%rsp), %r12d
movl 0x8(%rsp), %eax
movq %r8, %r10
movq 0x48(%rsp), %rsi
addl %edx, %eax
cmpl $0xc, %esi
jne 0x11f59
movslq %eax, %rdx
movslq %ecx, %rsi
movl %eax, %r14d
leaq 0x1(%rsi), %rax
movq %rcx, 0x10(%rsp)
leaq 0x1(%rdx), %rcx
movzbl (%r9,%rdx), %edx
leaq 0x1de6(%rip), %r8       # 0x13cf0
movb (%rdx,%r8), %dl
movb %dl, (%rbx,%rsi)
movb $0x2e, (%r10,%rsi)
movb %r11b, (%rdi,%rsi)
movq 0x78(%rsp), %rdx
movb %r11b, (%rdx,%rsi)
cmpl $0xc, %ebp
jne 0x11f81
movzbl (%r9,%rcx), %ecx
movb (%rcx,%r8), %cl
movb %cl, (%rbx,%rax)
movb $0x2e, (%r10,%rax)
movq 0x38(%rsp), %r10
movb %r11b, (%r10,%rax)
movb %r11b, (%rdx,%rax)
movq 0x10(%rsp), %rcx
addl $0x2, %ecx
addl $0x2, %r14d
movl %r14d, 0x8(%rsp)
jmp 0x11f60
movq %rdi, %r10
movl %eax, 0x8(%rsp)
movq 0x50(%rsp), %rdx
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %r8
incq %rdx
movslq 0xc(%rdi), %rax
cmpq %rax, %rdx
jl 0x113d7
jmp 0x11f98
movl %ecx, 0x8(%rsp)
movl %eax, %ecx
movq 0x50(%rsp), %rdx
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %r10
jmp 0x11f6a
movq %rcx, %r9
movq 0x108(%rsp), %rcx
movq 0x48(%rcx), %rsi
subq 0x40(%rcx), %rsi
movslq 0x8(%rsp), %rdx
jmp 0x11fbe
movl $0x6, %r15d
movl $0x6, %r9d
cmpq %rdx, %rsi
movq 0x78(%rsp), %r12
jne 0x121b1
leaq 0x3(%rdx), %rax
cmpq %rax, 0x110(%rsp)
jne 0x120c6
movslq %r15d, %rax
movq 0x70(%rsp), %rcx
cmpb $0x2a, -0x1(%rcx,%rax)
je 0x120c6
movq 0x28(%rsp), %r8
movzbl (%r8,%rdx), %ecx
cmpq $0x4, %rcx
setae %dil
movb 0x1(%r8,%rdx), %sil
movb 0x2(%r8,%rdx), %dl
movzbl %sil, %esi
movzbl %dl, %edx
cmpb $0x4, %sil
setae %r8b
orb %dil, %r8b
cmpb $0x4, %dl
setae %dil
orb %r8b, %dil
je 0x12038
leaq 0x74ce(%rip), %rdi      # 0x19500
addq $0x58, %rdi
jmp 0x12057
movl %ecx, %edi
shlb $0x4, %dil
leal (,%rsi,4), %r8d
orb %dl, %dil
orb %r8b, %dil
movzbl %dil, %edi
addq 0x6f81(%rip), %rdi      # 0x18fd8
movzbl (%rdi), %edi
leaq 0x1c8f(%rip), %r8       # 0x13cf0
movb (%rcx,%r8), %cl
movslq %r9d, %r9
movb %cl, (%rbx,%r9)
movb (%rsi,%r8), %cl
movb %cl, 0x1(%rbx,%r9)
movb (%rdx,%r8), %cl
movb %cl, 0x2(%rbx,%r9)
leaq 0x7143(%rip), %rcx      # 0x191c8
movq (%rcx), %rcx
movb (%rcx,%rdi), %cl
leal 0x1(%rax), %r15d
movq 0x70(%rsp), %rdx
movb %cl, (%rdx,%rax)
movq 0x20(%rsp), %rax
movb %cl, (%rax,%r9)
movw $0x2e2e, 0x1(%rax,%r9)  # imm = 0x2E2E
movb $0x20, %al
movb %al, 0x2(%r12,%r9)
movw $0x2020, %cx            # imm = 0x2020
movw %cx, (%r12,%r9)
movb %al, 0x2(%r10,%r9)
movw %cx, (%r10,%r9)
addl $0x3, %r9d
movslq %r9d, %rax
xorl %ecx, %ecx
movb %cl, (%r10,%rax)
movb %cl, (%r12,%rax)
movq 0x20(%rsp), %r8
movb %cl, (%r8,%rax)
movb %cl, (%rbx,%rax)
movslq %r15d, %rax
movq 0x70(%rsp), %rdx
movb %cl, (%rdx,%rax)
movq %r10, %r14
xorl %edi, %edi
movq 0x28(%rsp), %rsi
movq %r8, %r15
callq 0x83df
movq 0xc0(%rsp), %rcx
movl (%rcx), %eax
testb %al, %al
jns 0x12137
leaq 0x3445(%rip), %rsi      # 0x15556
movq 0xd0(%rsp), %rdi
movq %r14, %r9
movq %rbx, %r14
movq %rcx, %rbx
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0xf8b8
movl (%rbx), %eax
movq %r14, %rbx
btl $0x8, %eax
jae 0x12158
leaq 0x341b(%rip), %rsi      # 0x1555f
movq 0xd0(%rsp), %rdi
movq 0x70(%rsp), %rdx
xorl %eax, %eax
callq 0xf8b8
xorl %edi, %edi
movq %rbx, %rsi
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x83df
leaq 0x33d2(%rip), %rdi      # 0x1554c
leaq 0x3283(%rip), %rsi      # 0x15404
leaq 0x3359(%rip), %rcx      # 0x154e1
movl $0xdf, %edx
callq 0x2150
leaq 0x3332(%rip), %rdi      # 0x154cb
leaq 0x3264(%rip), %rsi      # 0x15404
leaq 0x333a(%rip), %rcx      # 0x154e1
movl $0xdc, %edx
callq 0x2150
leaq 0x32c8(%rip), %rdi      # 0x15480
leaq 0x3245(%rip), %rsi      # 0x15404
leaq 0x331b(%rip), %rcx      # 0x154e1
movl $0x139, %edx            # imm = 0x139
callq 0x2150