// File: /workspace/github_cpp_makefile_star2_O1/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)
xorl %r12d, %r12d
movl %r12d, 0x18(%rsp)
movl $0x1, %edx
movl %edx, 0x10(%rsp)
movl $0xa, %edx
movl %edx, 0x8(%rsp)
movl %eax, (%rsp)
xorl %edi, %edi
movq %r13, %rdx
callq 0xd7438
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 %r12
movl $0x1, %r10d
pushq %r10
pushq %rax
callq 0xd674d
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 %r12
movl $0x1, %r10d
pushq %r10
movl $0xa, %r10d
pushq %r10
pushq %rax
callq 0xfa611
addq $0x30, %rsp
cmpq $0x0, 0x58(%rsp)
je 0x1eefcb
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)
movl $0x0, 0x18(%rsp)
movl $0x1, 0x10(%rsp)
movl $0xa, 0x8(%rsp)
xorl %edi, %edi
movq %rbp, %rsi
movq %r13, %rdx
movq %rbx, %r8
callq 0xf38c4
addq $0x40, %rsp
movq (%r15), %rdx
movl 0x40(%r15), %eax
movl 0x44(%r15), %r10d
leaq 0x9b77b(%rip), %r12     # 0x28a758
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 0xfea02
addq $0x10, %rsp
movq (%r15), %rsi
movslq 0x11c(%r12), %r8
addq %r8, %r8
movl 0x40(%r15), %eax
movl 0x44(%r15), %r10d
movss 0x3aba0(%rip), %xmm0    # 0x229bc0
movss 0x3ab9c(%rip), %xmm1    # 0x229bc4
movss 0x3ab8c(%rip), %xmm2    # 0x229bbc
movl $0x3, %r9d
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 0xfa1bc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq