// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/extract.cpp
// Function: gv_read_list(char const*, int*)
char **gv_read_list(const char *o, int *n_)
{
	int n = 0, m = 0;
	char **s = 0;
	*n_ = 0;
	if (*o != '@') {
		const char *q = o, *p;
		for (p = q;; ++p) {
			if (*p == ',' || *p == 0) {
				if (n == m) {
					m = m? m<<1 : 16;
					GFA_REALLOC(s, m);
				}
				s[n++] = gfa_strndup(q, p - q);
				if (*p == 0) break;
				q = p + 1;
			}
		}
	} else {
		gzFile fp;
		kstream_t *ks;
		kstring_t str = {0,0,0};
		int dret;

		fp = gzopen(o + 1, "r");
		if (fp == 0) return 0;
		ks = ks_init(fp);
		while (ks_getuntil(ks, KS_SEP_LINE, &str, &dret) >= 0) {
			char *p;
			for (p = str.s; *p && !isspace(*p); ++p);
			if (n == m) {
				m = m? m<<1 : 16;
				GFA_REALLOC(s, m);
			}
			s[n++] = gfa_strndup(str.s, p - str.s);
		}
		ks_destroy(ks);
		gzclose(fp);
	}
	if (s) s = (char**)realloc(s, n * sizeof(char*));
	*n_ = n;
	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x0, (%rsi)
movb (%rdi), %al
cmpb $0x40, %al
jne 0x135471
incq %r15
leaq 0x10a630(%rip), %rsi    # 0x23f7f7
movq %r15, %rdi
callq 0x22d0
xorl %r14d, %r14d
testq %rax, %rax
je 0x135568
movq %rax, %r15
movq %rbx, 0x28(%rsp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x2120
movq %rax, %r12
movq %r15, 0x30(%rsp)
movq %r15, 0x18(%rax)
movl $0x10000, %edi          # imm = 0x10000
callq 0x2280
movq %rax, (%r12)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x1, %bl
xorl %r13d, %r13d
cmpl $-0x1, %r14d
je 0x135524
movl 0x8(%r12), %eax
cmpl %r14d, %eax
jl 0x13528e
cmpl $0x0, 0x10(%r12)
jne 0x13535d
movl $0x0, 0x8(%r12)
movq (%r12), %rsi
movq 0x18(%r12), %rdi
movl $0x10000, %edx          # imm = 0x10000
callq 0x23d0
movl %eax, 0xc(%r12)
cmpl $-0x1, %eax
je 0x135524
movl %eax, %r14d
testl %eax, %eax
je 0x13536c
xorl %eax, %eax
movl %eax, %r15d
cmpl %r14d, %eax
movq %rbp, %rdi
jge 0x1352b6
movslq %eax, %rcx
addq (%r12), %rcx
movl %eax, %r15d
cmpb $0xa, (%rcx)
je 0x1352b6
incl %r15d
incq %rcx
cmpl %r15d, %r14d
jne 0x1352a3
movl %r14d, %r15d
movq 0x10(%rsp), %rdx
subq %r13, %rdx
movl %r15d, %ecx
subl %eax, %ecx
leal 0x1(%rcx), %esi
movslq %esi, %rsi
cmpq %rsi, %rdx
jae 0x13531f
movslq %ecx, %rax
addq %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, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x10(%rsp)
callq 0x2370
movq %rax, %rdi
movl 0x8(%r12), %eax
movl %r15d, %ecx
subl %eax, %ecx
movq %rdi, %rbp
addq %r13, %rdi
movslq %eax, %rsi
addq (%r12), %rsi
movslq %ecx, %rdx
callq 0x2160
movslq 0x8(%r12), %rax
movslq %r15d, %rcx
subq %rax, %rcx
addq %rcx, %r13
leal 0x1(%r15), %eax
movl %eax, 0x8(%r12)
movl 0xc(%r12), %r14d
xorl %ebx, %ebx
cmpl %r14d, %r15d
jge 0x135237
jmp 0x13537e
cmpl %r14d, %eax
setge %al
testb %bl, %al
je 0x13537e
jmp 0x135524
movl $0x1, 0x10(%r12)
testb $0x1, %bl
jne 0x135524
testq %rbp, %rbp
je 0x13539c
movq %rbp, %rax
cmpq $0x2, %r13
jb 0x1353b5
xorl %ecx, %ecx
cmpb $0xd, -0x1(%rax,%r13)
sete %cl
subq %rcx, %r13
jmp 0x1353b5
movl $0x1, %eax
movq %rax, 0x10(%rsp)
movl $0x1, %edi
movl $0x1, %esi
callq 0x2120
movb $0x0, (%rax,%r13)
testl %r13d, %r13d
js 0x135524
movq %rax, %rbp
movq %rax, %rbx
movb (%rbp), %al
movq %rbp, %r15
testb %al, %al
movq 0x20(%rsp), %r14
je 0x1353f2
movq %rbx, %r15
movsbl %al, %edi
callq 0x2030
testl %eax, %eax
jne 0x1353f2
movb 0x1(%r15), %al
incq %r15
testb %al, %al
jne 0x1353db
movl %r14d, %eax
cmpq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
jne 0x13542b
leal (%r14,%r14), %ebx
testl %r14d, %r14d
movl $0x10, %eax
cmovel %eax, %ebx
movslq %ebx, %rsi
shlq $0x3, %rsi
callq 0x2370
movq %rax, %r14
movl %ebx, %eax
movq %rax, 0x20(%rsp)
movq %rbp, %rbx
jmp 0x13542e
movq %rdi, %r14
subq %rbx, %r15
leaq 0x1(%r15), %rdi
callq 0x2280
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x20d0
movb $0x0, (%r13,%r15)
movq 0x8(%rsp), %rax
movq %r14, 0x18(%rsp)
movq %r13, (%r14,%rax,8)
incq %rax
movq %rax, 0x8(%rsp)
movl 0xc(%r12), %r14d
jmp 0x135232
movq %rbx, 0x28(%rsp)
leaq 0x1(%r15), %rbp
xorl %ecx, %ecx
movq %r15, %r14
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpb $0x2c, %al
je 0x135493
movzbl %al, %eax
testl %eax, %eax
jne 0x135516
movq %r12, 0x8(%rsp)
cmpl %ecx, %r12d
jne 0x1354c8
leal (%rcx,%rcx), %r12d
testl %ecx, %ecx
movl $0x10, %eax
cmovel %eax, %r12d
movslq %r12d, %rsi
shlq $0x3, %rsi
movq %rbx, %rdi
callq 0x2370
movq %rax, %rbx
movl %r12d, %eax
movq %rax, 0x10(%rsp)
jmp 0x1354cd
movq %rcx, 0x10(%rsp)
movq %r14, %r12
subq %r15, %r12
leaq 0x1(%r12), %rdi
callq 0x2280
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x20d0
movq %r13, %rax
subq %r15, %rax
movb $0x0, (%rax,%r14)
movq 0x8(%rsp), %r12
movslq %r12d, %rax
incl %r12d
movq %r13, (%rbx,%rax,8)
cmpb $0x0, -0x1(%rbp)
movq %rbp, %r15
movq 0x10(%rsp), %rcx
je 0x13554e
movb (%rbp), %al
incq %rbp
incq %r14
jmp 0x135484
movq (%r12), %rdi
callq 0x2220
movq %r12, %rdi
callq 0x2220
movq 0x30(%rsp), %rdi
callq 0x2390
movq 0x18(%rsp), %rbx
testq %rbx, %rbx
je 0x13557a
movq 0x8(%rsp), %r12
movslq %r12d, %rsi
shlq $0x3, %rsi
movq %rbx, %rdi
callq 0x2370
movq %rax, %r14
movq 0x28(%rsp), %rax
movl %r12d, (%rax)
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
movq 0x8(%rsp), %r12
jmp 0x135560