// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/sam.c
// Function: sam_parse1
int sam_parse1(kstring_t *s, bam_hdr_t *h, bam1_t *b)
{
#define _read_token(_p) (_p); for (; *(_p) && *(_p) != '\t'; ++(_p)); if (*(_p) != '\t') goto err_ret; *(_p)++ = 0
#define _read_token_aux(_p) (_p); for (; *(_p) && *(_p) != '\t'; ++(_p)); *(_p)++ = 0 // this is different in that it does not test *(_p)=='\t'
#define _get_mem(type_t, _x, _s, _l) ks_resize((_s), (_s)->l + (_l)); *(_x) = (type_t*)((_s)->s + (_s)->l); (_s)->l += (_l)
#define _parse_err(cond, msg) do { if ((cond) && hts_verbose >= 1) { fprintf(stderr, "[E::%s] " msg "\n", __func__); goto err_ret; } } while (0)
#define _parse_warn(cond, msg) if ((cond) && hts_verbose >= 2) fprintf(stderr, "[W::%s] " msg "\n", __func__)

	uint8_t *t;
	char *p = s->s, *q;
	int i;
	kstring_t str;
	bam1_core_t *c = &b->core;

	str.l = b->l_data = 0;
	str.s = (char*)b->data; str.m = b->m_data;
	memset(c, 0, 32);
	if (h->cigar_tab == 0) {
		h->cigar_tab = (uint8_t*)calloc(128, 1);
		for (i = 0; BAM_CIGAR_STR[i]; ++i)
			h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
	}
	// qname
	q = _read_token(p);
	kputsn_(q, p - q, &str);
	c->l_qname = p - q;
	// flag
	c->flag = strtol(p, &p, 0);
	if (*p++ != '\t') goto err_ret; // malformated flag
	// chr
	q = _read_token(p);
	if (strcmp(q, "*")) {
		_parse_err(h->n_targets == 0, "missing SAM header");
		c->tid = bam_name2id(h, q);
		_parse_warn(c->tid < 0, "urecognized reference name; treated as unmapped");
	} else c->tid = -1;
	// pos
	c->pos = strtol(p, &p, 10) - 1;
	if (*p++ != '\t') goto err_ret;
	if (c->pos < 0 && c->tid >= 0) {
		_parse_warn(1, "mapped query cannot have zero coordinate; treated as unmapped");
		c->tid = -1;
	}
	if (c->tid < 0) c->flag |= BAM_FUNMAP;
	// mapq
	c->qual = strtol(p, &p, 10);
	if (*p++ != '\t') goto err_ret;
	// cigar
	if (*p != '*') {
		uint32_t *cigar;
		for (q = p, c->n_cigar = 0; *q && *q != '\t'; ++q)
			if (!isdigit(*q)) ++c->n_cigar;
		_get_mem(uint32_t, &cigar, &str, c->n_cigar<<2);
		for (i = 0, q = p; i < c->n_cigar; ++i, ++q) {
			int op;
			cigar[i] = strtol(q, &q, 10)<<BAM_CIGAR_SHIFT;
			op = (uint8_t)*q >= 128? -1 : h->cigar_tab[(int)*q];
			_parse_err(op < 0, "urecognized CIGAR operator");
			cigar[i] |= op;
		}
		p = q + 1;
		i = bam_cigar2rlen(c->n_cigar, cigar);
	} else {
		_parse_warn(!(c->flag&BAM_FUNMAP), "mapped query must have a CIGAR; treated as unmapped");
		c->flag |= BAM_FUNMAP;
		q = _read_token(p);
		i = 1;
	}
	c->bin = hts_reg2bin(c->pos, c->pos + i, 14, 5);
	// mate chr
	q = _read_token(p);
	if (strcmp(q, "=") == 0) c->mtid = c->tid;
	else if (strcmp(q, "*") == 0) c->mtid = -1;
	else c->mtid = bam_name2id(h, q);
	// mpos
	c->mpos = strtol(p, &p, 10) - 1;
	if (*p++ != '\t') goto err_ret;
	if (c->mpos < 0 && c->mtid >= 0) {
		_parse_warn(1, "mapped mate cannot have zero coordinate; treated as unmapped");
		c->mtid = -1;
	}
	// tlen
	c->isize = strtol(p, &p, 10);
	if (*p++ != '\t') goto err_ret;
	// seq
	q = _read_token(p);
	if (strcmp(q, "*")) {
		c->l_qseq = p - q - 1;
		i = bam_cigar2qlen(c->n_cigar, (uint32_t*)(str.s + c->l_qname));
		_parse_err(c->n_cigar && i != c->l_qseq, "CIGAR and query sequence are of different length");
		i = (c->l_qseq + 1) >> 1;
		_get_mem(uint8_t, &t, &str, i);
		memset(t, 0, i);
		for (i = 0; i < c->l_qseq; ++i)
			t[i>>1] |= seq_nt16_table[(int)q[i]] << ((~i&1)<<2);
	} else c->l_qseq = 0;
	// qual
	q = _read_token_aux(p);
	_get_mem(uint8_t, &t, &str, c->l_qseq);
	if (strcmp(q, "*")) {
		_parse_err(p - q - 1 != c->l_qseq, "SEQ and QUAL are of different length");
		for (i = 0; i < c->l_qseq; ++i) t[i] = q[i] - 33;
	} else memset(t, 0xff, c->l_qseq);
	// aux
	while (p < s->s + s->l) {
		uint8_t type;
		q = _read_token_aux(p); // FIXME: can be accelerated for long 'B' arrays
		_parse_err(p - q - 1 < 6, "incomplete aux field");
		kputsn_(q, 2, &str);
		q += 3; type = *q++; ++q; // q points to value
		if (type == 'A' || type == 'a' || type == 'c' || type == 'C') {
			kputc_('A', &str);
			kputc_(*q, &str);
		} else if (type == 'i' || type == 'I') {
			long x;
			x = strtol(q, &q, 10);
			if (x < 0) {
				if (x >= INT8_MIN) {
					kputc_('c', &str); kputc_(x, &str);
				} else if (x >= INT16_MIN) {
					int16_t y = x;
					kputc_('s', &str); kputsn_((char*)&y, 2, &str);
				} else {
					int32_t y = x;
					kputc_('i', &str); kputsn_(&y, 4, &str);
				}
			} else {
				if (x <= UINT8_MAX) {
					kputc_('C', &str); kputc_(x, &str);
				} else if (x <= UINT16_MAX) {
					uint16_t y = x;
					kputc_('S', &str); kputsn_(&y, 2, &str);
				} else {
					uint32_t y = x;
					kputc_('I', &str); kputsn_(&y, 4, &str);
				}
			}
		} else if (type == 'f') {
			float x;
			x = strtod(q, &q);
			kputc_('f', &str); kputsn_(&x, 4, &str);
		} else if (type == 'Z' || type == 'H') {
			kputc_('Z', &str);kputsn_(q, p - q, &str); // note that this include the trailing NULL
		} else if (type == 'B') {
			int32_t n;
			char *r;
			_parse_err(p - q - 1 < 3, "incomplete B-typed aux field");
			type = *q++; // q points to the first ',' following the typing byte
			for (r = q, n = 0; *r; ++r)
				if (*r == ',') ++n;
			kputc_('B', &str); kputc_(type, &str); kputsn_(&n, 4, &str);
			// FIXME: to evaluate which is faster: a) aligned array and then memmove(); b) unaligned array; c) kputsn_()
			if (type == 'c')      while (q + 1 < p) { int8_t   x = strtol(q + 1, &q, 0); kputc_(x, &str); }
			else if (type == 'C') while (q + 1 < p) { uint8_t  x = strtol(q + 1, &q, 0); kputc_(x, &str); }
			else if (type == 's') while (q + 1 < p) { int16_t  x = strtol(q + 1, &q, 0); kputsn_(&x, 2, &str); }
			else if (type == 'S') while (q + 1 < p) { uint16_t x = strtol(q + 1, &q, 0); kputsn_(&x, 2, &str); }
			else if (type == 'i') while (q + 1 < p) { int32_t  x = strtol(q + 1, &q, 0); kputsn_(&x, 4, &str); }
			else if (type == 'I') while (q + 1 < p) { uint32_t x = strtol(q + 1, &q, 0); kputsn_(&x, 4, &str); }
			else if (type == 'f') while (q + 1 < p) { float    x = strtod(q + 1, &q);    kputsn_(&x, 4, &str); }
			else _parse_err(1, "unrecognized type");
		} else _parse_err(1, "unrecognized type");
	}
	b->data = (uint8_t*)str.s; b->l_data = str.l; b->m_data = str.m;
	return 0;

#undef _parse_warn
#undef _parse_err
#undef _get_mem
#undef _read_token_aux
#undef _read_token
err_ret:
	b->data = (uint8_t*)str.s; b->l_data = str.l; b->m_data = str.m;
	return -2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %r14
andl $0x0, 0x20(%rdx)
andq $0x0, 0x30(%rsp)
movq 0x28(%rdx), %rax
movq %rax, 0x40(%rsp)
movslq 0x24(%rdx), %rax
movq %rax, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
cmpq $0x0, 0x18(%rsi)
je 0x8cf3
movq %rbx, 0x20(%rsp)
movq %r14, 0x10(%rsp)
leaq 0x1(%r14), %r12
movl $0x1000000, %ebx        # imm = 0x1000000
pushq $0x1
popq %rsi
pushq $-0x2
popq %rbp
movzbl -0x1(%r12), %eax
testl %eax, %eax
je 0x97c8
cmpl $0x9, %eax
je 0x8c80
incq %r12
addq $0x1000000, %rbx        # imm = 0x1000000
incl %esi
jmp 0x8c5f
leaq 0x28(%rsp), %rax
movq %r12, (%rax)
movb $0x0, -0x1(%r12)
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x986b
shrl $0x18, %ebx
movb %bl, 0xb(%r13)
movq %r12, %rdi
leaq 0x28(%rsp), %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2230
movq %r13, 0x8(%rsp)
movw %ax, 0xc(%r13)
movq (%rbx), %rax
cmpb $0x9, (%rax)
jne 0x97c3
leaq 0x1(%rax), %rsi
movq %rsi, 0x10(%rsp)
leaq 0x2(%rax), %r14
movq 0x8(%rsp), %r13
movzbl -0x1(%r14), %ecx
testl %ecx, %ecx
je 0x97c8
cmpl $0x9, %ecx
je 0x8d28
incq %r14
jmp 0x8cdc
pushq $0x1
popq %rsi
movl $0x80, %edi
callq 0x21f0
movq %rax, 0x18(%r15)
xorl %eax, %eax
leaq 0x384b(%rip), %rcx      # 0xc558
cmpq $0xa, %rax
je 0x8c46
movsbq (%rax,%rcx), %rdx
movq 0x18(%r15), %rsi
movb %al, (%rsi,%rdx)
incq %rax
jmp 0x8d0d
movq %r14, 0x28(%rsp)
movb $0x0, -0x1(%r14)
cmpb $0x2a, (%rsi)
jne 0x8d3d
cmpb $0x0, 0x2(%rax)
je 0x8d89
cmpl $0x0, (%r15)
leaq 0x84e8(%rip), %rbx      # 0x11230
jne 0x8d53
cmpl $0x0, (%rbx)
jg 0x908f
movq %r15, %rdi
callq 0x7e98
movl %eax, (%r13)
testl %eax, %eax
jns 0x8d8e
cmpl $0x2, (%rbx)
jl 0x8d8e
movq 0x8289(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x3811(%rip), %rsi      # 0xc58a
leaq 0x37ff(%rip), %rdx      # 0xc57f
xorl %eax, %eax
callq 0x2220
jmp 0x8d8e
orl $-0x1, (%r13)
leaq 0x28(%rsp), %r12
pushq $0xa
popq %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2230
decl %eax
movl %eax, 0x4(%r13)
movq (%r12), %rcx
leaq 0x1(%rcx), %r14
movq %r14, (%r12)
cmpb $0x9, (%rcx)
jne 0x97c8
movl (%r13), %ecx
testl %eax, %eax
js 0x8dca
testl %ecx, %ecx
jns 0x8de8
jmp 0x8de3
testl %ecx, %ecx
js 0x8de3
leaq 0x845b(%rip), %rax      # 0x11230
cmpl $0x2, (%rax)
jge 0x9267
orl $-0x1, (%r13)
orb $0x4, 0xc(%r13)
leaq 0x28(%rsp), %r12
pushq $0xa
popq %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2230
movq 0x8(%r13), %rcx
movzbl %al, %eax
shll $0x10, %eax
movq %rcx, %r14
andq $-0xff0001, %r14        # imm = 0xFF00FFFF
orq %rax, %r14
movq %r14, 0x8(%r13)
movq (%r12), %r12
cmpb $0x9, (%r12)
jne 0x97c8
leaq 0x1(%r12), %r13
cmpb $0x2a, (%r13)
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
jne 0x8e8d
movabsq $0x400000000, %rbx      # imm = 0x400000000
btq $0x22, %rcx
jb 0x8fbb
leaq 0x83d9(%rip), %rax      # 0x11230
cmpl $0x2, (%rax)
movq 0x8(%rsp), %r13
jl 0x8fc0
movq 0x818c(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x37b8(%rip), %rsi      # 0xc62e
leaq 0x3702(%rip), %rdx      # 0xc57f
xorl %eax, %eax
callq 0x2220
movq 0x8(%r13), %r14
jmp 0x8fc0
andq %rax, %r14
movq 0x8(%rsp), %rax
movq %r14, 0x8(%rax)
movq %r13, %r12
movzbl (%r12), %eax
testl %eax, %eax
je 0x8ef1
cmpl $0x9, %eax
je 0x8ef1
movsbq %al, %rbx
callq 0x2420
movq (%rax), %rax
testb $0x8, 0x1(%rax,%rbx,2)
jne 0x8eec
movq %r14, %rax
movabsq $-0x1000000000000, %rcx # imm = 0xFFFF000000000000
andq %rcx, %rax
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
orq %rcx, %rax
andq %rcx, %r14
addq %rax, %r14
incq %r14
movq 0x8(%rsp), %rax
movq %r14, 0x8(%rax)
incq %r12
jmp 0x8e9c
shrq $0x2e, %r14
andl $-0x4, %r14d
leaq 0x30(%rsp), %r12
addq (%r12), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x98ee
movq (%r12), %rax
movq 0x10(%r12), %r14
addq %rax, %r14
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rdi
movq %rdi, %rcx
shrq $0x30, %rcx
leaq (%rax,%rcx,4), %rax
movq %rax, (%r12)
xorl %r12d, %r12d
leaq 0x10(%rsp), %rbx
movq %r13, 0x10(%rsp)
shrq $0x30, %rdi
cmpq %rdi, %r12
jae 0x8fa1
movq %r13, %rdi
movq %rbx, %rsi
pushq $0xa
popq %rdx
callq 0x2230
shll $0x4, %eax
movl %eax, (%r14,%r12,4)
movq 0x10(%rsp), %r13
movsbq (%r13), %rdx
pushq $-0x1
popq %rcx
testq %rdx, %rdx
js 0x8f76
movq 0x18(%r15), %rcx
movzbl (%rcx,%rdx), %ecx
testl %ecx, %ecx
jns 0x8f8a
leaq 0x82af(%rip), %rdx      # 0x11230
cmpl $0x0, (%rdx)
jg 0x9243
orl %eax, %ecx
movl %ecx, (%r14,%r12,4)
incq %r12
incq %r13
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
jmp 0x8f39
incq %r13
movq %r13, 0x28(%rsp)
movq %r14, %rsi
callq 0x8011
movq %r13, %r12
movq 0x8(%rsp), %r13
jmp 0x8ff1
movq 0x8(%rsp), %r13
orq %rbx, %r14
movq %r14, 0x8(%r13)
addq $0x2, %r12
movzbl -0x1(%r12), %eax
testl %eax, %eax
je 0x97c8
cmpl $0x9, %eax
je 0x8fe3
incq %r12
jmp 0x8fcb
movq %r12, 0x28(%rsp)
movb $0x0, -0x1(%r12)
pushq $0x1
popq %rax
movslq 0x4(%r13), %r9
cltq
leaq (%r9,%rax), %r10
decq %r10
movl $0x1249, %r8d           # imm = 0x1249
pushq $0xe
popq %rdx
pushq $0xc
popq %rsi
xorl %edi, %edi
pushq $-0x1
popq %rax
cmpl $-0x3, %esi
je 0x9042
movq %r9, %r11
movl %edx, %ecx
sarq %cl, %r11
movq %r10, %rbx
sarq %cl, %rbx
cmpq %rbx, %r11
je 0x903b
movl %eax, %r11d
movl %esi, %ecx
shll %cl, %r11d
addq $0x3, %rdx
addl %r11d, %r8d
addl $-0x3, %esi
jmp 0x900f
addl %r11d, %r8d
movzwl %r8w, %edi
movw %di, 0x8(%r13)
movq %r12, 0x10(%rsp)
leaq 0x1(%r12), %r14
movzbl -0x1(%r14), %ecx
testl %ecx, %ecx
je 0x97c8
cmpl $0x9, %ecx
je 0x9068
incq %r14
jmp 0x9051
movq %r14, 0x28(%rsp)
movb $0x0, -0x1(%r14)
movzbl (%r12), %ecx
cmpl $0x2a, %ecx
je 0x90b3
cmpl $0x3d, %ecx
jne 0x90bb
cmpb $0x0, 0x1(%r12)
jne 0x90bb
movl (%r13), %eax
jmp 0x90c6
movq 0x7f62(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x34c3(%rip), %rsi      # 0xc563
leaq 0x34d8(%rip), %rdx      # 0xc57f
xorl %eax, %eax
callq 0x2220
jmp 0x97c8
cmpb $0x0, 0x1(%r12)
je 0x90c6
movq %r15, %rdi
movq %r12, %rsi
callq 0x7e98
movl %eax, 0x14(%r13)
leaq 0x28(%rsp), %r15
pushq $0xa
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2230
decl %eax
movl %eax, 0x18(%r13)
movq (%r15), %rcx
leaq 0x1(%rcx), %r14
movq %r14, (%r15)
cmpb $0x9, (%rcx)
jne 0x97c8
testl %eax, %eax
jns 0x9116
cmpl $0x0, 0x14(%r13)
js 0x9116
leaq 0x8128(%rip), %rax      # 0x11230
cmpl $0x2, (%rax)
jge 0x97ef
orl $-0x1, 0x14(%r13)
leaq 0x28(%rsp), %r15
pushq $0xa
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2230
movl %eax, 0x1c(%r13)
movq (%r15), %r12
cmpb $0x9, (%r12)
jne 0x97c8
xorl %r15d, %r15d
movzbl 0x1(%r12,%r15), %eax
testl %eax, %eax
je 0x97c8
cmpl $0x9, %eax
je 0x9156
incq %r15
jmp 0x913e
leaq (%r12,%r15), %r13
addq $0x2, %r13
movq %r13, 0x28(%rsp)
movb $0x0, -0x1(%r13)
cmpb $0x2a, 0x1(%r12)
jne 0x917c
cmpb $0x0, 0x2(%r12)
je 0x928b
movq 0x8(%rsp), %rax
movl %r15d, 0x10(%rax)
movq 0x8(%rax), %rbx
movq %rbx, %rdi
shrq $0x30, %rdi
movl %ebx, %esi
shrl $0x18, %esi
addq 0x40(%rsp), %rsi
callq 0x7fd6
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
incq %rcx
cmpq %rcx, %rbx
jb 0x91c8
movl %eax, %eax
cmpl %r15d, %eax
je 0x91c8
leaq 0x8071(%rip), %rax      # 0x11230
cmpl $0x0, (%rax)
jg 0x983f
leal 0x1(%r15), %eax
sarl %eax
cltq
leaq 0x30(%rsp), %r14
movq (%r14), %rsi
addq %rax, %rsi
movq %rax, %rbx
movq %r14, %rdi
callq 0x98ee
movq (%r14), %rax
movq %r14, %rcx
movq 0x10(%r14), %r14
addq %rax, %r14
movq %rbx, %rdx
addq %rbx, %rax
movq %rax, (%rcx)
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x21b0
leaq 0x8031(%rip), %rax      # 0x11240
xorl %edx, %edx
movq 0x8(%rsp), %rcx
movslq 0x10(%rcx), %rcx
cmpq %rcx, %rdx
jge 0x9294
movsbq 0x1(%r12,%rdx), %rcx
movb (%rax,%rcx), %sil
movl %ebx, %ecx
notb %cl
andb $0x4, %cl
shlb %cl, %sil
movl %edx, %ecx
shrl %ecx
orb %sil, (%r14,%rcx)
incq %rdx
addb $0x4, %bl
jmp 0x9211
movq 0x7dae(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x33b6(%rip), %rsi      # 0xc60a
leaq 0x3324(%rip), %rdx      # 0xc57f
xorl %eax, %eax
callq 0x2220
jmp 0x97c3
movq 0x7d8a(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x334b(%rip), %rsi      # 0xc5c3
leaq 0x3300(%rip), %rdx      # 0xc57f
xorl %eax, %eax
callq 0x2220
jmp 0x8dde
movq 0x8(%rsp), %rax
andl $0x0, 0x10(%rax)
leaq (%r12,%r15), %rax
addq $0x3, %rax
movq %r13, 0x10(%rsp)
xorl %r14d, %r14d
movzbl -0x1(%rax), %ecx
testl %ecx, %ecx
je 0x92b9
cmpl $0x9, %ecx
je 0x92b9
incq %rax
incq %r14
jmp 0x92a4
movq %rax, 0x28(%rsp)
movb $0x0, -0x1(%rax)
movq 0x8(%rsp), %rbx
movslq 0x10(%rbx), %rsi
leaq 0x30(%rsp), %rdi
addq (%rdi), %rsi
callq 0x98ee
leaq 0x30(%rsp), %rax
movq (%rax), %rcx
movq 0x10(%rax), %rdi
movq %rax, %rsi
addq %rcx, %rdi
movl 0x10(%rbx), %eax
movslq %eax, %rdx
addq %rdx, %rcx
movq %rcx, (%rsi)
cmpb $0x2a, (%r13)
jne 0x9305
cmpb $0x0, 0x3(%r12,%r15)
je 0x9341
cmpq %r14, %rdx
movq 0x20(%rsp), %rbx
je 0x931f
leaq 0x7f1a(%rip), %rcx      # 0x11230
cmpl $0x0, (%rcx)
jg 0x9829
xorl %ecx, %ecx
cltq
cmpq %rax, %rcx
jge 0x9350
movb (%r13), %al
addb $-0x21, %al
movb %al, (%rdi,%rcx)
incq %rcx
movq 0x8(%rsp), %rax
movl 0x10(%rax), %eax
incq %r13
jmp 0x9321
movl $0xff, %esi
callq 0x21b0
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %r13
leaq 0x33db(%rip), %rax      # 0xc737
movq %rax, 0x50(%rsp)
movq 0x10(%rbx), %rax
addq (%rbx), %rax
cmpq %rax, %r13
jae 0x97c1
movq %r13, 0x10(%rsp)
pushq $0x4
popq %r14
movq %r13, %r12
movzbl (%r12), %eax
testl %eax, %eax
je 0x9393
cmpl $0x9, %eax
je 0x9393
incq %r12
decq %r14
jmp 0x937d
movb $0x0, (%r12)
leaq -0x5(%r14), %rax
cmpq $-0x6, %rax
jl 0x93b2
leaq 0x7e87(%rip), %rax      # 0x11230
cmpl $0x0, (%rax)
jg 0x9813
leaq 0x1(%r12), %rax
movq %rax, 0x20(%rsp)
movq %r13, %rdi
pushq $0x2
popq %rsi
leaq 0x30(%rsp), %rdx
callq 0x986b
leaq 0x4(%r13), %rax
movq %rax, 0x10(%rsp)
movzbl 0x3(%r13), %eax
leaq 0x5(%r13), %r15
movq %r15, 0x10(%rsp)
leal -0x41(%rax), %ecx
cmpl $0x22, %ecx
ja 0x9421
movabsq $0x500000005, %rdx      # imm = 0x500000005
btq %rcx, %rdx
jae 0x9421
pushq $0x41
popq %rdi
leaq 0x30(%rsp), %r14
movq %r14, %rsi
callq 0x9942
movsbl (%r15), %edi
movq %r14, %rsi
callq 0x9942
movq 0x20(%rsp), %r13
jmp 0x9361
movl %eax, %ecx
andb $-0x21, %cl
cmpb $0x49, %cl
jne 0x9454
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x2230
movq %rax, %r14
testq %rax, %rax
js 0x94af
cmpq $0xff, %r14
ja 0x94d4
pushq $0x43
jmp 0x94bb
cmpl $0x42, %eax
je 0x94ee
cmpl $0x48, %eax
je 0x948e
cmpl $0x5a, %eax
je 0x948e
cmpl $0x66, %eax
jne 0x9531
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x20f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
pushq $0x66
jmp 0x9735
pushq $0x5a
popq %rdi
leaq 0x30(%rsp), %r12
movq %r12, %rsi
callq 0x9942
negl %r14d
movq %r15, %rdi
movl %r14d, %esi
movq %r12, %rdx
jmp 0x974e
cmpq $-0x80, %r14
jb 0x96fd
pushq $0x63
popq %rdi
leaq 0x30(%rsp), %r15
movq %r15, %rsi
callq 0x9942
movl %r14d, %edi
movq %r15, %rsi
jmp 0x9412
cmpq $0xffff, %r14           # imm = 0xFFFF
ja 0x9725
movw %r14w, 0x4(%rsp)
pushq $0x53
jmp 0x970e
cmpq $-0x3, %r14
jl 0x9504
leaq 0x7d35(%rip), %rax      # 0x11230
cmpl $0x0, (%rax)
jg 0x97a6
leaq 0x6(%r13), %r15
movq %r15, 0x10(%rsp)
movzbl 0x5(%r13), %r14d
andl $0x0, 0x4(%rsp)
xorl %eax, %eax
movq %r15, %rcx
movzbl (%rcx), %edx
cmpl $0x2c, %edx
je 0x952a
testl %edx, %edx
jne 0x952c
jmp 0x954b
incl %eax
incq %rcx
jmp 0x951c
leaq 0x7cf8(%rip), %rax      # 0x11230
cmpl $0x0, (%rax)
movq 0x20(%rsp), %r13
jle 0x9361
jmp 0x9855
movl %eax, 0x4(%rsp)
pushq $0x42
popq %rdi
leaq 0x30(%rsp), %r13
movq %r13, %rsi
callq 0x9942
movl %r14d, %edi
movq %r13, %rsi
callq 0x9942
leaq 0x4(%rsp), %rdi
pushq $0x4
popq %rsi
movq %r13, %rdx
callq 0x986b
cmpl $0x43, %r14d
je 0x9758
cmpl $0x49, %r14d
leaq 0x10(%rsp), %r13
je 0x96f3
cmpl $0x53, %r14d
je 0x96be
cmpl $0x63, %r14d
je 0x961d
cmpl $0x73, %r14d
je 0x9688
cmpl $0x69, %r14d
je 0x9652
cmpl $0x66, %r14d
jne 0x978a
cmpq %r12, %r15
jae 0x9417
incq %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x20f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1c(%rsp)
leaq 0x1c(%rsp), %rdi
pushq $0x4
popq %rsi
leaq 0x30(%rsp), %rdx
callq 0x986b
movq 0x10(%rsp), %r15
jmp 0x95c1
incq %r15
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2230
movsbl %al, %edi
leaq 0x30(%rsp), %rsi
callq 0x9942
movq 0x10(%rsp), %r15
cmpq %r12, %r15
jb 0x95fb
jmp 0x9417
incq %r15
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2230
movl %eax, 0x1c(%rsp)
leaq 0x1c(%rsp), %rdi
pushq $0x4
popq %rsi
leaq 0x30(%rsp), %rdx
callq 0x986b
movq 0x10(%rsp), %r15
cmpq %r12, %r15
jb 0x9627
jmp 0x9417
incq %r15
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2230
movw %ax, 0x1c(%rsp)
leaq 0x1c(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0x30(%rsp), %rdx
callq 0x986b
movq 0x10(%rsp), %r15
cmpq %r12, %r15
jb 0x965c
jmp 0x9417
incq %r15
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2230
movw %ax, 0x1c(%rsp)
leaq 0x1c(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0x30(%rsp), %rdx
callq 0x986b
movq 0x10(%rsp), %r15
cmpq %r12, %r15
jb 0x9692
jmp 0x9417
incq %r15
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2230
movl %eax, 0x1c(%rsp)
leaq 0x1c(%rsp), %rdi
pushq $0x4
popq %rsi
leaq 0x30(%rsp), %rdx
callq 0x986b
movq 0x10(%rsp), %r15
cmpq %r12, %r15
jb 0x96c8
jmp 0x9417
cmpq $-0x8000, %r14          # imm = 0x8000
jb 0x972e
movw %r14w, 0x4(%rsp)
pushq $0x73
popq %rdi
leaq 0x30(%rsp), %r14
movq %r14, %rsi
callq 0x9942
leaq 0x4(%rsp), %rdi
pushq $0x2
jmp 0x974a
movl %r14d, 0x4(%rsp)
pushq $0x49
jmp 0x9735
movl %r14d, 0x4(%rsp)
pushq $0x69
popq %rdi
leaq 0x30(%rsp), %r14
movq %r14, %rsi
callq 0x9942
leaq 0x4(%rsp), %rdi
pushq $0x4
popq %rsi
movq %r14, %rdx
callq 0x986b
jmp 0x9417
leaq 0x10(%rsp), %r14
cmpq %r12, %r15
jae 0x9417
incq %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2230
movzbl %al, %edi
leaq 0x30(%rsp), %rsi
callq 0x9942
movq 0x10(%rsp), %r15
jmp 0x975d
leaq 0x7a9f(%rip), %rax      # 0x11230
cmpl $0x0, (%rax)
jle 0x9417
leaq 0x2fbc(%rip), %rax      # 0xc75d
movq %rax, 0x50(%rsp)
movq 0x784b(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x2dc8(%rip), %rdx      # 0xc57f
movq 0x50(%rsp), %rsi
jmp 0x925b
xorl %ebp, %ebp
movq 0x8(%rsp), %r13
movq 0x40(%rsp), %rax
movq %rax, 0x28(%r13)
pshufd $0xe8, 0x30(%rsp), %xmm0 # xmm0 = mem[0,2,2,3]
movq %xmm0, 0x20(%r13)
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7802(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x2e6b(%rip), %rsi      # 0xc66b
leaq 0x2d78(%rip), %rdx      # 0xc57f
xorl %eax, %eax
callq 0x2220
jmp 0x9111
movq 0x77de(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x2ef5(%rip), %rsi      # 0xc719
jmp 0x9254
movq 0x77c8(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x2eb1(%rip), %rsi      # 0xc6eb
jmp 0x9254
movq 0x77b2(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x2e61(%rip), %rsi      # 0xc6b1
jmp 0x9254
movq 0x779c(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x2ef7(%rip), %rsi      # 0xc75d
jmp 0x9254