// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: benchmark_hic_graph(asg_t*, ma_sub_t*, char*, ma_hit_t_alloc*, ma_hit_t_alloc*, long long, float, long long, R_to_U*, float, float, int, int, int, bub_label_t*)
void benchmark_hic_graph(asg_t *sg, ma_sub_t* coverage_cut, char* output_file_name, 
ma_hit_t_alloc* sources, ma_hit_t_alloc* reverse_sources, 
long long tipsLen, float tip_drop_ratio, long long stops_threshold, R_to_U* ruIndex, 
float chimeric_rate, float drop_ratio, int max_hang, int min_ovlp, int gap_fuzz, bub_label_t* b_mask_t)
{
    ma_ug_t *ug_1 = output_trio_unitig_graph(sg, coverage_cut, output_file_name, FATHER, sources, 
    reverse_sources, tipsLen, tip_drop_ratio, stops_threshold, ruIndex, 
    chimeric_rate, drop_ratio, max_hang, min_ovlp, gap_fuzz, 1, b_mask_t, NULL, NULL, NULL);

    ma_ug_t *ug_2 = output_trio_unitig_graph(sg, coverage_cut, output_file_name, MOTHER, sources, 
    reverse_sources, tipsLen, tip_drop_ratio, stops_threshold, ruIndex, 
    chimeric_rate, drop_ratio, max_hang, min_ovlp, gap_fuzz, 1, b_mask_t, NULL, NULL, NULL);
    fprintf(stderr, "ug_1->u.n: %u, ug_2->u.n: %u\n", (uint32_t)ug_1->u.n, (uint32_t)ug_2->u.n);
    ma_ug_t *ug = merge_utg(&ug_1, &ug_2);
    fprintf(stderr, "ug->u.n: %u\n", (uint32_t)ug->u.n);

    hic_benchmark(ug, sg);

    ma_ug_destroy(ug);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq 0x38(%rbp), %rax
movl 0x30(%rbp), %eax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movss %xmm0, -0x5c(%rbp)
movss %xmm1, -0x60(%rbp)
movss %xmm2, -0x64(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %r8
movq -0x50(%rbp), %r9
movq -0x58(%rbp), %r12
movss -0x5c(%rbp), %xmm0
movq 0x10(%rbp), %r15
movq 0x18(%rbp), %r14
movss -0x60(%rbp), %xmm1
movss -0x64(%rbp), %xmm2
movl 0x20(%rbp), %ebx
movl 0x28(%rbp), %r11d
movl 0x30(%rbp), %r10d
movq 0x38(%rbp), %rax
movl $0x1, %ecx
xorl %r13d, %r13d
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl $0x1, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
callq 0x100cf0
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %r8
movq -0x50(%rbp), %r9
movq -0x58(%rbp), %r12
movss -0x5c(%rbp), %xmm0
movq 0x10(%rbp), %r15
movq 0x18(%rbp), %r14
movss -0x60(%rbp), %xmm1
movss -0x64(%rbp), %xmm2
movl 0x20(%rbp), %ebx
movl 0x28(%rbp), %r11d
movl 0x30(%rbp), %r10d
movq 0x38(%rbp), %rax
movl $0x2, %ecx
xorl %r13d, %r13d
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl $0x1, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
callq 0x100cf0
movq %rax, -0x78(%rbp)
movq 0x2af023(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x70(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
movq -0x78(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
leaq 0x272cd9(%rip), %rsi    # 0x387cb2
movb $0x0, %al
callq 0x22a0
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x114980
movq %rax, -0x80(%rbp)
movq 0x2aefe8(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
leaq 0x27565e(%rip), %rsi    # 0x38a669
movb $0x0, %al
callq 0x22a0
movq -0x80(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x211680
movq -0x80(%rbp), %rdi
callq 0xcd6f0
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)