// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: renew_g(ma_hit_t_alloc**, ma_hit_t_alloc**, long long*, unsigned long**, ma_sub_t**, R_to_U*, asg_t**, long, long, ug_opt_t*, long, double, double, long, bub_label_t*, unsigned int, char*, char const*, unsigned long, unsigned long, unsigned long)
void renew_g(ma_hit_t_alloc **sources, ma_hit_t_alloc **reverse_sources, long long *n_read, 
uint64_t **readLen, ma_sub_t **coverage_cut, R_to_U *ruIndex, asg_t **sg, int64_t mini_overlap_length, 
int64_t max_hang_length, ug_opt_t *uopt, int64_t clean_round, double min_ovlp_drop_ratio, 
double max_ovlp_drop_ratio, int64_t max_tip, bub_label_t *b_mask_t, uint32_t is_trio, 
char *o_file, const char *bin_file, uint64_t free_uld, uint64_t is_bridg, uint64_t deep_clean)
{
    ul_renew_t nopt; memset(&nopt, 0, sizeof(nopt));
    nopt.src = sources; nopt.r_src = reverse_sources; nopt.ruIndex = ruIndex;
    nopt.n_read = n_read; nopt.readLen = readLen; nopt.sg = sg;
    nopt.cov = coverage_cut; nopt.b_mask_t = b_mask_t;
    nopt.max_hang = max_hang_length; nopt.mini_ovlp = mini_overlap_length;
    ul_realignment_gfa(uopt, *sg, clean_round, min_ovlp_drop_ratio, max_ovlp_drop_ratio, 
        asm_opt.max_short_tip, asm_opt.max_short_ul_tip, b_mask_t, ha_opt_triobin(&asm_opt), o_file, &nopt, bin_file, free_uld, is_bridg, deep_clean);
    // ma_ug_t *iug = ul_realignment_gfa(uopt, *sg, clean_round, min_ovlp_drop_ratio, max_ovlp_drop_ratio, 
    //                                                                 asm_opt.max_short_tip, b_mask_t, ha_opt_triobin(&asm_opt), o_file);
    // asg_t *ng = gen_ng(iug, *sg, uopt, coverage_cut, ruIndex, 256);
    // ma_ug_destroy(iug); asg_destroy(*sg);
    // (*sources) = R_INF.paf; 
    // (*reverse_sources) = R_INF.reverse_paf;
    // (*n_read) = R_INF.total_reads;
    // (*readLen) = R_INF.read_length;
    // (*sg) = ng; 
    // ma_hit_contained_advance(*sources, *n_read, *coverage_cut, ruIndex, max_hang_length, mini_overlap_length);
    // post_rescue(uopt, *sg, (*sources), (*reverse_sources), ruIndex, b_mask_t, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq 0x70(%rbp), %rax
movq 0x68(%rbp), %rax
movq 0x60(%rbp), %rax
movq 0x58(%rbp), %rax
movq 0x50(%rbp), %rax
movl 0x48(%rbp), %eax
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq %r8, -0x48(%rbp)
movq %r9, -0x50(%rbp)
movsd %xmm0, -0x58(%rbp)
movsd %xmm1, -0x60(%rbp)
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x2100
movq -0x28(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x98(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x80(%rbp)
movq 0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movq 0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq 0x28(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xe8(%rbp)
movq 0x30(%rbp), %rax
movq %rax, -0xe0(%rbp)
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0xd8(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0xd0(%rbp)
leaq 0x25fee7(%rip), %rax    # 0x3c47f8
movslq 0x11c(%rax), %rax
movq %rax, -0xc8(%rbp)
leaq 0x25fed2(%rip), %rax    # 0x3c47f8
movslq 0x120(%rax), %rax
movq %rax, -0xc0(%rbp)
movq 0x40(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x25feb2(%rip), %rdi    # 0x3c47f8
callq 0x133600
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
movsd -0xd8(%rbp), %xmm0
movsd -0xd0(%rbp), %xmm1
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %r8
movq -0xb8(%rbp), %r9
movl %eax, %r12d
movq 0x50(%rbp), %r15
movq 0x58(%rbp), %rbx
movq 0x60(%rbp), %r11
movq 0x68(%rbp), %r10
movq 0x70(%rbp), %rax
leaq -0xb0(%rbp), %r14
movl %r12d, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x378f90
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)