// File: /workspace/github_cpp_makefile_star2_O1/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 $0x118, %rsp            # imm = 0x118
movsd %xmm1, 0xf0(%rsp)
movsd %xmm0, 0xe8(%rsp)
movq %r9, 0x88(%rsp)
movq %r8, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdi, %rbx
movq 0x1b8(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x188(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x168(%rsp), %r12
movq 0x170(%rsp), %r13
movq 0x190(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x1a8(%rsp), %r14
movl 0x1a0(%rsp), %ebp
movl %ebp, 0x68(%rsp)
movq 0x1b0(%rsp), %r15
movq %r15, %rdi
callq 0x2090
movq %rax, 0x90(%rsp)
xorl %eax, %eax
cmpl $0x2, %ebp
setl %al
leaq 0x18a06e(%rip), %rdx    # 0x28a758
xorl %ecx, %ecx
cmpl $0x3, 0x1bc(%rdx)
setl %cl
movq %rax, 0x50(%rsp)
movq %r15, 0xf8(%rsp)
movq %r15, 0x48(%rsp)
movq %r14, 0x100(%rsp)
movq %r14, 0x40(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %r13, 0x108(%rsp)
movq %r13, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %r14
movq %r14, (%rsp)
movq %rcx, 0x60(%rsp)
movq $0x1, 0x58(%rsp)
movq %rbx, %rdi
movq 0xc8(%rsp), %r15
movq %r15, %rsi
movq 0xd0(%rsp), %rdx
movq 0xd8(%rsp), %rbp
movq %rbp, %rcx
movq 0xe0(%rsp), %r13
movq %r13, %r8
movq 0x88(%rsp), %r9
movsd 0xe8(%rsp), %xmm0
movsd 0xf0(%rsp), %xmm1
callq 0x1004ca
movq %rbx, 0x110(%rsp)
movq (%rbx), %rax
movq 0x90(%rsp), %rbx
movq (%r15), %rcx
movq (%rbp), %rdx
movq (%r13), %rsi
leaq 0x189f86(%rip), %rdi    # 0x28a758
movslq 0x11c(%rdi), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movups %xmm0, 0x10(%r12)
movups %xmm0, 0x40(%r12)
movups %xmm0, 0x50(%r12)
movups %xmm0, 0x60(%r12)
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x20(%r12)
movq $0x0, 0x70(%r12)
movq %rax, 0x8(%r12)
movq %rcx, 0x10(%r12)
movq 0x78(%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)
movq 0x88(%rsp), %rax
movq %rax, 0x30(%r12)
movq %rdi, 0x18(%r12)
movl $0x3e19999a, 0x20(%r12) # imm = 0x3E19999A
movq $0x3, 0x28(%r12)
movabsq $0x3f6666663d4ccccd, %rax # imm = 0x3F6666663D4CCCCD
movq %rax, 0x38(%r12)
movq 0x70(%rsp), %rax
movq %rax, 0x60(%r12)
movq 0xc0(%rsp), %rax
movq %rax, 0x70(%r12)
movq (%r14), %rsi
movq %r12, %rdi
movl $0x124f8, %edx          # imm = 0x124F8
callq 0x1efbb6
movq (%r14), %rdi
movq %r12, %rsi
callq 0xc04b2
leal 0x2(%rbx), %eax
movl %eax, 0x6c(%rsp)
movslq %eax, %rdi
callq 0x2280
movq %rax, 0x98(%rsp)
cmpl $0x2, 0x68(%rsp)
jl 0x100b39
incl %ebx
movl $0x1, %r14d
movl $0xcccccccd, %ebp       # imm = 0xCCCCCCCD
movq %rbx, 0x90(%rsp)
movq 0xe0(%rsp), %r15
movl %ebx, %r13d
movl %r14d, %eax
movl %eax, %ecx
imulq %rbp, %rcx
shrq $0x23, %rcx
incl %r13d
cmpl $0x9, %eax
movl %ecx, %eax
ja 0x1008ff
cmpl %r13d, 0x6c(%rsp)
movq 0x98(%rsp), %rbx
jg 0x100938
incl %r13d
movslq %r13d, %rsi
movq %rbx, %rdi
callq 0x2370
movq %rax, %rbx
movl %r13d, 0x6c(%rsp)
movq %rbx, %rdi
leaq 0x12c548(%rip), %rsi    # 0x22ce8a
movq 0xf8(%rsp), %rdx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2050
incl %r14d
movl %r14d, 0xac(%rsp)
xorl %eax, %eax
cmpl 0x68(%rsp), %r14d
sete %al
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rsp)
movq %rbx, 0x98(%rsp)
movq %rbx, 0x48(%rsp)
movq 0x100(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq 0x70(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0x108(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movq 0x78(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x80(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0xa0(%rsp), %rcx
movq %rcx, (%rsp)
movq %rax, 0x50(%rsp)
movq 0x110(%rsp), %r14
movq %r14, %rdi
movq 0xc8(%rsp), %r13
movq %r13, %rsi
movq 0xd0(%rsp), %rdx
movq 0xd8(%rsp), %rbx
movq %rbx, %rcx
movq %r15, %r8
movq 0x88(%rsp), %r9
movsd 0xe8(%rsp), %xmm0
movsd 0xf0(%rsp), %xmm1
callq 0x1004ca
movq (%r14), %rax
movl 0xac(%rsp), %r14d
movq (%r13), %rcx
movq (%rbx), %rdx
movq (%r15), %rsi
leaq 0x189d22(%rip), %rdi    # 0x28a758
movslq 0x11c(%rdi), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movups %xmm0, 0x10(%r12)
movups %xmm0, 0x40(%r12)
movups %xmm0, 0x50(%r12)
movups %xmm0, 0x60(%r12)
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x20(%r12)
movq $0x0, 0x70(%r12)
movq %rax, 0x8(%r12)
movq %rcx, 0x10(%r12)
movq 0x78(%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 0x88(%rsp), %rax
movq %rax, 0x30(%r12)
movq %rdi, 0x18(%r12)
movl $0x3e19999a, 0x20(%r12) # imm = 0x3E19999A
movq $0x3, 0x28(%r12)
movabsq $0x3f6666663d4ccccd, %rax # imm = 0x3F6666663D4CCCCD
movq %rax, 0x38(%r12)
movq 0x70(%rsp), %rax
movq %rax, 0x60(%r12)
movq 0xc0(%rsp), %rax
movq %rax, 0x70(%r12)
movq 0xa0(%rsp), %rbx
movq (%rbx), %rsi
movq %r12, %rdi
movl $0x124f8, %edx          # imm = 0x124F8
callq 0x1efbb6
movq (%rbx), %rdi
movq %r12, %rsi
callq 0xc04b2
cmpl 0x68(%rsp), %r14d
movq 0x90(%rsp), %rbx
jne 0x1008f9
movq 0x98(%rsp), %rdi
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220