// File: /workspace/github_c_makefile_star2_O0/lh3[P]minimap2/bseq.c
// Function: mm_bseq_read_frag2
mm_bseq1_t *mm_bseq_read_frag2(int n_fp, mm_bseq_file_t **fp, int64_t chunk_size, int with_qual, int with_comment, int *n_)
{
	int i;
	int64_t size = 0;
	kvec_t(mm_bseq1_t) a = {0,0,0};
	*n_ = 0;
	if (n_fp < 1) return 0;
	while (1) {
		int n_read = 0;
		for (i = 0; i < n_fp; ++i)
			if (kseq_read(fp[i]->ks) >= 0)
				++n_read;
		if (n_read < n_fp) {
			if (n_read > 0)
				fprintf(stderr, "[W::%s]\033[1;31m query files have different number of records; extra records skipped.\033[0m\n", __func__);
			break; // some file reaches the end
		}
		if (a.m == 0) kv_resize(mm_bseq1_t, 0, a, 256);
		for (i = 0; i < n_fp; ++i) {
			mm_bseq1_t *s;
			kv_pushp(mm_bseq1_t, 0, a, &s);
			kseq2bseq(fp[i]->ks, s, with_qual, with_comment);
			size += s->l_seq;
		}
		if (size >= chunk_size) break;
	}
	*n_ = a.n;
	return a.a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x21b0
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
cmpl $0x1, -0xc(%rbp)
jge 0x1c333
movq $0x0, -0x8(%rbp)
jmp 0x1c52c
jmp 0x1c335
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1c37b
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rdi
callq 0x1b620
cmpl $0x0, %eax
jl 0x1c36e
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1c370
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1c343
movl -0x5c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1c3ad
cmpl $0x0, -0x5c(%rbp)
jle 0x1c3a8
movq 0x41c68(%rip), %rax     # 0x5dff8
movq (%rax), %rdi
leaq 0x3bafc(%rip), %rsi     # 0x57e96
leaq 0x3bb4e(%rip), %rdx     # 0x57eef
movb $0x0, %al
callq 0x2250
jmp 0x1c518
cmpq $0x0, -0x50(%rbp)
jne 0x1c451
jmp 0x1c3ba
cmpq $0x100, -0x50(%rbp)     # imm = 0x100
jae 0x1c44d
movq $0x100, -0x50(%rbp)     # imm = 0x100
movq -0x50(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
shrq %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
shrq $0x2, %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
shrq $0x4, %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
shrq $0x10, %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rsi
imulq $0x28, -0x50(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
callq 0x1ad30
movq %rax, -0x48(%rbp)
jmp 0x1c44f
jmp 0x1c451
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1c507
jmp 0x1c466
movq -0x58(%rbp), %rax
cmpq -0x50(%rbp), %rax
jne 0x1c4ad
cmpq $0x0, -0x50(%rbp)
je 0x1c484
movq -0x50(%rbp), %rax
shlq %rax
movq %rax, -0x70(%rbp)
jmp 0x1c48f
movl $0x2, %eax
movq %rax, -0x70(%rbp)
jmp 0x1c48f
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rsi
imulq $0x28, -0x50(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
callq 0x1ad30
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x58(%rbp)
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rdi
movq -0x68(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
callq 0x1c0b0
movq -0x68(%rbp), %rax
movslq (%rax), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1c458
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jl 0x1c513
jmp 0x1c518
jmp 0x1c335
movq -0x58(%rbp), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)