// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movq %rdx, 0x8(%rsp)
movl %esi, 0x14(%rsp)
movq %rdi, %r15
leaq 0x30(%rdi), %r12
leaq 0x20(%rdi), %r13
leaq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x18(%rsp)
xorl %r14d, %r14d
xorl %edx, %edx
movl %edx, 0x10(%rsp)
movq 0x48(%r15), %rbx
cmpl $0x0, 0x40(%r15)
je 0x2cf8
movl %ebp, 0x4(%rsp)
jmp 0x2d6c
movl 0x8(%rbx), %edx
movl (%rbx), %ecx
movl 0x4(%rbx), %eax
movl %ebp, 0x4(%rsp)
testb $0x3, %dl
je 0x2d11
cmpl %eax, %ecx
jge 0x3095
movq 0x18(%rbx), %rsi
cmpl %eax, %ecx
jl 0x2d50
movl $0x0, (%rbx)
movq 0x10(%rbx), %rdi
sarl $0x2, %edx
callq 0x2130
movl %eax, 0x4(%rbx)
movl 0x8(%rbx), %edx
movl %edx, %ecx
sarl $0x2, %ecx
cmpl %ecx, %eax
jge 0x2d42
andl $-0x4, %edx
incl %edx
movl %edx, 0x8(%rbx)
testl %eax, %eax
je 0x3095
movl (%rbx), %ecx
movq 0x18(%rbx), %rsi
movslq %ecx, %rdi
incl %ecx
movl %ecx, (%rbx)
movzbl (%rsi,%rdi), %esi
movl %esi, (%rsp)
cmpl $0x40, %esi
je 0x2d68
cmpl $0x3e, %esi
jne 0x2d04
movl %esi, 0x40(%r15)
xorl %eax, %eax
movl %eax, 0x30(%r15)
movl %eax, 0x20(%r15)
movl %eax, 0x10(%r15)
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rsp, %rcx
xorl %r8d, %r8d
callq 0x48c9
testl %eax, %eax
js 0x3095
cmpl $0xa, (%rsp)
je 0x2db2
movq %rbx, %rdi
movl $0x2, %esi
movq 0x20(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x48c9
cmpq $0x0, 0x28(%r15)
jne 0x2dcf
movl $0x100, 0x24(%r15)      # imm = 0x100
movl $0x100, %edi            # imm = 0x100
callq 0x21a0
movq %rax, 0x28(%r15)
movl 0x8(%rbx), %edx
testb $0x3, %dl
sete %sil
movl (%rbx), %ecx
movl 0x4(%rbx), %eax
cmpl %eax, %ecx
setl %dil
orb %dil, %sil
testb $0x1, %sil
je 0x2eb1
movq 0x18(%rbx), %rsi
testb $0x1, %dil
jne 0x2e32
movl $0x0, (%rbx)
movq 0x10(%rbx), %rdi
sarl $0x2, %edx
callq 0x2130
movl %eax, 0x4(%rbx)
movl 0x8(%rbx), %edx
movl %edx, %ecx
sarl $0x2, %ecx
cmpl %ecx, %eax
jge 0x2e24
andl $-0x4, %edx
incl %edx
movl %edx, 0x8(%rbx)
testl %eax, %eax
je 0x2eb1
movl (%rbx), %ecx
movq 0x18(%rbx), %rsi
movslq %ecx, %rdi
incl %ecx
movl %ecx, (%rbx)
movb (%rsi,%rdi), %sil
movzbl %sil, %edi
movl %edi, (%rsp)
cmpl $0x2a, %edi
jg 0x2e50
cmpl $0xa, %edi
je 0x2e9a
jmp 0x2e67
cmpl $0x2b, %edi
je 0x2eb8
cmpl $0x3e, %edi
je 0x308c
cmpl $0x40, %edi
je 0x308c
movq 0x28(%r15), %rax
movl 0x20(%r15), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x20(%r15)
movb %sil, (%rax,%rcx)
movq %rbx, %rdi
movl $0x2, %esi
movq %r13, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x48c9
movl 0x8(%rbx), %edx
movl (%rbx), %ecx
movl 0x4(%rbx), %eax
cmpl %eax, %ecx
setl %dil
testb $0x3, %dl
je 0x2df1
cmpl %eax, %ecx
jl 0x2df1
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl 0x20(%r15), %ecx
leal 0x1(%rcx), %edx
movq 0x28(%r15), %rax
cmpl 0x24(%r15), %edx
jb 0x2f01
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, (%rsp)
jne 0x2fcc
movl 0x24(%r15), %esi
cmpl %esi, 0x34(%r15)
jae 0x2f2c
movl %esi, 0x34(%r15)
movq 0x38(%r15), %rdi
callq 0x21b0
movq %rax, 0x38(%r15)
movl 0x8(%rbx), %edx
movl (%rbx), %ecx
movl 0x4(%rbx), %eax
testb $0x3, %dl
je 0x2f41
cmpl %eax, %ecx
jge 0x3095
movq 0x18(%rbx), %rsi
cmpl %eax, %ecx
jl 0x2f80
movl $0x0, (%rbx)
movq 0x10(%rbx), %rdi
sarl $0x2, %edx
callq 0x2130
movl %eax, 0x4(%rbx)
movl 0x8(%rbx), %edx
movl %edx, %ecx
sarl $0x2, %ecx
cmpl %ecx, %eax
jge 0x2f72
andl $-0x4, %edx
incl %edx
movl %edx, 0x8(%rbx)
testl %eax, %eax
je 0x3095
movl (%rbx), %ecx
movq 0x18(%rbx), %rsi
movslq %ecx, %rdi
incl %ecx
movl %ecx, (%rbx)
movzbl (%rsi,%rdi), %esi
movl %esi, (%rsp)
cmpl $0xa, %esi
jne 0x2f34
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x48c9
movl (%r13), %ecx
movl (%r12), %edx
testl %eax, %eax
js 0x2fbb
cmpl %ecx, %edx
jb 0x2f93
movl $0x0, 0x40(%r15)
cmpl %edx, %ecx
je 0x2fd0
jmp 0x3095
movl (%r13), %ecx
testl %ecx, %ecx
js 0x3095
movq 0x18(%rsp), %rcx
movslq %ecx, %rax
cmpq %rax, %rbp
jl 0x300b
leal (%rcx,%rcx), %ebx
testl %ecx, %ecx
movl $0x100, %eax            # imm = 0x100
cmovel %eax, %ebx
movslq %ebx, %rsi
shlq $0x6, %rsi
movq %r14, %rdi
callq 0x21b0
movq %rax, %r14
movl %ebx, %eax
movq %rax, 0x18(%rsp)
movq %rbp, %rbx
shlq $0x6, %rbx
movq 0x8(%r15), %rdi
callq 0x2240
movq %rax, 0x10(%r14,%rbx)
movq 0x28(%r15), %rdi
callq 0x2240
movq %rax, 0x18(%r14,%rbx)
cmpl $0x0, 0x30(%r15)
je 0x3040
movq 0x38(%r15), %rdi
callq 0x2240
jmp 0x3042
xorl %eax, %eax
movl 0x10(%rsp), %edx
addq %r14, %rbx
movq %rax, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movl (%r13), %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %eax
movl %eax, (%rbx)
movq $0x0, 0x4(%rbx)
movl $0x0, 0xc(%rbx)
incq %rbp
addl %eax, %edx
cmpl 0x14(%rsp), %edx
jl 0x2ce3
andl $0x1, 0x4(%rsp)
je 0x2ce3
jmp 0x30b2
movl %edi, 0x40(%r15)
jmp 0x2eb8
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %ecx
movq 0x8(%rsp), %rax
jmp 0x309e