// File: /workspace/github_c_makefile_star2_O1/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 0x2b8b(%rip), %rdx      # 0x4004
callq 0x1130
testl %eax, %eax
js 0x14c9
xorl %r15d, %r15d
leaq 0x2b78(%rip), %r14      # 0x4004
xorl %r12d, %r12d
cmpl $0x63, %eax
je 0x14a1
cmpl $0x70, %eax
jne 0x14a7
movl $0x1, %r12d
jmp 0x14a7
movl $0x1, %r15d
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1130
testl %eax, %eax
jns 0x148f
testl %r12d, %r12d
sete 0x3(%rsp)
testl %r15d, %r15d
sete %r15b
jmp 0x14d1
movb $0x1, 0x3(%rsp)
movb $0x1, %r15b
movq 0x4b00(%rip), %rax      # 0x5fd8
movslq (%rax), %r14
cmpl %ebp, %r14d
je 0x3030
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
xorl %eax, %eax
movq %rax, 0xc0(%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 %rax, 0x80(%rsp)
movq 0x8(%rbx), %rdi
leaq 0x2c8a(%rip), %rsi      # 0x41b9
callq 0x10b0
testl %eax, %eax
je 0x154a
movq (%rbx,%r14,8), %rdi
leaq 0x2c78(%rip), %rsi      # 0x41bb
callq 0x1120
jmp 0x1567
movq 0x4a7f(%rip), %rax      # 0x5fd0
movq (%rax), %rdi
callq 0x10f0
leaq 0x2c5b(%rip), %rsi      # 0x41bb
movl %eax, %edi
callq 0x1060
movq %rax, %r13
movl $0x1, %edi
movl $0x20, %esi
callq 0x10a0
movq %rax, %r14
movq %r13, 0x18(%rax)
movl $0x4000, %edi           # imm = 0x4000
callq 0x1100
movq %rax, (%r14)
leaq 0xb0(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3050
testl %eax, %eax
js 0x2f94
leaq 0x40(%rsp), %rcx
leaq 0x28(%rsp), %rdx
cmpb $0x0, 0x3(%rsp)
movl $0x30, %eax
movl $0x18, %esi
cmovneq %rax, %rsi
movq %rsi, 0xf8(%rsp)
cmovneq %rcx, %rdx
movq %rdx, 0xf0(%rsp)
leaq 0x50(%rsp), %rax
leaq 0x38(%rsp), %rcx
cmovneq %rax, %rcx
movq %rcx, 0xe8(%rsp)
leaq 0xb0(%rsp), %rbp
leaq 0x4(%rsp), %rbx
movl $0x0, 0x88(%rsp)
movq $0x0, 0xe0(%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0xa8(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0xd8(%rsp)
movl $0x0, 0xa4(%rsp)
movb %r15b, 0x2(%rsp)
movq %r13, 0xd0(%rsp)
movq 0xc0(%rsp), %r12
movq %r12, %rdi
leaq 0x2b4f(%rip), %rsi      # 0x41bd
callq 0x10b0
testl %eax, %eax
je 0x1c28
movq %r12, %rdi
leaq 0x2b78(%rip), %rsi      # 0x41fd
callq 0x10b0
testl %eax, %eax
je 0x16f6
movq %r12, %rdi
leaq 0x2ba5(%rip), %rsi      # 0x423d
callq 0x10b0
testl %eax, %eax
je 0x1896
movq %r12, %rdi
leaq 0x2bb2(%rip), %rsi      # 0x4261
callq 0x10b0
testl %eax, %eax
je 0x196d
movq %r12, %rdi
leaq 0x2bba(%rip), %rsi      # 0x4280
callq 0x10b0
testl %eax, %eax
je 0x1afb
cmpl $0xa, 0x4(%rsp)
je 0x2f60
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
jmp 0x2f60
cmpq $0x0, 0x10(%rsp)
je 0x303c
cmpl $0xa, 0x4(%rsp)
je 0x171c
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
testb %r15b, %r15b
jne 0x173c
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 0x1844
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
leaq 0x4(%rsp), %rcx
callq 0x3050
testl %eax, %eax
js 0x183a
cmpq $0x0, 0xb0(%rsp)
je 0x1826
testb %r15b, %r15b
jne 0x1828
movq 0xc0(%rsp), %rdi
callq 0x1140
movl %eax, %r12d
cmpl $0x5d, %eax
movl $0x5d, %eax
cmovgel %eax, %r12d
movq 0x70(%rsp), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jb 0x17f5
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 0x1110
movq %rax, 0x80(%rsp)
addb $0x21, %r12b
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb %r12b, (%rcx,%rax)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
jmp 0x1828
decl %ebx
incl %ebx
movslq %ebx, %rax
cmpq %rax, 0x40(%rsp)
ja 0x174a
jmp 0x1844
callq 0x1208
jmp 0x1764
cmpl $0xa, 0x4(%rsp)
leaq 0x4(%rsp), %rbx
je 0x1863
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
testb %r15b, %r15b
jne 0x1888
movq 0x80(%rsp), %rdi
callq 0x1050
movq $0x0, 0x70(%rsp)
jmp 0x2f60
cmpq $0x0, 0x10(%rsp)
je 0x3041
testb %r15b, %r15b
jne 0x18c5
cmpq $0x0, 0x70(%rsp)
je 0x18bc
movq 0x80(%rsp), %rdi
callq 0x1050
movq $0x0, 0x70(%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq 0xc0(%rsp), %rax
movq %rbx, %rcx
xorl %ebx, %ebx
cmpb $0x43, (%rax)
sete %r15b
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x3050
movq 0xc0(%rsp), %rdi
callq 0x1140
movl %eax, %r12d
movl %eax, %r13d
negl %r13d
cmovsl %eax, %r13d
movq 0xe0(%rsp), %rax
cmpl %eax, 0x88(%rsp)
jne 0x1aae
leal (%rax,%rax), %ebp
testl %eax, %eax
movl $0x4, %eax
cmovel %eax, %ebp
movslq %ebp, %rsi
shlq $0x2, %rsi
movq 0xa8(%rsp), %rdi
callq 0x1110
movl %ebp, %ecx
movq %rcx, 0xe0(%rsp)
leaq 0xb0(%rsp), %rbp
jmp 0x1ab6
movl 0x88(%rsp), %eax
cmpl %eax, 0xa4(%rsp)
jge 0x3046
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 %rbx, %rcx
callq 0x3050
cmpl $0xa, 0x4(%rsp)
je 0x19be
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
testl %eax, %eax
js 0x2f60
cmpq $0x0, 0xb0(%rsp)
je 0x2f60
movq 0xc0(%rsp), %r13
movq %r13, %rdi
callq 0x1070
movq 0x40(%rsp), %rcx
movslq %eax, %r12
leaq (%rcx,%r12), %rax
incq %rax
cmpq 0x48(%rsp), %rax
jb 0x1a56
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 0x1110
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
addq 0x40(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x10e0
addq 0x40(%rsp), %r12
movq %r12, 0x40(%rsp)
movq 0x50(%rsp), %rax
movb $0x0, (%rax,%r12)
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
testl %eax, %eax
js 0x2f53
cmpq $0x0, 0xb0(%rsp)
jne 0x19e8
jmp 0x2f53
movq 0xa8(%rsp), %rax
movb %r15b, %bl
shldl $0x2, %r12d, %r13d
andl $-0x2, %r13d
orl %ebx, %r13d
movl 0x88(%rsp), %ecx
movslq %ecx, %rdx
incl %ecx
movl %ecx, 0x88(%rsp)
movq %rax, 0xa8(%rsp)
movl %r13d, (%rax,%rdx,4)
movb 0x2(%rsp), %r15b
movq 0xd0(%rsp), %r13
leaq 0x4(%rsp), %rbx
jmp 0x2f60
movl 0x88(%rsp), %eax
cmpl %eax, 0xa4(%rsp)
jge 0x304b
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq 0xc0(%rsp), %rdi
callq 0x1140
movl %eax, %r13d
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq 0xc0(%rsp), %rdi
callq 0x1140
movl %eax, 0x94(%rsp)
cmpl $0xa, 0x4(%rsp)
je 0x1b8d
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
leal -0x1(%r13), %r12d
movslq 0xa4(%rsp), %rbx
movq 0xa8(%rsp), %rax
movl (%rax,%rbx,4), %eax
movl %eax, %ecx
shrl $0x2, %ecx
movl %ecx, %r15d
negl %r15d
testb $0x2, %al
cmovel %ecx, %r15d
leaq 0x40(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x32eb
movl %r12d, 0xa0(%rsp)
testl %r12d, %r12d
movq %rbx, 0x100(%rsp)
je 0x1ebe
movq 0x98(%rsp), %r9
testq %r9, %r9
movq 0x8(%rsp), %rdi
jne 0x1c02
movl $0x10, %esi
callq 0x1110
movq %rax, %rdi
movl $0x4, %r9d
movl 0xa0(%rsp), %r11d
movl %r11d, %eax
shll $0x4, %eax
orl $0x4, %eax
movl %eax, (%rdi)
movl $0x1, %r12d
movl 0x94(%rsp), %r10d
jmp 0x1ede
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 %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq 0xc0(%rsp), %r13
movq %r13, %rdi
callq 0x1070
movq 0x10(%rsp), %rcx
movslq %eax, %r12
leaq (%rcx,%r12), %rax
incq %rax
cmpq 0x18(%rsp), %rax
jb 0x1cc1
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 0x1110
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
addq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x10e0
addq 0x10(%rsp), %r12
movq %r12, 0x10(%rsp)
movq 0x20(%rsp), %rax
movb $0x0, (%rax,%r12)
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
testl %eax, %eax
setns %cl
movq 0xb0(%rsp), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1de5
movq 0xc0(%rsp), %r13
movq 0x28(%rsp), %rcx
movslq %eax, %r12
leaq (%r12,%rcx), %rax
incq %rax
cmpq 0x30(%rsp), %rax
jb 0x1d94
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 0x1110
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
addq 0x28(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x10e0
addq 0x28(%rsp), %r12
movq %r12, 0x28(%rsp)
movq 0x38(%rsp), %rax
movb $0x0, (%rax,%r12)
movq %r14, %rdi
movl $0xa, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
testl %eax, %eax
js 0x1de5
movq 0xb0(%rsp), %rax
testq %rax, %rax
jne 0x1d2e
leaq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x32eb
movq 0x30(%rsp), %rsi
shlq $0x2, %rsi
movq 0xd8(%rsp), %rdi
callq 0x1110
movq 0x28(%rsp), %r8
testq %r8, %r8
je 0x1e34
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 0x1e1d
movq %rax, 0xd8(%rsp)
movq 0x41b5(%rip), %r15      # 0x5ff8
movq (%r15), %rdi
movq 0x20(%rsp), %rdx
movq 0xf8(%rsp), %rbx
movq 0x10(%rsp,%rbx), %rcx
leaq 0x2361(%rip), %rsi      # 0x41c0
xorl %eax, %eax
callq 0x10d0
movq (%r15), %rdi
movq 0x20(%rsp), %rdx
leaq 0x235f(%rip), %rsi      # 0x41d4
xorl %eax, %eax
callq 0x10d0
cmpq $0x0, 0x10(%rsp,%rbx)
movb 0x2(%rsp), %r15b
movq 0xd0(%rsp), %r13
jne 0x2f7a
movl $0x0, 0xa4(%rsp)
testb %r15b, %r15b
leaq 0x4(%rsp), %rbx
je 0x20cb
movl $0x0, 0x88(%rsp)
jmp 0x2f60
xorl %r12d, %r12d
movq 0x8(%rsp), %rdi
movq 0x98(%rsp), %r9
movl 0x94(%rsp), %r10d
movl 0xa0(%rsp), %r11d
addl %r11d, %r15d
movslq %r10d, %rax
movq %rax, 0x8(%rsp)
cmpb $0x0, 0x3(%rsp)
je 0x1ff2
cmpl %r10d, %r13d
jg 0x1f4a
movslq %r11d, %rax
leal -0x1(%r15), %ecx
movslq %ecx, %rcx
movl %r10d, %edx
subl %r13d, %edx
incl %edx
movq 0x50(%rsp), %rsi
cmpb $0x2a, (%rsi,%rax)
jne 0x1f2e
movq 0x38(%rsp), %r8
cmpb $0x2a, (%r8,%rcx)
sete %r8b
shlb $0x2, %r8b
orb $0x2, %r8b
jmp 0x1f3c
movq 0x38(%rsp), %r8
cmpb $0x2a, (%r8,%rcx)
sete %r8b
movb %r8b, (%rsi,%rax)
incq %rax
incq %rcx
decl %edx
jne 0x1f0b
movq %r15, 0x98(%rsp)
movq 0x50(%rsp), %rax
movslq %r11d, %rcx
movsbl (%rax,%rcx), %ebx
movl $0x10, %r15d
cmpl %r10d, %r13d
jge 0x211f
movslq %r13d, %r13
movl $0x1, %r15d
movq 0x8(%rsp), %r10
movq 0x50(%rsp), %rax
movsbl (%rax,%r13), %eax
cmpl %eax, %ebx
jne 0x1f8e
incl %r15d
jmp 0x1fe1
cmpq %r9, %r12
jne 0x1fc3
leaq (%r9,%r9), %rbp
testq %r9, %r9
movl $0x4, %eax
cmoveq %rax, %rbp
leaq (,%rbp,4), %rsi
callq 0x1110
movq 0x8(%rsp), %r10
movq %rax, %rdi
movq %rbp, %r9
leaq 0xb0(%rsp), %rbp
shll $0x4, %r15d
orl %r15d, %ebx
movl %ebx, (%rdi,%r12,4)
incq %r12
movq 0x50(%rsp), %rax
movsbl (%rax,%r13), %ebx
movl $0x1, %r15d
incq %r13
cmpq %r13, %r10
jne 0x1f7b
shll $0x4, %r15d
jmp 0x2124
cmpq $0x0, 0x40(%rsp)
je 0x21f1
movq %r15, 0x98(%rsp)
xorl %r15d, %r15d
xorl %r13d, %r13d
xorl %ebx, %ebx
movq 0x50(%rsp), %rax
cmpb $0x2a, (%rax,%r15)
jne 0x205f
testl %ebx, %ebx
je 0x2058
cmpq %r9, %r12
jne 0x204e
leaq (%r9,%r9), %rbp
testq %r9, %r9
movl $0x4, %eax
cmoveq %rax, %rbp
leaq (,%rbp,4), %rsi
callq 0x1110
movq %rax, %rdi
movq %rbp, %r9
leaq 0xb0(%rsp), %rbp
shll $0x4, %ebx
movl %ebx, (%rdi,%r12,4)
incq %r12
incl %r13d
xorl %ebx, %ebx
jmp 0x20a8
testl %r13d, %r13d
je 0x20a3
cmpq %r9, %r12
jne 0x2094
leaq (%r9,%r9), %rbp
testq %r9, %r9
movl $0x4, %eax
cmoveq %rax, %rbp
leaq (,%rbp,4), %rsi
callq 0x1110
movq %rax, %rdi
movq %rbp, %r9
leaq 0xb0(%rsp), %rbp
shll $0x4, %r13d
orl $0x2, %r13d
movl %r13d, (%rdi,%r12,4)
incq %r12
incl %ebx
xorl %r13d, %r13d
incq %r15
cmpq %r15, 0x40(%rsp)
ja 0x200e
shll $0x4, %r13d
orl $0x2, %r13d
movq 0x98(%rsp), %r15
jmp 0x21f9
cmpb $0x0, 0x3(%rsp)
movq 0x8(%rsp), %rdi
movq 0x98(%rsp), %rcx
je 0x28db
testq %rcx, %rcx
leaq 0x70(%rsp), %r13
jne 0x20ff
movl $0x10, %esi
callq 0x1110
movq %rax, %rdi
movl $0x4, %ecx
movq %rcx, 0x98(%rsp)
movl 0x40(%rsp), %eax
shll $0x4, %eax
movq %rdi, 0x8(%rsp)
movl %eax, (%rdi)
movl $0x1, %ebx
jmp 0x2a61
movq 0x8(%rsp), %r10
cmpq %r9, %r12
jne 0x2151
leaq (%r9,%r9), %r13
testq %r9, %r9
movl $0x4, %eax
cmoveq %rax, %r13
leaq (,%r13,4), %rsi
callq 0x1110
movq 0x8(%rsp), %r10
movq %rax, %rdi
movq %r13, %r9
leaq 0x70(%rsp), %r13
orl %r15d, %ebx
movl %ebx, (%rdi,%r12,4)
cmpq $0x2, %r12
movq 0x98(%rsp), %r15
movl 0x94(%rsp), %r8d
jl 0x21c6
movl $0x1, %eax
movl 0x4(%rdi,%rax,4), %ecx
movl %ecx, %edx
andl $0xf, %edx
cmpl $0x1, %edx
je 0x21be
movl (%rdi,%rax,4), %edx
andl $0xf, %edx
cmpl $0x6, %edx
jne 0x21be
movl -0x4(%rdi,%rax,4), %edx
movl %edx, %esi
andl $0xf, %esi
cmpl $0x1, %esi
je 0x21be
movl $0x0, (%rdi,%rax,4)
movl %edx, %esi
xorl %ecx, %esi
testb $0xf, %sil
jne 0x21be
addl %ecx, %edx
movl %edx, 0x4(%rdi,%rax,4)
movl $0x0, -0x4(%rdi,%rax,4)
incq %rax
cmpq %rax, %r12
jne 0x2178
testq %r12, %r12
js 0x2240
incq %r12
xorl %eax, %eax
xorl %ecx, %ecx
movl (%rdi,%rax,4), %edx
testl %edx, %edx
je 0x21e1
movslq %ecx, %rsi
incl %ecx
movl %edx, (%rdi,%rsi,4)
incq %rax
cmpq %rax, %r12
jne 0x21d2
movslq %ecx, %rbx
jmp 0x22b8
movl $0x2, %r13d
xorl %ebx, %ebx
testl %ebx, %ebx
je 0x2244
cmpq %r9, %r12
jne 0x222b
movq %r15, %r13
leaq (%r9,%r9), %r15
testq %r9, %r9
movl $0x4, %eax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
callq 0x1110
movq %rax, %rdi
movq %r15, %r9
movq %r13, %r15
movq 0x8(%rsp), %r10
shll $0x4, %ebx
movl %ebx, %r13d
movl 0x94(%rsp), %r8d
jmp 0x2279
xorl %ebx, %ebx
jmp 0x22b8
cmpq %r9, %r12
jne 0x226c
leaq (%r9,%r9), %rbx
testq %r9, %r9
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1110
movq %rax, %rdi
movq %rbx, %r9
movl 0x94(%rsp), %r8d
movq 0x8(%rsp), %r10
movl 0xa0(%rsp), %eax
movl %r13d, (%rdi,%r12,4)
testl %eax, %eax
je 0x2293
testq %r12, %r12
jle 0x2293
shll $0x4, %eax
subl %eax, 0x4(%rdi)
leaq 0x1(%r12), %rbx
movq 0x40(%rsp), %rax
cmpq %r10, %rax
leaq 0x70(%rsp), %r13
jbe 0x22b8
testq %rbx, %rbx
je 0x22b8
movl %r8d, %ecx
subl %eax, %ecx
shll $0x4, %ecx
addl %ecx, (%rdi,%r12,4)
cmpq %r10, 0x40(%rsp)
movq 0x100(%rsp), %r12
jbe 0x2324
cmpq %r9, %rbx
jne 0x2302
movq %rbx, %r13
leaq (%r9,%r9), %rbx
testq %r9, %r9
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1110
movq %rax, %rdi
movq %rbx, %r9
movq %r13, %rbx
leaq 0x70(%rsp), %r13
movl 0x94(%rsp), %r8d
movq %r9, 0x98(%rsp)
movl 0x40(%rsp), %eax
subl %r8d, %eax
shll $0x4, %eax
orl $0x4, %eax
movq %rdi, 0x8(%rsp)
movl %eax, (%rdi,%rbx,4)
incq %rbx
jmp 0x2331
movq %r9, 0x98(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x70(%rsp), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jb 0x238e
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x9, (%rcx,%rax)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq 0xa8(%rsp), %rax
movl (%rax,%r12,4), %edi
shll $0x4, %edi
andl $0x10, %edi
movq %r13, %rsi
callq 0x33ad
movq 0x70(%rsp), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jb 0x2430
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x9, (%rcx,%rax)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq 0x20(%rsp), %r12
movq 0x70(%rsp), %rax
movslq 0x10(%rsp), %r13
addq %r13, %rax
incq %rax
cmpq 0x78(%rsp), %rax
jb 0x24c5
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
addq 0x70(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10e0
addq 0x70(%rsp), %r13
movq %r13, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%r13)
movq 0x70(%rsp), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jb 0x2551
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x9, (%rcx,%rax)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
cmpb $0x0, 0x3(%rsp)
leaq 0x70(%rsp), %r12
je 0x259b
movslq %r15d, %rax
movq 0xd8(%rsp), %rcx
movl -0x4(%rcx,%rax,4), %r15d
incl %r15d
movl %r15d, %edi
movq %r12, %rsi
callq 0x33ad
movq 0x70(%rsp), %rax
addq $0x5, %rax
cmpq 0x78(%rsp), %rax
jb 0x2604
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movl $0x9303609, (%rcx,%rax) # imm = 0x9303609
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x4(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x4(%rcx,%rax)
testq %rbx, %rbx
movq 0x8(%rsp), %rsi
jle 0x2703
movq %rbx, %r13
xorl %ebx, %ebx
movl (%rsi,%rbx,4), %edi
shrl $0x4, %edi
movq %r12, %rsi
callq 0x33ad
movq 0x8(%rsp), %rsi
movl (%rsi,%rbx,4), %eax
andl $0xf, %eax
leaq 0x1b85(%rip), %rcx      # 0x41eb
movb (%rax,%rcx), %r15b
movq 0x70(%rsp), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jb 0x26cc
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 0x1110
movq 0x8(%rsp), %rsi
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb %r15b, (%rcx,%rax)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
incq %rbx
cmpq %rbx, %r13
jne 0x2646
movq 0x70(%rsp), %rax
addq $0x8, %rax
cmpq 0x78(%rsp), %rax
jb 0x2761
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movl $0x9300930, 0x3(%rcx,%rax) # imm = 0x9300930
movl $0x30092a09, (%rcx,%rax) # 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), %r12
movq 0x70(%rsp), %rax
movslq 0x58(%rsp), %r13
addq %r13, %rax
incq %rax
cmpq 0x78(%rsp), %rax
leaq 0x4(%rsp), %rbx
jb 0x2807
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
addq 0x70(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10e0
addq 0x70(%rsp), %r13
movq %r13, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%r13)
movq 0x70(%rsp), %rax
addq $0x3, %rax
cmpq 0x78(%rsp), %rax
jb 0x2894
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movw $0x2a09, (%rcx,%rax)    # 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 0xa4(%rsp)
jmp 0x2f53
cmpq $0x0, 0x28(%rsp)
je 0x29c6
xorl %r13d, %r13d
xorl %r12d, %r12d
xorl %ebx, %ebx
movq $0x0, 0x88(%rsp)
movq 0x38(%rsp), %rax
cmpb $0x2a, (%rax,%r13)
jne 0x2958
testl %ebx, %ebx
je 0x2951
cmpq %rcx, 0x88(%rsp)
jne 0x2938
leaq (%rcx,%rcx), %r15
testq %rcx, %rcx
movl $0x4, %eax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
callq 0x1110
movq %rax, %rdi
movq %r15, %rcx
shll $0x4, %ebx
movq 0x88(%rsp), %rax
movl %ebx, (%rdi,%rax,4)
incq %rax
movq %rax, 0x88(%rsp)
incl %r12d
xorl %ebx, %ebx
jmp 0x29ae
testl %r12d, %r12d
je 0x29a9
cmpq %rcx, 0x88(%rsp)
jne 0x298a
leaq (%rcx,%rcx), %r15
testq %rcx, %rcx
movl $0x4, %eax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
callq 0x1110
movq %rax, %rdi
movq %r15, %rcx
shll $0x4, %r12d
orl $0x2, %r12d
movq 0x88(%rsp), %rax
movl %r12d, (%rdi,%rax,4)
incq %rax
movq %rax, 0x88(%rsp)
incl %ebx
xorl %r12d, %r12d
incq %r13
cmpq %r13, 0x28(%rsp)
ja 0x28fb
shll $0x4, %r12d
orl $0x2, %r12d
jmp 0x29da
movl $0x2, %r12d
movq $0x0, 0x88(%rsp)
xorl %ebx, %ebx
testl %ebx, %ebx
leaq 0x70(%rsp), %r13
je 0x2a18
cmpq %rcx, 0x88(%rsp)
jne 0x2a10
leaq (%rcx,%rcx), %r15
testq %rcx, %rcx
movl $0x4, %eax
cmoveq %rax, %r15
leaq (,%r15,4), %rsi
callq 0x1110
movq %rax, %rdi
movq %r15, %rcx
shll $0x4, %ebx
movl %ebx, %r12d
jmp 0x2a45
cmpq %rcx, 0x88(%rsp)
jne 0x2a45
leaq (%rcx,%rcx), %rbx
testq %rcx, %rcx
movl $0x4, %eax
cmoveq %rax, %rbx
leaq (,%rbx,4), %rsi
callq 0x1110
movq %rax, %rdi
movq %rbx, %rcx
movq %rcx, 0x98(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x88(%rsp), %rbx
movl %r12d, (%rdi,%rbx,4)
incq %rbx
movq 0x20(%rsp), %r15
movq 0x70(%rsp), %rax
movslq 0x10(%rsp), %r12
addq %r12, %rax
incq %rax
cmpq 0x78(%rsp), %rax
jb 0x2acb
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
addq 0x70(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x10e0
addq 0x70(%rsp), %r12
movq %r12, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%r12)
movq 0x70(%rsp), %rax
addq $0x6, %rax
cmpq 0x78(%rsp), %rax
jb 0x2b58
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x9, 0x4(%rcx,%rax)
movl $0x36313509, (%rcx,%rax) # 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), %r15
movq 0x70(%rsp), %rax
movslq 0x10(%rsp), %r12
addq %r12, %rax
incq %rax
cmpq 0x78(%rsp), %rax
jb 0x2bf6
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
addq 0x70(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x10e0
addq 0x70(%rsp), %r12
movq %r12, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%r12)
movq 0x70(%rsp), %rax
addq $0x7, %rax
cmpq 0x78(%rsp), %rax
jb 0x2c83
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movw $0x930, 0x4(%rcx,%rax)  # imm = 0x930
movl $0x36093109, (%rcx,%rax) # imm = 0x36093109
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x6(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x6(%rcx,%rax)
testq %rbx, %rbx
movq 0x8(%rsp), %rsi
jle 0x2d89
movq %rbx, %r12
xorl %ebx, %ebx
movl (%rsi,%rbx,4), %edi
shrl $0x4, %edi
movq %r13, %rsi
callq 0x33ad
movq 0x8(%rsp), %rsi
movl (%rsi,%rbx,4), %eax
andl $0xf, %eax
leaq 0x14ff(%rip), %rcx      # 0x41eb
movb (%rax,%rcx), %r15b
movq 0x70(%rsp), %rax
incq %rax
cmpq 0x78(%rsp), %rax
jb 0x2d52
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 0x1110
movq 0x8(%rsp), %rsi
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb %r15b, (%rcx,%rax)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rcx,%rax)
incq %rbx
cmpq %rbx, %r12
jne 0x2ccc
movq 0x70(%rsp), %rax
addq $0x8, %rax
cmpq 0x78(%rsp), %rax
jb 0x2de7
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movl $0x9300930, 0x3(%rcx,%rax) # imm = 0x9300930
movl $0x30092a09, (%rcx,%rax) # 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), %r13
movq 0x70(%rsp), %rax
movslq 0x40(%rsp), %r12
addq %r12, %rax
incq %rax
cmpq 0x78(%rsp), %rax
leaq 0x4(%rsp), %rbx
jb 0x2e8d
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
addq 0x70(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x10e0
addq 0x70(%rsp), %r12
movq %r12, 0x70(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax,%r12)
movq 0x70(%rsp), %rax
addq $0x3, %rax
cmpq 0x78(%rsp), %rax
jb 0x2f1a
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 0x1110
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
movw $0x2a09, (%rcx,%rax)    # imm = 0x2A09
movq 0x70(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, 0x70(%rsp)
movb $0x0, 0x2(%rcx,%rax)
movl $0x0, 0x88(%rsp)
movb 0x2(%rsp), %r15b
movq 0xd0(%rsp), %r13
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3050
testl %eax, %eax
jns 0x165c
jmp 0x2fb5
movq 0xf0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x1252
jmp 0x1e95
movq $0x0, 0xd8(%rsp)
movq $0x0, 0xa8(%rsp)
movq $0x0, 0x8(%rsp)
testq %r14, %r14
je 0x2fca
movq (%r14), %rdi
callq 0x1040
movq %r14, %rdi
callq 0x1040
movq %r13, %rdi
callq 0x1030
movq 0xa8(%rsp), %rdi
callq 0x1040
movq 0xc0(%rsp), %rdi
callq 0x1040
movq 0x8(%rsp), %rdi
callq 0x1040
movq 0xd8(%rsp), %rdi
callq 0x1040
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x20(%rsp,%r14), %rdi
callq 0x1040
addq $0x18, %r14
cmpq $0x78, %r14
jne 0x3008
movl %ebx, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x12c5
movl $0x1, %ebx
jmp 0x301c
callq 0x122a
callq 0x11e0
callq 0x11b8
callq 0x1190