// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x410(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x32b0
leaq -0x410(%rbp), %rdi
leaq 0x23354(%rip), %rsi     # 0x39365
callq 0x3690
leaq -0x410(%rbp), %rsi
leaq 0x240dc(%rip), %rdi     # 0x3a100
leaq 0x252ed(%rip), %rdx     # 0x3b318
callq 0x12740
movq %rax, -0x418(%rbp)
movq -0x418(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl 0xc(%rax), %r8d
leaq 0x240ae(%rip), %rsi     # 0x3a109
movb $0x0, %al
callq 0x12f20
movl $0x0, -0x41c(%rbp)
movl -0x41c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x16155
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x41c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x428(%rbp)
movq -0x418(%rbp), %rdi
movq -0x428(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x428(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0x24056(%rip), %rsi     # 0x3a115
movb $0x0, %al
callq 0x12f20
movq -0x428(%rbp), %rax
movq 0x20(%rax), %rax
cmpb $0x0, (%rax)
je 0x160f8
movq -0x418(%rbp), %rdi
movq -0x428(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x22ec6(%rip), %rsi     # 0x38fb5
movb $0x0, %al
callq 0x12f20
jmp 0x1610d
movq -0x418(%rbp), %rdi
leaq 0x214ab(%rip), %rsi     # 0x375b1
movb $0x0, %al
callq 0x12f20
movq -0x418(%rbp), %rdi
movq -0x428(%rbp), %rax
movq (%rax), %rdx
movq -0x428(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x428(%rbp), %rax
movl 0xc(%rax), %r8d
leaq 0x23fe1(%rip), %rsi     # 0x3a11b
movb $0x0, %al
callq 0x12f20
movl -0x41c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x41c(%rbp)
jmp 0x1606c
movq -0x418(%rbp), %rdi
callq 0x130e0
movq -0x418(%rbp), %rdi
callq 0x131b0
leaq -0x410(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x32b0
leaq -0x410(%rbp), %rdi
leaq 0x23f9c(%rip), %rsi     # 0x3a127
callq 0x3690
leaq -0x410(%rbp), %rsi
leaq 0x23f62(%rip), %rdi     # 0x3a100
leaq 0x25173(%rip), %rdx     # 0x3b318
callq 0x12740
movq %rax, -0x418(%rbp)
movq -0x418(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl 0x18(%rax), %r8d
leaq 0x23f34(%rip), %rsi     # 0x3a109
movb $0x0, %al
callq 0x12f20
movl $0x0, -0x41c(%rbp)
movl -0x41c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
je 0x16258
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x41c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x430(%rbp)
movq -0x418(%rbp), %rdi
movq -0x430(%rbp), %rax
movq (%rax), %rdx
movq -0x430(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x430(%rbp), %rax
movsbl 0xc(%rax), %r8d
leaq 0x23eec(%rip), %rsi     # 0x3a12c
movb $0x0, %al
callq 0x12f20
movl -0x41c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x41c(%rbp)
jmp 0x161e6
movq -0x418(%rbp), %rdi
callq 0x130e0
movq -0x418(%rbp), %rdi
callq 0x131b0
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
nopl (%rax)