// File: /workspace/github_c_makefile_star2_O1/ToniWestbrook[P]paladin/bntseq.c
// Function: bns_dump
void bns_dump(const bntseq_t *bns, const char *prefix)
{
	char str[1024];
	FILE *fp;
	int i;
	{ // dump .ann
		strcpy(str, prefix); strcat(str, ".ann");
		fp = xopen(str, "w");
		err_fprintf(fp, "%lld %d %u\n", (long long)bns->l_pac, bns->n_seqs, bns->seed);
		for (i = 0; i != bns->n_seqs; ++i) {
			bntann1_t *p = bns->anns + i;
			err_fprintf(fp, "%d %s", p->gi, p->name);
			if (p->anno[0]) err_fprintf(fp, " %s\n", p->anno);
			else err_fprintf(fp, "\n");
			err_fprintf(fp, "%lld %d %d\n", (long long)p->offset, p->len, p->n_ambs);
		}
		err_fflush(fp);
		err_fclose(fp);
	}
	{ // dump .amb
		strcpy(str, prefix); strcat(str, ".amb");
		fp = xopen(str, "w");
		err_fprintf(fp, "%lld %d %u\n", (long long)bns->l_pac, bns->n_seqs, bns->n_holes);
		for (i = 0; i != bns->n_holes; ++i) {
			bntamb1_t *p = bns->ambs + i;
			err_fprintf(fp, "%lld %d %c\n", (long long)p->offset, p->len, p->amb);
		}
		err_fflush(fp);
		err_fclose(fp);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x8(%rsp)
callq 0x32c0
movq %r14, %rdi
callq 0x3100
movl $0x6e6e612e, 0x10(%rsp,%rax) # imm = 0x6E6E612E
movb $0x0, 0x14(%rsp,%rax)
leaq 0x1815e(%rip), %rdi     # 0x28218
leaq 0x1936e(%rip), %rdx     # 0x2942f
movq %r14, %rsi
callq 0xdd8e
movq %rax, %r15
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %r8d
leaq 0x18144(%rip), %rsi     # 0x28221
movq %rax, %rdi
xorl %eax, %eax
callq 0xe2d2
cmpl $0x0, 0x8(%rbx)
je 0x10178
movl $0x20, %r13d
leaq 0x18135(%rip), %rbp     # 0x28233
xorl %r14d, %r14d
movq 0x10(%rbx), %r12
movl -0x10(%r12,%r13), %edx
movq -0x8(%r12,%r13), %rcx
movq %r15, %rdi
leaq 0x18114(%rip), %rsi     # 0x2822d
xorl %eax, %eax
callq 0xe2d2
movq (%r12,%r13), %rdx
cmpb $0x0, (%rdx)
je 0x1013c
movq %r15, %rdi
leaq 0x16e82(%rip), %rsi     # 0x26fb5
xorl %eax, %eax
callq 0xe2d2
jmp 0x1014d
movq %r15, %rdi
leaq 0x15467(%rip), %rsi     # 0x255ad
xorl %eax, %eax
callq 0xe2d2
movq -0x20(%r12,%r13), %rdx
movl -0x18(%r12,%r13), %ecx
movl -0x14(%r12,%r13), %r8d
movq %r15, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0xe2d2
incq %r14
movl 0x8(%rbx), %eax
addq $0x28, %r13
cmpq %rax, %r14
jne 0x10101
movq %r15, %rdi
callq 0xe3f3
movq %r15, %rdi
callq 0xe490
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x32c0
movq %r14, %rdi
callq 0x3100
movl $0x626d612e, 0x10(%rsp,%rax) # imm = 0x626D612E
movb $0x0, 0x14(%rsp,%rax)
leaq 0x18062(%rip), %rdi     # 0x28218
leaq 0x19272(%rip), %rdx     # 0x2942f
movq %r14, %rsi
callq 0xdd8e
movq %rax, %r14
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movl 0x18(%rbx), %r8d
leaq 0x18048(%rip), %rsi     # 0x28221
movq %rax, %rdi
xorl %eax, %eax
callq 0xe2d2
cmpl $0x0, 0x18(%rbx)
je 0x10228
movl $0xc, %r12d
leaq 0x1804e(%rip), %r15     # 0x28244
xorl %r13d, %r13d
movq 0x20(%rbx), %rax
movq -0xc(%rax,%r12), %rdx
movl -0x4(%rax,%r12), %ecx
movsbl (%rax,%r12), %r8d
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xe2d2
incq %r13
movl 0x18(%rbx), %eax
addq $0x10, %r12
cmpq %rax, %r13
jne 0x101f9
movq %r14, %rdi
callq 0xe3f3
movq %r14, %rdi
callq 0xe490
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq