// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: gen_shallow_ref_trans(bubble_type*, scaf_res_t*, scaf_res_t*, asg_t*, ma_ug_t*, ma_sub_t*, ma_hit_t_alloc*, ma_hit_t_alloc*, long long, float, long long, R_to_U*, float, float, int, int, bub_label_t*)
kv_u_trans_t *gen_shallow_ref_trans(bubble_type *bu, scaf_res_t *cp0, scaf_res_t *cp1, asg_t *sg, ma_ug_t *ref, ma_sub_t* cover, ma_hit_t_alloc* src, ma_hit_t_alloc* rev,
long long tipsLen, float tip_drop_ratio, long long stops_threshold, R_to_U* ruIndex, float chimeric_rate, float drop_ratio, int max_hang, int min_ovlp, bub_label_t* b_mask_t)
{
    kvec_asg_arc_t_warp ne; kv_init(ne.a); kv_u_trans_t *p = NULL; CALLOC(p, 1);
    ma_ug_t *cref = gen_shallow_clean_ug(ref, bu, cp0, cp1);
    asg_t *csg = copy_read_graph(sg); hap_cov_t *cov = NULL; ne.a.n = 0;  

    adjust_utg_by_primary(&cref, csg, TRIO_THRES, src, rev, cover, tipsLen, tip_drop_ratio, stops_threshold, ruIndex, chimeric_rate, drop_ratio, max_hang, min_ovlp, &ne, &cov, b_mask_t, 0, 0);

    ma_ug_destroy(cref); asg_destroy(csg); kv_destroy(ne.a);
    p->n = cov->t_ch->k_trans.n; p->m = cov->t_ch->k_trans.m; p->a = cov->t_ch->k_trans.a; 
    p->idx.n = cov->t_ch->k_trans.idx.n; p->idx.m = cov->t_ch->k_trans.idx.m; p->idx.a = cov->t_ch->k_trans.idx.a;  
    cov->t_ch->k_trans.n = cov->t_ch->k_trans.m = 0; cov->t_ch->k_trans.a = NULL;
    cov->t_ch->k_trans.idx.n = cov->t_ch->k_trans.idx.m = 0; cov->t_ch->k_trans.idx.a = NULL;
    destory_hap_cov_t(&cov);
    return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movss %xmm2, 0x5c(%rsp)
movss %xmm1, 0x58(%rsp)
movss %xmm0, 0x54(%rsp)
movq %r9, 0x60(%rsp)
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x2120
movq %rax, %rbx
xorps %xmm0, %xmm0
leaq 0x78(%rsp), %rax
movups %xmm0, 0x8(%rax)
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x9de79
leaq 0x70(%rsp), %r12
movq %rax, (%r12)
movq %r15, %rdi
callq 0x8c8a9
leaq 0x68(%rsp), %r15
andq $0x0, (%r15)
movq %rax, %r14
leaq 0x78(%rsp), %rax
andq $0x0, (%rax)
movq 0x108(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq %r15, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movq %rax, %r13
movl 0x100(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0xf8(%rsp), %eax
movl %eax, 0x10(%rsp)
movups 0xe8(%rsp), %xmm0
movups %xmm0, (%rsp)
andl $0x0, 0x40(%rsp)
andl $0x0, 0x38(%rsp)
movq %r12, %rdi
movq %r14, %rsi
movq 0xd0(%rsp), %rdx
movq 0xd8(%rsp), %rcx
movq 0x60(%rsp), %r8
movq 0xe0(%rsp), %r9
movss 0x54(%rsp), %xmm1
movss 0x58(%rsp), %xmm2
movss 0x5c(%rsp), %xmm3
callq 0x8cb4c
movq (%r12), %rdi
callq 0x6921d
movq %r14, %rdi
callq 0x68f68
movq 0x10(%r13), %rdi
callq 0x2220
movq (%r15), %rax
movq 0xa8(%rax), %rax
movups 0x138(%rax), %xmm0
movups %xmm0, (%rbx)
movq 0x148(%rax), %rcx
movq %rcx, 0x10(%rbx)
movups 0x150(%rax), %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x160(%rax), %rcx
movq %rcx, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x158(%rax)
movups %xmm0, 0x148(%rax)
movups %xmm0, 0x138(%rax)
movq %r15, %rdi
callq 0x8d243
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq