// File: /workspace/github_c_makefile_star2_O0/aokad[P]sequeeze/seqtk.c
// Function: stk_mergefa
int stk_mergefa(int argc, char *argv[])
{
	gzFile fp[2];
	kseq_t *seq[2];
	int i, l, c, is_intersect = 0, is_haploid = 0, qual = 0, is_mask = 0, is_randhet = 0;
	uint64_t cnt[5];
	while ((c = getopt(argc, argv, "himrq:")) >= 0) {
		switch (c) {
			case 'i': is_intersect = 1; break;
			case 'h': is_haploid = 1; break;
			case 'm': is_mask = 1; break;
			case 'r': is_randhet = 1; break;
			case 'q': qual = atoi(optarg); break;
		}
	}
	if (is_mask && is_intersect) {
		fprintf(stderr, "[%s] `-i' and `-h' cannot be applied at the same time.\n", __func__);
		return 1;
	}
	if (optind + 2 > argc) {
		fprintf(stderr, "\nUsage: seqtk mergefa [options] <in1.fa> <in2.fa>\n\n");
		fprintf(stderr, "Options: -q INT   quality threshold [0]\n");
		fprintf(stderr, "         -i       take intersection\n");
		fprintf(stderr, "         -m       convert to lowercase when one of the input base is N\n");
		fprintf(stderr, "         -r       pick a random allele from het\n");
		fprintf(stderr, "         -h       suppress hets in the input\n\n");
		return 1;
	}
	for (i = 0; i < 2; ++i) {
		fp[i] = strcmp(argv[optind+i], "-")? gzopen(argv[optind+i], "r") : gzdopen(fileno(stdin), "r");
		seq[i] = kseq_init(fp[i]);
	}
	if (fp[0] == 0 || fp[1] == 0) {
		fprintf(stderr, "[E::%s] failed to open the input file/stream.\n", __func__);
		return 1;
	}
	cnt[0] = cnt[1] = cnt[2] = cnt[3] = cnt[4] = 0;
	srand48(11);
	while (kseq_read(seq[0]) >= 0) {
		int min_l, c[2], b[2], is_upper;
		kseq_read(seq[1]);
		if (strcmp(seq[0]->name.s, seq[1]->name.s))
			fprintf(stderr, "[%s] Different sequence names: %s != %s\n", __func__, seq[0]->name.s, seq[1]->name.s);
		if (seq[0]->seq.l != seq[1]->seq.l)
			fprintf(stderr, "[%s] Unequal sequence length: %ld != %ld\n", __func__, seq[0]->seq.l, seq[1]->seq.l);
		min_l = seq[0]->seq.l < seq[1]->seq.l? seq[0]->seq.l : seq[1]->seq.l;
		printf(">%s", seq[0]->name.s);
		for (l = 0; l < min_l; ++l) {
			c[0] = seq[0]->seq.s[l]; c[1] = seq[1]->seq.s[l];
			if (seq[0]->qual.l && seq[0]->qual.s[l] - 33 < qual) c[0] = tolower(c[0]);
			if (seq[1]->qual.l && seq[1]->qual.s[l] - 33 < qual) c[1] = tolower(c[1]);
			if (is_intersect) is_upper = (isupper(c[0]) || isupper(c[1]))? 1 : 0;
			else if (is_mask) is_upper = (isupper(c[0]) || isupper(c[1]))? 1 : 0;
			else is_upper = (isupper(c[0]) && isupper(c[1]))? 1 : 0;
			c[0] = seq_nt16_table[c[0]]; c[1] = seq_nt16_table[c[1]];
			if (c[0] == 0) c[0] = 15;
			if (c[1] == 0) c[1] = 15;
			b[0] = bitcnt_table[c[0]];
			b[1] = bitcnt_table[c[1]];
			if (is_upper) {
				if (b[0] == 1 && b[1] == 1) {
					if (c[0] == c[1]) ++cnt[0];
					else ++cnt[1];
				} else if (b[0] == 1 && b[1] == 2) ++cnt[2];
				else if (b[0] == 2 && b[1] == 1) ++cnt[3];
				else if (b[0] == 2 && b[1] == 2) ++cnt[4];
			}
			if (is_haploid && (b[0] > 1 || b[1] > 1)) is_upper = 0;
			if (is_intersect) {
				c[0] = c[0] & c[1];
				if (c[0] == 0) is_upper = 0; // FIXME: is this a bug - c[0] cannot be 0!
			} else if (is_mask) {
				if (c[0] == 15 || c[1] == 15) is_upper = 0;
				c[0] &= c[1];
				if (c[0] == 0) is_upper = 0;
			} else if (is_randhet) {
				if (b[0] == 1 && b[1] == 1) { // two homs
					c[0] |= c[1];
				} else if (((b[0] == 1 && b[1] == 2) || (b[0] == 2 && b[1] == 1)) && (c[0]&c[1])) { // one hom, one het
					c[0] = (lrand48()&1)? (c[0] & c[1]) : (c[0] | c[1]);
				} else if (b[0] == 2 && b[1] == 2 && c[0] == c[1]) { // double hets
					if (lrand48()&1) {
						if (lrand48()&1) {
							for (i = 8; i >= 1; i >>= 1) // pick the "larger" allele
								if (c[0]&i) c[0] &= i;
						} else {
							for (i = 1; i <= 8; i <<= 1) // pick the "smaller" allele
								if (c[0]&i) c[0] &= i;
						}
					} // else set as het
				} else is_upper = 0;
			} else c[0] |= c[1];
			c[0] = seq_nt16_rev_table[c[0]];
			if (!is_upper) c[0] = tolower(c[0]);
			if (l%60 == 0) putchar('\n');
			putchar(c[0]);
		}
		putchar('\n');
	}
	fprintf(stderr, "[%s] (same,diff,hom-het,het-hom,het-het)=(%ld,%ld,%ld,%ld,%ld)\n", __func__, (long)cnt[0], (long)cnt[1], (long)cnt[2], (long)cnt[3], (long)cnt[4]);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x87f4(%rip), %rdx      # 0xd7d7
callq 0x2240
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jl 0x5053
movl -0x3c(%rbp), %eax
addl $-0x68, %eax
movl %eax, %ecx
movq %rcx, -0xa0(%rbp)
subl $0xa, %eax
ja 0x5051
movq -0xa0(%rbp), %rax
leaq 0x8106(%rip), %rcx      # 0xd118
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x40(%rbp)
jmp 0x5051
movl $0x1, -0x44(%rbp)
jmp 0x5051
movl $0x1, -0x4c(%rbp)
jmp 0x5051
movl $0x1, -0x50(%rbp)
jmp 0x5051
movq 0xbf92(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x2250
movl %eax, -0x48(%rbp)
jmp 0x4fd5
cmpl $0x0, -0x4c(%rbp)
je 0x508a
cmpl $0x0, -0x40(%rbp)
je 0x508a
movq 0xbf92(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x876e(%rip), %rsi      # 0xd7de
leaq 0x879f(%rip), %rdx      # 0xd816
movb $0x0, %al
callq 0x2190
movl $0x1, -0x4(%rbp)
jmp 0x5967
movq 0xbf3f(%rip), %rax      # 0x10fd0
movl (%rax), %eax
addl $0x2, %eax
cmpl -0x8(%rbp), %eax
jle 0x513b
movq 0xbf52(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x8772(%rip), %rsi      # 0xd822
movb $0x0, %al
callq 0x2190
movq 0xbf3a(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x878e(%rip), %rsi      # 0xd856
movb $0x0, %al
callq 0x2190
movq 0xbf22(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x879f(%rip), %rsi      # 0xd87f
movb $0x0, %al
callq 0x2190
movq 0xbf0a(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x87ac(%rip), %rsi      # 0xd8a4
movb $0x0, %al
callq 0x2190
movq 0xbef2(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x87dc(%rip), %rsi      # 0xd8ec
movb $0x0, %al
callq 0x2190
movq 0xbeda(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x87f5(%rip), %rsi      # 0xd91d
movb $0x0, %al
callq 0x2190
movl $0x1, -0x4(%rbp)
jmp 0x5967
movl $0x0, -0x34(%rbp)
cmpl $0x2, -0x34(%rbp)
jge 0x51fc
movq -0x10(%rbp), %rax
movq 0xbe79(%rip), %rcx      # 0x10fd0
movl (%rcx), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x932c(%rip), %rsi      # 0xe496
callq 0x2170
cmpl $0x0, %eax
je 0x51a0
movq -0x10(%rbp), %rax
movq 0xbe51(%rip), %rcx      # 0x10fd0
movl (%rcx), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x80ee(%rip), %rsi      # 0xd280
callq 0x2220
movq %rax, -0xa8(%rbp)
jmp 0x51c4
movq 0xbe21(%rip), %rax      # 0x10fc8
movq (%rax), %rdi
callq 0x21b0
movl %eax, %edi
leaq 0x80c8(%rip), %rsi      # 0xd280
callq 0x20b0
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rcx
movslq -0x34(%rbp), %rax
movq %rcx, -0x20(%rbp,%rax,8)
movslq -0x34(%rbp), %rax
movq -0x20(%rbp,%rax,8), %rdi
callq 0x38f0
movq %rax, %rcx
movslq -0x34(%rbp), %rax
movq %rcx, -0x30(%rbp,%rax,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5142
cmpq $0x0, -0x20(%rbp)
je 0x520a
cmpq $0x0, -0x18(%rbp)
jne 0x5235
movq 0xbde7(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x825e(%rip), %rsi      # 0xd479
leaq 0x85f4(%rip), %rdx      # 0xd816
movb $0x0, %al
callq 0x2190
movl $0x1, -0x4(%rbp)
jmp 0x5967
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movl $0xb, %edi
callq 0x2210
movq -0x30(%rbp), %rdi
callq 0x3930
cmpl $0x0, %eax
jl 0x5924
movq -0x28(%rbp), %rdi
callq 0x3930
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x2170
cmpl $0x0, %eax
je 0x52cb
movq 0xbd55(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %r8
leaq 0x868f(%rip), %rsi      # 0xd94c
leaq 0x8552(%rip), %rdx      # 0xd816
movb $0x0, %al
callq 0x2190
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x30(%rcx), %rax
je 0x530c
movq 0xbd14(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x30(%rax), %r8
leaq 0x8677(%rip), %rsi      # 0xd975
leaq 0x8511(%rip), %rdx      # 0xd816
movb $0x0, %al
callq 0x2190
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x532f
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0xb0(%rbp)
jmp 0x533e
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movl %eax, -0x84(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x8222(%rip), %rdi      # 0xd57c
movb $0x0, %al
callq 0x20f0
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x84(%rbp), %eax
jge 0x5915
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x8c(%rbp)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x88(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x53d7
movq -0x30(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x21, %eax
cmpl -0x48(%rbp), %eax
jge 0x53d7
movl -0x8c(%rbp), %edi
callq 0x21c0
movl %eax, -0x8c(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x540b
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x21, %eax
cmpl -0x48(%rbp), %eax
jge 0x540b
movl -0x88(%rbp), %edi
callq 0x21c0
movl %eax, -0x88(%rbp)
cmpl $0x0, -0x40(%rbp)
je 0x5479
callq 0x2280
movq (%rax), %rax
movslq -0x8c(%rbp), %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x100, %ecx            # imm = 0x100
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0xb1(%rbp)
jne 0x545b
callq 0x2280
movq (%rax), %rax
movslq -0x88(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
setne %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x98(%rbp)
jmp 0x5549
cmpl $0x0, -0x4c(%rbp)
je 0x54e4
callq 0x2280
movq (%rax), %rax
movslq -0x8c(%rbp), %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x100, %ecx            # imm = 0x100
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0xb2(%rbp)
jne 0x54c9
callq 0x2280
movq (%rax), %rax
movslq -0x88(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
setne %al
movb %al, -0xb2(%rbp)
movb -0xb2(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x98(%rbp)
jmp 0x5547
callq 0x2280
movq (%rax), %rax
movslq -0x8c(%rbp), %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x100, %ecx            # imm = 0x100
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xb3(%rbp)
je 0x552e
callq 0x2280
movq (%rax), %rax
movslq -0x88(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
setne %al
movb %al, -0xb3(%rbp)
movb -0xb3(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x98(%rbp)
jmp 0x5549
movslq -0x8c(%rbp), %rcx
leaq 0xbc09(%rip), %rax      # 0x11160
movzbl (%rax,%rcx), %eax
movl %eax, -0x8c(%rbp)
movslq -0x88(%rbp), %rcx
leaq 0xbbf1(%rip), %rax      # 0x11160
movzbl (%rax,%rcx), %eax
movl %eax, -0x88(%rbp)
cmpl $0x0, -0x8c(%rbp)
jne 0x558c
movl $0xf, -0x8c(%rbp)
cmpl $0x0, -0x88(%rbp)
jne 0x559f
movl $0xf, -0x88(%rbp)
movslq -0x8c(%rbp), %rcx
leaq 0xbde3(%rip), %rax      # 0x11390
movl (%rax,%rcx,4), %eax
movl %eax, -0x94(%rbp)
movslq -0x88(%rbp), %rcx
leaq 0xbdcc(%rip), %rax      # 0x11390
movl (%rax,%rcx,4), %eax
movl %eax, -0x90(%rbp)
cmpl $0x0, -0x98(%rbp)
je 0x567c
cmpl $0x1, -0x94(%rbp)
jne 0x5616
cmpl $0x1, -0x90(%rbp)
jne 0x5616
movl -0x8c(%rbp), %eax
cmpl -0x88(%rbp), %eax
jne 0x5608
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x5614
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x567a
cmpl $0x1, -0x94(%rbp)
jne 0x5636
cmpl $0x2, -0x90(%rbp)
jne 0x5636
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x5678
cmpl $0x2, -0x94(%rbp)
jne 0x5656
cmpl $0x1, -0x90(%rbp)
jne 0x5656
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x5676
cmpl $0x2, -0x94(%rbp)
jne 0x5674
cmpl $0x2, -0x90(%rbp)
jne 0x5674
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x5676
jmp 0x5678
jmp 0x567a
jmp 0x567c
cmpl $0x0, -0x44(%rbp)
je 0x569e
cmpl $0x1, -0x94(%rbp)
jg 0x5694
cmpl $0x1, -0x90(%rbp)
jle 0x569e
movl $0x0, -0x98(%rbp)
cmpl $0x0, -0x40(%rbp)
je 0x56ce
movl -0x8c(%rbp), %eax
andl -0x88(%rbp), %eax
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x8c(%rbp)
jne 0x56c9
movl $0x0, -0x98(%rbp)
jmp 0x58b0
cmpl $0x0, -0x4c(%rbp)
je 0x571a
cmpl $0xf, -0x8c(%rbp)
je 0x56e6
cmpl $0xf, -0x88(%rbp)
jne 0x56f0
movl $0x0, -0x98(%rbp)
movl -0x88(%rbp), %eax
andl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x8c(%rbp)
jne 0x5715
movl $0x0, -0x98(%rbp)
jmp 0x58ae
cmpl $0x0, -0x50(%rbp)
je 0x589a
cmpl $0x1, -0x94(%rbp)
jne 0x574d
cmpl $0x1, -0x90(%rbp)
jne 0x574d
movl -0x88(%rbp), %eax
orl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x5898
cmpl $0x1, -0x94(%rbp)
jne 0x575f
cmpl $0x2, -0x90(%rbp)
je 0x5771
cmpl $0x2, -0x94(%rbp)
jne 0x57c8
cmpl $0x1, -0x90(%rbp)
jne 0x57c8
movl -0x8c(%rbp), %eax
andl -0x88(%rbp), %eax
cmpl $0x0, %eax
je 0x57c8
callq 0x21f0
andq $0x1, %rax
cmpq $0x0, %rax
je 0x57a5
movl -0x8c(%rbp), %eax
andl -0x88(%rbp), %eax
movl %eax, -0xb8(%rbp)
jmp 0x57b7
movl -0x8c(%rbp), %eax
orl -0x88(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x5896
cmpl $0x2, -0x94(%rbp)
jne 0x588a
cmpl $0x2, -0x90(%rbp)
jne 0x588a
movl -0x8c(%rbp), %eax
cmpl -0x88(%rbp), %eax
jne 0x588a
callq 0x21f0
andq $0x1, %rax
cmpq $0x0, %rax
je 0x5888
callq 0x21f0
andq $0x1, %rax
cmpq $0x0, %rax
je 0x584e
movl $0x8, -0x34(%rbp)
cmpl $0x1, -0x34(%rbp)
jl 0x584c
movl -0x8c(%rbp), %eax
andl -0x34(%rbp), %eax
cmpl $0x0, %eax
je 0x5840
movl -0x34(%rbp), %eax
andl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x5842
movl -0x34(%rbp), %eax
sarl %eax
movl %eax, -0x34(%rbp)
jmp 0x581d
jmp 0x5886
movl $0x1, -0x34(%rbp)
cmpl $0x8, -0x34(%rbp)
jg 0x5884
movl -0x8c(%rbp), %eax
andl -0x34(%rbp), %eax
cmpl $0x0, %eax
je 0x5878
movl -0x34(%rbp), %eax
andl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x587a
movl -0x34(%rbp), %eax
shll %eax
movl %eax, -0x34(%rbp)
jmp 0x5855
jmp 0x5886
jmp 0x5888
jmp 0x5894
movl $0x0, -0x98(%rbp)
jmp 0x5896
jmp 0x5898
jmp 0x58ac
movl -0x88(%rbp), %eax
orl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x58ae
jmp 0x58b0
movq 0xbaa9(%rip), %rax      # 0x11360
movslq -0x8c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x98(%rbp)
jne 0x58e2
movl -0x8c(%rbp), %edi
callq 0x21c0
movl %eax, -0x8c(%rbp)
movl -0x38(%rbp), %eax
movl $0x3c, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x58fc
movl $0xa, %edi
callq 0x2050
movl -0x8c(%rbp), %edi
callq 0x2050
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x5368
movl $0xa, %edi
callq 0x2050
jmp 0x5267
movq 0xb6cd(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %r8
movq -0x70(%rbp), %r9
movq -0x68(%rbp), %r10
movq -0x60(%rbp), %rax
leaq 0x8056(%rip), %rsi      # 0xd99f
leaq 0x7ec6(%rip), %rdx      # 0xd816
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2190
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)