// File: /workspace/github_c_makefile_star2_O0/lh3[P]bgt/hts.c
// Function: hts_readlines
char **hts_readlines(const char *fn, int *_n)
{
	int m = 0, n = 0, dret;
	char **s = 0;
	gzFile fp;
	if (_n) *_n = 0;
	if ((fp = gzopen(fn, "r")) != 0) { // read from file
		kstream_t *ks;
		kstring_t str;
		str.s = 0; str.l = str.m = 0;
		ks = ks_init(fp);
		while (ks_getuntil(ks, KS_SEP_LINE, &str, &dret) >= 0) {
			int i;
			if (str.l == 0) continue;
			for (i = 0; i < str.l && str.s[i] != '\t'; ++i);
			str.s[i] = 0;
			if (m == n) {
				m = m? m<<1 : 16;
				s = (char**)realloc(s, m * sizeof(void*));
			}
			s[n++] = strdup(str.s);
		}
		ks_destroy(ks);
		gzclose(fp);
		s = (char**)realloc(s, n * sizeof(void*));
		free(str.s);
	} else if (*fn == ':' || *fn == ',') { // read from string
		const char *q, *p;
		for (q = p = fn + 1;; ++p)
			if (*p == ',' || *p == 0) {
				if (m == n) {
					m = m? m<<1 : 16;
					s = (char**)realloc(s, m * sizeof(void*));
				}
				s[n] = (char*)calloc(p - q + 1, 1);
				strncpy(s[n++], q, p - q);
				q = p + 1;
				if (*p == 0) break;
			}
	} else return 0;
	s = (char**)realloc(s, n * sizeof(void*));
	*_n = n;
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x892a
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x1f7a9(%rip), %rsi     # 0x280de
callq 0x2380
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x8a7b
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %rdi
callq 0x7500
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movl $0x2, %esi
leaq -0x58(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0x88b0
cmpl $0x0, %eax
jl 0x8a46
cmpq $0x0, -0x58(%rbp)
jne 0x8995
jmp 0x896d
movl $0x0, -0x5c(%rbp)
movslq -0x5c(%rbp), %rcx
xorl %eax, %eax
cmpq -0x58(%rbp), %rcx
movb %al, -0x71(%rbp)
jae 0x89c0
movq -0x48(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
setne %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x89c9
jmp 0x89d6
jmp 0x89cb
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x899c
movq -0x48(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jne 0x8a1f
cmpl $0x0, -0x1c(%rbp)
je 0x89fa
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x78(%rbp)
jmp 0x8a04
movl $0x10, %eax
movl %eax, -0x78(%rbp)
jmp 0x8a04
movl -0x78(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2340
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rdi
callq 0x2440
movq %rax, %rdx
movq -0x30(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x896d
movq -0x40(%rbp), %rdi
callq 0x7560
movq -0x38(%rbp), %rdi
callq 0x2030
movq -0x30(%rbp), %rdi
movslq -0x20(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2340
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rdi
callq 0x2040
jmp 0x8b8f
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
je 0x8a97
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x8b83
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
movq %rax, -0x68(%rbp)
movq -0x70(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x8ac3
movq -0x70(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x8b6e
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jne 0x8b00
cmpl $0x0, -0x1c(%rbp)
je 0x8adb
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x7c(%rbp)
jmp 0x8ae5
movl $0x10, %eax
movl %eax, -0x7c(%rbp)
jmp 0x8ae5
movl -0x7c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2340
movq %rax, -0x30(%rbp)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rax
subq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x2230
movq %rax, %rdx
movq -0x30(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rax
subq %rax, %rdx
callq 0x2070
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x70(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x8b6c
jmp 0x8b81
jmp 0x8b6e
jmp 0x8b70
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x8aa7
jmp 0x8b8d
movq $0x0, -0x8(%rbp)
jmp 0x8bb5
jmp 0x8b8f
movq -0x30(%rbp), %rdi
movslq -0x20(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2340
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)