// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: debug_sl_compress_base_disk_0(uldat_t*, char*)
void debug_sl_compress_base_disk_0(uldat_t *sl, char* gfa_name)
{
	int32_t ret, rid = 0, sr_0, sr_1; gzFile fp;
	init_ucr_file_t(sl, gfa_name, 1);
	fp = gzopen(gfa_name, "r"); assert(fp);
    sl->ks = kseq_init(fp);
	while ((ret = kseq_read(sl->ks)) >= 0) {
		write_compress_base_disk(sl->ucr_s->fp, rid, sl->ks->seq.s, sl->ks->seq.l, &(sl->ucr_s->u));
		rid++;   
	}
	kseq_destroy(sl->ks);
    gzclose(fp);

	destory_ucr_file_t(sl);


	uint64_t ulid; uint32_t ulen; kvec_t(char) des; kv_init(des);
	init_ucr_file_t(sl, gfa_name, 2); rid = 0;

	fp = gzopen(gfa_name, "r"); assert(fp);
    sl->ks = kseq_init(fp);
	while (1) {
		sr_0 = kseq_read(sl->ks); des.n = 0; 
		if(sr_0 >= 0) sr_0 = 1;
		else sr_0 = 0;
		if(sr_0 == 0) sl->ks->seq.l = 1;
		kv_resize(char, des, sl->ks->seq.l);
		sr_1 = load_compress_base_disk(sl->ucr_s->fp, &ulid, des.a, &ulen, &(sl->ucr_s->u));
		if(sr_0 != sr_1) fprintf(stderr, "[M::%s::] rid->%d, sr_0->%d, sr_1->%d\n", __func__, rid, sr_0, sr_1);
		assert(sr_0 == sr_1);
		if(sr_0 == 0 || sr_1 == 0) break;
		// if(rid != (int64_t)ulid) fprintf(stderr, "[M::%s::] rid->%d, ulid->%lu, sr_0->%d, sr_1->%d\n", __func__, rid, ulid, sr_0, sr_1);
		assert(rid == (int64_t)ulid);
		assert(sl->ks->seq.l == ulen);
		assert(memcmp(sl->ks->seq.s, des.a, ulen) == 0);
		rid++;   
	}
	kseq_destroy(sl->ks); kv_destroy(des);
    gzclose(fp);

	destory_ucr_file_t(sl);
	fprintf(stderr, "[M::%s::] ==> Have checked %d UL reads\n", __func__, rid);
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %edx
callq 0x1cdcb0
leaq 0x71a36(%rip), %rsi     # 0x23f7f7
movq %r14, %rdi
callq 0x22d0
testq %rax, %rax
je 0x1ce01b
movq %rax, %r15
movq %rax, %rdi
callq 0x1cd6b2
movq %rax, 0x48(%rbx)
movq %rax, %rdi
callq 0x1ce059
testl %eax, %eax
js 0x1cde1e
xorl %r12d, %r12d
movq 0x40(%rbx), %r8
movq 0x48(%rbx), %rax
movq (%r8), %rdi
movq 0x40(%rax), %rdx
movl 0x30(%rax), %ecx
addq $0x8, %r8
movq %r12, %rsi
callq 0x37ad6
incq %r12
movq 0x48(%rbx), %rdi
callq 0x1ce059
testl %eax, %eax
jns 0x1cddf0
movq 0x48(%rbx), %rdi
callq 0x1cdb7d
movq %r15, %rdi
callq 0x2390
movq %rbx, %rdi
callq 0x1cdd4d
movl $0x2, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1cdcb0
leaq 0x719a9(%rip), %rsi     # 0x23f7f7
movq %r14, %rdi
callq 0x22d0
testq %rax, %rax
je 0x1ce03a
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x1cd6b2
movq %rax, %r12
movq %rax, 0x48(%rbx)
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %r15d, %r15d
movq %r12, %rdi
callq 0x1ce059
movl %eax, %ebp
movq 0x48(%rbx), %rax
testl %ebp, %ebp
js 0x1cde94
movq 0x30(%rax), %rax
jmp 0x1cdea1
movq $0x1, 0x30(%rax)
movl $0x1, %eax
cmpq %rax, %r15
jae 0x1cdeeb
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, %r15
shrq $0x10, %r15
orq %rax, %r15
incq %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x2370
movq %rax, %r13
movl %ebp, %r12d
notl %r12d
shrl $0x1f, %r12d
movq 0x40(%rbx), %r8
movq (%r8), %rdi
addq $0x8, %r8
leaq 0x10(%rsp), %rsi
movq %r13, %rdx
leaq 0x4(%rsp), %rcx
callq 0x37bf9
cmpl %eax, %r12d
jne 0x1cdfb1
testl %ebp, %ebp
js 0x1cdf5d
cmpq 0x10(%rsp), %r14
jne 0x1cdfbe
movq 0x48(%rbx), %r12
movq 0x30(%r12), %rdx
movl 0x4(%rsp), %eax
cmpq %rax, %rdx
jne 0x1cdfdd
movq 0x40(%r12), %rdi
movq %r13, %rsi
callq 0x21a0
testl %eax, %eax
jne 0x1cdffc
incq %r14
jmp 0x1cde7c
movq 0x48(%rbx), %rdi
callq 0x1cdb7d
movq %r13, %rdi
callq 0x2220
movq 0x8(%rsp), %rdi
callq 0x2390
movq %rbx, %rdi
callq 0x1cdd4d
movq 0xc7059(%rip), %rax     # 0x294fe0
movq (%rax), %rdi
leaq 0x742b0(%rip), %rsi     # 0x242241
leaq 0x7422b(%rip), %rdx     # 0x2421c3
movl %r14d, %ecx
xorl %eax, %eax
callq 0x22b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl %r12d, %esi
movl %eax, %edx
callq 0x297bf
leaq 0x74229(%rip), %rdi     # 0x2421ee
leaq 0x71c8f(%rip), %rsi     # 0x23fc5b
leaq 0x74193(%rip), %rcx     # 0x242166
movl $0x33be, %edx           # imm = 0x33BE
callq 0x2110
leaq 0x7421f(%rip), %rdi     # 0x242203
leaq 0x71c70(%rip), %rsi     # 0x23fc5b
leaq 0x74174(%rip), %rcx     # 0x242166
movl $0x33bf, %edx           # imm = 0x33BF
callq 0x2110
leaq 0x74216(%rip), %rdi     # 0x242219
leaq 0x71c51(%rip), %rsi     # 0x23fc5b
leaq 0x74155(%rip), %rcx     # 0x242166
movl $0x33c0, %edx           # imm = 0x33C0
callq 0x2110
leaq 0x74141(%rip), %rdi     # 0x242163
leaq 0x71c32(%rip), %rsi     # 0x23fc5b
leaq 0x74136(%rip), %rcx     # 0x242166
movl $0x33a2, %edx           # imm = 0x33A2
callq 0x2110
leaq 0x74122(%rip), %rdi     # 0x242163
leaq 0x71c13(%rip), %rsi     # 0x23fc5b
leaq 0x74117(%rip), %rcx     # 0x242166
movl $0x33b1, %edx           # imm = 0x33B1
callq 0x2110