// File: /workspace/github_cpp_makefile_star2_O1/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 $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %edx
callq 0x1c3cb5
leaq 0x6f7e1(%rip), %rsi     # 0x2335a7
movq %r14, %rdi
callq 0x22d0
testq %rax, %rax
je 0x1c402e
movq %rax, %r15
movq %rax, %rdi
callq 0x1c370a
movq %rax, 0x48(%rbx)
movq %rax, %rdi
callq 0x1c406c
testl %eax, %eax
js 0x1c3e23
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 0x3851a
incq %r12
movq 0x48(%rbx), %rdi
callq 0x1c406c
testl %eax, %eax
jns 0x1c3df5
movq 0x48(%rbx), %rdi
callq 0x1c3b87
movq %r15, %rdi
callq 0x2390
movq %rbx, %rdi
callq 0x1c3d52
movl $0x2, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1c3cb5
leaq 0x6f754(%rip), %rsi     # 0x2335a7
movq %r14, %rdi
callq 0x22d0
testq %rax, %rax
je 0x1c404d
movq %rax, 0x18(%rsp)
movq %rax, %rdi
callq 0x1c370a
movq %rax, 0x48(%rbx)
movq $0x0, 0x8(%rsp)
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x48(%rbx), %rdi
callq 0x1c406c
movl %eax, %ebp
xorl %r13d, %r13d
testl %eax, %eax
setns %r14b
jns 0x1c3ea6
movq 0x48(%rbx), %rax
movq $0x1, 0x30(%rax)
movq 0x48(%rbx), %rax
movq 0x30(%rax), %rax
cmpq %rax, %r15
jae 0x1c3ef8
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 %r12, %rdi
movq %r15, %rsi
callq 0x2370
movq %rax, %r12
movb %r14b, %r13b
movq 0x40(%rbx), %r8
movq (%r8), %rdi
addq $0x8, %r8
leaq 0x20(%rsp), %rsi
movq %r12, %rdx
leaq 0x14(%rsp), %rcx
callq 0x38638
cmpl %eax, %r13d
jne 0x1c3fc2
testl %ebp, %ebp
js 0x1c3f6c
testl %eax, %eax
je 0x1c3f6c
movq 0x8(%rsp), %r14
cmpq 0x20(%rsp), %r14
jne 0x1c3fd1
movq 0x48(%rbx), %rax
movl 0x14(%rsp), %edx
cmpq %rdx, 0x30(%rax)
jne 0x1c400f
movq 0x40(%rax), %rdi
movq %r12, %rsi
callq 0x21a0
testl %eax, %eax
jne 0x1c3ff0
incq %r14
movq %r14, 0x8(%rsp)
jmp 0x1c3e84
movq 0x48(%rbx), %rdi
callq 0x1c3b87
movq %r12, %rdi
callq 0x2220
movq 0x18(%rsp), %rdi
callq 0x2390
movq %rbx, %rdi
callq 0x1c3d52
movq 0xc604a(%rip), %rax     # 0x289fe0
movq (%rax), %rdi
leaq 0x71fd1(%rip), %rsi     # 0x235f71
leaq 0x71f4c(%rip), %rdx     # 0x235ef3
movq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x22b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rdi
movl %r13d, %esi
movl %eax, %edx
callq 0x2a400
leaq 0x71f46(%rip), %rdi     # 0x235f1e
leaq 0x6f9ac(%rip), %rsi     # 0x23398b
leaq 0x71eb0(%rip), %rcx     # 0x235e96
movl $0x33be, %edx           # imm = 0x33BE
callq 0x2110
leaq 0x71f52(%rip), %rdi     # 0x235f49
leaq 0x6f98d(%rip), %rsi     # 0x23398b
leaq 0x71e91(%rip), %rcx     # 0x235e96
movl $0x33c0, %edx           # imm = 0x33C0
callq 0x2110
leaq 0x71f1d(%rip), %rdi     # 0x235f33
leaq 0x6f96e(%rip), %rsi     # 0x23398b
leaq 0x71e72(%rip), %rcx     # 0x235e96
movl $0x33bf, %edx           # imm = 0x33BF
callq 0x2110
leaq 0x71e5e(%rip), %rdi     # 0x235e93
leaq 0x6f94f(%rip), %rsi     # 0x23398b
leaq 0x71e53(%rip), %rcx     # 0x235e96
movl $0x33a2, %edx           # imm = 0x33A2
callq 0x2110
leaq 0x71e3f(%rip), %rdi     # 0x235e93
leaq 0x6f930(%rip), %rsi     # 0x23398b
leaq 0x71e34(%rip), %rcx     # 0x235e96
movl $0x33b1, %edx           # imm = 0x33B1
callq 0x2110