// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: debug_update_uovlp_chain_qse(ma_ug_t*, mg_lchain_t*, long, long)
void debug_update_uovlp_chain_qse(ma_ug_t *ug, mg_lchain_t *a, int64_t a_n, int64_t ulid)
{
	if(a_n <= 2) return;
	int64_t r0_s, r0_e, q0_s, q0_e, k;
	int64_t r1_s, r1_e, q1_s, q1_e;
	get_u_offset(ug, &(a[0]), &r0_s, &r0_e, &q0_s, &q0_e);
	get_u_offset(ug, &(a[a_n-1]), &r1_s, &r1_e, &q1_s, &q1_e);
	/**if(r0_s <= r1_s && r0_e <= r1_e && q0_s <= q1_s && q0_e <= q1_e)**/ {
		for (k = 1; k + 1 < a_n; k++) a[k].qs = a[k].qe = -1;
		update_uovlp_chain_qse(ug, 0, a_n-1, a, a_n);
		for (k = 1; k < a_n; k++) {
			get_u_offset(ug, a + k - 1, &r0_s, &r0_e, &q0_s, &q0_e);
			get_u_offset(ug, a + k, &r1_s, &r1_e, &q1_s, &q1_e);
			// if(!(r0_s <= r1_s && r0_e <= r1_e && q0_s <= q1_s && q0_e <= q1_e)) {
			// 	fprintf(stderr, "ulid:%ld, r0_s:%ld, r1_s:%ld, r0_e:%ld, r1_e:%ld, q0_s:%ld, q1_s:%ld, q0_e:%ld, q1_e:%ld\n", ulid, 
			// 	r0_s, r1_s, r0_e, r1_e, q0_s, q1_s, q0_e, q1_e);
			// }
			// assert(q0_s <= q1_s && q0_e <= q1_e && q0_s <= q0_e && q1_s <= q1_e);
			if(r0_s <= r1_s) assert(q0_s <= q1_s);
			if(r0_e <= r1_e) assert(q0_e <= q1_e);
			// assert(r0_s <= r1_s && r0_e <= r1_e && q0_s <= q1_s && q0_e <= q1_e);
			assert(q0_s>=0 && q0_e>=0 && q1_s>=0 && q1_e>=0);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpq $0x3, %rdx
jl 0x1b073e
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %rdx
leaq 0x38(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x1af158
leaq -0x1(%r12), %r15
leaq (%r15,%r15,4), %rax
leaq (%r14,%rax,8), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x8(%rsp), %r8
leaq 0x18(%rsp), %r9
movq %rbx, %rdi
callq 0x1af158
leaq 0x40(%r14), %rax
movl $0x2, %ecx
movq $-0x1, -0x4(%rax)
incq %rcx
addq $0x28, %rax
cmpq %rcx, %r12
jne 0x1b0666
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x1b0196
leaq 0x20(%rsp), %rbp
leaq 0x8(%rsp), %r12
leaq 0x18(%rsp), %r13
movq %r14, %rsi
addq $0x28, %r14
movq %rbx, %rdi
leaq 0x40(%rsp), %rdx
leaq 0x38(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x1af158
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x28(%rsp), %rdx
movq %rbp, %rcx
movq %r12, %r8
movq %r13, %r9
callq 0x1af158
movq 0x40(%rsp), %rax
cmpq 0x28(%rsp), %rax
jg 0x1b06f4
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jg 0x1b078b
movq 0x38(%rsp), %rax
cmpq 0x20(%rsp), %rax
setle %dl
movq 0x30(%rsp), %rcx
movq 0x18(%rsp), %rax
cmpq %rax, %rcx
setg %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x1b074d
cmpq $0x0, 0x10(%rsp)
js 0x1b076c
testq %rcx, %rcx
js 0x1b076c
cmpq $0x0, 0x8(%rsp)
js 0x1b076c
testq %rax, %rax
js 0x1b076c
decq %r15
jne 0x1b069c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x90810(%rip), %rdi     # 0x240f64
leaq 0x8f500(%rip), %rsi     # 0x23fc5b
leaq 0x907b4(%rip), %rcx     # 0x240f16
movl $0x1349, %edx           # imm = 0x1349
callq 0x2110
leaq 0x907fe(%rip), %rdi     # 0x240f71
leaq 0x8f4e1(%rip), %rsi     # 0x23fc5b
leaq 0x90795(%rip), %rcx     # 0x240f16
movl $0x134b, %edx           # imm = 0x134B
callq 0x2110
leaq 0x90777(%rip), %rdi     # 0x240f09
leaq 0x8f4c2(%rip), %rsi     # 0x23fc5b
leaq 0x90776(%rip), %rcx     # 0x240f16
movl $0x1348, %edx           # imm = 0x1348
callq 0x2110