// File: /workspace/github_c_makefile_star2_O0/lh3[P]miniprot/ntseq.c
// Function: mp_ntseq_restore
mp_ntdb_t *mp_ntseq_restore(FILE *fp)
{
	int32_t i, x[2];
	int64_t off = 0, l;
	mp_ntdb_t *nt;
	char *p;

	nt = Kcalloc(0, mp_ntdb_t, 1);
	fread(x, 4, 2, fp);
	fread(&nt->l_seq, 8, 1, fp);
	nt->n_ctg = nt->m_ctg = x[0];
	nt->l_name = x[1];
	nt->m_seq = nt->l_seq;
	l = (nt->l_seq + 1) >> 1;
	nt->ctg = Kcalloc(0, mp_ctg_t, nt->n_ctg);
	for (i = 0; i < nt->n_ctg; ++i) {
		fread(&nt->ctg[i].len, 8, 1, fp);
		nt->ctg[i].off = off;
		off += nt->ctg[i].len;
	}
	nt->seq = Kmalloc(0, uint8_t, l);
	nt->name = Kmalloc(0, char, nt->l_name);
	fread(nt->seq, 1, l, fp);
	fread(nt->name, 1, nt->l_name, fp);
	for (i = 0, p = nt->name; i < nt->n_ctg; ++i) {
		nt->ctg[i].name = p;
		p += strlen(p) + 1;
	}
	return nt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x20(%rbp)
xorl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
movl $0x48, %edx
callq 0xab60
movq %rax, -0x30(%rbp)
leaq -0x14(%rbp), %rdi
movq -0x8(%rbp), %rcx
movl $0x4, %esi
movl $0x2, %edx
callq 0x20b0
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x20b0
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x1, %rax
sarq %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movslq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edi
movl $0x18, %edx
callq 0xab60
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x16f1a
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x20b0
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x16ea1
movq -0x28(%rbp), %rsi
shlq $0x0, %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0xaeb0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
movslq 0x8(%rax), %rsi
shlq $0x0, %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0xaeb0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x20b0
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x30(%rbp), %rax
movslq 0x8(%rax), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x20b0
movl $0x0, -0xc(%rbp)
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x16fe7
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rdi
callq 0x2110
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x16fa1
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)