// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: regen_ul_ov_t_lst(ul_idx_t const*, overlap_region_alloc*, kv_ul_ov_t*)
void regen_ul_ov_t_lst(const ul_idx_t *uref, overlap_region_alloc* olist, kv_ul_ov_t *idx)
{
	uint64_t k; ul_ov_t *p; idx->n = 0;
	kv_resize(ul_ov_t, *idx, olist->length);
	for (k = 0; k < olist->length; k++) {
		// fprintf(stderr, "---[M::%s::utg%.6dl] q[%d, %d), t[%d, %d), tot::%u, cis::%u\n", __func__, 
        // (int32_t)olist->list[k].y_id+1, olist->list[k].x_pos_s, olist->list[k].x_pos_e+1,
		// olist->list[k].y_pos_s, olist->list[k].y_pos_e+1,
		// olist->list[k].overlapLen, olist->list[k].align_length);
		p = &(idx->a[idx->n++]);
		p->qn = k; p->qs = olist->list[k].x_pos_s; p->qe = olist->list[k].x_pos_e+1;
        p->tn = olist->list[k].y_id; p->el = 1; p->rev = olist->list[k].y_pos_strand;
        p->sec = olist->list[k].non_homopolymer_errors;
		if(p->rev) {
            p->ts = uref->ug->u.a[p->tn].len - (olist->list[k].y_pos_e+1); 
            p->te = uref->ug->u.a[p->tn].len - olist->list[k].y_pos_s;
        } else {
            p->ts = olist->list[k].y_pos_s; 
            p->te = olist->list[k].y_pos_e+1;
        }
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, 0x8(%rdx)
movq 0x10(%rsi), %rax
cmpq %rax, 0x10(%rdx)
jae 0x1bb215
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
leaq (%rax,%rax,8), %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax), %rsi
incq %rsi
callq 0x2370
movq %rax, (%rbx)
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x1bb314
movq (%r14), %r9
xorl %eax, %eax
movl $0x40000000, %ecx       # imm = 0x40000000
movl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
xorl %edi, %edi
movq (%rbx), %r10
movq 0x8(%rbx), %r8
leaq 0x1(%r8), %r11
movq %r11, 0x8(%rbx)
leaq (%r8,%r8,8), %r11
leaq (%r11,%r11,2), %r11
addq %r8, %r11
leaq (%r10,%r11), %r8
movl %edi, (%r10,%r11)
movl 0x4(%r9,%rax), %ebp
movl %ebp, 0x4(%r10,%r11)
movl 0x8(%r9,%rax), %ebp
incl %ebp
movl %ebp, 0x8(%r10,%r11)
movl 0x10(%r9,%rax), %r9d
movl %r9d, 0xc(%r10,%r11)
movl 0x18(%r10,%r11), %ebp
orl %ecx, %ebp
movl %ebp, 0x18(%r10,%r11)
movq (%r14), %r12
movl 0x1c(%r12,%rax), %r12d
movl %r12d, %r13d
shll $0x1f, %r13d
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
orl %r13d, %ebp
movl %ebp, 0x18(%r10,%r11)
movq (%r14), %rbp
movl 0x30(%rbp,%rax), %ebp
andl %edx, %ebp
orl %r13d, %ebp
orl %ecx, %ebp
movl %ebp, 0x18(%r10,%r11)
testb $0x1, %r12b
jne 0x1bb2ce
movq (%r14), %r9
movl 0x14(%r9,%rax), %r10d
movl %r10d, 0x10(%r8)
movl 0x18(%r9,%rax), %r10d
incl %r10d
jmp 0x1bb2fd
movq (%r15), %r10
movq 0x10(%r10), %r10
leaq (%r9,%r9,4), %r11
movl (%r10,%r11,8), %ebp
andl %esi, %ebp
movq (%r14), %r9
movl 0x18(%r9,%rax), %r12d
notl %r12d
addl %ebp, %r12d
movl %r12d, 0x10(%r8)
movl (%r10,%r11,8), %r10d
andl %esi, %r10d
subl 0x14(%r9,%rax), %r10d
movl %r10d, 0x14(%r8)
incq %rdi
addq $0xa8, %rax
cmpq 0x10(%r14), %rdi
jb 0x1bb234
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq