// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Process_Read.cpp
// Function: debug_append_ul_t(ul_ov_t*, long, ul_vec_t*)
void debug_append_ul_t(ul_ov_t *o, int64_t on, ul_vec_t *p)
{
	int64_t k, l = 0;
    uint32_t sp = (uint32_t)-1, ep = (uint32_t)-1, qss, qee, m;
    for (k = on-1; k >= 0; k--) {
        if(sp == (uint32_t)-1 || o[k].qe <= sp) {
            if(sp != (uint32_t)-1) l += ep - sp;

			if(sp == (uint32_t)-1) qss = o[k].qe, qee = p->rlen;
			else qss = o[k].qe, qee = sp;
			if(qee > qss) {
				for (m = 0; m < p->bb.n; m++) {
					if(qss == (p->bb.a[m].qs+((p->bb.a[m].hid>>15)&(0x7fffU))) && 
							qee == (p->bb.a[m].qe-(p->bb.a[m].hid&(0x7fffU)))) {
						break;
					}
				}
				if(m >= p->bb.n) fprintf(stderr, "ERROR\n");
			}

            sp = o[k].qs;
            ep = o[k].qe;
        } else {
            sp = MIN(sp, o[k].qs);
        }
    }
    if(sp != (uint32_t)-1) l += ep - sp;

	if(sp == (uint32_t)-1) qss = 0, qee = p->rlen;
	else qss = 0, qee = sp;
	if(qee > qss) {
		for (m = 0; m < p->bb.n; m++) {
			if(qss == (p->bb.a[m].qs+((p->bb.a[m].hid>>15)&(0x7fffU))) && 
					qee == (p->bb.a[m].qe-(p->bb.a[m].hid&(0x7fffU)))) {
				break;
			}
		}
		if(m >= p->bb.n) fprintf(stderr, "ERROR\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $-0x1
popq %rax
leaq 0x1e2780(%rip), %r12    # 0x1ead84
pushq $0x6
popq %r13
pushq $0x1
popq %rbp
testq %r14, %r14
jle 0x86b6
decq %r14
cmpl $-0x1, %eax
je 0x8636
imulq $0x1c, %r14, %rdx
movl 0x8(%r15,%rdx), %ecx
cmpl %eax, %ecx
jbe 0x8642
addq %r15, %rdx
movl 0x4(%rdx), %ecx
cmpl %ecx, %eax
cmovael %ecx, %eax
jmp 0x860b
movl 0x18(%rbx), %eax
imulq $0x1c, %r14, %rcx
movl 0x8(%r15,%rcx), %ecx
cmpl %ecx, %eax
jbe 0x86a8
movq 0x20(%rbx), %rdx
xorl %esi, %esi
movl %esi, %esi
cmpq %rsi, %rdx
jbe 0x8690
movq 0x30(%rbx), %r8
imulq $0x24, %rsi, %r9
movl (%r8,%r9), %edi
movl %edi, %r10d
shrl $0xf, %r10d
andl $0x7fff, %r10d          # imm = 0x7FFF
addl 0x4(%r8,%r9), %r10d
cmpl %r10d, %ecx
jne 0x868c
addq %r9, %r8
movl 0x8(%r8), %r8d
andl $0x7fff, %edi           # imm = 0x7FFF
subl %edi, %r8d
cmpl %r8d, %eax
je 0x86a8
incl %esi
jmp 0x864c
movq 0x24a949(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x2410
imulq $0x1c, %r14, %rax
movl 0x4(%r15,%rax), %eax
jmp 0x860b
cmpl $-0x1, %eax
jne 0x86be
movl 0x18(%rbx), %eax
testl %eax, %eax
je 0x8706
movq 0x20(%rbx), %rcx
xorl %edx, %edx
movl %edx, %edx
cmpq %rdx, %rcx
jbe 0x8715
movq 0x30(%rbx), %rdi
imulq $0x24, %rdx, %r8
movl (%rdi,%r8), %esi
movl %esi, %r9d
shrl $0xf, %r9d
andl $0x7fff, %r9d           # imm = 0x7FFF
addl 0x4(%rdi,%r8), %r9d
jne 0x8702
addq %r8, %rdi
movl 0x8(%rdi), %edi
andl $0x7fff, %esi           # imm = 0x7FFF
subl %esi, %edi
cmpl %edi, %eax
je 0x8706
incl %edx
jmp 0x86c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x24a8c4(%rip), %rax    # 0x252fe0
movq (%rax), %rcx
leaq 0x1e265e(%rip), %rdi    # 0x1ead84
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2410