// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: ma_ug_print_bed(ma_ug_t const*, asg_t*, All_reads*, ma_sub_t*, ma_hit_t_alloc*, kvec_asg_arc_t_warp*, int, int, unsigned int, char const*, _IO_FILE*, trans_chain*)
void ma_ug_print_bed(const ma_ug_t *g, asg_t *read_g, All_reads *RNF, ma_sub_t *coverage_cut,
ma_hit_t_alloc* sources, kvec_asg_arc_t_warp* edge, int max_hang, int min_ovlp, uint32_t rate_thres,
const char* prefix, FILE *fp, trans_chain* t_ch)
{
	UC_Read g_read;
    init_UC_Read(&g_read);
    UC_Read tmp;
    init_UC_Read(&tmp);
    kvec_t_u32_warp exact_count, total_count;
    kv_init(exact_count.a);
    kv_init(total_count.a);
    uint32_t i, j, l, eLen, start;
    for (i = 0; i < g->u.n; ++i) {
		ma_utg_t *u = &g->u.a[i];
        if(u->m == 0) continue;
        if(u->n < 2) continue;
        l = 0;
        for (j = 0; j < u->n; ++j) 
        {
            start = l;
            eLen = (uint32_t)u->a[j];
			l += eLen;

            print_rough_inconsistent_sites(u, j, j+1, read_g, RNF, sources, coverage_cut, 
            edge, &g_read, &tmp, max_hang, min_ovlp, start, rate_thres, &exact_count, 
            &total_count, prefix, i+1, fp, t_ch? &(t_ch->bed.a[i]): NULL);
        }
    }

    destory_UC_Read(&g_read);
    destory_UC_Read(&tmp);
    kv_destroy(exact_count.a);
    kv_destroy(total_count.a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %rbp
movq %rdi, %r15
leaq 0x98(%rsp), %rdi
callq 0x32e2d
leaq 0x78(%rsp), %rdi
callq 0x32e2d
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
xorl %ebx, %ebx
movq %rbx, 0x60(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %rbx, 0x40(%rsp)
movq (%r15), %rax
movl $0x0, %r14d
testq %rax, %rax
je 0xb9085
movq 0x118(%rsp), %rdi
movq %r15, 0x8(%rsp)
movq 0x10(%r15), %rcx
leaq (%rbx,%rbx,4), %rdx
cmpl $0x0, 0xc(%rcx,%rdx,8)
je 0xb9070
leaq (%rcx,%rdx,8), %r14
cmpl $0x2, 0x10(%r14)
jb 0xb9070
leal 0x1(%rbx), %r12d
xorl %esi, %esi
xorl %eax, %eax
testq %rdi, %rdi
je 0xb8fc4
leaq (%rbx,%rbx,2), %r10
shlq $0x3, %r10
addq 0x30(%rdi), %r10
jmp 0xb8fc7
xorl %r10d, %r10d
movq 0x18(%r14), %rcx
movl (%rcx,%rsi,8), %r13d
addl %eax, %r13d
leaq 0x1(%rsi), %r15
movq %r14, %rdi
movl %r15d, %edx
movq %rbp, %rcx
movq 0x10(%rsp), %r8
movq 0x20(%rsp), %r9
pushq %r10
pushq 0x118(%rsp)
pushq %r12
pushq 0x120(%rsp)
leaq 0x50(%rsp), %r10
pushq %r10
leaq 0x78(%rsp), %r10
pushq %r10
movl 0x130(%rsp), %r10d
pushq %r10
pushq %rax
movl 0x138(%rsp), %eax
pushq %rax
movl 0x138(%rsp), %eax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xf0(%rsp), %rax
pushq %rax
pushq 0x88(%rsp)
pushq 0x80(%rsp)
callq 0xb53ad
addq $0x70, %rsp
movl 0x10(%r14), %ecx
movq %r15, %rsi
movl %r13d, %eax
cmpq %rcx, %r15
movq 0x118(%rsp), %rdi
jb 0xb8fb1
movq 0x8(%rsp), %r15
movq (%r15), %rax
incl %ebx
cmpq %rbx, %rax
ja 0xb8f87
movq 0x60(%rsp), %r14
movq 0x40(%rsp), %rbx
leaq 0x98(%rsp), %rdi
callq 0x32d68
leaq 0x78(%rsp), %rdi
callq 0x32d68
movq %r14, %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2220
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq