// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/ace2sam.c
// Function: main
int main(int argc, char *argv[])
{
	gzFile fp;
	kstream_t *ks;
	kstring_t s, t[N_TMPSTR];
	int dret, i, k, af_n, af_max, af_i, c, is_padded = 0, write_cns = 0, *p2u = 0;
	long m_cigar = 0, n_cigar = 0;
	unsigned *af, *cigar = 0;

	while ((c = getopt(argc, argv, "pc")) >= 0) {
		switch (c) {
			case 'p': is_padded = 1; break;
			case 'c': write_cns = 1; break;
		}
	}
	if (argc == optind) {
		fprintf(stderr, "\nUsage:   ace2sam [-pc] <in.ace>\n\n");
		fprintf(stderr, "Options: -p     output padded SAM\n");
		fprintf(stderr, "         -c     write the contig sequence in SAM\n\n");
		fprintf(stderr, "Notes: 1. Fields must appear in the following order: (CO->[BQ]->(AF)->(RD->QA))\n");
		fprintf(stderr, "       2. The order of reads in AF and in RD must be identical\n");
		fprintf(stderr, "       3. Except in BQ, words and numbers must be separated by a single SPACE or TAB\n");
		fprintf(stderr, "       4. This program writes the headerless SAM to stdout and header to stderr\n\n");
		return 1;
	}

	s.l = s.m = 0; s.s = 0;
	af_n = af_max = af_i = 0; af = 0;
	for (i = 0; i < N_TMPSTR; ++i) t[i].l = t[i].m = 0, t[i].s = 0;
	fp = strcmp(argv[1], "-")? gzopen(argv[optind], "r") : gzdopen(fileno(stdin), "r");
	ks = ks_init(fp);
	while (ks_getuntil(ks, 0, &s, &dret) >= 0) {
		if (strcmp(s.s, "CO") == 0) { // contig sequence
			kstring_t *cns;
			t[0].l = t[1].l = t[2].l = t[3].l = t[4].l = 0; // 0: name; 1: padded ctg; 2: unpadded ctg/padded read; 3: unpadded read; 4: SAM line
			af_n = af_i = 0; // reset the af array
			ks_getuntil(ks, 0, &s, &dret); kputs(s.s, &t[0]); // contig name
			ks_getuntil(ks, '\n', &s, &dret); // read the whole line
			while (ks_getuntil(ks, '\n', &s, &dret) >= 0 && s.l > 0) kputsn(s.s, s.l, &t[1]); // read the padded consensus sequence
			remove_pads(&t[1], &t[2]); // construct the unpadded sequence
			// compute the array for mapping padded positions to unpadded positions
			p2u = realloc(p2u, t[1].m * sizeof(int));
			for (i = k = 0; i < t[1].l; ++i) {
				p2u[i] = k;
				if (t[1].s[i] != '*') ++k;
			}
			// write out the SAM header and contig sequences
			fprintf(stderr, "H @SQ\tSN:%s\tLN:%ld\n", t[0].s, t[is_padded?1:2].l); // The SAM header line
			cns = &t[is_padded?1:2];
			fprintf(stderr, "S >%s\n", t[0].s);
			for (i = 0; i < cns->l; i += LINE_LEN) {
				fputs("S ", stderr);
				for (k = 0; k < LINE_LEN && i + k < cns->l; ++k)
					fputc(cns->s[i + k], stderr);
				fputc('\n', stderr);
			}

#define __padded2cigar(sp) do { \
		int i, l_M = 0, l_D = 0; \
		for (i = 0; i < sp.l; ++i) { \
			if (sp.s[i] == '*') { \
				if (l_M) write_cigar(cigar, n_cigar, m_cigar, l_M<<4); \
				++l_D; l_M = 0; \
			} else { \
				if (l_D) write_cigar(cigar, n_cigar, m_cigar, l_D<<4 | 2); \
				++l_M; l_D = 0; \
			} \
		} \
		if (l_M) write_cigar(cigar, n_cigar, m_cigar, l_M<<4); \
		else write_cigar(cigar, n_cigar, m_cigar, l_D<<4 | 2); \
	} while (0)

			if (write_cns) { // write the consensus SAM line (dummy read)
				n_cigar = 0;
				if (is_padded) __padded2cigar(t[1]);
				else write_cigar(cigar, n_cigar, m_cigar, t[2].l<<4);
				kputsn(t[0].s, t[0].l, &t[4]); kputs("\t516\t", &t[4]); kputsn(t[0].s, t[0].l, &t[4]); kputs("\t1\t60\t", &t[4]);
				for (i = 0; i < n_cigar; ++i) {
					kputw(cigar[i]>>4, &t[4]); kputc("MIDNSHP=X"[cigar[i]&0xf], &t[4]);
				}
				kputs("\t*\t0\t0\t", &t[4]); kputsn(t[2].s, t[2].l, &t[4]); kputs("\t*", &t[4]);
			}
		} else if (strcmp(s.s, "BQ") == 0) { // contig quality
			if (t[0].l == 0) fatal("come to 'BQ' before reading 'CO'");
			if (dret != '\n') ks_getuntil(ks, '\n', &s, &dret); // read the entire "BQ" line
			if (write_cns) t[4].s[--t[4].l] = 0; // remove the trailing "*"
			for (i = 0; i < t[2].l; ++i) { // read the consensus quality
				int q;
				if (ks_getuntil(ks, 0, &s, &dret) < 0) fprintf(stderr, "E truncated contig quality\n");
				if (s.l) {
					q = atoi(s.s) + 33;
					if (q > 126) q = 126;
					if (write_cns) kputc(q, &t[4]);
				} else --i;
			}
			if (dret != '\n') ks_getuntil(ks, '\n', &s, &dret);
			ks_getuntil(ks, '\n', &s, &dret); // skip the empty line
			if (write_cns) puts(t[4].s); t[4].l = 0;
		} else if (strcmp(s.s, "AF") == 0) { // padded read position
			int reversed, neg, pos;
			if (t[0].l == 0) fatal("come to 'AF' before reading 'CO'");
			if (write_cns) {
				if (t[4].l) puts(t[4].s);
				t[4].l = 0;
			}
			ks_getuntil(ks, 0, &s, &dret); // read name
			ks_getuntil(ks, 0, &s, &dret); reversed = s.s[0] == 'C'? 1 : 0; // strand
			ks_getuntil(ks, 0, &s, &dret); pos = atoi(s.s); neg = pos < 0? 1 : 0; pos = pos < 0? -pos : pos; // position
			if (af_n == af_max) { // double the af array
				af_max = af_max? af_max<<1 : 4;
				af = realloc(af, af_max * sizeof(unsigned));
			}
			af[af_n++] = pos << 2 | neg << 1 | reversed; // keep the placement information
		} else if (strcmp(s.s, "RD") == 0) { // read sequence
			if (af_i >= af_n) fatal("more 'RD' records than 'AF'");
			t[2].l = t[3].l = t[4].l = 0;
			ks_getuntil(ks, 0, &t[4], &dret); // QNAME
			if (dret != '\n') ks_getuntil(ks, '\n', &s, &dret); // read the entire RD line
			while (ks_getuntil(ks, '\n', &s, &dret) >= 0 && s.l > 0) kputs(s.s, &t[2]); // read the read sequence
		} else if (strcmp(s.s, "QA") == 0) { // clipping
			if (af_i >= af_n) fatal("more 'QA' records than 'AF'");
			int beg, end, pos, op;
			ks_getuntil(ks, 0, &s, &dret); ks_getuntil(ks, 0, &s, &dret); // skip quality clipping
			ks_getuntil(ks, 0, &s, &dret); beg = atoi(s.s) - 1; // align clipping start
			ks_getuntil(ks, 0, &s, &dret); end = atoi(s.s); // clipping end
			if (dret != '\n') ks_getuntil(ks, '\n', &s, &dret);
			// compute 1-based POS
			pos = af[af_i]>>2; // retrieve the position information
			if (af[af_i]>>1&1) pos = -pos;
			pos += beg; // now pos is the true padded position
			// generate CIGAR
			remove_pads(&t[2], &t[3]); // backup the unpadded read sequence
			n_cigar = 0;
			if (beg) write_cigar(cigar, n_cigar, m_cigar, beg<<4|4);
			if (is_padded) {
				__padded2cigar(t[2]);
				if (beg && n_cigar > 1) cigar[1] -= beg<<4; // fix the left-hand CIGAR 
				if (end < t[2].l && n_cigar) cigar[n_cigar-1] -= (t[2].l - end)<<4; // fix the right-hand CIGAR
			} else {
				// generate flattened CIGAR string
				for (i = beg, k = pos - 1; i < end; ++i, ++k)
					t[2].s[i] = t[2].s[i] != '*'? (t[1].s[k] != '*'? 0 : 1) : (t[1].s[k] != '*'? 2 : 6);
				// generate the proper CIGAR
				for (i = beg + 1, k = 1, op = t[2].s[beg]; i < end; ++i) {
					if (op != t[2].s[i]) {
						write_cigar(cigar, n_cigar, m_cigar, k<<4|op);
						op = t[2].s[i]; k = 1;
					} else ++k;
				}
				write_cigar(cigar, n_cigar, m_cigar, k<<4|op);
				// remove unnecessary "P" and possibly merge adjacent operations
				for (i = 2; i < n_cigar; ++i) {
					if ((cigar[i]&0xf) != 1 && (cigar[i-1]&0xf) == 6 && (cigar[i-2]&0xf) != 1) {
						cigar[i-1] = 0;
						if ((cigar[i]&0xf) == (cigar[i-2]&0xf)) // merge operations
							cigar[i] += cigar[i-2], cigar[i-2] = 0;
					}
				}
				for (i = k = 0; i < n_cigar; ++i) // squeeze out dumb operations
					if (cigar[i]) cigar[k++] = cigar[i];
				n_cigar = k;
			}
			if (end < t[2].l) write_cigar(cigar, n_cigar, m_cigar, (t[2].l - end)<<4|4);
			// write the SAM line for the read
			kputc('\t', &t[4]); // QNAME has already been written
			kputw((af[af_i]&1)? 16 : 0, &t[4]); kputc('\t', &t[4]); // FLAG
			kputsn(t[0].s, t[0].l, &t[4]); kputc('\t', &t[4]); // RNAME
			kputw(is_padded? pos : p2u[pos-1]+1, &t[4]); // POS
			kputs("\t60\t", &t[4]); // MAPQ
			for (i = 0; i < n_cigar; ++i) { // CIGAR
				kputw(cigar[i]>>4, &t[4]); kputc("MIDNSHP=X"[cigar[i]&0xf], &t[4]);
			}
			kputs("\t*\t0\t0\t", &t[4]); // empty MRNM, MPOS and TLEN
			kputsn(t[3].s, t[3].l, &t[4]); // unpadded SEQ
			kputs("\t*", &t[4]); // QUAL
			puts(t[4].s); // print to stdout
			++af_i;
		} else if (dret != '\n') ks_getuntil(ks, '\n', &s, &dret);
	}
	ks_destroy(ks);
	gzclose(fp);
	free(af); free(s.s); free(cigar); free(p2u);
	for (i = 0; i < N_TMPSTR; ++i) free(t[i].s);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x2b6b(%rip), %rdx      # 0x4004
callq 0x1120
testl %eax, %eax
js 0x14e9
xorl %r15d, %r15d
leaq 0x2b58(%rip), %r14      # 0x4004
xorl %r12d, %r12d
cmpl $0x63, %eax
je 0x14c1
cmpl $0x70, %eax
jne 0x14c7
movl $0x1, %r12d
jmp 0x14c7
movl $0x1, %r15d
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1120
testl %eax, %eax
jns 0x14af
testl %r12d, %r12d
sete 0x3(%rsp)
testl %r15d, %r15d
sete %r13b
jmp 0x14f1
movb $0x1, 0x3(%rsp)
movb $0x1, %r13b
movq 0x4ae0(%rip), %rax      # 0x5fd8
movslq (%rax), %rax
cmpl %ebp, %eax
je 0x30c1
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
xorl %ecx, %ecx
movq %rcx, 0xb0(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %rcx, 0x80(%rsp)
movq 0x8(%rbx), %rcx
cmpb $0x2d, (%rcx)
jne 0x1556
cmpb $0x0, 0x1(%rcx)
je 0x309f
movq (%rbx,%rax,8), %rdi
leaq 0x2c58(%rip), %rsi      # 0x41b9
callq 0x1110
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x10a0
movq %rax, %r14
movq %r15, 0x18(%rax)
movl $0x4000, %edi           # imm = 0x4000
callq 0x10f0
movq %rax, (%r14)
leaq 0xa0(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rdi
xorl %esi, %esi
callq 0x30e1
testl %eax, %eax
js 0x3017
leaq 0x40(%rsp), %rcx
cmpb $0x0, 0x3(%rsp)
movl $0x30, %eax
movl $0x18, %edx
cmovneq %rax, %rdx
movq %rdx, 0xf8(%rsp)
leaq 0x28(%rsp), %rax
cmovneq %rcx, %rax
movq %rax, 0xf0(%rsp)
leaq 0xa0(%rsp), %rbx
leaq 0x4(%rsp), %rbp
movq $0x0, 0x98(%rsp)
movl $0x0, 0xec(%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0xd0(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0xc8(%rsp)
movl $0x0, 0x94(%rsp)
movb %r13b, 0x2(%rsp)
movq %r15, 0xb8(%rsp)
movq 0xb0(%rsp), %rax
movzbl (%rax), %ecx
cmpl $0x42, %ecx
jle 0x16e7
cmpl $0x52, %ecx
je 0x1863
cmpl $0x51, %ecx
je 0x19c7
cmpl $0x43, %ecx
jne 0x1afe
cmpb $0x4f, 0x1(%rax)
jne 0x1afe
cmpb $0x0, 0x2(%rax)
jne 0x1afe
xorl %eax, %eax
movq %rax, 0x70(%rsp)
movq %rax, 0x58(%rsp)
movq %rax, 0x40(%rsp)
movq %rax, 0x28(%rsp)
movq %rax, 0x10(%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq 0xb0(%rsp), %rbp
movq %rbp, %rdi
callq 0x1070
movq 0x10(%rsp), %rdi
movslq %eax, %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x18(%rsp), %rax
jae 0x26e7
movq 0x20(%rsp), %rax
jmp 0x2734
cmpl $0x41, %ecx
je 0x1af2
cmpl $0x42, %ecx
jne 0x1afe
cmpb $0x51, 0x1(%rax)
jne 0x1afe
cmpb $0x0, 0x2(%rax)
jne 0x1afe
cmpq $0x0, 0x10(%rsp)
je 0x30d7
cmpl $0xa, 0x4(%rsp)
je 0x1733
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
testb %r13b, %r13b
jne 0x1753
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq -0x1(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, -0x1(%rcx,%rax)
cmpq $0x0, 0x40(%rsp)
je 0x1c13
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
leaq 0xa0(%rsp), %rdx
movq %rbp, %rcx
callq 0x30e1
testl %eax, %eax
js 0x1859
cmpq $0x0, 0xa0(%rsp)
je 0x17c6
testb %r13b, %r13b
jne 0x1844
movq 0xb0(%rsp), %rdi
callq 0x1130
movl %eax, %ebp
cmpl $0x5d, %eax
movl $0x5d, %eax
cmovgel %eax, %ebp
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x78(%rsp), %rcx
jae 0x17ca
movq 0x80(%rsp), %rax
jmp 0x1821
decl %ebx
jmp 0x1844
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
addb $0x21, %bpl
movq %rcx, 0x70(%rsp)
movb %bpl, (%rax,%rdx)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
leaq 0x4(%rsp), %rbp
incl %ebx
movslq %ebx, %rax
cmpq %rax, 0x40(%rsp)
ja 0x1761
jmp 0x1c13
callq 0x11f8
jmp 0x177e
cmpb $0x44, 0x1(%rax)
jne 0x1afe
cmpb $0x0, 0x2(%rax)
jne 0x1afe
movq 0x98(%rsp), %rax
cmpl %eax, 0x94(%rsp)
jge 0x30d2
xorl %eax, %eax
movq %rax, 0x70(%rsp)
movq %rax, 0x58(%rsp)
movq %rax, 0x40(%rsp)
movq %r14, %rdi
xorl %esi, %esi
leaq 0x70(%rsp), %rdx
movq %rbp, %rcx
callq 0x30e1
cmpl $0xa, 0x4(%rsp)
je 0x18c9
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
testl %eax, %eax
js 0x1b18
cmpq $0x0, 0xa0(%rsp)
je 0x1b18
movq 0xb0(%rsp), %rbp
movq %rbp, %rdi
callq 0x1070
movq 0x40(%rsp), %rdi
movslq %eax, %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x48(%rsp), %rax
jae 0x1920
movq 0x50(%rsp), %rax
jmp 0x196d
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0x1100
movq %rax, 0x50(%rsp)
movq 0x40(%rsp), %rdi
addq %rax, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x10d0
addq 0x40(%rsp), %r15
movq %r15, 0x40(%rsp)
movq 0x50(%rsp), %rax
movb $0x0, (%rax,%r15)
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
leaq 0x4(%rsp), %rbp
movq %rbp, %rcx
callq 0x30e1
testl %eax, %eax
js 0x19ba
cmpq $0x0, 0xa0(%rsp)
jne 0x18f3
movq 0xb8(%rsp), %r15
jmp 0x1b18
cmpb $0x41, 0x1(%rax)
jne 0x1afe
cmpb $0x0, 0x2(%rax)
jne 0x1afe
movq 0x98(%rsp), %rax
cmpl %eax, 0x94(%rsp)
jge 0x30cd
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq 0xb0(%rsp), %rdi
callq 0x1130
movl %eax, %r15d
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq 0xb0(%rsp), %rdi
callq 0x1130
movl %eax, %r12d
cmpl $0xa, 0x4(%rsp)
je 0x1a6a
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq %r15, 0xc0(%rsp)
leal -0x1(%r15), %r13d
movslq 0x94(%rsp), %r15
movq 0xd0(%rsp), %rax
movl (%rax,%r15,4), %eax
movl %eax, %ecx
shrl $0x2, %ecx
movl %ecx, %ebx
negl %ebx
testb $0x2, %al
cmovel %ecx, %ebx
leaq 0x40(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x3383
testl %r13d, %r13d
movq %r15, 0x100(%rsp)
je 0x1cb7
movq 0x88(%rsp), %rcx
testq %rcx, %rcx
movq 0x8(%rsp), %rdi
jne 0x1adc
movl $0x10, %esi
callq 0x1100
movq %rax, %rdi
movl $0x4, %ecx
movl %r13d, %eax
shll $0x4, %eax
orl $0x4, %eax
movl %eax, (%rdi)
movl $0x1, %r15d
jmp 0x1cc7
cmpb $0x46, 0x1(%rax)
jne 0x1afe
cmpb $0x0, 0x2(%rax)
je 0x1b35
cmpl $0xa, 0x4(%rsp)
je 0x1b18
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
testl %eax, %eax
jns 0x1645
jmp 0x3008
cmpq $0x0, 0x10(%rsp)
je 0x30dc
testb %r13b, %r13b
jne 0x1b64
cmpq $0x0, 0x70(%rsp)
je 0x1b5b
movq 0x80(%rsp), %rdi
callq 0x1050
movq $0x0, 0x70(%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq 0xb0(%rsp), %rax
movq %rbx, %rdx
xorl %ebx, %ebx
cmpb $0x43, (%rax)
sete %r15b
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rcx
callq 0x30e1
movq 0xb0(%rsp), %rdi
callq 0x1130
movl %eax, %ebp
movl %eax, %r12d
negl %r12d
cmovsl %eax, %r12d
movq 0x98(%rsp), %rcx
cmpl 0xec(%rsp), %ecx
jne 0x1c68
movq 0x98(%rsp), %rax
leal (%rax,%rax), %ecx
cmpl $0x0, 0x98(%rsp)
movl $0x4, %eax
cmovel %eax, %ecx
movl %ecx, 0xec(%rsp)
movslq %ecx, %rsi
shlq $0x2, %rsi
movq 0xd0(%rsp), %rdi
callq 0x1100
movq 0x98(%rsp), %rcx
jmp 0x1c70
cmpl $0xa, 0x4(%rsp)
leaq 0xa0(%rsp), %rbx
je 0x1c35
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
testb %r13b, %r13b
jne 0x1c5a
movq 0x80(%rsp), %rdi
callq 0x1050
movq $0x0, 0x70(%rsp)
jmp 0x1b18
movq 0xd0(%rsp), %rax
movb %r15b, %bl
shldl $0x2, %ebp, %r12d
andl $-0x2, %r12d
orl %ebx, %r12d
movslq %ecx, %rdx
incl %ecx
movq %rcx, 0x98(%rsp)
movq %rax, 0xd0(%rsp)
movl %r12d, (%rax,%rdx,4)
movb 0x2(%rsp), %r13b
movq 0xb8(%rsp), %r15
leaq 0xa0(%rsp), %rbx
leaq 0x4(%rsp), %rbp
jmp 0x1b18
xorl %r15d, %r15d
movq 0x8(%rsp), %rdi
movq 0x88(%rsp), %rcx
addl %r13d, %ebx
movslq %r12d, %rbp
cmpb $0x0, 0x3(%rsp)
movl %r12d, 0x8(%rsp)
je 0x1d02
movq %rcx, 0x88(%rsp)
movq 0xc0(%rsp), %rsi
cmpl %r12d, %esi
movq %rbp, 0xe0(%rsp)
jle 0x1e32
movslq %r13d, %rcx
jmp 0x1e81
movl $0x2, 0x88(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x202f
movl %r13d, 0xc0(%rsp)
movq %rbp, 0xe0(%rsp)
movq %rbx, 0xd8(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %ebp, %ebp
movq 0x50(%rsp), %rax
cmpb $0x2a, (%rax,%r13)
jne 0x1d90
testl %ebp, %ebp
je 0x1d7a
cmpq %rcx, %r15
jne 0x1d70
leaq (%r15,%r15), %r12
testq %r15, %r15
movl $0x4, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rsi
callq 0x1100
movq %r12, %rcx
movq %rax, %rdi
shll $0x4, %ebp
movl %ebp, (%rdi,%r15,4)
incq %r15
incl %ebx
incq %r13
movl $0x0, %ebp
cmpq %r13, 0x40(%rsp)
ja 0x1d38
jmp 0x200a
testl %ebx, %ebx
je 0x1dc9
cmpq %rcx, %r15
jne 0x1dbc
leaq (%r15,%r15), %r12
testq %r15, %r15
movl $0x4, %eax
cmoveq %rax, %r12
leaq (,%r12,4), %rsi
callq 0x1100
movq %r12, %rcx
movq %rax, %rdi
shll $0x4, %ebx
orl $0x2, %ebx
movl %ebx, (%rdi,%r15,4)
incq %r15
incl %ebp
incq %r13
movl $0x0, %ebx
cmpq %r13, 0x40(%rsp)
ja 0x1d38
testl %ebp, %ebp
je 0x2017
cmpq %rcx, %r15
movl 0xc0(%rsp), %r13d
jne 0x1e16
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1100
movq %rax, %rdi
movq %rbx, %rcx
shll $0x4, %ebp
movl %ebp, (%rdi,%r15,4)
movq 0xd8(%rsp), %rbx
movq 0xe0(%rsp), %rbp
jmp 0x206e
leal -0x1(%rbx), %eax
movslq %r13d, %rcx
cltq
subl %esi, %r12d
incl %r12d
movq %rcx, %rsi
movq 0x38(%rsp), %r10
movq 0x50(%rsp), %r8
xorl %r9d, %r9d
cmpb $0x2a, (%r10,%rax)
sete %r9b
leal (,%r9,4), %r10d
orb $0x2, %r10b
cmpb $0x2a, (%r8,%rsi)
movzbl %r10b, %r10d
cmovnel %r9d, %r10d
movb %r10b, (%r8,%rsi)
incq %rsi
incq %rax
decl %r12d
jne 0x1e43
movq 0x50(%rsp), %rax
movsbl (%rax,%rcx), %r13d
movl $0x10, %ebp
movl 0x8(%rsp), %ecx
movq 0xc0(%rsp), %rdx
cmpl %ecx, %edx
jge 0x1f25
movq %rbx, 0xd8(%rsp)
movslq %edx, %rbx
movslq %ecx, %r12
movl $0x1, %ebp
movsbl (%rax,%rbx), %ecx
cmpl %ecx, %r13d
jne 0x1ec4
incl %ebp
jmp 0x1f12
cmpq 0x88(%rsp), %r15
jne 0x1efb
leaq (%r15,%r15), %rcx
testq %r15, %r15
movl $0x4, %eax
cmoveq %rax, %rcx
movq %rcx, 0x88(%rsp)
leaq (,%rcx,4), %rsi
callq 0x1100
movq %rax, %rdi
movq 0x50(%rsp), %rax
shll $0x4, %ebp
orl %ebp, %r13d
movl %r13d, (%rdi,%r15,4)
incq %r15
movsbl (%rax,%rbx), %r13d
movl $0x1, %ebp
incq %rbx
cmpq %rbx, %r12
jne 0x1eb7
shll $0x4, %ebp
movq 0xd8(%rsp), %rbx
movq 0x88(%rsp), %rax
cmpq %rax, %r15
jne 0x1f60
movq %rbx, %r12
leaq (%rax,%rax), %rbx
testq %rax, %rax
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1100
movq %rax, %rdi
movq %rbx, 0x88(%rsp)
movq %r12, %rbx
orl %ebp, %r13d
movl %r13d, (%rdi,%r15,4)
cmpq $0x2, %r15
movq 0xe0(%rsp), %rbp
jl 0x1fc8
movl $0x1, %eax
movl 0x4(%rdi,%rax,4), %ecx
movl %ecx, %edx
andl $0xf, %edx
cmpl $0x1, %edx
je 0x1fc0
movl (%rdi,%rax,4), %edx
andl $0xf, %edx
cmpl $0x6, %edx
jne 0x1fc0
movl -0x4(%rdi,%rax,4), %edx
movl %edx, %esi
andl $0xf, %esi
cmpl $0x1, %esi
je 0x1fc0
movl $0x0, (%rdi,%rax,4)
movl %edx, %esi
xorl %ecx, %esi
testb $0xf, %sil
jne 0x1fc0
addl %ecx, %edx
movl %edx, 0x4(%rdi,%rax,4)
movl $0x0, -0x4(%rdi,%rax,4)
incq %rax
cmpq %rax, %r15
jne 0x1f7a
testq %r15, %r15
js 0x1ff0
incq %r15
xorl %eax, %eax
xorl %ecx, %ecx
movl (%rdi,%rax,4), %edx
testl %edx, %edx
je 0x1fe3
movslq %ecx, %rsi
incl %ecx
movl %edx, (%rdi,%rsi,4)
incq %rax
cmpq %rax, %r15
jne 0x1fd4
movslq %ecx, %r13
jmp 0x1ff3
xorl %r13d, %r13d
movq 0x40(%rsp), %rax
leaq 0x70(%rsp), %r15
movq 0x88(%rsp), %rcx
jmp 0x20ab
shll $0x4, %ebx
orl $0x2, %ebx
movl %ebx, 0x88(%rsp)
movq 0xd8(%rsp), %rbx
movq 0xe0(%rsp), %rbp
movl 0xc0(%rsp), %r13d
cmpq %rcx, %r15
jne 0x2063
movl %r13d, %r12d
movq %rbx, %r13
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1100
movq %rax, %rdi
movq %rbx, %rcx
movq %r13, %rbx
movl %r12d, %r13d
movl 0x88(%rsp), %eax
movl %eax, (%rdi,%r15,4)
testl %r13d, %r13d
je 0x2080
testq %r15, %r15
jle 0x2080
shll $0x4, %r13d
subl %r13d, 0x4(%rdi)
leaq 0x1(%r15), %r13
movq 0x40(%rsp), %rax
cmpq %rbp, %rax
jbe 0x20a6
testq %r13, %r13
je 0x20a6
movq %rcx, %rdx
movl 0x8(%rsp), %ecx
subl %eax, %ecx
shll $0x4, %ecx
addl %ecx, (%rdi,%r15,4)
movq %rdx, %rcx
leaq 0x70(%rsp), %r15
cmpq %rbp, %rax
jbe 0x20fe
cmpq %rcx, %r13
jne 0x20e3
movq %rbx, %rbp
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1100
movq %rax, %rdi
movq 0x40(%rsp), %rax
movq %rbx, %rcx
movq %rbp, %rbx
movq %rcx, 0x88(%rsp)
subl 0x8(%rsp), %eax
shll $0x4, %eax
orl $0x4, %eax
movl %eax, (%rdi,%r13,4)
incq %r13
jmp 0x2106
movq %rcx, 0x88(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x78(%rsp), %rcx
jae 0x2125
movq 0x80(%rsp), %rax
jmp 0x217c
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x70(%rsp)
movb $0x9, (%rax,%rdx)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq 0xd0(%rsp), %rax
movq 0x100(%rsp), %rcx
movl (%rax,%rcx,4), %edi
shll $0x4, %edi
andl $0x10, %edi
movq %r15, %rsi
callq 0x3451
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x78(%rsp), %rcx
jae 0x21d1
movq 0x80(%rsp), %rax
jmp 0x2228
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x70(%rsp)
movb $0x9, (%rax,%rdx)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq 0x20(%rsp), %r15
movq 0x70(%rsp), %rdi
movslq 0x10(%rsp), %rbp
leaq (%rdi,%rbp), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jae 0x2269
movq 0x80(%rsp), %rax
jmp 0x22bc
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x10d0
addq 0x70(%rsp), %rbp
movq %rbp, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%rbp)
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x78(%rsp), %rcx
jae 0x22fa
movq 0x80(%rsp), %rax
jmp 0x2351
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq 0xc8(%rsp), %rsi
leaq 0x70(%rsp), %r15
movq %rcx, 0x70(%rsp)
movb $0x9, (%rax,%rdx)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
cmpb $0x0, 0x3(%rsp)
je 0x2388
movslq %ebx, %rax
movl -0x4(%rsi,%rax,4), %ebx
incl %ebx
movl %ebx, %edi
movq %r15, %rsi
callq 0x3451
movq 0x70(%rsp), %rcx
leaq 0x5(%rcx), %rax
cmpq 0x78(%rsp), %rax
jae 0x23ac
movq 0x80(%rsp), %rax
jmp 0x23ff
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rcx
movq 0x8(%rsp), %rsi
movl $0x9303609, (%rax,%rcx) # imm = 0x9303609
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x4(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x4(%rcx,%rax)
testq %r13, %r13
jle 0x24f1
xorl %ebx, %ebx
movl (%rsi,%rbx,4), %edi
shrl $0x4, %edi
movq %r15, %rsi
callq 0x3451
movq 0x8(%rsp), %rsi
movl (%rsi,%rbx,4), %eax
andl $0xf, %eax
leaq 0x1d95(%rip), %rcx      # 0x41e6
movb (%rax,%rcx), %bpl
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x78(%rsp), %rcx
jae 0x246f
movq 0x80(%rsp), %rax
jmp 0x24cb
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq 0x8(%rsp), %rsi
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x70(%rsp)
movb %bpl, (%rax,%rdx)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
incq %rbx
cmpq %rbx, %r13
jne 0x2431
movq 0x70(%rsp), %rcx
leaq 0x8(%rcx), %rax
cmpq 0x78(%rsp), %rax
jae 0x250b
movq 0x80(%rsp), %rax
jmp 0x255e
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rcx
movb 0x2(%rsp), %r13b
leaq 0xa0(%rsp), %rbx
movl $0x9300930, 0x3(%rax,%rcx) # imm = 0x9300930
movl $0x30092a09, (%rax,%rcx) # imm = 0x30092A09
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x7(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x7(%rcx,%rax)
movq 0x68(%rsp), %r15
movq 0x70(%rsp), %rdi
movslq 0x58(%rsp), %rbp
leaq (%rdi,%rbp), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jae 0x25bc
movq 0x80(%rsp), %rax
jmp 0x260f
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x10d0
addq 0x70(%rsp), %rbp
movq %rbp, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%rbp)
movq 0x70(%rsp), %rcx
leaq 0x3(%rcx), %rax
cmpq 0x78(%rsp), %rax
jae 0x264d
movq 0x80(%rsp), %rax
jmp 0x26a0
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rcx
movq 0xb8(%rsp), %r15
leaq 0x4(%rsp), %rbp
movw $0x2a09, (%rax,%rcx)    # imm = 0x2A09
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x2(%rcx,%rax)
movq 0x80(%rsp), %rdi
callq 0x1050
incl 0x94(%rsp)
jmp 0x1b18
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1100
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rdi
addq %rax, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x10d0
addq 0x10(%rsp), %r15
movq %r15, 0x10(%rsp)
movq 0x20(%rsp), %rax
movb $0x0, (%rax,%r15)
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
leaq 0x4(%rsp), %rbp
movq %rbp, %rcx
callq 0x30e1
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x30e1
testl %eax, %eax
setns %cl
movq 0xa0(%rsp), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2860
movq 0xb0(%rsp), %rbp
movq 0x28(%rsp), %rdi
movslq %eax, %r15
leaq (%r15,%rdi), %rax
incq %rax
cmpq 0x30(%rsp), %rax
jae 0x27c4
movq 0x38(%rsp), %rax
jmp 0x2811
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x1100
movq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rdi
addq %rax, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x10d0
addq 0x28(%rsp), %r15
movq %r15, 0x28(%rsp)
movq 0x38(%rsp), %rax
movb $0x0, (%rax,%r15)
movq %r14, %rdi
movl $0xa, %esi
movq %rbx, %rdx
leaq 0x4(%rsp), %rbp
movq %rbp, %rcx
callq 0x30e1
testl %eax, %eax
js 0x2860
movq 0xa0(%rsp), %rax
testq %rax, %rax
jne 0x279f
leaq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3383
movq 0x30(%rsp), %rsi
shlq $0x2, %rsi
movq 0xc8(%rsp), %rdi
callq 0x1100
movq 0x28(%rsp), %r8
testq %r8, %r8
je 0x28af
xorl %ecx, %ecx
movq 0x38(%rsp), %rdx
xorl %esi, %esi
movl %esi, (%rax,%rcx,4)
xorl %edi, %edi
cmpb $0x2a, (%rdx,%rcx)
setne %dil
addl %edi, %esi
incq %rcx
cmpq %rcx, %r8
jne 0x2898
movq %rax, 0xc8(%rsp)
movq 0x373a(%rip), %r15      # 0x5ff8
movq (%r15), %rdi
movq 0x20(%rsp), %rdx
movq 0xf8(%rsp), %rbx
movq 0x10(%rsp,%rbx), %rcx
leaq 0x18e1(%rip), %rsi      # 0x41bb
xorl %eax, %eax
callq 0x10c0
movq (%r15), %rdi
movq 0x20(%rsp), %rdx
leaq 0x18df(%rip), %rsi      # 0x41cf
xorl %eax, %eax
callq 0x10c0
cmpq $0x0, 0x10(%rsp,%rbx)
movq 0xb8(%rsp), %r15
jne 0x2a7a
movl $0x0, 0x94(%rsp)
testb %r13b, %r13b
leaq 0xa0(%rsp), %rbx
jne 0x2ff7
cmpb $0x0, 0x3(%rsp)
movq 0x8(%rsp), %rdi
movq 0x88(%rsp), %rcx
je 0x2966
testq %rcx, %rcx
jne 0x2952
movl $0x10, %esi
callq 0x1100
movq %rax, %rdi
movl $0x4, %ecx
movl 0x40(%rsp), %eax
shll $0x4, %eax
movl %eax, (%rdi)
movl $0x1, %r12d
jmp 0x2ad4
movl $0x2, %ebp
cmpq $0x0, 0x28(%rsp)
je 0x2a68
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x38(%rsp), %rax
cmpb $0x2a, (%rax,%r15)
jne 0x29dd
testl %r13d, %r13d
je 0x29c6
cmpq %rcx, %r12
jne 0x29bb
leaq (%r12,%r12), %rbx
testq %r12, %r12
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1100
movq %rbx, %rcx
movq %rax, %rdi
shll $0x4, %r13d
movl %r13d, (%rdi,%r12,4)
incq %r12
incl %ebp
incq %r15
movl $0x0, %r13d
cmpq %r15, 0x28(%rsp)
ja 0x2982
jmp 0x2a6d
testl %ebp, %ebp
je 0x2a16
cmpq %rcx, %r12
jne 0x2a09
leaq (%r12,%r12), %rbx
testq %r12, %r12
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1100
movq %rbx, %rcx
movq %rax, %rdi
shll $0x4, %ebp
orl $0x2, %ebp
movl %ebp, (%rdi,%r12,4)
incq %r12
incl %r13d
incq %r15
movl $0x0, %ebp
cmpq %r15, 0x28(%rsp)
ja 0x2982
testl %r13d, %r13d
je 0x2a9b
cmpq %rcx, %r12
jne 0x2a59
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1100
movq %rax, %rdi
movq %rbx, %rcx
shll $0x4, %r13d
movl %r13d, (%rdi,%r12,4)
movb 0x2(%rsp), %r13b
jmp 0x2ad1
xorl %r12d, %r12d
jmp 0x2aa5
shll $0x4, %ebp
orl $0x2, %ebp
movb 0x2(%rsp), %r13b
jmp 0x2aa5
movzbl 0x3(%rsp), %ecx
movq 0xf0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x1242
jmp 0x290b
movb 0x2(%rsp), %r13b
movl $0x2, %ebp
cmpq %rcx, %r12
jne 0x2acd
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1100
movq %rax, %rdi
movq %rbx, %rcx
movl %ebp, (%rdi,%r12,4)
incq %r12
movq %rdi, 0x8(%rsp)
movq 0x20(%rsp), %rbx
movq 0x70(%rsp), %rdi
movslq 0x10(%rsp), %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x78(%rsp), %rax
movq %rcx, 0x88(%rsp)
jae 0x2b08
movq 0x80(%rsp), %rax
jmp 0x2b5b
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdi
addq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10d0
addq 0x70(%rsp), %r15
movq %r15, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%r15)
movq 0x70(%rsp), %rcx
leaq 0x6(%rcx), %rax
cmpq 0x78(%rsp), %rax
jae 0x2b9a
movq 0x80(%rsp), %rax
jmp 0x2bed
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rcx
movb $0x9, 0x4(%rax,%rcx)
movl $0x36313509, (%rax,%rcx) # imm = 0x36313509
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x5(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x5(%rcx,%rax)
movq 0x20(%rsp), %rbx
movq 0x70(%rsp), %rdi
movslq 0x10(%rsp), %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jae 0x2c3b
movq 0x80(%rsp), %rax
jmp 0x2c8e
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdi
addq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10d0
addq 0x70(%rsp), %r15
movq %r15, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%r15)
movq 0x70(%rsp), %rcx
leaq 0x7(%rcx), %rax
cmpq 0x78(%rsp), %rax
jae 0x2ccd
movq 0x80(%rsp), %rax
jmp 0x2d20
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rcx
leaq 0x70(%rsp), %r15
movq 0x8(%rsp), %rsi
movw $0x930, 0x4(%rax,%rcx)  # imm = 0x930
movl $0x36093109, (%rax,%rcx) # imm = 0x36093109
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x6(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x6(%rcx,%rax)
testq %r12, %r12
jle 0x2e1e
xorl %ebx, %ebx
movl (%rsi,%rbx,4), %edi
shrl $0x4, %edi
movq %r15, %rsi
callq 0x3451
movq 0x8(%rsp), %rsi
movl (%rsi,%rbx,4), %eax
andl $0xf, %eax
leaq 0x1468(%rip), %rcx      # 0x41e6
movb (%rax,%rcx), %bpl
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x78(%rsp), %rcx
jae 0x2d9c
movq 0x80(%rsp), %rax
jmp 0x2df8
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq 0x8(%rsp), %rsi
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x70(%rsp)
movb %bpl, (%rax,%rdx)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
incq %rbx
cmpq %rbx, %r12
jne 0x2d5e
movq 0x70(%rsp), %rcx
leaq 0x8(%rcx), %rax
cmpq 0x78(%rsp), %rax
jae 0x2e38
movq 0x80(%rsp), %rax
jmp 0x2e8b
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rcx
leaq 0xa0(%rsp), %rbx
movl $0x9300930, 0x3(%rax,%rcx) # imm = 0x9300930
movl $0x30092a09, (%rax,%rcx) # imm = 0x30092A09
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x7(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x7(%rcx,%rax)
movq 0x50(%rsp), %rbp
movq 0x70(%rsp), %rdi
movslq 0x40(%rsp), %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jae 0x2ee4
movq 0x80(%rsp), %rax
jmp 0x2f37
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rdi
addq %rax, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x10d0
addq 0x70(%rsp), %r15
movq %r15, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%r15)
movq 0x70(%rsp), %rcx
leaq 0x3(%rcx), %rax
cmpq 0x78(%rsp), %rax
jae 0x2f76
movq 0x80(%rsp), %rax
jmp 0x2fc9
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1100
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rcx
movq 0xb8(%rsp), %r15
leaq 0x4(%rsp), %rbp
movw $0x2a09, (%rax,%rcx)    # imm = 0x2A09
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x2(%rcx,%rax)
movq $0x0, 0x98(%rsp)
jmp 0x1b18
testq %r14, %r14
movq 0xd0(%rsp), %rbx
jne 0x302e
jmp 0x303e
movq $0x0, 0x8(%rsp)
xorl %ebx, %ebx
movq $0x0, 0xc8(%rsp)
movq (%r14), %rdi
callq 0x1040
movq %r14, %rdi
callq 0x1040
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1040
movq 0xb0(%rsp), %rdi
callq 0x1040
movq 0x8(%rsp), %rdi
callq 0x1040
movq 0xc8(%rsp), %rdi
callq 0x1040
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x20(%rsp,%r14), %rdi
callq 0x1040
addq $0x18, %r14
cmpq $0x78, %r14
jne 0x3077
movl %ebx, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2f2a(%rip), %rax      # 0x5fd0
movq (%rax), %rdi
callq 0x10e0
leaq 0x1104(%rip), %rsi      # 0x41b9
movl %eax, %edi
callq 0x1060
jmp 0x1566
callq 0x12d7
movl $0x1, %ebx
jmp 0x308b
callq 0x1180
callq 0x11a8
callq 0x121a
callq 0x11d0