// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: post_rescue(ug_opt_t*, asg_t*, ma_hit_t_alloc*, ma_hit_t_alloc*, R_to_U*, bub_label_t*, long long, unsigned char*)
void post_rescue(ug_opt_t *uopt, asg_t *sg, ma_hit_t_alloc *src, ma_hit_t_alloc *rev, R_to_U* rI, bub_label_t *b_mask_t, long long no_trio_recover, uint8_t *cmk)
{
    rescue_contained_reads_aggressive(NULL, sg, src, uopt->coverage_cut, rI, uopt->max_hang, uopt->min_ovlp, 10, 1, 0, NULL, NULL, b_mask_t);
    rescue_missing_overlaps_aggressive(NULL, sg, src, uopt->coverage_cut, rI, uopt->max_hang, uopt->min_ovlp, 1, 0, NULL, b_mask_t);
    rescue_missing_overlaps_backward(NULL, sg, src, uopt->coverage_cut, rI, uopt->max_hang, uopt->min_ovlp, 10, 1, 0, b_mask_t);
    if(cmk) rescue_chimeric_reads_aggressive(NULL, sg, src, uopt->coverage_cut, rI, uopt->max_hang, uopt->min_ovlp, 10, 1, 0, NULL, NULL, b_mask_t, cmk);
    // rescue_wrong_overlaps_to_unitigs(NULL, sg, sources, reverse_sources, coverage_cut, ruIndex, 
    // max_hang_length, mini_overlap_length, bubble_dist, NULL);
    // rescue_no_coverage_aggressive(sg, sources, reverse_sources, &coverage_cut, ruIndex, max_hang_length, 
    // mini_overlap_length, bubble_dist, 10);
    set_hom_global_coverage(&asm_opt, sg, uopt->coverage_cut, src, rev, rI, uopt->max_hang, uopt->min_ovlp);
    rescue_bubble_by_chain(sg, uopt->coverage_cut, src, rev, (asm_opt.max_short_tip*2), 0.15, 3, rI, 0.05, 0.9, uopt->max_hang, uopt->min_ovlp, 10, uopt->gap_fuzz, b_mask_t, no_trio_recover, cmk);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %rbx
movq %rcx, 0x10(%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
movq (%rdi), %rcx
movl 0x40(%rdi), %r9d
movl 0x44(%rdi), %eax
subq $0x40, %rsp
movq %r14, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
pushq $0x1
popq %r12
movl %r12d, 0x10(%rsp)
pushq $0xa
popq %rdx
andl $0x0, 0x18(%rsp)
movl %edx, 0x8(%rsp)
movl %eax, (%rsp)
xorl %edi, %edi
movq %r13, %rdx
callq 0x9b10e
addq $0x40, %rsp
movq (%r15), %rcx
movl 0x40(%r15), %r9d
movl 0x44(%r15), %eax
subq $0x8, %rsp
xorl %edi, %edi
movq %rbp, %rsi
movq %r13, %rdx
movq %rbx, %r8
pushq %r14
pushq $0x0
pushq $0x0
pushq %r12
pushq %rax
callq 0x9a6fd
addq $0x30, %rsp
movq (%r15), %rcx
movl 0x40(%r15), %r9d
movl 0x44(%r15), %eax
subq $0x8, %rsp
xorl %edi, %edi
movq %rbp, %rsi
movq %r13, %rdx
movq %rbx, %r8
pushq %r14
pushq $0x0
pushq %r12
pushq $0xa
popq %r10
pushq %r10
pushq %rax
callq 0xbc30a
addq $0x30, %rsp
cmpq $0x0, 0x58(%rsp)
je 0x1aeac8
movq (%r15), %rcx
movl 0x40(%r15), %r9d
movl 0x44(%r15), %eax
subq $0x40, %rsp
movq 0x98(%rsp), %rdx
movq %rdx, 0x38(%rsp)
movq %r14, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
movl %eax, (%rsp)
andl $0x0, 0x18(%rsp)
movl $0x1, 0x10(%rsp)
movl $0xa, 0x8(%rsp)
xorl %edi, %edi
movq %rbp, %rsi
movq %r13, %rdx
movq %rbx, %r8
callq 0xb669c
addq $0x40, %rsp
movq (%r15), %rdx
movl 0x40(%r15), %eax
movl 0x44(%r15), %r10d
leaq 0xa4c7e(%rip), %r12     # 0x253758
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rcx
movq %r14, 0x8(%rsp)
movq 0x10(%rsp), %r14
movq %r14, %r8
movq %rbx, %r9
pushq %r10
pushq %rax
callq 0xbff80
popq %rax
popq %rcx
movq (%r15), %rsi
movslq 0x11c(%r12), %r8
addq %r8, %r8
movl 0x40(%r15), %eax
movl 0x44(%r15), %r10d
movss 0x3919d(%rip), %xmm0    # 0x1e7cb8
pushq $0x3
popq %r9
movss 0x39195(%rip), %xmm1    # 0x1e7cbc
movss 0x39185(%rip), %xmm2    # 0x1e7cb4
movq %rbp, %rdi
movq %r13, %rdx
movq %r14, %rcx
pushq 0x58(%rsp)
pushq 0x58(%rsp)
pushq 0x18(%rsp)
pushq 0x50(%r15)
pushq $0xa
pushq %r10
pushq %rax
pushq %rbx
callq 0xbbf5a
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq