// File: /workspace/github_c_makefile_star2_O2/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 0x148da(%rip), %rdi     # 0x23248
leaq 0x15b6a(%rip), %rdx     # 0x244df
movq %r14, %rsi
callq 0xc931
movq %rax, %r15
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %r8d
leaq 0x148c0(%rip), %rsi     # 0x23251
movq %rax, %rdi
xorl %eax, %eax
callq 0xce5d
pushq $0x20
popq %r13
leaq 0x148bd(%rip), %rbp     # 0x23263
xorl %r14d, %r14d
movl 0x8(%rbx), %eax
cmpq %rax, %r14
je 0xea22
movq 0x10(%rbx), %r12
movl -0x10(%r12,%r13), %edx
movq -0x8(%r12,%r13), %rcx
movq %r15, %rdi
leaq 0x14894(%rip), %rsi     # 0x2325d
xorl %eax, %eax
callq 0xce5d
movq (%r12,%r13), %rdx
cmpb $0x0, (%rdx)
je 0xe9ec
movq %r15, %rdi
leaq 0x135d2(%rip), %rsi     # 0x21fb5
xorl %eax, %eax
callq 0xce5d
jmp 0xe9fd
movq %r15, %rdi
leaq 0x11bb7(%rip), %rsi     # 0x205ad
xorl %eax, %eax
callq 0xce5d
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 0xce5d
incq %r14
addq $0x28, %r13
jmp 0xe9a9
movq %r15, %rdi
callq 0xcf7e
movq %r15, %rdi
callq 0xd01b
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 0x147e8(%rip), %rdi     # 0x23248
leaq 0x15a78(%rip), %rdx     # 0x244df
movq %r14, %rsi
callq 0xc931
movq %rax, %r14
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movl 0x18(%rbx), %r8d
leaq 0x147ce(%rip), %rsi     # 0x23251
movq %rax, %rdi
xorl %eax, %eax
callq 0xce5d
pushq $0xc
popq %r12
leaq 0x147dc(%rip), %r15     # 0x23274
xorl %r13d, %r13d
movl 0x18(%rbx), %eax
cmpq %rax, %r13
je 0xeacc
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 0xce5d
incq %r13
addq $0x10, %r12
jmp 0xea9b
movq %r14, %rdi
callq 0xcf7e
movq %r14, %rdi
callq 0xd01b
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq