// File: /workspace/github_c_makefile_star2_O1/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, 0x18(%rsp)
movl %esi, 0x4(%rsp)
movq %rdi, %r14
leaq 0x30(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x20(%rdi), %r12
leaq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x8(%rsp)
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x48(%r14), %rbx
cmpl $0x0, 0x40(%r14)
jne 0x2db9
jmp 0x2d43
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2d9f
movl 0x8(%rbx), %edx
testb $0x3, %dl
je 0x2d57
movl (%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x4(%rbx), %ecx
jge 0x2d9f
movl (%rbx), %eax
cmpl 0x4(%rbx), %eax
jl 0x2d8f
movl $0x0, (%rbx)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
sarl $0x2, %edx
callq 0x2140
movl %eax, 0x4(%rbx)
movl 0x8(%rbx), %ecx
movl %ecx, %edx
sarl $0x2, %edx
cmpl %edx, %eax
jge 0x2d8b
andl $-0x4, %ecx
incl %ecx
movl %ecx, 0x8(%rbx)
testl %eax, %eax
je 0x2d3c
movq 0x18(%rbx), %rax
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movzbl (%rax,%rcx), %eax
movl %eax, (%rsp)
cmpl $-0x1, %eax
je 0x3013
cmpl $0x40, %eax
je 0x2db5
cmpl $0x3e, %eax
jne 0x2d43
movl %eax, 0x40(%r14)
xorl %eax, %eax
movl %eax, 0x30(%r14)
movl %eax, 0x20(%r14)
movl %eax, 0x10(%r14)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rsp, %rcx
xorl %r8d, %r8d
callq 0x486b
testl %eax, %eax
js 0x2ed1
cmpl $0xa, (%rsp)
je 0x2dff
movq %rbx, %rdi
movl $0x2, %esi
movq 0x20(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x486b
cmpq $0x0, 0x28(%r14)
jne 0x2e1c
movl $0x100, 0x24(%r14)      # imm = 0x100
movl $0x100, %edi            # imm = 0x100
callq 0x21b0
movq %rax, 0x28(%r14)
movl 0x8(%rbx), %edx
testb $0x3, %dl
je 0x2e30
movl (%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x4(%rbx), %ecx
jge 0x2e78
movl (%rbx), %eax
cmpl 0x4(%rbx), %eax
jl 0x2e68
movl $0x0, (%rbx)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
sarl $0x2, %edx
callq 0x2140
movl %eax, 0x4(%rbx)
movl 0x8(%rbx), %ecx
movl %ecx, %edx
sarl $0x2, %edx
cmpl %edx, %eax
jge 0x2e64
andl $-0x4, %ecx
incl %ecx
movl %ecx, 0x8(%rbx)
testl %eax, %eax
je 0x2eca
movq 0x18(%rbx), %rax
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movzbl (%rax,%rcx), %eax
movl %eax, (%rsp)
cmpl $0x2a, %eax
jg 0x2e8c
cmpl $0xa, %eax
je 0x2e1c
cmpl $-0x1, %eax
jne 0x2e9b
jmp 0x2edf
cmpl $0x2b, %eax
je 0x2edf
cmpl $0x3e, %eax
je 0x2edb
cmpl $0x40, %eax
je 0x2edb
movq 0x28(%r14), %rcx
movl 0x20(%r14), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x20(%r14)
movb %al, (%rcx,%rdx)
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x486b
jmp 0x2e1c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2e78
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3013
movl %eax, 0x40(%r14)
movl 0x20(%r14), %eax
incl %eax
cmpl 0x24(%r14), %eax
jb 0x2f20
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %esi
shrl $0x10, %esi
orl %eax, %esi
incl %esi
movl %esi, 0x24(%r14)
movq 0x28(%r14), %rdi
callq 0x21c0
movq %rax, 0x28(%r14)
movq 0x28(%r14), %rax
movl 0x20(%r14), %ecx
movb $0x0, (%rax,%rcx)
cmpl $0x2b, (%rsp)
jne 0x3008
movl 0x24(%r14), %esi
cmpl %esi, 0x34(%r14)
jae 0x2f5a
movl %esi, 0x34(%r14)
movq 0x38(%r14), %rdi
callq 0x21c0
movq %rax, 0x38(%r14)
jmp 0x2f5a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2fb6
movl 0x8(%rbx), %edx
testb $0x3, %dl
je 0x2f6e
movl (%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x4(%rbx), %ecx
jge 0x2fb6
movl (%rbx), %eax
cmpl 0x4(%rbx), %eax
jl 0x2fa6
movl $0x0, (%rbx)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
sarl $0x2, %edx
callq 0x2140
movl %eax, 0x4(%rbx)
movl 0x8(%rbx), %ecx
movl %ecx, %edx
sarl $0x2, %edx
cmpl %edx, %eax
jge 0x2fa2
andl $-0x4, %ecx
incl %ecx
movl %ecx, 0x8(%rbx)
testl %eax, %eax
je 0x2f53
movq 0x18(%rbx), %rax
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movzbl (%rax,%rcx), %eax
movl %eax, (%rsp)
cmpl $-0x1, %eax
je 0x300e
cmpl $0xa, %eax
jne 0x2f5a
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x486b
movq 0x10(%rsp), %rdx
testl %eax, %eax
js 0x2fee
movl (%rdx), %eax
cmpl (%r12), %eax
jb 0x2fc8
movl $0x0, 0x40(%r14)
movl 0x20(%r14), %eax
cmpl 0x30(%r14), %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmovnel %ecx, %eax
jmp 0x3013
movl (%r12), %eax
jmp 0x3013
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq %r15, %rdi
testl %eax, %eax
js 0x30e3
movq 0x8(%rsp), %rcx
movslq %ecx, %rax
cmpq %rax, %rbp
jge 0x3030
movq %rdi, %r15
jmp 0x3053
leal (%rcx,%rcx), %ebx
testl %ecx, %ecx
movl $0x100, %eax            # imm = 0x100
cmovel %eax, %ebx
movslq %ebx, %rsi
shlq $0x6, %rsi
callq 0x21c0
movq %rax, %r15
movl %ebx, %eax
movq %rax, 0x8(%rsp)
movq %rbp, %rbx
shlq $0x6, %rbx
movq 0x8(%r14), %rdi
callq 0x2250
movq %rax, 0x10(%r15,%rbx)
movq 0x28(%r14), %rdi
callq 0x2250
movq %rax, 0x18(%r15,%rbx)
cmpl $0x0, 0x30(%r14)
movq %r15, %rcx
je 0x3091
movq 0x38(%r14), %rdi
movq %rcx, %r15
callq 0x2250
movq %r15, %rcx
jmp 0x3093
xorl %eax, %eax
movq %rcx, %r15
addq %rcx, %rbx
movq %rax, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movl 0x20(%r14), %ecx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl %eax, %ecx
movl %ecx, (%rbx)
movq $0x0, 0x4(%rbx)
movl $0x0, 0xc(%rbx)
leaq 0x1(%rbp), %rax
addl %ecx, %r13d
cmpl 0x4(%rsp), %r13d
setl %cl
testb $0x1, %bpl
sete %dl
orb %cl, %dl
movq %rax, %rbp
jne 0x2d2f
jmp 0x30e6
movq %rbp, %rax
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq