// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/gfa-io.c
// Function: gfa_aux_parse
int gfa_aux_parse(char *s, uint8_t **data, int *max)
{
	char *q, *p;
	kstring_t str;
	if (s == 0) return 0;
	str.l = 0, str.m = *max, str.s = (char*)*data;
	if (*s == '\t') ++s;
	for (p = q = s;; ++p) {
		if (*p == 0 || *p == '\t') {
			int c = *p;
			*p = 0;
			if (p - q >= 5 && q[2] == ':' && q[4] == ':' && (q[3] == 'A' || q[3] == 'i' || q[3] == 'f' || q[3] == 'Z' || q[3] == 'B')) {
				int type = q[3];
				kputsn_(q, 2, &str);
				q += 5;
				if (type == 'A') {
					kputc_('A', &str);
					kputc_(*q, &str);
				} else if (type == 'i') {
					int32_t x;
					x = strtol(q, &q, 10);
					kputc_(type, &str); kputsn_((char*)&x, 4, &str);
				} else if (type == 'f') {
					float x;
					x = strtod(q, &q);
					kputc_('f', &str); kputsn_(&x, 4, &str);
				} else if (type == 'Z') {
					kputc_('Z', &str); kputsn_(q, p - q + 1, &str); // note that this include the trailing NULL
				} else if (type == 'B') {
					type = *q++; // q points to the first ',' following the typing byte
					if (p - q >= 2 && (type == 'c' || type == 'C' || type == 's' || type == 'S' || type == 'i' || type == 'I' || type != 'f')) {
						int32_t n;
						char *r;
						for (r = q, n = 0; *r; ++r)
							if (*r == ',') ++n;
						kputc_('B', &str); kputc_(type, &str); kputsn_(&n, 4, &str);
						// TODO: 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); }
					}
				} // should not be here, as we have tested all types
			}
			q = p + 1;
			if (c == 0) break;
		}
	}
	if (str.l > 0 && str.l == str.m) ks_resize(&str, str.l + 1);
	if (str.s) str.s[str.l] = 0;
	*max = str.m, *data = (uint8_t*)str.s;
	return str.l;
}

// Assembly:
testq %rdi, %rdi
je 0x7086
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x30(%rsp)
movslq (%rdx), %rbp
movq %rsi, 0x20(%rsp)
movq (%rsi), %r9
xorl %r15d, %r15d
cmpb $0x9, (%rdi)
sete %r15b
addq %rdi, %r15
leaq 0x8(%rsp), %rax
movq %r15, (%rax)
xorl %r8d, %r8d
movzbl (%r15), %ebx
cmpl $0x9, %ebx
je 0x6690
testl %ebx, %ebx
jne 0x6b31
movb $0x0, (%r15)
movq 0x8(%rsp), %r14
movq %r15, %rax
subq %r14, %rax
cmpq $0x5, %rax
jl 0x6b20
cmpb $0x3a, 0x2(%r14)
jne 0x6b20
cmpb $0x3a, 0x4(%r14)
jne 0x6b20
movzbl 0x3(%r14), %r12d
leal -0x41(%r12), %eax
cmpl $0x28, %eax
ja 0x6b20
movabsq $0x12002000003, %rcx    # imm = 0x12002000003
btq %rax, %rcx
jae 0x6b20
leaq 0x2(%r8), %r13
cmpq %rbp, %r13
jbe 0x6749
leaq 0x1(%r8), %rax
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, %rbp
shrq $0x10, %rbp
orq %rax, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
movl %ebx, 0x10(%rsp)
movq %r13, %rbx
movq %r8, %r13
callq 0x22b0
movq %r13, %r8
movq %rbx, %r13
movl 0x10(%rsp), %ebx
movq %rax, %r9
movzwl (%r14), %eax
movw %ax, (%r9,%r8)
leaq 0x5(%r14), %rdi
movq %rdi, 0x8(%rsp)
cmpl $0x59, %r12d
jle 0x67f9
cmpl $0x5a, %r12d
je 0x683a
cmpl $0x66, %r12d
je 0x6918
cmpl $0x69, %r12d
jne 0x6832
movq %r9, %r12
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
movq %r8, %r14
callq 0x2220
leaq 0x3(%r14), %rdx
cmpq %rbp, %rdx
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
jbe 0x6ab4
movq %r13, %rax
shrq %rax
orq %r13, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x22b0
movq %r14, %rcx
movq %rax, %r9
jmp 0x6aba
cmpl $0x41, %r12d
je 0x698a
cmpl $0x42, %r12d
jne 0x6832
leaq 0x6(%r14), %rax
movq %rax, 0x8(%rsp)
movb 0x5(%r14), %dil
movq %r15, %rcx
subq %rax, %rcx
cmpq $0x2, %rcx
setl %cl
cmpb $0x66, %dil
sete %dl
orb %cl, %dl
je 0x6b39
movq %r13, %r8
jmp 0x6b20
addq $0x3, %r8
cmpq %rbp, %r8
jbe 0x688b
movq %r13, %rax
shrq %rax
orq %r13, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
movq %r8, %r14
callq 0x22b0
movq %r14, %r8
movq %rax, %r9
movb $0x5a, (%r9,%r13)
movq 0x8(%rsp), %rsi
movl %r15d, %eax
subl %esi, %eax
incl %eax
movslq %eax, %r14
leaq (%r14,%r8), %r12
cmpq %rbp, %r12
jbe 0x68ff
leaq -0x1(%r12), %rax
movq %rsi, 0x10(%rsp)
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, %rbp
shrq $0x10, %rbp
orq %rax, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
movq %r8, %r13
callq 0x22b0
movq 0x10(%rsp), %rsi
movq %r13, %r8
movq %rax, %r9
addq %r9, %r8
movq %r8, %rdi
movq %r9, %r13
movq %r14, %rdx
callq 0x2230
movq %r13, %r9
jmp 0x6b1d
movq %r9, %r12
leaq 0x8(%rsp), %rsi
movq %r8, %r14
callq 0x20c0
movsd %xmm0, 0x18(%rsp)
leaq 0x3(%r14), %rdx
movq %rdx, 0x10(%rsp)
cmpq %rbp, %rdx
jbe 0x6a43
movq %r13, %rax
shrq %rax
orq %r13, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x22b0
movq %r14, %rcx
movq %rax, %r9
jmp 0x6a49
leaq 0x3(%r8), %r14
cmpq %rbp, %r14
jbe 0x69db
movq %r13, %rax
shrq %rax
orq %r13, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
movq %r8, %r12
callq 0x22b0
movq %r12, %r8
movq %rax, %r9
movb $0x41, 0x2(%r9,%r8)
movq 0x8(%rsp), %rax
movb (%rax), %r12b
addq $0x4, %r8
cmpq %rbp, %r8
jbe 0x6a3a
movq %r14, %rax
shrq %rax
orq %r14, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
movq %r8, %r13
callq 0x22b0
movq %r13, %r8
movq %rax, %r9
movb %r12b, (%r9,%r14)
jmp 0x6b20
movq %r14, %rcx
movq %r12, %r9
movb $0x66, 0x2(%r9,%rcx)
leaq 0x7(%rcx), %r12
cmpq %rbp, %r12
jbe 0x6a9e
addq $0x6, %rcx
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
callq 0x22b0
movq %rax, %r9
xorps %xmm0, %xmm0
cvtsd2ss 0x18(%rsp), %xmm0
movq 0x10(%rsp), %rax
movss %xmm0, (%r9,%rax)
jmp 0x6b1d
movq %r14, %rcx
movq %r12, %r9
movb $0x69, 0x2(%r9,%rcx)
leaq 0x7(%rcx), %r12
cmpq %rbp, %r12
jbe 0x6b0f
addq $0x6, %rcx
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
callq 0x22b0
movq %rax, %r9
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movl %eax, (%r9,%rcx)
movq %r12, %r8
leaq 0x1(%r15), %rax
movq %rax, 0x8(%rsp)
testb %bl, %bl
je 0x7024
incq %r15
jmp 0x667f
movzbl %dil, %ecx
movl %ecx, 0x10(%rsp)
xorl %r14d, %r14d
movzbl (%rax), %ecx
cmpl $0x2c, %ecx
je 0x6b52
testl %ecx, %ecx
jne 0x6b55
jmp 0x6b5a
incl %r14d
incq %rax
jmp 0x6b44
leaq 0x3(%r8), %r12
cmpq %rbp, %r12
movb %dil, 0x18(%rsp)
jbe 0x6bb0
movq %r13, %rax
shrq %rax
orq %r13, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
movq %r8, %r13
callq 0x22b0
movq %r13, %r8
movq %rax, %r9
movb $0x42, 0x2(%r9,%r8)
leaq 0x4(%r8), %rcx
movq %rcx, 0x28(%rsp)
cmpq %rbp, %rcx
jbe 0x6c0c
movq %r12, %rax
shrq %rax
orq %r12, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
movq %r8, %r12
callq 0x22b0
movq %r12, %r8
movq %rax, %r9
movb 0x18(%rsp), %al
movb %al, 0x3(%r9,%r8)
leaq 0x8(%r8), %r13
cmpq %rbp, %r13
jbe 0x6c64
addq $0x7, %r8
movq %r8, %rax
shrq %rax
orq %r8, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
callq 0x22b0
movq %rax, %r9
movl 0x10(%rsp), %eax
movq 0x28(%rsp), %rcx
movl %r14d, (%r9,%rcx)
cmpl $0x62, %eax
jg 0x6d2a
cmpl $0x43, %eax
je 0x6dda
cmpl $0x49, %eax
je 0x6efc
cmpl $0x53, %eax
jne 0x6832
movq 0x8(%rsp), %rdi
incq %rdi
movq %r13, %r8
cmpq %r15, %rdi
jae 0x6b20
movq %r9, %r12
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x2220
movq %rax, %r14
leaq 0x2(%r13), %r8
cmpq %rbp, %r8
jbe 0x6d12
leaq 0x1(%r13), %rax
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, %rbp
shrq $0x10, %rbp
orq %rax, %rbp
incq %rbp
movq %r12, %rdi
movq %rbp, %rsi
movq %r8, %r12
callq 0x22b0
movq %r12, %r8
movq %rax, %r9
jmp 0x6d15
movq %r12, %r9
movw %r14w, (%r9,%r13)
movq 0x8(%rsp), %rdi
incq %rdi
movq %r8, %r13
jmp 0x6ca0
cmpl $0x63, %eax
je 0x6e6a
cmpl $0x69, %eax
je 0x6f90
cmpl $0x73, %eax
jne 0x6832
movq 0x8(%rsp), %rdi
incq %rdi
movq %r13, %r8
cmpq %r15, %rdi
jae 0x6b20
movq %r9, %r12
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x2220
movq %rax, %r14
leaq 0x2(%r13), %r8
cmpq %rbp, %r8
jbe 0x6dc2
leaq 0x1(%r13), %rax
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, %rbp
shrq $0x10, %rbp
orq %rax, %rbp
incq %rbp
movq %r12, %rdi
movq %rbp, %rsi
movq %r8, %r12
callq 0x22b0
movq %r12, %r8
movq %rax, %r9
jmp 0x6dc5
movq %r12, %r9
movw %r14w, (%r9,%r13)
movq 0x8(%rsp), %rdi
incq %rdi
movq %r8, %r13
jmp 0x6d50
movq 0x8(%rsp), %rdi
incq %rdi
movq %r13, %r8
cmpq %r15, %rdi
jae 0x6b20
movq %r9, %r12
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x2220
movq %rax, %r14
leaq 0x1(%r13), %r8
cmpq %rbp, %r8
jbe 0x6e53
movq %r13, %rax
shrq %rax
orq %r13, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r12, %rdi
movq %rbp, %rsi
movq %r8, %r12
callq 0x22b0
movq %r12, %r8
movq %rax, %r9
jmp 0x6e56
movq %r12, %r9
movb %r14b, (%r9,%r13)
movq 0x8(%rsp), %rdi
incq %rdi
movq %r8, %r13
jmp 0x6de5
movq 0x8(%rsp), %rdi
incq %rdi
cmpq %r15, %rdi
jae 0x6832
movq %r9, %r12
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x2220
movq %rax, %r14
leaq 0x1(%r13), %r8
cmpq %rbp, %r8
jbe 0x6ee0
movq %r13, %rax
shrq %rax
orq %r13, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r12, %rdi
movq %rbp, %rsi
movq %r8, %r12
callq 0x22b0
movq %r12, %r8
movq %rax, %r9
jmp 0x6ee3
movq %r12, %r9
movb %r14b, (%r9,%r13)
movq 0x8(%rsp), %rdi
incq %rdi
movq %r8, %r13
cmpq %r15, %rdi
jb 0x6e7b
jmp 0x6b20
movq 0x8(%rsp), %rdi
incq %rdi
movq %r13, %r8
cmpq %r15, %rdi
jae 0x6b20
movq %r9, %r12
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x2220
movq %rax, %r14
leaq 0x4(%r13), %r8
cmpq %rbp, %r8
jbe 0x6f79
leaq 0x3(%r13), %rax
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, %rbp
shrq $0x10, %rbp
orq %rax, %rbp
incq %rbp
movq %r12, %rdi
movq %rbp, %rsi
movq %r8, %r12
callq 0x22b0
movq %r12, %r8
movq %rax, %r9
jmp 0x6f7c
movq %r12, %r9
movl %r14d, (%r9,%r13)
movq 0x8(%rsp), %rdi
incq %rdi
movq %r8, %r13
jmp 0x6f07
movq 0x8(%rsp), %rdi
incq %rdi
movq %r13, %r8
cmpq %r15, %rdi
jae 0x6b20
movq %r9, %r12
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x2220
movq %rax, %r14
leaq 0x4(%r13), %r8
cmpq %rbp, %r8
jbe 0x700d
leaq 0x3(%r13), %rax
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, %rbp
shrq $0x10, %rbp
orq %rax, %rbp
incq %rbp
movq %r12, %rdi
movq %rbp, %rsi
movq %r8, %r12
callq 0x22b0
movq %r12, %r8
movq %rax, %r9
jmp 0x7010
movq %r12, %r9
movl %r14d, (%r9,%r13)
movq 0x8(%rsp), %rdi
incq %rdi
movq %r8, %r13
jmp 0x6f9b
testq %r8, %r8
je 0x708b
cmpq %rbp, %r8
movq 0x20(%rsp), %rbx
jne 0x7090
leaq 0x1(%r8), %rax
cmpq %rax, %rbp
jae 0x7090
movq %r8, %rax
shrq %rax
orq %r8, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rbp
shrq $0x10, %rbp
orq %rcx, %rbp
incq %rbp
movq %r9, %rdi
movq %rbp, %rsi
movq %r8, %r14
callq 0x22b0
movq %r14, %r8
movq %rax, %r9
jmp 0x7090
xorl %r8d, %r8d
jmp 0x70b2
movq 0x20(%rsp), %rbx
testq %r9, %r9
je 0x709a
movb $0x0, (%r9,%r8)
movq 0x30(%rsp), %rax
movl %ebp, (%rax)
movq %r9, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movl %r8d, %eax
retq