// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a74e6
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %rdx
leaq 0x38(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x18(%rsp), %r9
callq 0x1a5eda
leaq -0x1(%r12), %r15
leaq (%r15,%r15,4), %rax
leaq (%r14,%rax,8), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
callq 0x1a5eda
leaq 0x40(%r14), %rax
movl $0x2, %ecx
movq $-0x1, -0x4(%rax)
incq %rcx
addq $0x28, %rax
cmpq %rcx, %r12
jne 0x1a7417
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x1a6f5a
leaq 0x28(%rsp), %rbp
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r14, %rsi
addq $0x28, %r14
movq %rbx, %rdi
leaq 0x40(%rsp), %rdx
leaq 0x38(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x18(%rsp), %r9
callq 0x1a5eda
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x30(%rsp), %rdx
movq %rbp, %rcx
movq %r12, %r8
movq %r13, %r9
callq 0x1a5eda
movq 0x40(%rsp), %rax
cmpq 0x30(%rsp), %rax
jg 0x1a74a5
movq 0x20(%rsp), %rax
cmpq 0x10(%rsp), %rax
jg 0x1a7533
movq 0x38(%rsp), %rax
cmpq 0x28(%rsp), %rax
jg 0x1a74bd
movq 0x18(%rsp), %rax
cmpq 0x8(%rsp), %rax
jg 0x1a7514
cmpq $0x0, 0x20(%rsp)
js 0x1a74f5
cmpq $0x0, 0x18(%rsp)
js 0x1a74f5
cmpq $0x0, 0x10(%rsp)
js 0x1a74f5
cmpq $0x0, 0x8(%rsp)
js 0x1a74f5
decq %r15
jne 0x1a744d
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8d7a5(%rip), %rdi     # 0x234ca1
leaq 0x8c488(%rip), %rsi     # 0x23398b
leaq 0x8d73c(%rip), %rcx     # 0x234c46
movl $0x134b, %edx           # imm = 0x134B
callq 0x2110
leaq 0x8d779(%rip), %rdi     # 0x234c94
leaq 0x8c469(%rip), %rsi     # 0x23398b
leaq 0x8d71d(%rip), %rcx     # 0x234c46
movl $0x1349, %edx           # imm = 0x1349
callq 0x2110
leaq 0x8d6ff(%rip), %rdi     # 0x234c39
leaq 0x8c44a(%rip), %rsi     # 0x23398b
leaq 0x8d6fe(%rip), %rcx     # 0x234c46
movl $0x1348, %edx           # imm = 0x1348
callq 0x2110