// File: /workspace/github_cpp_makefile_star2_O3/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, 0xa8(%rsp)
movq %r8, 0xe8(%rsp)
movq %rcx, 0xe0(%rsp)
movq %rdx, 0xd8(%rsp)
movq %rsi, 0xd0(%rsp)
movq %rdi, %rbx
movq 0x1c8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x198(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x170(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x178(%rsp), %r12
movq 0x180(%rsp), %r13
movq 0x1a0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x1b8(%rsp), %r14
movl 0x1b0(%rsp), %ebp
movl %ebp, 0x70(%rsp)
movq 0x1c0(%rsp), %r15
movq %r15, %rdi
callq 0x2090
movq %rax, 0x98(%rsp)
xorl %eax, %eax
cmpl $0x2, %ebp
setl %al
leaq 0x190d52(%rip), %rdx    # 0x295758
xorl %ecx, %ecx
cmpl $0x3, 0x1bc(%rdx)
setl %cl
movq %rax, 0x50(%rsp)
movq %r15, 0x108(%rsp)
movq %r15, 0x48(%rsp)
movq %r14, 0x110(%rsp)
movq %r14, 0x40(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %r13, 0x118(%rsp)
movq %r13, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
movq %rcx, 0x60(%rsp)
movq $0x1, 0x58(%rsp)
movq %rbx, %rdi
movq 0xd0(%rsp), %r14
movq %r14, %rsi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %rbp
movq %rbp, %rcx
movq 0xe8(%rsp), %r13
movq %r13, %r8
movq 0xa8(%rsp), %r15
movq %r15, %r9
movsd 0xf0(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm1
callq 0x1047fd
movq %rbx, 0x120(%rsp)
movq (%rbx), %rax
movq 0x98(%rsp), %rbx
movq (%r14), %rcx
movq (%rbp), %rdx
movq (%r13), %rsi
leaq 0x190c64(%rip), %rdi    # 0x295758
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 0x80(%rsp), %rax
movl %eax, 0x40(%r12)
movq 0x88(%rsp), %rax
movl %eax, 0x44(%r12)
movq 0xb8(%rsp), %rax
movq %rax, 0x50(%r12)
movq 0xc0(%rsp), %rax
movq %rax, 0x58(%r12)
movq %rdx, 0x68(%r12)
movq %rsi, (%r12)
addq %rdi, %rdi
movq %r15, 0x30(%r12)
movq %rdi, 0x18(%r12)
movl $0x3e19999a, 0x20(%r12) # imm = 0x3E19999A
movq $0x3, 0x28(%r12)
movsd 0x1311b2(%rip), %xmm0   # 0x235d30
movsd %xmm0, 0x38(%r12)
movq 0x78(%rsp), %rax
movq %rax, 0x60(%r12)
movq 0xc8(%rsp), %rax
movq %rax, 0x70(%r12)
movq 0x90(%rsp), %r14
movq (%r14), %rsi
movq %r12, %rdi
movl $0x124f8, %edx          # imm = 0x124F8
callq 0x1faec1
movq (%r14), %rdi
movq %r12, %rsi
callq 0xc1328
leal 0x2(%rbx), %eax
movl %eax, 0x74(%rsp)
movslq %eax, %rdi
callq 0x2280
movq %rax, 0xa0(%rsp)
cmpl $0x2, 0x70(%rsp)
jl 0x104e35
leaq 0x20(%r12), %rax
movq %rax, 0x100(%rsp)
incl %ebx
movl $0x1, %r14d
movl $0xcccccccd, %ebp       # imm = 0xCCCCCCCD
movq %rbx, 0x98(%rsp)
movq 0xe8(%rsp), %r13
movl %ebx, %r15d
movl %r14d, %eax
movl %eax, %ecx
imulq %rbp, %rcx
shrq $0x23, %rcx
incl %r15d
cmpl $0x9, %eax
movl %ecx, %eax
ja 0x104c11
cmpl %r15d, 0x74(%rsp)
movq 0xa0(%rsp), %rbx
jg 0x104c4a
incl %r15d
movslq %r15d, %rsi
movq %rbx, %rdi
callq 0x2370
movq %rax, %rbx
movl %r15d, 0x74(%rsp)
movq %rbx, %rdi
leaq 0x134426(%rip), %rsi    # 0x23907a
movq 0x108(%rsp), %rdx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2050
incl %r14d
movl %r14d, 0xb4(%rsp)
xorl %eax, %eax
cmpl 0x70(%rsp), %r14d
sete %al
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rsp)
movq %rbx, 0xa0(%rsp)
movq %rbx, 0x48(%rsp)
movq 0x110(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq 0x78(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0x118(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movq 0x80(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x88(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x90(%rsp), %rcx
movq %rcx, (%rsp)
movq %rax, 0x50(%rsp)
movq 0x120(%rsp), %r14
movq %r14, %rdi
movq 0xd0(%rsp), %r15
movq %r15, %rsi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %rbx
movq %rbx, %rcx
movq %r13, %r8
movq 0xa8(%rsp), %r9
movsd 0xf0(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm1
callq 0x1047fd
movq (%r14), %rax
movl 0xb4(%rsp), %r14d
movq (%r15), %rcx
movq (%rbx), %rdx
movq (%r13), %rsi
leaq 0x190a0d(%rip), %rdi    # 0x295758
movslq 0x11c(%rdi), %rdi
movq 0x100(%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 0x80(%rsp), %rax
movl %eax, 0x40(%r12)
movq 0x88(%rsp), %rax
movl %eax, 0x44(%r12)
movq 0xb8(%rsp), %rax
movq %rax, 0x50(%r12)
movq 0xc0(%rsp), %rax
movq %rax, 0x58(%r12)
movq %rdx, 0x68(%r12)
movq %rsi, (%r12)
addq %rdi, %rdi
movq 0xa8(%rsp), %rax
movq %rax, 0x30(%r12)
movq %rdi, 0x18(%r12)
movl $0x3e19999a, 0x20(%r12) # imm = 0x3E19999A
movq $0x3, 0x28(%r12)
movsd 0x130f4f(%rip), %xmm0   # 0x235d30
movsd %xmm0, 0x38(%r12)
movq 0x78(%rsp), %rax
movq %rax, 0x60(%r12)
movq 0xc8(%rsp), %rax
movq %rax, 0x70(%r12)
movq 0x90(%rsp), %rbx
movq (%rbx), %rsi
movq %r12, %rdi
movl $0x124f8, %edx          # imm = 0x124F8
callq 0x1faec1
movq (%rbx), %rdi
movq %r12, %rsi
callq 0xc1328
cmpl 0x70(%rsp), %r14d
movq 0x98(%rsp), %rbx
jne 0x104c0b
movq 0xa0(%rsp), %rdi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220