// File: /workspace/github_c_makefile_star2_O3/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 0x17eca(%rip), %rdi     # 0x282b0
leaq 0x19172(%rip), %rdx     # 0x2955f
movq %r14, %rsi
callq 0xe023
movq %rax, %r15
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %r8d
leaq 0x17eb0(%rip), %rsi     # 0x282b9
movq %rax, %rdi
xorl %eax, %eax
callq 0xe560
cmpl $0x0, 0x8(%rbx)
je 0x104a4
movl $0x20, %r13d
leaq 0x17ea1(%rip), %rbp     # 0x282cb
xorl %r14d, %r14d
movq 0x10(%rbx), %r12
movl -0x10(%r12,%r13), %edx
movq -0x8(%r12,%r13), %rcx
movq %r15, %rdi
leaq 0x17e80(%rip), %rsi     # 0x282c5
xorl %eax, %eax
callq 0xe560
movq (%r12,%r13), %rdx
cmpb $0x0, (%rdx)
je 0x10468
movq %r15, %rdi
leaq 0x16ba2(%rip), %rsi     # 0x27001
xorl %eax, %eax
callq 0xe560
jmp 0x10479
movq %r15, %rdi
leaq 0x1513b(%rip), %rsi     # 0x255ad
xorl %eax, %eax
callq 0xe560
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 0xe560
incq %r14
movl 0x8(%rbx), %eax
addq $0x28, %r13
cmpq %rax, %r14
jne 0x1042d
movq %r15, %rdi
callq 0xe681
movq %r15, %rdi
callq 0xe71e
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 0x17dce(%rip), %rdi     # 0x282b0
leaq 0x19076(%rip), %rdx     # 0x2955f
movq %r14, %rsi
callq 0xe023
movq %rax, %r14
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movl 0x18(%rbx), %r8d
leaq 0x17db4(%rip), %rsi     # 0x282b9
movq %rax, %rdi
xorl %eax, %eax
callq 0xe560
cmpl $0x0, 0x18(%rbx)
je 0x10554
movl $0xc, %r12d
leaq 0x17dba(%rip), %r15     # 0x282dc
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 0xe560
incq %r13
movl 0x18(%rbx), %eax
addq $0x10, %r12
cmpq %rax, %r13
jne 0x10525
movq %r14, %rdi
callq 0xe681
movq %r14, %rdi
callq 0xe71e
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq