// File: /workspace/github_c_makefile_star2_O0/lh3[P]miniprot/format.c
// Function: mp_write_output
void mp_write_output(kstring_t *s, void *km, const mp_idx_t *mi, const mp_bseq1_t *seq, const mp_reg1_t *r, const mp_mapopt_t *opt, int64_t id, int32_t hit_idx)
{
	s->l = 0;
	if (r == 0) {
		if (opt->flag&MP_F_SHOW_UNMAP)
			mp_write_paf(s, mi, opt, seq, 0);
	} else if (opt->flag&MP_F_GTF) {
		if (opt->flag & (MP_F_SHOW_RESIDUE|MP_F_SHOW_TRANS)) {
			mp_write_paf(s, mi, opt, seq, r);
			mp_write_residue(s, mi, opt, seq->seq, r);
		}
		mp_write_gtf(s, km, mi, seq, r, opt->gff_prefix, id, seq->name);
	} else {
		if (!(opt->flag&MP_F_NO_PAF))
			mp_write_paf(s, mi, opt, seq, r);
		if (opt->flag & (MP_F_SHOW_RESIDUE|MP_F_SHOW_TRANS))
			mp_write_residue(s, mi, opt, seq->seq, r);
		if (opt->flag&MP_F_GFF)
			mp_write_gff(s, km, mi, seq, r, opt->gff_prefix, id, seq->name, opt->gff_delim, hit_idx);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x58, %rsp
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x30(%rbp)
jne 0x1d287
movq -0x38(%rbp), %rax
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1d282
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x1c570
jmp 0x1d3d3
movq -0x38(%rbp), %rax
movl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1d31d
movq -0x38(%rbp), %rax
movl (%rax), %eax
andl $0x180, %eax            # imm = 0x180
cmpl $0x0, %eax
je 0x1d2df
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x1c570
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x30(%rbp), %r8
callq 0x1d3e0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %rax
movq 0xa0(%rax), %r9
movq 0x10(%rbp), %r10
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x1ea50
jmp 0x1d3d1
movq -0x38(%rbp), %rax
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x1d344
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x1c570
movq -0x38(%rbp), %rax
movl (%rax), %eax
andl $0x180, %eax            # imm = 0x180
cmpl $0x0, %eax
je 0x1d371
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x30(%rbp), %r8
callq 0x1d3e0
movq -0x38(%rbp), %rax
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x1d3cf
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %rax
movq 0xa0(%rax), %r9
movq 0x10(%rbp), %rbx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %r11
movq -0x38(%rbp), %rax
movl 0x98(%rax), %r10d
movl 0x18(%rbp), %eax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x1ef20
jmp 0x1d3d1
jmp 0x1d3d3
addq $0x58, %rsp
popq %rbx
popq %rbp
retq
nopw (%rax,%rax)