// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]oatk/path.c
// Function: gfa_aux_parse
static 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') {
                    int64_t x;
                    x = strtoll(q, &q, 10);
                    kputc_(type, &str); kputsn_((char*)&x, 8, &str);
                } else if (type == 'f') {
                    double x;
                    x = strtod(q, &q);
                    kputc_('f', &str); kputsn_(&x, 8, &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) { int64_t  x = strtoll(q + 1, &q, 0); kputsn_(&x, 8, &str); }
                        else if (type == 'I') while (q + 1 < p) { uint64_t x = strtoll(q + 1, &q, 0); kputsn_(&x, 8, &str); }
                        else if (type == 'f') while (q + 1 < p) { double   x = strtod(q + 1, &q);     kputsn_(&x, 8, &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 $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x16c7a
movl $0x0, -0x4(%rbp)
jmp 0x171ae
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 0x16cb0
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 0x16cd8
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x17148
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 0x17132
movq -0x28(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x3a, %eax
jne 0x17132
movq -0x28(%rbp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x3a, %eax
jne 0x17132
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x41, %eax
je 0x16d65
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x69, %eax
je 0x16d65
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x66, %eax
je 0x16d65
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x5a, %eax
je 0x16d65
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x42, %eax
jne 0x17132
movq -0x28(%rbp), %rax
movsbl 0x3(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
movl $0x2, %esi
leaq -0x48(%rbp), %rdx
callq 0x17410
movq -0x28(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x28(%rbp)
cmpl $0x41, -0x50(%rbp)
jne 0x16db7
movl $0x41, %edi
leaq -0x48(%rbp), %rsi
callq 0x17540
movq -0x28(%rbp), %rax
movsbl (%rax), %edi
leaq -0x48(%rbp), %rsi
callq 0x17540
jmp 0x17130
cmpl $0x69, -0x50(%rbp)
jne 0x16df6
movq -0x28(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0xa, %edx
callq 0x2260
movq %rax, -0x58(%rbp)
movl -0x50(%rbp), %edi
leaq -0x48(%rbp), %rsi
callq 0x17540
leaq -0x58(%rbp), %rdi
movl $0x8, %esi
leaq -0x48(%rbp), %rdx
callq 0x17410
jmp 0x1712e
cmpl $0x66, -0x50(%rbp)
jne 0x16e33
movq -0x28(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x20d0
movsd %xmm0, -0x60(%rbp)
movl $0x66, %edi
leaq -0x48(%rbp), %rsi
callq 0x17540
leaq -0x60(%rbp), %rdi
movl $0x8, %esi
leaq -0x48(%rbp), %rdx
callq 0x17410
jmp 0x1712c
cmpl $0x5a, -0x50(%rbp)
jne 0x16e6a
movl $0x5a, %edi
leaq -0x48(%rbp), %rsi
callq 0x17540
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 0x17410
jmp 0x1712a
cmpl $0x42, -0x50(%rbp)
jne 0x17128
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 0x17126
cmpl $0x63, -0x50(%rbp)
je 0x16ecc
cmpl $0x43, -0x50(%rbp)
je 0x16ecc
cmpl $0x73, -0x50(%rbp)
je 0x16ecc
cmpl $0x53, -0x50(%rbp)
je 0x16ecc
cmpl $0x69, -0x50(%rbp)
je 0x16ecc
cmpl $0x49, -0x50(%rbp)
je 0x16ecc
cmpl $0x66, -0x50(%rbp)
je 0x17126
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x70(%rbp), %rax
cmpb $0x0, (%rax)
je 0x16f09
movq -0x70(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x16ef9
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x16efb
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x16edb
movl $0x42, %edi
leaq -0x48(%rbp), %rsi
callq 0x17540
movl -0x50(%rbp), %edi
leaq -0x48(%rbp), %rsi
callq 0x17540
leaq -0x64(%rbp), %rdi
movl $0x4, %esi
leaq -0x48(%rbp), %rdx
callq 0x17410
cmpl $0x63, -0x50(%rbp)
jne 0x16f75
jmp 0x16f3d
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x16f70
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x22b0
movb %al, -0x71(%rbp)
movsbl -0x71(%rbp), %edi
leaq -0x48(%rbp), %rsi
callq 0x17540
jmp 0x16f3d
jmp 0x17124
cmpl $0x43, -0x50(%rbp)
jne 0x16fb5
jmp 0x16f7d
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x16fb0
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x22b0
movb %al, -0x72(%rbp)
movzbl -0x72(%rbp), %edi
leaq -0x48(%rbp), %rsi
callq 0x17540
jmp 0x16f7d
jmp 0x17122
cmpl $0x73, -0x50(%rbp)
jne 0x16ffb
jmp 0x16fbd
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x16ff6
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x22b0
movw %ax, -0x74(%rbp)
leaq -0x74(%rbp), %rdi
movl $0x2, %esi
leaq -0x48(%rbp), %rdx
callq 0x17410
jmp 0x16fbd
jmp 0x17120
cmpl $0x53, -0x50(%rbp)
jne 0x17041
jmp 0x17003
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x1703c
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x22b0
movw %ax, -0x76(%rbp)
leaq -0x76(%rbp), %rdi
movl $0x2, %esi
leaq -0x48(%rbp), %rdx
callq 0x17410
jmp 0x17003
jmp 0x1711e
cmpl $0x69, -0x50(%rbp)
jne 0x17087
jmp 0x17049
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x17082
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2260
movq %rax, -0x80(%rbp)
leaq -0x80(%rbp), %rdi
movl $0x8, %esi
leaq -0x48(%rbp), %rdx
callq 0x17410
jmp 0x17049
jmp 0x1711c
cmpl $0x49, -0x50(%rbp)
jne 0x170d0
jmp 0x1708f
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x170ce
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2260
movq %rax, -0x88(%rbp)
leaq -0x88(%rbp), %rdi
movl $0x8, %esi
leaq -0x48(%rbp), %rdx
callq 0x17410
jmp 0x1708f
jmp 0x1711a
cmpl $0x66, -0x50(%rbp)
jne 0x17118
jmp 0x170d8
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
jae 0x17116
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
callq 0x20d0
movsd %xmm0, -0x90(%rbp)
leaq -0x90(%rbp), %rdi
movl $0x8, %esi
leaq -0x48(%rbp), %rdx
callq 0x17410
jmp 0x170d8
jmp 0x17118
jmp 0x1711a
jmp 0x1711c
jmp 0x1711e
jmp 0x17120
jmp 0x17122
jmp 0x17124
jmp 0x17126
jmp 0x17128
jmp 0x1712a
jmp 0x1712c
jmp 0x1712e
jmp 0x17130
jmp 0x17132
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0x17146
jmp 0x1715b
jmp 0x17148
jmp 0x1714a
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x16cbc
cmpq $0x0, -0x48(%rbp)
jbe 0x1717d
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x1717d
movq -0x48(%rbp), %rsi
addq $0x1, %rsi
leaq -0x48(%rbp), %rdi
callq 0x17660
cmpq $0x0, -0x38(%rbp)
je 0x17190
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 $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)