// File: /workspace/github_cpp_makefile_star2_O1/statgen[P]statgen/lib/samtools-0.1.7a-hybrid/bam_import.c
// Function: sam_read1
int sam_read1(tamFile fp, bam_header_t *header, bam1_t *b)
{
	int ret, doff, doff0, dret, z = 0;
	bam1_core_t *c = &b->core;
	kstring_t *str = fp->str;
	kstream_t *ks = fp->ks;

	if (fp->is_first) {
		fp->is_first = 0;
		ret = str->l;
	} else {
		do { // special consideration for empty lines
			ret = ks_getuntil(fp->ks, KS_SEP_TAB, str, &dret);
			if (ret >= 0) z += str->l + 1;
		} while (ret == 0);
	}
	if (ret < 0) return -1;
	++fp->n_lines;
	doff = 0;

	{ // name
		c->l_qname = strlen(str->s) + 1;
		memcpy(alloc_data(b, doff + c->l_qname) + doff, str->s, c->l_qname);
		doff += c->l_qname;
	}
	{ // flag
		long flag;
		char *s;
		ret = ks_getuntil(ks, KS_SEP_TAB, str, &dret); z += str->l + 1;
		flag = strtol((char*)str->s, &s, 0);
		if (*s) { // not the end of the string
			flag = 0;
			for (s = str->s; *s; ++s)
				flag |= bam_char2flag_table[(int)*s];
		}
		c->flag = flag;
	}
	{ // tid, pos, qual
		ret = ks_getuntil(ks, KS_SEP_TAB, str, &dret); z += str->l + 1; c->tid = bam_get_tid(header, str->s);
		if (c->tid < 0 && strcmp(str->s, "*")) {
			if (header->n_targets == 0) {
				fprintf(stderr, "[sam_read1] missing header? Abort!\n");
				exit(1);
			} else fprintf(stderr, "[sam_read1] reference '%s' is recognized as '*'.\n", str->s);
		}
		ret = ks_getuntil(ks, KS_SEP_TAB, str, &dret); z += str->l + 1; c->pos = isdigit(str->s[0])? atoi(str->s) - 1 : -1;
		ret = ks_getuntil(ks, KS_SEP_TAB, str, &dret); z += str->l + 1; c->qual = isdigit(str->s[0])? atoi(str->s) : 0;
		if (ret < 0) return -2;
	}
	{ // cigar
		char *s, *t;
		int i, op;
		long x;
		c->n_cigar = 0;
		if (ks_getuntil(ks, KS_SEP_TAB, str, &dret) < 0) return -3;
		z += str->l + 1;
		if (str->s[0] != '*') {
			for (s = str->s; *s; ++s) {
				if (isalpha(*s)) ++c->n_cigar;
				else if (!isdigit(*s)) parse_error(fp->n_lines, "invalid CIGAR character");
			}
			b->data = alloc_data(b, doff + c->n_cigar * 4);
			for (i = 0, s = str->s; i != c->n_cigar; ++i) {
				x = strtol(s, &t, 10);
				op = toupper(*t);
				if (op == 'M' || op == '=' || op == 'X') op = BAM_CMATCH;
				else if (op == 'I') op = BAM_CINS;
				else if (op == 'D') op = BAM_CDEL;
				else if (op == 'N') op = BAM_CREF_SKIP;
				else if (op == 'S') op = BAM_CSOFT_CLIP;
				else if (op == 'H') op = BAM_CHARD_CLIP;
				else if (op == 'P') op = BAM_CPAD;
				else parse_error(fp->n_lines, "invalid CIGAR operation");
				s = t + 1;
				bam1_cigar(b)[i] = x << BAM_CIGAR_SHIFT | op;
			}
			if (*s) parse_error(fp->n_lines, "unmatched CIGAR operation");
			c->bin = bam_reg2bin(c->pos, bam_calend(c, bam1_cigar(b)));
			doff += c->n_cigar * 4;
		} else {
			if (!(c->flag&BAM_FUNMAP)) {
				fprintf(stderr, "Parse warning at line %lld: mapped sequence without CIGAR\n", (long long)fp->n_lines);
				c->flag |= BAM_FUNMAP;
			}
			c->bin = bam_reg2bin(c->pos, c->pos + 1);
		}
	}
	{ // mtid, mpos, isize
		ret = ks_getuntil(ks, KS_SEP_TAB, str, &dret); z += str->l + 1;
		c->mtid = strcmp(str->s, "=")? bam_get_tid(header, str->s) : c->tid;
		ret = ks_getuntil(ks, KS_SEP_TAB, str, &dret); z += str->l + 1;
		c->mpos = isdigit(str->s[0])? atoi(str->s) - 1 : -1;
		ret = ks_getuntil(ks, KS_SEP_TAB, str, &dret); z += str->l + 1;
		c->isize = (str->s[0] == '-' || isdigit(str->s[0]))? atoi(str->s) : 0;
		if (ret < 0) return -4;
	}
	{ // seq and qual
		int i;
		uint8_t *p = 0;
		if (ks_getuntil(ks, KS_SEP_TAB, str, &dret) < 0) return -5; // seq
		z += str->l + 1;
		if (strcmp(str->s, "*")) {
			c->l_qseq = strlen(str->s);
			if (c->n_cigar && c->l_qseq != (int32_t)bam_cigar2qlen(c, bam1_cigar(b)))
				parse_error(fp->n_lines, "CIGAR and sequence length are inconsistent");
			p = (uint8_t*)alloc_data(b, doff + c->l_qseq + (c->l_qseq+1)/2) + doff;
			memset(p, 0, (c->l_qseq+1)/2);
			for (i = 0; i < c->l_qseq; ++i)
				p[i/2] |= bam_nt16_table[(int)str->s[i]] << 4*(1-i%2);
		} else c->l_qseq = 0;
		if (ks_getuntil(ks, KS_SEP_TAB, str, &dret) < 0) return -6; // qual
		z += str->l + 1;
		if (strcmp(str->s, "*") && c->l_qseq != strlen(str->s))
			parse_error(fp->n_lines, "sequence and quality are inconsistent");
		p += (c->l_qseq+1)/2;
		if (strcmp(str->s, "*") == 0) for (i = 0; i < c->l_qseq; ++i) p[i] = 0xff;
		else for (i = 0; i < c->l_qseq; ++i) p[i] = str->s[i] - 33;
		doff += c->l_qseq + (c->l_qseq+1)/2;
	}
	doff0 = doff;
	if (dret != '\n' && dret != '\r') { // aux
		while (ks_getuntil(ks, KS_SEP_TAB, str, &dret) >= 0) {
			uint8_t *s, type, key[2];
			z += str->l + 1;
			if (str->l < 6 || str->s[2] != ':' || str->s[4] != ':')
				parse_error(fp->n_lines, "missing colon in auxiliary data");
			key[0] = str->s[0]; key[1] = str->s[1];
			type = str->s[3];
			s = alloc_data(b, doff + 3) + doff;
			s[0] = key[0]; s[1] = key[1]; s += 2; doff += 2;
			if (type == 'A' || type == 'a' || type == 'c' || type == 'C') { // c and C for backward compatibility
				s = alloc_data(b, doff + 2) + doff;
				*s++ = 'A'; *s = str->s[5];
				doff += 2;
			} else if (type == 'I' || type == 'i') {
				long long x;
				s = alloc_data(b, doff + 5) + doff;
				x = (long long)atoll(str->s + 5);
				if (x < 0) {
					if (x >= -127) {
						*s++ = 'c'; *(int8_t*)s = (int8_t)x;
						s += 1; doff += 2;
					} else if (x >= -32767) {
						*s++ = 's'; *(int16_t*)s = (int16_t)x;
						s += 2; doff += 3;
					} else {
						*s++ = 'i'; *(int32_t*)s = (int32_t)x;
						s += 4; doff += 5;
						if (x < -2147483648ll)
							fprintf(stderr, "Parse warning at line %lld: integer %lld is out of range.",
									(long long)fp->n_lines, x);
					}
				} else {
					if (x <= 255) {
						*s++ = 'C'; *s++ = (uint8_t)x;
						doff += 2;
					} else if (x <= 65535) {
						*s++ = 'S'; *(uint16_t*)s = (uint16_t)x;
						s += 2; doff += 3;
					} else {
						*s++ = 'I'; *(uint32_t*)s = (uint32_t)x;
						s += 4; doff += 5;
						if (x > 4294967295ll)
							fprintf(stderr, "Parse warning at line %lld: integer %lld is out of range.",
									(long long)fp->n_lines, x);
					}
				}
			} else if (type == 'f') {
				s = alloc_data(b, doff + 5) + doff;
				*s++ = 'f';
				*(float*)s = (float)atof(str->s + 5);
				s += 4; doff += 5;
			} else if (type == 'd') {
				s = alloc_data(b, doff + 9) + doff;
				*s++ = 'd';
				*(float*)s = (float)atof(str->s + 9);
				s += 8; doff += 9;
			} else if (type == 'Z' || type == 'H') {
				int size = 1 + (str->l - 5) + 1;
				if (type == 'H') { // check whether the hex string is valid
					int i;
					if ((str->l - 5) % 2 == 1) parse_error(fp->n_lines, "length of the hex string not even");
					for (i = 0; i < str->l - 5; ++i) {
						int c = toupper(str->s[5 + i]);
						if (!((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')))
							parse_error(fp->n_lines, "invalid hex character");
					}
				}
				s = alloc_data(b, doff + size) + doff;
				*s++ = type;
				memcpy(s, str->s + 5, str->l - 5);
				s[str->l - 5] = 0;
				doff += size;
			} else parse_error(fp->n_lines, "unrecognized type");
			if (dret == '\n' || dret == '\r') break;
		}
	}
	b->l_aux = doff - doff0;
	b->data_len = doff;
	return z;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r13
movq %rsi, 0x30(%rsp)
movq %rdi, %rbp
movq 0x8(%rdi), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rdi), %r12
cmpl $0x0, 0x20(%rdi)
je 0x13649
movl $0x0, 0x20(%rbp)
movl (%r12), %eax
movl $0x4, %r14d
jmp 0x1367b
xorl %r14d, %r14d
leaq 0xc(%rsp), %r15
movq 0x8(%rbp), %rdi
movl $0x1, %esi
movq %r12, %rdx
movq %r15, %rcx
callq 0x13054
testl %eax, %eax
js 0x13673
movl (%r12), %ecx
addl %ecx, %r14d
incl %r14d
testl %eax, %eax
je 0x13651
addl $0x4, %r14d
testl %eax, %eax
js 0x13858
incq 0x18(%rbp)
movq 0x10(%r12), %rdi
callq 0x32d0
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
shrl $0x18, %eax
movb %al, 0xb(%r13)
cmpl %eax, 0x28(%r13)
jge 0x136e0
decl %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x10, %ecx
orl %eax, %ecx
incl %ecx
movl %ecx, 0x28(%r13)
movq 0x30(%r13), %rdi
movslq %ecx, %rsi
callq 0x3610
movq %rax, 0x30(%r13)
movq 0x30(%r13), %rdi
movq 0x10(%r12), %rsi
movzbl 0xb(%r13), %edx
callq 0x3680
movzbl 0xb(%r13), %eax
movq %rax, 0x38(%rsp)
leaq 0xc(%rsp), %rcx
movq 0x10(%rsp), %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
movl (%r12), %eax
movl %eax, 0x20(%rsp)
movq 0x10(%r12), %rdi
leaq 0x50(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x3400
movq (%r15), %rcx
cmpb $0x0, (%rcx)
je 0x13766
movq 0x10(%r12), %rcx
movb (%rcx), %dl
xorl %eax, %eax
testb %dl, %dl
je 0x13761
leaq 0x1c594(%rip), %rsi     # 0x2fce0
movsbq %dl, %rdx
movzwl (%rsi,%rdx,2), %edx
orq %rdx, %rax
movb 0x1(%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x1374c
movq %rcx, 0x50(%rsp)
movw %ax, 0xc(%r13)
leaq 0xc(%rsp), %rcx
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
movl (%r12), %eax
movl %eax, 0x44(%rsp)
movq 0x10(%r12), %rsi
movq 0x30(%rsp), %rdi
callq 0x11541
movl %eax, (%r13)
testl %eax, %eax
jns 0x137c0
movq 0x10(%r12), %r15
leaq 0x12cc1(%rip), %rsi     # 0x26471
movq %r15, %rdi
callq 0x34e0
testl %eax, %eax
jne 0x13b1d
movq %rbp, 0x48(%rsp)
leaq 0xc(%rsp), %rcx
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
movl (%r12), %r15d
callq 0x3310
movq %rax, 0x28(%rsp)
movq (%rax), %rcx
movq 0x10(%r12), %rdi
movsbq (%rdi), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x13807
callq 0x3410
decl %eax
leaq 0x8(%r13), %rcx
movq %rcx, 0x18(%rsp)
movl %eax, 0x4(%r13)
leaq 0xc(%rsp), %rcx
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
movl %eax, %ebp
addl 0x20(%rsp), %r14d
addl 0x44(%rsp), %r14d
addl %r15d, %r14d
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x10(%r12), %rdi
movsbq (%rdi), %rcx
addl (%r12), %r14d
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x13862
xorl %ecx, %ecx
jmp 0x1386d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x13f28
callq 0x3410
movzbl %al, %ecx
shll $0x10, %ecx
movq $-0xff0001, %rax        # imm = 0xFF00FFFF
movq 0x18(%rsp), %rdx
andq (%rdx), %rax
orq %rcx, %rax
movq %rax, (%rdx)
testl %ebp, %ebp
js 0x1390e
movq 0x48(%rsp), %r15
addq $0x18, %r15
movabsq $0x1000000000000, %rcx  # imm = 0x1000000000000
leaq -0x1(%rcx), %rbx
andq %rbx, %rax
movq %rax, (%rdx)
leaq 0xc(%rsp), %rcx
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
testl %eax, %eax
movq %r13, 0x20(%rsp)
movq %r15, 0x48(%rsp)
js 0x13b7a
movl (%r12), %ecx
addl %ecx, %r14d
incl %r14d
movq 0x10(%r12), %r9
cmpb $0x2a, (%r9)
jne 0x13918
movq 0x18(%rsp), %rsi
testb $0x4, 0x4(%rsi)
je 0x14354
movl 0x4(%r13), %ecx
shrl $0xe, %ecx
addl $0x1249, %ecx           # imm = 0x1249
movw %cx, 0x8(%r13)
jmp 0x13b7a
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x13f28
movl %eax, 0x44(%rsp)
movb (%r9), %dl
testb %dl, %dl
movq 0x28(%rsp), %rdi
movabsq $0x1000000000000, %rbp  # imm = 0x1000000000000
movq 0x18(%rsp), %r8
je 0x1397f
incq %r9
movabsq $-0x1000000000000, %rcx # imm = 0xFFFF000000000000
movq (%rdi), %rsi
movsbq %dl, %rdx
movzwl (%rsi,%rdx,2), %edx
btl $0xa, %edx
jb 0x13960
btl $0xb, %edx
jb 0x13975
jmp 0x14365
movq (%r8), %rdx
movq %rdx, %rsi
andq %rcx, %rsi
addq %rbp, %rsi
andq %rbx, %rdx
orq %rsi, %rdx
movq %rdx, (%r8)
movb (%r9), %dl
incq %r9
testb %dl, %dl
jne 0x13944
movq 0x8(%r13), %rax
shrq $0x2e, %rax
andl $-0x4, %eax
addl 0x38(%rsp), %eax
cmpl %eax, 0x28(%r13)
jge 0x139d3
decl %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x10, %ecx
orl %eax, %ecx
incl %ecx
movl %ecx, 0x28(%r13)
movq 0x30(%r13), %rdi
movslq %ecx, %rsi
callq 0x3610
movq 0x18(%rsp), %r8
movq %rax, 0x30(%r13)
movq 0x10(%r12), %r15
movq (%r8), %rsi
cmpq %rbp, %rsi
jb 0x13a90
xorl %ebx, %ebx
callq 0x3280
movq %rax, %rbp
leaq 0x12aab(%rip), %r13     # 0x264a0
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
movl $0xa, %edx
callq 0x3400
movq (%rbp), %rcx
movq 0x50(%rsp), %r15
movsbq (%r15), %rdx
movl (%rcx,%rdx,4), %edx
xorl %ecx, %ecx
leal -0x48(%rdx), %esi
cmpl $0x10, %esi
ja 0x13a32
movslq (%r13,%rsi,4), %rdx
addq %r13, %rdx
jmpq *%rdx
movl $0x5, %ecx
jmp 0x13a61
cmpl $0x3d, %edx
je 0x13a61
cmpl $0x44, %edx
jne 0x14377
movl $0x2, %ecx
jmp 0x13a61
movl $0x1, %ecx
jmp 0x13a61
movl $0x4, %ecx
jmp 0x13a61
movl $0x6, %ecx
jmp 0x13a61
movl $0x3, %ecx
incq %r15
shll $0x4, %eax
orl %eax, %ecx
movq 0x20(%rsp), %rdx
movzbl 0xb(%rdx), %eax
addq 0x30(%rdx), %rax
movl %ecx, (%rax,%rbx,4)
incq %rbx
movq 0x8(%rdx), %rsi
movq %rsi, %rax
shrq $0x30, %rax
cmpq %rax, %rbx
jne 0x139f5
cmpb $0x0, (%r15)
movq 0x48(%rsp), %rdi
movq 0x10(%rsp), %rbp
jne 0x1438e
movq 0x20(%rsp), %r13
movl 0x4(%r13), %ebx
shrl $0x18, %esi
addq 0x30(%r13), %rsi
movq %r13, %rdi
callq 0x11c08
decl %eax
movl %ebx, %ecx
shrl $0xe, %ecx
movl %eax, %edx
shrl $0xe, %edx
cmpl %edx, %ecx
jne 0x13adc
addl $0x1249, %ecx           # imm = 0x1249
movq 0x18(%rsp), %rsi
jmp 0x13b60
movl %ebx, %ecx
shrl $0x11, %ecx
movl %eax, %edx
shrl $0x11, %edx
cmpl %edx, %ecx
movq 0x18(%rsp), %rsi
jne 0x13af7
addl $0x249, %ecx            # imm = 0x249
jmp 0x13b60
movl %ebx, %ecx
shrl $0x14, %ecx
movl %eax, %edx
shrl $0x14, %edx
cmpl %edx, %ecx
jne 0x13b0a
addl $0x49, %ecx
jmp 0x13b60
movl %ebx, %ecx
shrl $0x17, %ecx
movl %eax, %edx
shrl $0x17, %edx
cmpl %edx, %ecx
jne 0x13b50
addl $0x9, %ecx
jmp 0x13b60
movq 0x30(%rsp), %rax
cmpl $0x0, (%rax)
movq 0x1b4bc(%rip), %rax     # 0x2efe8
movq (%rax), %rdi
je 0x14381
leaq 0x12a9b(%rip), %rsi     # 0x265d7
movq %r15, %rdx
xorl %eax, %eax
callq 0x3630
movq 0x10(%rsp), %rbx
jmp 0x137c0
shrl $0x1a, %ebx
shrl $0x1a, %eax
leal 0x1(%rbx), %edx
xorl %ecx, %ecx
cmpl %eax, %ebx
cmovel %edx, %ecx
movq (%rsi), %rax
movw %cx, (%rsi)
shrq $0x2e, %rax
andl $-0x4, %eax
addl 0x38(%rsp), %eax
movq %rax, 0x38(%rsp)
movl 0x44(%rsp), %eax
testl %eax, %eax
js 0x13bbe
leaq 0xc(%rsp), %rcx
movq %rbp, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
movl (%r12), %ebx
movq 0x10(%r12), %r15
leaq 0x12aeb(%rip), %rsi     # 0x2668e
movq %r15, %rdi
callq 0x34e0
testl %eax, %eax
je 0x13bc8
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x11541
jmp 0x13bcc
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jmp 0x13f28
movl (%r13), %eax
movl %eax, 0x14(%r13)
leaq 0xc(%rsp), %rcx
movq %rbp, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
movl (%r12), %r15d
movq 0x28(%rsp), %rax
movq (%rax), %rcx
movq 0x10(%r12), %rdi
movsbq (%rdi), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x13c0d
callq 0x3410
decl %eax
movl %eax, 0x18(%r13)
leaq 0xc(%rsp), %rcx
movq %rbp, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
movl %eax, %ebp
movl (%r12), %r13d
movq 0x10(%r12), %rdi
movsbq (%rdi), %rcx
cmpq $0x2d, %rcx
je 0x13c4c
movq 0x28(%rsp), %rax
movq (%rax), %rdx
xorl %eax, %eax
testb $0x8, 0x1(%rdx,%rcx,2)
je 0x13c51
callq 0x3410
movq 0x20(%rsp), %rcx
movl %eax, 0x1c(%rcx)
testl %ebp, %ebp
js 0x13dbf
addl %ebx, %r14d
addl %r15d, %r14d
addl %r13d, %r14d
addl $0x3, %r14d
leaq 0xc(%rsp), %rcx
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
testl %eax, %eax
js 0x13dc9
movq %r14, 0x30(%rsp)
movl (%r12), %r14d
movq 0x10(%r12), %r15
leaq 0x127cc(%rip), %rsi     # 0x26471
movq %r15, %rdi
callq 0x34e0
testl %eax, %eax
movq 0x20(%rsp), %r13
movq 0x48(%rsp), %rbx
je 0x13dda
movq %r15, %rdi
callq 0x32d0
movq %rax, %r15
movl %r15d, 0x10(%r13)
movq 0x8(%r13), %rsi
movabsq $0x1000000000000, %rax  # imm = 0x1000000000000
cmpq %rax, %rsi
jb 0x13cf9
shrl $0x18, %esi
addq 0x30(%r13), %rsi
movq %r13, %rdi
callq 0x11c4a
cmpl %r15d, %eax
jne 0x143a7
movl 0x10(%r13), %eax
movq 0x38(%rsp), %rcx
addl %eax, %ecx
movl %eax, %edx
incl %edx
shrl $0x1f, %edx
addl %edx, %eax
incl %eax
sarl %eax
addl %ecx, %eax
cmpl %eax, 0x28(%r13)
jge 0x13d53
decl %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x10, %ecx
orl %eax, %ecx
incl %ecx
movl %ecx, 0x28(%r13)
movq 0x30(%r13), %rdi
movslq %ecx, %rsi
callq 0x3610
movq %rax, 0x30(%r13)
movl 0x38(%rsp), %r15d
addq 0x30(%r13), %r15
movl 0x10(%r13), %eax
movl %eax, %ecx
incl %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
incl %eax
sarl %eax
movslq %eax, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3060
cmpl $0x0, 0x10(%r13)
jle 0x13de5
xorl %eax, %eax
leaq 0x1be56(%rip), %rdx     # 0x2fbe0
xorl %esi, %esi
movq %r14, %r8
movq 0x10(%r12), %rcx
movsbq (%rcx,%rsi), %rcx
movb (%rcx,%rdx), %dil
movl %eax, %ecx
notb %cl
andb $0x4, %cl
shlb %cl, %dil
movl %esi, %ecx
shrl %ecx
orb %dil, (%r15,%rcx)
incq %rsi
movslq 0x10(%r13), %rcx
addb $0x4, %al
cmpq %rcx, %rsi
jl 0x13d8f
jmp 0x13de8
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
jmp 0x13f28
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
xorl %ecx, %ecx
movq 0x20(%rsp), %r13
jmp 0x13efc
movl $0x0, 0x10(%r13)
xorl %r15d, %r15d
movq %r14, %r8
movq 0x30(%rsp), %r14
addl %r8d, %r14d
incl %r14d
leaq 0xc(%rsp), %rcx
movq %rbp, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x13054
testl %eax, %eax
js 0x13eac
movl (%r12), %ebx
movq %r13, %rbp
movq 0x10(%r12), %r13
leaq 0x1264e(%rip), %rsi     # 0x26471
movq %r13, %rdi
callq 0x34e0
testl %eax, %eax
je 0x13e54
movq %rbx, 0x30(%rsp)
movq %r14, %rbx
movslq 0x10(%rbp), %r14
movq %r13, %rdi
callq 0x32d0
cmpq %r14, %rax
movq %rbx, %r14
movq 0x30(%rsp), %rbx
jne 0x14393
movl 0x10(%rbp), %eax
movl %eax, %ecx
incl %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
incl %eax
sarl %eax
cltq
addq %rax, %r15
movq 0x10(%r12), %rdi
leaq 0x125fc(%rip), %rsi     # 0x26471
callq 0x34e0
movl 0x10(%rbp), %ecx
testl %eax, %eax
movq %rbp, %r13
je 0x13eb5
testl %ecx, %ecx
movq 0x10(%rsp), %rbp
jle 0x13ed1
xorl %eax, %eax
movq 0x10(%r12), %rcx
movb (%rcx,%rax), %cl
addb $-0x21, %cl
movb %cl, (%r15,%rax)
incq %rax
movslq 0x10(%r13), %rcx
cmpq %rcx, %rax
jl 0x13e8f
jmp 0x13ed1
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
xorl %ecx, %ecx
jmp 0x13efc
testl %ecx, %ecx
movq 0x10(%rsp), %rbp
jle 0x13ed1
xorl %eax, %eax
movb $-0x1, (%r15,%rax)
incq %rax
movslq 0x10(%r13), %rcx
cmpq %rcx, %rax
jl 0x13ec0
addl %ebx, %r14d
incl %r14d
movl 0x10(%r13), %eax
leal 0x1(%rax), %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
incl %ecx
sarl %ecx
movq 0x38(%rsp), %rdx
addl %eax, %edx
addl %ecx, %edx
movq %rdx, 0x38(%rsp)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movb $0x1, %cl
testb %cl, %cl
je 0x13f28
movl 0xc(%rsp), %eax
cmpl $0xa, %eax
je 0x13f0e
cmpl $0xd, %eax
jne 0x13f37
movq 0x38(%rsp), %rax
movl %eax, %r8d
movl %r8d, %eax
subl 0x38(%rsp), %eax
movl %eax, 0x20(%r13)
movl %r8d, 0x24(%r13)
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x38(%rsp), %rax
movl %eax, %r8d
movq %r8, 0x28(%rsp)
movq %rbp, %rdi
movl $0x1, %esi
movq %r12, %rdx
leaq 0xc(%rsp), %rcx
callq 0x13054
testl %eax, %eax
js 0x14340
movq %r14, 0x30(%rsp)
movq (%r12), %rax
movq %rax, 0x18(%rsp)
cmpq $0x6, %rax
movq 0x28(%rsp), %r8
jb 0x1436d
movq 0x10(%r12), %rax
cmpb $0x3a, 0x2(%rax)
jne 0x1436d
cmpb $0x3a, 0x4(%rax)
jne 0x1436d
movb (%rax), %r14b
movb 0x1(%rax), %bpl
movb 0x3(%rax), %r15b
leal 0x3(%r8), %ebx
cmpl %ebx, 0x28(%r13)
jge 0x13fed
leal 0x2(%r8), %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x10, %ecx
orl %eax, %ecx
incl %ecx
movl %ecx, 0x28(%r13)
movq 0x30(%r13), %rdi
movslq %ecx, %rsi
callq 0x3610
movq 0x28(%rsp), %r8
movq %rax, 0x30(%r13)
movzbl %r15b, %eax
movq 0x30(%r13), %rcx
movslq %r8d, %r13
movb %r14b, (%rcx,%r13)
movb %bpl, 0x1(%rcx,%r13)
addq $0x2, %r13
leal -0x41(%rax), %ecx
cmpl $0x22, %ecx
ja 0x140bd
movabsq $0x500000005, %rdx      # imm = 0x500000005
btq %rcx, %rdx
jae 0x140bd
addl $0x4, %r8d
movq 0x20(%rsp), %r14
cmpl %r8d, 0x28(%r14)
jge 0x14072
movl %ebx, %eax
sarl %eax
orl %ebx, %eax
movl %eax, %ecx
sarl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x10, %eax
orl %ecx, %eax
incl %eax
movl %eax, 0x28(%r14)
movq 0x30(%r14), %rdi
movslq %eax, %rsi
movq %r8, %rbx
callq 0x3610
movq %rbx, %r8
movq %rax, 0x30(%r14)
movq 0x30(%r14), %rax
movb $0x41, (%rax,%r13)
movq 0x10(%r12), %rcx
movb 0x5(%rcx), %cl
movb %cl, 0x1(%rax,%r13)
movq 0x10(%rsp), %rbp
movq 0x30(%rsp), %r14
movq 0x18(%rsp), %rax
addl %eax, %r14d
incl %r14d
movl 0xc(%rsp), %eax
cmpl $0xd, %eax
je 0x1434a
cmpl $0xa, %eax
movq 0x20(%rsp), %r13
jne 0x13f3f
jmp 0x13f16
movl %r15d, %ecx
andb $-0x21, %cl
cmpb $0x49, %cl
movq 0x48(%rsp), %rbp
jne 0x14159
leal 0x7(%r8), %ebp
movq 0x20(%rsp), %rbx
cmpl %ebp, 0x28(%rbx)
movq 0x30(%rsp), %r14
jge 0x14123
movq 0x28(%rsp), %rax
addl $0x6, %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x10, %ecx
orl %eax, %ecx
incl %ecx
movl %ecx, 0x28(%rbx)
movq 0x30(%rbx), %rdi
movslq %ecx, %rsi
callq 0x3610
movq %rax, 0x30(%rbx)
movq 0x30(%rbx), %rbx
movq 0x10(%r12), %rdi
addq $0x5, %rdi
callq 0x3540
testq %rax, %rax
js 0x1425f
cmpq $0xff, %rax
movq 0x28(%rsp), %r8
jg 0x1427a
movb $0x43, (%rbx,%r13)
jmp 0x1426f
cmpl $0x63, %eax
movq 0x30(%rsp), %r14
jg 0x1422a
cmpl $0x48, %eax
je 0x14175
cmpl $0x5a, %eax
jne 0x143b6
movq (%r12), %rbx
movb %r15b, 0x44(%rsp)
cmpb $0x48, %r15b
jne 0x141db
testb $0x1, %bl
je 0x143c6
movq (%r12), %r14
cmpq $0x5, %r14
je 0x141db
callq 0x3280
movq 0x28(%rsp), %r8
movq (%rax), %rax
movq 0x10(%r12), %rcx
movl $0x5, %edx
movsbq (%rcx,%rdx), %rsi
movl (%rax,%rsi,4), %esi
leal -0x30(%rsi), %edi
cmpl $0xa, %edi
setb %dil
addl $-0x41, %esi
cmpl $0x6, %esi
setb %sil
orb %dil, %sil
je 0x14386
incq %rdx
cmpq %rdx, %r14
jne 0x141ae
addl %ebx, %r8d
decl %r8d
movq 0x20(%rsp), %rdi
movl %r8d, %esi
movq %r8, %r14
callq 0x143d6
leaq (%rax,%r13), %rbx
leaq (%rax,%r13), %rdi
incq %rdi
movb 0x44(%rsp), %al
movb %al, -0x1(%rdi)
movq (%r12), %rdx
movq 0x10(%r12), %rsi
addq $0x5, %rsi
addq $-0x5, %rdx
callq 0x3680
movq %r14, %r8
movq (%r12), %rax
movb $0x0, -0x4(%rax,%rbx)
jmp 0x14088
cmpl $0x64, %eax
je 0x14289
cmpl $0x66, %eax
jne 0x143b6
addl $0x7, %r8d
movq 0x20(%rsp), %rdi
movl %r8d, %esi
movq %r8, %rbx
callq 0x143d6
movq %rax, %r15
movb $0x66, (%rax,%r13)
movq 0x10(%r12), %rdi
addq $0x5, %rdi
jmp 0x142ae
cmpq $-0x7f, %rax
movq 0x28(%rsp), %r8
jl 0x142c3
movb $0x63, (%rbx,%r13)
movb %al, 0x1(%rbx,%r13)
addl $0x4, %r8d
jmp 0x142f8
cmpq $0xffff, %rax           # imm = 0xFFFF
jg 0x142dc
movb $0x53, (%rbx,%r13)
jmp 0x142d0
addl $0xb, %r8d
movq 0x20(%rsp), %rdi
movl %r8d, %esi
movq %r8, %rbx
callq 0x143d6
movq %rax, %r15
movb $0x64, (%rax,%r13)
movq 0x10(%r12), %rdi
addq $0x9, %rdi
callq 0x3230
movq %rbx, %r8
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1(%r15,%r13)
jmp 0x142f8
cmpq $-0x7fff, %rax          # imm = 0x8001
jl 0x14302
movb $0x73, (%rbx,%r13)
movw %ax, 0x1(%rbx,%r13)
addl $0x5, %r8d
jmp 0x142f8
movb $0x49, (%rbx,%r13)
movl %eax, 0x1(%rbx,%r13)
movabsq $0x100000000, %rcx      # imm = 0x100000000
cmpq %rcx, %rax
jge 0x1431b
movl %ebp, %r8d
movq 0x10(%rsp), %rbp
jmp 0x14092
movb $0x69, (%rbx,%r13)
movl %eax, 0x1(%rbx,%r13)
movabsq $-0x80000001, %rcx      # imm = 0xFFFFFFFF7FFFFFFF
cmpq %rcx, %rax
jg 0x142f5
movq 0x1acc6(%rip), %rcx     # 0x2efe8
movq (%rcx), %rdi
movq 0x48(%rsp), %rcx
movq (%rcx), %rdx
leaq 0x123cd(%rip), %rsi     # 0x26701
movq %rax, %rcx
xorl %eax, %eax
callq 0x3630
jmp 0x142f5
movq 0x28(%rsp), %r8
jmp 0x13f16
movq 0x20(%rsp), %r13
jmp 0x13f16
movq %r15, %rdi
movl %eax, %ebx
callq 0x431f
movl %ebx, %eax
jmp 0x138f7
movq %r15, %rdi
callq 0x42a7
movq 0x48(%rsp), %rdi
callq 0x436f
movq 0x48(%rsp), %rdi
callq 0x42cf
callq 0x4289
movq %rbp, %rdi
callq 0x4347
callq 0x42f7
movq 0x48(%rsp), %rax
movq (%rax), %rdi
leaq 0x12319(%rip), %rsi     # 0x266bb
callq 0x1441e
movq (%rbx), %rdi
leaq 0x122df(%rip), %rsi     # 0x26690
callq 0x1441e
movq (%rbp), %rdi
leaq 0x123b2(%rip), %rsi     # 0x26773
callq 0x1441e
movq (%rbp), %rdi
leaq 0x1236a(%rip), %rsi     # 0x2673b
callq 0x1441e