// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Overlaps.cpp
// Function: gradually_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, long, long, bub_label_t*, unsigned int, int, char*, char const*, telo_end_t*)
void gradually_renew_g(ma_hit_t_alloc **src, ma_hit_t_alloc **rev_src, long long *n_read, 
uint64_t **readLen, ma_sub_t **cov, 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, int64_t gap_fuzz, int64_t min_dp, 
bub_label_t *b_mask_t, uint32_t is_trio, int32_t ul_aln_round, char *o_file, const char *bin_file, telo_end_t *te)
{
    int32_t k, strl = strlen(bin_file)+1, kt, cl, sl; char *id = NULL;
    renew_g(src, rev_src, n_read, readLen, cov, ruIndex, sg, mini_overlap_length, max_hang_length,
        uopt, clean_round, min_ovlp_drop_ratio, max_ovlp_drop_ratio, asm_opt.max_short_tip, b_mask_t, 
        is_trio, o_file, bin_file, (ul_aln_round<=1)?1:0, 1, /**((is_trio)?(0):(1))**/((asm_opt.polyploidy<=2)?1:0));
    gen_ug_opt_t(uopt, *src, *rev_src, max_hang_length, mini_overlap_length, gap_fuzz, min_dp, *readLen, 
            *cov, ruIndex, (asm_opt.max_short_tip*2), 0.15, 3, 0.05, 0.9, b_mask_t, te);
    ug_ext_gfa(uopt, *sg, ug_ext_len);

    /**if(!ha_opt_triobin(&asm_opt))**/ hic_clean_adv(*sg, uopt);

    cl = strl+1; MALLOC(id, cl);
    for (k = 1; k < ul_aln_round; k++) {
        for(kt = k, sl = strl+1; kt > 0; kt/=10) sl++;
        if(cl < sl) {
            cl = sl; REALLOC(id, cl);
        }

        sprintf(id, "%s%d", bin_file, k);
        renew_g(src, rev_src, n_read, readLen, cov, ruIndex, sg, mini_overlap_length, max_hang_length,
            uopt, clean_round, min_ovlp_drop_ratio, max_ovlp_drop_ratio, asm_opt.max_short_tip, b_mask_t, 
            is_trio, o_file, id, ((k+1)==ul_aln_round)?1:0, 0, 0);
        gen_ug_opt_t(uopt, *src, *rev_src, max_hang_length, mini_overlap_length, gap_fuzz, min_dp, *readLen, 
            *cov, ruIndex, (asm_opt.max_short_tip*2), 0.15, 3, 0.05, 0.9, b_mask_t, te);
        ug_ext_gfa(uopt, *sg, ug_ext_len);
        /**if(!ha_opt_triobin(&asm_opt))**/ hic_clean_adv(*sg, uopt);
    }
    free(id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movsd %xmm1, 0xf8(%rsp)
movsd %xmm0, 0xf0(%rsp)
movq %r9, 0xa0(%rsp)
movq %r8, 0xe8(%rsp)
movq %rcx, 0xe0(%rsp)
movq %rdx, 0xd8(%rsp)
movq %rsi, 0xd0(%rsp)
movq %rdi, 0xc8(%rsp)
movq 0x1c8(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x1c0(%rsp), %r13
movq 0x1b8(%rsp), %r14
movl 0x1b0(%rsp), %ebp
movq 0x1a0(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x198(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x180(%rsp), %r15
movq 0x178(%rsp), %r12
movq 0x170(%rsp), %rbx
movq %rbx, 0x98(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %r13, %rdi
callq 0x2090
movq %rax, 0x70(%rsp)
xorl %eax, %eax
movl %ebp, 0xa8(%rsp)
cmpl $0x2, %ebp
setl %al
leaq 0x191e0e(%rip), %rdx    # 0x253758
xorl %ecx, %ecx
cmpl $0x3, 0x1bc(%rdx)
setl %cl
movq %rax, 0x50(%rsp)
movq %r13, 0x120(%rsp)
movq %r13, 0x48(%rsp)
movq %r14, 0x118(%rsp)
movq %r14, 0x40(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %r15, 0x110(%rsp)
movq %r15, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rax
movq %rax, (%rsp)
movq %rcx, 0x60(%rsp)
movq $0x1, 0x58(%rsp)
movq 0xc8(%rsp), %r13
movq %r13, %rdi
movq 0xd0(%rsp), %rbx
movq %rbx, %rsi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %r15
movq %r15, %rcx
movq 0xe8(%rsp), %rbp
movq %rbp, %r8
movq 0xa0(%rsp), %r14
movq %r14, %r9
movsd 0xf0(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm1
callq 0xc174c
movq (%r13), %rax
movq (%rbx), %rcx
movq (%r15), %rdx
movq (%rbp), %rsi
leaq 0x191d30(%rip), %rdi    # 0x253758
movslq 0x11c(%rdi), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%r12)
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x20(%r12)
movq %rax, 0x8(%r12)
movq %rcx, 0x10(%r12)
movq 0x98(%rsp), %rax
movl %eax, 0x40(%r12)
movq 0x80(%rsp), %rax
movl %eax, 0x44(%r12)
movq 0xb0(%rsp), %rax
movq %rax, 0x50(%r12)
movq 0xb8(%rsp), %rax
movq %rax, 0x58(%r12)
movq %rdx, 0x68(%r12)
addq %rdi, %rdi
movq %rsi, (%r12)
leaq 0x20(%r12), %rax
movq %rax, 0x108(%rsp)
movq %r14, 0x30(%r12)
movq %rdi, 0x18(%r12)
movl $0x3e19999a, 0x20(%r12) # imm = 0x3E19999A
movq $0x3, 0x28(%r12)
movsd 0x126171(%rip), %xmm0   # 0x1e7c30
movsd %xmm0, 0x38(%r12)
movq 0x88(%rsp), %rax
movq %rax, 0x60(%r12)
movq 0xc0(%rsp), %rax
movq %rax, 0x70(%r12)
movq 0x78(%rsp), %rbx
movq (%rbx), %rsi
movq %r12, %rdi
movl $0x124f8, %edx          # imm = 0x124F8
callq 0x1af6b9
movq (%rbx), %rdi
movq %r12, %rsi
callq 0x857d0
movq 0x70(%rsp), %rax
addl $0x2, %eax
movq %rax, 0x70(%rsp)
movslq %eax, %rdi
movq %rdi, 0x100(%rsp)
callq 0x2280
movq %rax, 0x90(%rsp)
pushq $0x1
popq %rbp
pushq $0xa
popq %r13
movl 0xa8(%rsp), %ebx
cmpl %ebx, %ebp
jge 0xc1d53
movq 0x100(%rsp), %r15
movl %ebp, %eax
movq 0x90(%rsp), %r14
testl %eax, %eax
je 0xc1b5b
xorl %edx, %edx
divl %r13d
incq %r15
jmp 0xc1b4d
cmpl %r15d, 0x70(%rsp)
jge 0xc1b75
movq %r14, %rdi
movq %r15, %rsi
callq 0x2370
movq %rax, %r14
movq %r15, 0x70(%rsp)
movq %r14, %rdi
leaq 0x1293fb(%rip), %rsi    # 0x1eaf7a
movq 0x120(%rsp), %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2050
incl %ebp
movl %ebp, 0xac(%rsp)
xorl %eax, %eax
cmpl %ebx, %ebp
sete %al
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rsp)
movq %r14, 0x90(%rsp)
movq %r14, 0x48(%rsp)
movq 0x118(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq 0x88(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0x110(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movq 0x98(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x80(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x78(%rsp), %rcx
movq %rcx, (%rsp)
movq %rax, 0x50(%rsp)
movq 0xc8(%rsp), %r15
movq %r15, %rdi
movq 0xd0(%rsp), %rbx
movq %rbx, %rsi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %r14
movq %r14, %rcx
movq 0xe8(%rsp), %rbp
movq %rbp, %r8
movq 0xa0(%rsp), %r9
movsd 0xf0(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm1
callq 0xc174c
movq (%r15), %rax
movq (%rbx), %rcx
movq (%r14), %rdx
movq (%rbp), %rsi
movl 0xac(%rsp), %ebp
leaq 0x191ae1(%rip), %rdi    # 0x253758
movslq 0x11c(%rdi), %rdi
movq 0x108(%rsp), %r8
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r8)
movups %xmm0, 0x10(%r8)
movups %xmm0, (%r8)
movq %rax, 0x8(%r12)
movq %rcx, 0x10(%r12)
movq 0x98(%rsp), %rax
movl %eax, 0x40(%r12)
movq 0x80(%rsp), %rax
movl %eax, 0x44(%r12)
movq 0xb0(%rsp), %rax
movq %rax, 0x50(%r12)
movq 0xb8(%rsp), %rax
movq %rax, 0x58(%r12)
movq %rdx, 0x68(%r12)
movq %rsi, (%r12)
addq %rdi, %rdi
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%r12)
movq %rdi, 0x18(%r12)
movl $0x3e19999a, 0x20(%r12) # imm = 0x3E19999A
movq $0x3, 0x28(%r12)
movsd 0x125f23(%rip), %xmm0   # 0x1e7c30
movsd %xmm0, 0x38(%r12)
movq 0x88(%rsp), %rax
movq %rax, 0x60(%r12)
movq 0xc0(%rsp), %rax
movq %rax, 0x70(%r12)
movq 0x78(%rsp), %rbx
movq (%rbx), %rsi
movq %r12, %rdi
movl $0x124f8, %edx          # imm = 0x124F8
callq 0x1af6b9
movq (%rbx), %rdi
movq %r12, %rsi
callq 0x857d0
jmp 0xc1b2c
movq 0x90(%rsp), %rdi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220