// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x856a
movl $0x0, -0x4(%rbp)
jmp 0x8a97
movq $0x0, -0x48(%rbp)
movq -0x20(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x85a0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x85c8
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x8a31
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
cmpq $0x5, %rax
jl 0x8a1b
movq -0x28(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x3a, %eax
jne 0x8a1b
movq -0x28(%rbp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x3a, %eax
jne 0x8a1b
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x41, %eax
je 0x8655
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x69, %eax
je 0x8655
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x66, %eax
je 0x8655
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x5a, %eax
je 0x8655
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x42, %eax
jne 0x8a1b
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
movl $0x2, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
movq -0x28(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x28(%rbp)
cmpl $0x41, -0x50(%rbp)
jne 0x86a7
movl $0x41, %edi
leaq -0x48(%rbp), %rsi
callq 0x8be0
movq -0x28(%rbp), %rax
movsbl (%rax), %edi
leaq -0x48(%rbp), %rsi
callq 0x8be0
jmp 0x8a19
cmpl $0x69, -0x50(%rbp)
jne 0x86e5
movq -0x28(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0xa, %edx
callq 0x2220
movl %eax, -0x54(%rbp)
movl -0x50(%rbp), %edi
leaq -0x48(%rbp), %rsi
callq 0x8be0
leaq -0x54(%rbp), %rdi
movl $0x4, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
jmp 0x8a17
cmpl $0x66, -0x50(%rbp)
jne 0x8726
movq -0x28(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x20c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x58(%rbp)
movl $0x66, %edi
leaq -0x48(%rbp), %rsi
callq 0x8be0
leaq -0x58(%rbp), %rdi
movl $0x4, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
jmp 0x8a15
cmpl $0x5a, -0x50(%rbp)
jne 0x875d
movl $0x5a, %edi
leaq -0x48(%rbp), %rsi
callq 0x8be0
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movl %eax, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
jmp 0x8a13
cmpl $0x42, -0x50(%rbp)
jne 0x8a11
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jl 0x8a0f
cmpl $0x63, -0x50(%rbp)
je 0x87bf
cmpl $0x43, -0x50(%rbp)
je 0x87bf
cmpl $0x73, -0x50(%rbp)
je 0x87bf
cmpl $0x53, -0x50(%rbp)
je 0x87bf
cmpl $0x69, -0x50(%rbp)
je 0x87bf
cmpl $0x49, -0x50(%rbp)
je 0x87bf
cmpl $0x66, -0x50(%rbp)
je 0x8a0f
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x5c(%rbp)
movq -0x68(%rbp), %rax
cmpb $0x0, (%rax)
je 0x87fc
movq -0x68(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x87ec
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x87ee
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x87ce
movl $0x42, %edi
leaq -0x48(%rbp), %rsi
callq 0x8be0
movl -0x50(%rbp), %edi
leaq -0x48(%rbp), %rsi
callq 0x8be0
leaq -0x5c(%rbp), %rdi
movl $0x4, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
cmpl $0x63, -0x50(%rbp)
jne 0x8868
jmp 0x8830
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x8863
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2220
movb %al, -0x69(%rbp)
movsbl -0x69(%rbp), %edi
leaq -0x48(%rbp), %rsi
callq 0x8be0
jmp 0x8830
jmp 0x8a0d
cmpl $0x43, -0x50(%rbp)
jne 0x88a8
jmp 0x8870
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x88a3
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2220
movb %al, -0x6a(%rbp)
movzbl -0x6a(%rbp), %edi
leaq -0x48(%rbp), %rsi
callq 0x8be0
jmp 0x8870
jmp 0x8a0b
cmpl $0x73, -0x50(%rbp)
jne 0x88ee
jmp 0x88b0
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x88e9
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2220
movw %ax, -0x6c(%rbp)
leaq -0x6c(%rbp), %rdi
movl $0x2, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
jmp 0x88b0
jmp 0x8a09
cmpl $0x53, -0x50(%rbp)
jne 0x8934
jmp 0x88f6
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x892f
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2220
movw %ax, -0x6e(%rbp)
leaq -0x6e(%rbp), %rdi
movl $0x2, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
jmp 0x88f6
jmp 0x8a07
cmpl $0x69, -0x50(%rbp)
jne 0x8979
jmp 0x893c
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x8974
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2220
movl %eax, -0x74(%rbp)
leaq -0x74(%rbp), %rdi
movl $0x4, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
jmp 0x893c
jmp 0x8a05
cmpl $0x49, -0x50(%rbp)
jne 0x89bb
jmp 0x8981
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x89b9
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2220
movl %eax, -0x78(%rbp)
leaq -0x78(%rbp), %rdi
movl $0x4, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
jmp 0x8981
jmp 0x8a03
cmpl $0x66, -0x50(%rbp)
jne 0x8a01
jmp 0x89c3
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x89ff
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
callq 0x20c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x7c(%rbp)
leaq -0x7c(%rbp), %rdi
movl $0x4, %esi
leaq -0x48(%rbp), %rdx
callq 0x8ab0
jmp 0x89c3
jmp 0x8a01
jmp 0x8a03
jmp 0x8a05
jmp 0x8a07
jmp 0x8a09
jmp 0x8a0b
jmp 0x8a0d
jmp 0x8a0f
jmp 0x8a11
jmp 0x8a13
jmp 0x8a15
jmp 0x8a17
jmp 0x8a19
jmp 0x8a1b
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0x8a2f
jmp 0x8a44
jmp 0x8a31
jmp 0x8a33
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x85ac
cmpq $0x0, -0x48(%rbp)
jbe 0x8a66
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x8a66
movq -0x48(%rbp), %rsi
addq $0x1, %rsi
leaq -0x48(%rbp), %rdi
callq 0x8d00
cmpq $0x0, -0x38(%rbp)
je 0x8a79
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)