// File: /workspace/github_c_makefile_star2_O2/lh3[P]pre-pe/pre-meta.c
// Function: bseq_read
bseq1_t *bseq_read(kseq_t *ks, int chunk_size, int *n_)
{
	int size = 0, m, n;
	bseq1_t *seqs;
	m = n = 0; seqs = 0;
	while (kseq_read(ks) >= 0) {
		bseq1_t *s;
		if (n >= m) {
			m = m? m<<1 : 256;
			seqs = realloc(seqs, m * sizeof(bseq1_t));
		}
		s = &seqs[n];
		s->name = strdup(ks->name.s);
		s->seq = strdup(ks->seq.s);
		s->qual = ks->qual.l? strdup(ks->qual.s) : 0;
		s->bc_f = 0;
		s->bc_r = 0;
		s->l_seq = ks->seq.l;
		s->dbl_bind = 0;
		s->type = LT_UNKNOWN;
		s->olig_pos_f = 0;
		s->olig_pos_r = 0;
		size += seqs[n++].l_seq;
		if (size >= chunk_size && (n&1) == 0) break;
	}
	*n_ = n;
	return seqs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x10(%rsp)
movl %esi, 0x24(%rsp)
movq %rdi, %r15
leaq 0x30(%rdi), %r12
leaq 0x20(%rdi), %r13
leaq 0x10(%rdi), %rax
movq %rax, 0x30(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0x4(%rsp), %rbp
pushq $0x2
popq %rbx
movq $0x0, 0x28(%rsp)
movq $0x0, 0x8(%rsp)
xorl %esi, %esi
movl %esi, 0x20(%rsp)
movq 0x48(%r15), %r14
cmpl $0x0, 0x40(%r15)
jne 0x2c0f
movq %r14, %rdi
callq 0x40ea
cmpl $-0x1, %eax
je 0x2e61
cmpl $0x40, %eax
je 0x2c07
cmpl $0x3e, %eax
jne 0x2bec
movl %eax, 0x4(%rsp)
movl %eax, 0x40(%r15)
andl $0x0, 0x30(%r15)
andl $0x0, 0x20(%r15)
andl $0x0, 0x10(%r15)
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbp, %rcx
callq 0x415d
testl %eax, %eax
js 0x2e61
cmpl $0xa, 0x4(%rsp)
je 0x2c4e
movq %r14, %rdi
movl %ebx, %esi
movq 0x30(%rsp), %rdx
xorl %ecx, %ecx
callq 0x415d
cmpq $0x0, 0x28(%r15)
pushq $0x1
popq %rbp
jne 0x2c6e
movl $0x100, 0x24(%r15)      # imm = 0x100
movl $0x100, %edi            # imm = 0x100
callq 0x21a0
movq %rax, 0x28(%r15)
movq %r14, %rdi
callq 0x40ea
movl %eax, 0x4(%rsp)
cmpl $0xa, %eax
je 0x2c6e
cmpl $-0x1, %eax
je 0x2cbd
cmpl $0x2b, %eax
je 0x2cbd
cmpl $0x3e, %eax
je 0x2cb9
cmpl $0x40, %eax
je 0x2cb9
movq 0x28(%r15), %rcx
movl 0x20(%r15), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x20(%r15)
movb %al, (%rcx,%rdx)
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x4162
jmp 0x2c6e
movl %eax, 0x40(%r15)
movl 0x20(%r15), %ecx
leal 0x1(%rcx), %edx
movq 0x28(%r15), %rax
cmpl 0x24(%r15), %edx
jb 0x2d06
movl %edx, %ecx
shrl %ecx
orl %edx, %ecx
movl %ecx, %edx
shrl $0x2, %edx
orl %ecx, %edx
movl %edx, %ecx
shrl $0x4, %ecx
orl %edx, %ecx
movl %ecx, %edx
shrl $0x8, %edx
orl %ecx, %edx
movl %edx, %esi
shrl $0x10, %esi
orl %edx, %esi
incl %esi
movl %esi, 0x24(%r15)
movq %rax, %rdi
callq 0x21b0
movq %rax, 0x28(%r15)
movl 0x20(%r15), %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
cmpl $0x2b, 0x4(%rsp)
jne 0x2d78
movl 0x24(%r15), %esi
cmpl %esi, 0x34(%r15)
jae 0x2d2e
movl %esi, 0x34(%r15)
movq 0x38(%r15), %rdi
callq 0x21b0
movq %rax, 0x38(%r15)
movq %r14, %rdi
callq 0x40ea
movl %eax, 0x4(%rsp)
cmpl $-0x1, %eax
je 0x2e61
cmpl $0xa, %eax
jne 0x2d2e
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x4162
movl (%r13), %ecx
movl (%r12), %edx
testl %eax, %eax
js 0x2d6a
cmpl %ecx, %edx
jb 0x2d48
andl $0x0, 0x40(%r15)
cmpl %edx, %ecx
je 0x2d7c
jmp 0x2e61
movl (%r13), %ecx
testl %ecx, %ecx
js 0x2e61
movq 0x28(%rsp), %rcx
movslq %ecx, %rax
cmpq %rax, 0x18(%rsp)
jge 0x2d9a
movq 0x8(%rsp), %rbp
jmp 0x2dc5
leal (%rcx,%rcx), %r14d
testl %ecx, %ecx
movl $0x100, %eax            # imm = 0x100
cmovel %eax, %r14d
movslq %r14d, %rsi
shlq $0x6, %rsi
movq 0x8(%rsp), %rdi
callq 0x21b0
movq %rax, %rbp
movl %r14d, %eax
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %r14
shlq $0x6, %r14
movq 0x8(%r15), %rdi
callq 0x2240
movq %rax, 0x10(%rbp,%r14)
movq 0x28(%r15), %rdi
callq 0x2240
movq %rbp, 0x8(%rsp)
movq %rax, 0x18(%rbp,%r14)
cmpl $0x0, 0x30(%r15)
je 0x2e01
movq 0x38(%r15), %rdi
callq 0x2240
jmp 0x2e03
xorl %eax, %eax
leaq 0x4(%rsp), %rbp
movl 0x20(%rsp), %esi
addq 0x8(%rsp), %r14
movq %rax, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movl (%r13), %ecx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl %eax, %ecx
movl %ecx, (%r14)
andq $0x0, 0x4(%r14)
andl $0x0, 0xc(%r14)
movq 0x18(%rsp), %rdx
movq %rdx, %rax
incq %rax
addl %ecx, %esi
cmpl 0x24(%rsp), %esi
setl %cl
testb $0x1, %dl
sete %dl
orb %cl, %dl
movq %rax, 0x18(%rsp)
jne 0x2bdd
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movl %ecx, (%rdx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq