// File: /workspace/github_c_makefile_star2_O0/aokad[P]sequeeze/seqtk.c
// Function: stk_seq
int stk_seq(int argc, char *argv[])
{
	gzFile fp;
	kseq_t *seq;
	int c, qual_thres = 0, flag = 0, qual_shift = 33, mask_chr = 0, min_len = 0, max_q = 255, fake_qual = -1;
	unsigned i, line_len = 0;
	int64_t n_seqs = 0;
	double frac = 1.;
	khash_t(reg) *h = 0;
	krand_t *kr = 0;

	while ((c = getopt(argc, argv, "N12q:l:Q:aACrn:s:f:M:L:cVUX:SF:")) >= 0) {
		switch (c) {
			case 'a':
			case 'A': flag |= 1; break;
			case 'C': flag |= 2; break;
			case 'r': flag |= 4; break;
			case 'c': flag |= 8; break;
			case '1': flag |= 16; break;
			case '2': flag |= 32; break;
			case 'V': flag |= 64; break;
			case 'N': flag |= 128; break;
			case 'U': flag |= 256; break;
			case 'S': flag |= 512; break;
			case 'M': h = stk_reg_read(optarg); break;
			case 'n': mask_chr = *optarg; break;
			case 'Q': qual_shift = atoi(optarg); break;
			case 'q': qual_thres = atoi(optarg); break;
			case 'X': max_q = atoi(optarg); break;
			case 'l': line_len = atoi(optarg); break;
			case 'L': min_len = atoi(optarg); break;
			case 's': kr = kr_srand(atol(optarg)); break;
			case 'f': frac = atof(optarg); break;
			case 'F': fake_qual = *optarg; break;
		}
	}
	if (kr == 0) kr = kr_srand(11);
	if (argc == optind && isatty(fileno(stdin))) {
		fprintf(stderr, "\n");
		fprintf(stderr, "Usage:   seqtk seq [options] <in.fq>|<in.fa>\n\n");
		fprintf(stderr, "Options: -q INT    mask bases with quality lower than INT [0]\n");
		fprintf(stderr, "         -X INT    mask bases with quality higher than INT [255]\n");
		fprintf(stderr, "         -n CHAR   masked bases converted to CHAR; 0 for lowercase [0]\n");
		fprintf(stderr, "         -l INT    number of residues per line; 0 for 2^32-1 [%d]\n", line_len);
		fprintf(stderr, "         -Q INT    quality shift: ASCII-INT gives base quality [%d]\n", qual_shift);
		fprintf(stderr, "         -s INT    random seed (effective with -f) [11]\n");
		fprintf(stderr, "         -f FLOAT  sample FLOAT fraction of sequences [1]\n");
		fprintf(stderr, "         -M FILE   mask regions in BED or name list FILE [null]\n");
		fprintf(stderr, "         -L INT    drop sequences with length shorter than INT [0]\n");
		fprintf(stderr, "         -F CHAR   fake FASTQ quality []\n");
		fprintf(stderr, "         -c        mask complement region (effective with -M)\n");
		fprintf(stderr, "         -r        reverse complement\n");
		fprintf(stderr, "         -A        force FASTA output (discard quality)\n");
		fprintf(stderr, "         -C        drop comments at the header lines\n");
		fprintf(stderr, "         -N        drop sequences containing ambiguous bases\n");
		fprintf(stderr, "         -1        output the 2n-1 reads only\n");
		fprintf(stderr, "         -2        output the 2n reads only\n");
		fprintf(stderr, "         -V        shift quality by '(-Q) - 33'\n");
		fprintf(stderr, "         -U        convert all bases to uppercases\n");
		fprintf(stderr, "         -S        strip of white spaces in sequences\n");
		fprintf(stderr, "\n");
		free(kr);
		return 1;
	}
	if (line_len == 0) line_len = UINT_MAX;
	fp = optind < argc && strcmp(argv[optind], "-")? gzopen(argv[optind], "r") : gzdopen(fileno(stdin), "r");
	if (fp == 0) {
		fprintf(stderr, "[E::%s] failed to open the input file/stream.\n", __func__);
		return 1;
	}
	seq = kseq_init(fp);
	qual_thres += qual_shift;
	while (kseq_read(seq) >= 0) {
		++n_seqs;
		if (seq->seq.l < min_len) continue; // NB: length filter before taking random
		if (frac < 1. && kr_drand(kr) >= frac) continue;
		if (flag & 48) { // then choose odd/even reads only
			if ((flag&16) && (n_seqs&1) == 0) continue;
			if ((flag&32) && (n_seqs&1) == 1) continue;
		}
		if (flag & 512) { // option -S: squeeze out white spaces
			int k;
			if (seq->qual.l) {
				for (i = k = 0; i < seq->seq.l; ++i)
					if (!isspace(seq->seq.s[i]))
						seq->qual.s[k++] = seq->qual.s[i];
				seq->qual.l = k;
			}
			for (i = k = 0; i < seq->seq.l; ++i)
				if (!isspace(seq->seq.s[i]))
					seq->seq.s[k++] = seq->seq.s[i];
			seq->seq.l = k;
		}
		if (seq->qual.l && qual_thres > qual_shift) {
			if (mask_chr) {
				for (i = 0; i < seq->seq.l; ++i)
					if (seq->qual.s[i] < qual_thres || seq->qual.s[i] > max_q)
						seq->seq.s[i] = mask_chr;
			} else {
				for (i = 0; i < seq->seq.l; ++i)
					if (seq->qual.s[i] < qual_thres || seq->qual.s[i] > max_q)
						seq->seq.s[i] = tolower(seq->seq.s[i]);
			}
		}
		if (flag & 256) // option -U: convert to uppercases
			for (i = 0; i < seq->seq.l; ++i)
				seq->seq.s[i] = toupper(seq->seq.s[i]);
		if (flag & 1) seq->qual.l = 0; // option -a: fastq -> fasta
		else if (fake_qual >= 33 && fake_qual <= 127) {
			if (seq->qual.m < seq->seq.m) {
				seq->qual.m = seq->seq.m;
				seq->qual.s = (char*)realloc(seq->qual.s, seq->qual.m);
			}
			seq->qual.l = seq->seq.l;
			memset(seq->qual.s, fake_qual, seq->qual.l);
			seq->qual.s[seq->qual.l] = 0;
		}
		if (flag & 2) seq->comment.l = 0; // option -C: drop fasta/q comments
		if (h) stk_mask(seq, h, flag&8, mask_chr); // masking
		if (flag & 4) { // option -r: reverse complement
			int c0, c1;
			for (i = 0; i < seq->seq.l>>1; ++i) { // reverse complement sequence
				c0 = comp_tab[(int)seq->seq.s[i]];
				c1 = comp_tab[(int)seq->seq.s[seq->seq.l - 1 - i]];
				seq->seq.s[i] = c1;
				seq->seq.s[seq->seq.l - 1 - i] = c0;
			}
			if (seq->seq.l & 1) // complement the remaining base
				seq->seq.s[seq->seq.l>>1] = comp_tab[(int)seq->seq.s[seq->seq.l>>1]];
			if (seq->qual.l) {
				for (i = 0; i < seq->seq.l>>1; ++i) // reverse quality
					c0 = seq->qual.s[i], seq->qual.s[i] = seq->qual.s[seq->qual.l - 1 - i], seq->qual.s[seq->qual.l - 1 - i] = c0;
			}
		}
		if ((flag & 64) && seq->qual.l && qual_shift != 33)
			for (i = 0; i < seq->qual.l; ++i)
				seq->qual.s[i] -= qual_shift - 33;
		if (flag & 128) { // option -N: drop sequences containing ambiguous bases - Note: this is the last step!
			for (i = 0; i < seq->seq.l; ++i)
				if (seq_nt16to4_table[seq_nt16_table[(int)seq->seq.s[i]]] > 3) break;
			if (i < seq->seq.l) continue;
		}
		stk_printseq(seq, line_len);
	}
	kseq_destroy(seq);
	gzclose(fp);
	stk_reg_destroy(h);
	free(kr);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x21, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl $0xff, -0x3c(%rbp)
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movsd 0x5346(%rip), %xmm0     # 0xd020
movsd %xmm0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x6075(%rip), %rdx      # 0xdd72
callq 0x2240
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jl 0x7ea5
movl -0x24(%rbp), %eax
addl $-0x31, %eax
movl %eax, %ecx
movq %rcx, -0x80(%rbp)
subl $0x42, %eax
ja 0x7ea0
movq -0x80(%rbp), %rax
leaq 0x5416(%rip), %rcx      # 0xd144
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x2c(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movl -0x2c(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movl -0x2c(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movl -0x2c(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movl -0x2c(%rbp), %eax
orl $0x10, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movl -0x2c(%rbp), %eax
orl $0x20, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movl -0x2c(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movl -0x2c(%rbp), %eax
orl $0x80, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movl -0x2c(%rbp), %eax
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movl -0x2c(%rbp), %eax
orl $0x200, %eax            # imm = 0x200
movl %eax, -0x2c(%rbp)
jmp 0x7ea0
movq 0x9208(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x23a0
movq %rax, -0x60(%rbp)
jmp 0x7ea0
movq 0x91f0(%rip), %rax      # 0x10fd8
movq (%rax), %rax
movsbl (%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x7ea0
movq 0x91db(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x2250
movl %eax, -0x30(%rbp)
jmp 0x7ea0
movq 0x91c4(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x2250
movl %eax, -0x28(%rbp)
jmp 0x7ea0
movq 0x91b0(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x2250
movl %eax, -0x3c(%rbp)
jmp 0x7ea0
movq 0x919c(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x2250
movl %eax, -0x48(%rbp)
jmp 0x7ea0
movq 0x9188(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x2250
movl %eax, -0x38(%rbp)
jmp 0x7ea0
movq 0x9174(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x2230
movq %rax, %rdi
callq 0x2e00
movq %rax, -0x68(%rbp)
jmp 0x7ea0
movq 0x9157(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x20a0
movsd %xmm0, -0x58(%rbp)
jmp 0x7ea0
movq 0x9141(%rip), %rax      # 0x10fd8
movq (%rax), %rax
movsbl (%rax), %eax
movl %eax, -0x40(%rbp)
jmp 0x7cef
cmpq $0x0, -0x68(%rbp)
jne 0x7eba
movl $0xb, %edi
callq 0x2e00
movq %rax, -0x68(%rbp)
movl -0x8(%rbp), %eax
movq 0x910c(%rip), %rcx      # 0x10fd0
cmpl (%rcx), %eax
jne 0x812e
movq 0x90f5(%rip), %rax      # 0x10fc8
movq (%rax), %rdi
callq 0x21b0
movl %eax, %edi
callq 0x2090
cmpl $0x0, %eax
je 0x812e
movq 0x9106(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x583b(%rip), %rsi      # 0xd737
movb $0x0, %al
callq 0x2190
movq 0x90ee(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5e7e(%rip), %rsi      # 0xdd92
movb $0x0, %al
callq 0x2190
movq 0x90d6(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5e95(%rip), %rsi      # 0xddc1
movb $0x0, %al
callq 0x2190
movq 0x90be(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5ebc(%rip), %rsi      # 0xde00
movb $0x0, %al
callq 0x2190
movq 0x90a6(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5ee6(%rip), %rsi      # 0xde42
movb $0x0, %al
callq 0x2190
movq 0x908e(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
movl -0x48(%rbp), %edx
leaq 0x5f13(%rip), %rsi      # 0xde8a
movb $0x0, %al
callq 0x2190
movq 0x9073(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
movl -0x30(%rbp), %edx
leaq 0x5f3b(%rip), %rsi      # 0xdecd
movb $0x0, %al
callq 0x2190
movq 0x9058(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5f68(%rip), %rsi      # 0xdf12
movb $0x0, %al
callq 0x2190
movq 0x9040(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5f89(%rip), %rsi      # 0xdf4b
movb $0x0, %al
callq 0x2190
movq 0x9028(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5fac(%rip), %rsi      # 0xdf86
movb $0x0, %al
callq 0x2190
movq 0x9010(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5fd5(%rip), %rsi      # 0xdfc7
movb $0x0, %al
callq 0x2190
movq 0x8ff8(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x6001(%rip), %rsi      # 0xe00b
movb $0x0, %al
callq 0x2190
movq 0x8fe0(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x6013(%rip), %rsi      # 0xe035
movb $0x0, %al
callq 0x2190
movq 0x8fc8(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x603a(%rip), %rsi      # 0xe074
movb $0x0, %al
callq 0x2190
movq 0x8fb0(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x6049(%rip), %rsi      # 0xe09b
movb $0x0, %al
callq 0x2190
movq 0x8f98(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x606a(%rip), %rsi      # 0xe0d4
movb $0x0, %al
callq 0x2190
movq 0x8f80(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x6088(%rip), %rsi      # 0xe10a
movb $0x0, %al
callq 0x2190
movq 0x8f68(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x60ae(%rip), %rsi      # 0xe148
movb $0x0, %al
callq 0x2190
movq 0x8f50(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x60c5(%rip), %rsi      # 0xe177
movb $0x0, %al
callq 0x2190
movq 0x8f38(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x60da(%rip), %rsi      # 0xe1a4
movb $0x0, %al
callq 0x2190
movq 0x8f20(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x60f3(%rip), %rsi      # 0xe1d5
movb $0x0, %al
callq 0x2190
movq 0x8f08(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x610f(%rip), %rsi      # 0xe209
movb $0x0, %al
callq 0x2190
movq 0x8ef0(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5625(%rip), %rsi      # 0xd737
movb $0x0, %al
callq 0x2190
movq -0x68(%rbp), %rdi
callq 0x2040
movl $0x1, -0x4(%rbp)
jmp 0x88b1
cmpl $0x0, -0x48(%rbp)
jne 0x813b
movl $0xffffffff, -0x48(%rbp) # imm = 0xFFFFFFFF
movq 0x8e8e(%rip), %rax      # 0x10fd0
movl (%rax), %eax
cmpl -0x8(%rbp), %eax
jge 0x8193
movq -0x10(%rbp), %rax
movq 0x8e7c(%rip), %rcx      # 0x10fd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x6334(%rip), %rsi      # 0xe496
callq 0x2170
cmpl $0x0, %eax
je 0x8193
movq -0x10(%rbp), %rax
movq 0x8e59(%rip), %rcx      # 0x10fd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x50fb(%rip), %rsi      # 0xd280
callq 0x2220
movq %rax, -0x88(%rbp)
jmp 0x81b7
movq 0x8e2e(%rip), %rax      # 0x10fc8
movq (%rax), %rdi
callq 0x21b0
movl %eax, %edi
leaq 0x50d5(%rip), %rsi      # 0xd280
callq 0x20b0
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x81f4
movq 0x8e28(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x529f(%rip), %rsi      # 0xd479
leaq 0x605f(%rip), %rdx      # 0xe240
movb $0x0, %al
callq 0x2190
movl $0x1, -0x4(%rbp)
jmp 0x88b1
movq -0x18(%rbp), %rdi
callq 0x38f0
movq %rax, -0x20(%rbp)
movl -0x30(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3930
cmpl $0x0, %eax
jl 0x8886
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x38(%rbp), %rcx
cmpq %rcx, %rax
jae 0x823b
jmp 0x820a
movsd 0x4ddd(%rip), %xmm0     # 0xd020
ucomisd -0x58(%rbp), %xmm0
jbe 0x8271
movq -0x68(%rbp), %rdi
callq 0x2ee0
shrq $0xb, %rax
cvtsi2sd %rax, %xmm0
movsd 0x4dd4(%rip), %xmm1     # 0xd038
mulsd %xmm1, %xmm0
ucomisd -0x58(%rbp), %xmm0
jb 0x8271
jmp 0x820a
movl -0x2c(%rbp), %eax
andl $0x30, %eax
cmpl $0x0, %eax
je 0x82ba
movl -0x2c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x829a
movq -0x50(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0x829a
jmp 0x820a
movl -0x2c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x82b8
movq -0x50(%rbp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
jne 0x82b8
jmp 0x820a
jmp 0x82ba
movl -0x2c(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x83e0
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x835d
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x8351
callq 0x2280
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl -0x44(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x8344
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x44(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x6c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x6c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x8346
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x82e8
movslq -0x6c(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x48(%rax)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x83d4
callq 0x2280
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl -0x44(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x83c7
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x44(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x6c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x6c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x83c9
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x836b
movslq -0x6c(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x84d0
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x84d0
cmpl $0x0, -0x34(%rbp)
je 0x845f
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x845d
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl -0x28(%rbp), %eax
jl 0x843d
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl -0x3c(%rbp), %eax
jle 0x8450
movl -0x34(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x44(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x8452
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x8408
jmp 0x84ce
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x84cc
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl -0x28(%rbp), %eax
jl 0x849b
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl -0x3c(%rbp), %eax
jle 0x84bf
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %edi
callq 0x21c0
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x44(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x84c1
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x8466
jmp 0x84ce
jmp 0x84d0
movl -0x2c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x8522
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x8520
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %edi
callq 0x2070
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x44(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x84e4
jmp 0x8522
movl -0x2c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x853e
movq -0x20(%rbp), %rax
movq $0x0, 0x48(%rax)
jmp 0x85d5
cmpl $0x21, -0x40(%rbp)
jl 0x85d3
cmpl $0x7f, -0x40(%rbp)
jg 0x85d3
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x8594
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x2200
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rdi
movl -0x40(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x48(%rcx), %rdx
movzbl %al, %esi
callq 0x2120
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x48(%rcx), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x85d5
movl -0x2c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x85ec
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
cmpq $0x0, -0x60(%rbp)
je 0x8609
movq -0x20(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl -0x2c(%rbp), %edx
andl $0x8, %edx
movl -0x34(%rbp), %ecx
callq 0x7950
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x87ab
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x86c8
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0x8d81(%rip), %rax      # 0x113d0
movsbl (%rax,%rcx), %eax
movl %eax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
subq $0x1, %rcx
movl -0x44(%rbp), %edx
subq %rdx, %rcx
movsbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0x8d52(%rip), %rax      # 0x113d0
movsbl (%rax,%rcx), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x44(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x70(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
subq $0x1, %rcx
movl -0x44(%rbp), %esi
subq %rsi, %rcx
movb %dl, (%rax,%rcx)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x861f
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x8714
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
shrq %rcx
movsbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0x8cd5(%rip), %rax      # 0x113d0
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
shrq %rcx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x87a9
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x87a7
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x48(%rcx), %rcx
subq $0x1, %rcx
movl -0x44(%rbp), %edx
subq %rdx, %rcx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x44(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x70(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x48(%rcx), %rcx
subq $0x1, %rcx
movl -0x44(%rbp), %esi
subq %rsi, %rcx
movb %dl, (%rax,%rcx)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x872a
jmp 0x87a9
jmp 0x87ab
movl -0x2c(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x8802
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x8802
cmpl $0x21, -0x30(%rbp)
je 0x8802
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x8800
movl -0x30(%rbp), %esi
subl $0x21, %esi
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %edx
subl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x87ce
jmp 0x8802
movl -0x2c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8875
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x8861
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x44(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0x8924(%rip), %rax      # 0x11160
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x8b27(%rip), %rax      # 0x11370
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jle 0x8854
jmp 0x8861
jmp 0x8856
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x8816
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x8873
jmp 0x820a
jmp 0x8875
movq -0x20(%rbp), %rdi
movl -0x48(%rbp), %esi
callq 0x7440
jmp 0x820a
movq -0x20(%rbp), %rdi
callq 0x3d40
movq -0x18(%rbp), %rdi
callq 0x2030
movq -0x60(%rbp), %rdi
callq 0x2d10
movq -0x68(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)