// File: chhylp123[P]hifiasm/Assembly.cpp
// Function: update_exact_overlaps(overlap_region_alloc*, UC_Read*, UC_Read*)
void update_exact_overlaps(overlap_region_alloc* overlap_list, UC_Read* g_read, UC_Read* overlap_read)
{
    uint64_t j;
    for (j = 0; j < overlap_list->length; j++)
    {
        if (overlap_list->list[j].is_match != 1)
        {
            if((overlap_list->list[j].x_pos_e + 1 - overlap_list->list[j].x_pos_s) != 
               (overlap_list->list[j].y_pos_e + 1 - overlap_list->list[j].y_pos_s))
            {
                continue;
            }

            if(overlap_list->list[j].y_pos_strand == 0)
            {
                recover_UC_Read(overlap_read, &R_INF, overlap_list->list[j].y_id);
            }
            else
            {
                recover_UC_Read_RC(overlap_read, &R_INF, overlap_list->list[j].y_id);
            }

            if(if_exact_match(g_read->seq, g_read->length, overlap_read->seq, overlap_read->length, 
            overlap_list->list[j].x_pos_s, overlap_list->list[j].x_pos_e, 
            overlap_list->list[j].y_pos_s, overlap_list->list[j].y_pos_e))
            {
                overlap_list->list[j].is_match = 1;
                overlap_list->list[j].strong = 0;
                overlap_list->list[j].without_large_indel = 1;
                overlap_list->list[j].shared_seed = 1;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x18f66
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %rcx
addq %rcx, %rax
movzbl 0x2c(%rax), %eax
cmpl $0x1, %eax
je 0x18f53
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
imulq $0xa8, -0x20(%rbp), %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
imulq $0xa8, -0x20(%rbp), %rdx
addq %rdx, %rcx
movl 0x18(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movq (%rdx), %rdx
imulq $0xa8, -0x20(%rbp), %rsi
addq %rsi, %rdx
subl 0x14(%rdx), %ecx
cmpl %ecx, %eax
je 0x18e00
jmp 0x18f55
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, 0x1c(%rax)
jne 0x18e41
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, %edx
leaq 0x3ac496(%rip), %rsi    # 0x3c52d0
callq 0xa380
jmp 0x18e68
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, %edx
leaq 0x3ac46d(%rip), %rsi    # 0x3c52d0
callq 0xa500
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %r8
addq %r8, %rax
movl 0x4(%rax), %eax
movl %eax, %r8d
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %r9
addq %r9, %rax
movl 0x8(%rax), %eax
movl %eax, %r9d
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %r10
addq %r10, %rax
movl 0x14(%rax), %eax
movl %eax, %r10d
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %r11
addq %r11, %rax
movl 0x18(%rax), %eax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x1c610
cmpl $0x0, %eax
je 0x18f51
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %rcx
addq %rcx, %rax
movb $0x1, 0x2c(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %rcx
addq %rcx, %rax
movb $0x0, 0x2e(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %rcx
addq %rcx, %rax
movb $0x1, 0x2d(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0xa8, -0x20(%rbp), %rcx
addq %rcx, %rax
movl $0x1, 0x24(%rax)
jmp 0x18f53
jmp 0x18f55
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x18d6c
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)