// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rdx
callq 0x18202e
leaq 0x6f581(%rip), %rsi     # 0x1f16b7
movq %r14, %rdi
callq 0x22d0
testq %rax, %rax
je 0x1823bf
movq %rax, %r15
movq %rax, %rdi
callq 0x181b19
movq %rax, %rdi
movq %rax, 0x48(%rbx)
xorl %r12d, %r12d
callq 0x1823fd
testl %eax, %eax
js 0x18218c
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 0xb7c0
incq %r12
movq 0x48(%rbx), %rdi
jmp 0x18215c
movq 0x48(%rbx), %rdi
callq 0x181f21
movq %r15, %rdi
callq 0x2390
movq %rbx, %rdi
callq 0x1820c7
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18202e
leaq 0x6f4fd(%rip), %rsi     # 0x1f16b7
movq %r14, %rdi
callq 0x22d0
testq %rax, %rax
je 0x1823de
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x181b19
movq %rax, %r13
movq %rax, 0x48(%rbx)
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r14d, %r14d
movq %r13, %rdi
callq 0x1823fd
movl %eax, %r12d
movq 0x48(%rbx), %rax
testl %r12d, %r12d
js 0x182201
movq 0x30(%rax), %rax
jmp 0x18220c
movq $0x1, 0x30(%rax)
pushq $0x1
popq %rax
cmpq %rax, %r14
jae 0x182256
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, %r14
shrq $0x10, %r14
orq %rax, %r14
incq %r14
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2370
movq %rax, %rbp
movl %r12d, %r13d
notl %r13d
shrl $0x1f, %r13d
movq 0x40(%rbx), %r8
movq (%r8), %rdi
addq $0x8, %r8
leaq 0x10(%rsp), %rsi
movq %rbp, %rdx
leaq 0x4(%rsp), %rcx
callq 0xb8e2
cmpl %eax, %r13d
jne 0x18231b
testl %r12d, %r12d
js 0x1822c7
cmpq 0x10(%rsp), %r15
jne 0x182362
movq 0x48(%rbx), %r13
movq 0x30(%r13), %rdx
movl 0x4(%rsp), %eax
cmpq %rax, %rdx
jne 0x182381
movq 0x40(%r13), %rdi
movq %rbp, %rsi
callq 0x21a0
testl %eax, %eax
jne 0x1823a0
incq %r15
jmp 0x1821e7
movq 0x48(%rbx), %rdi
callq 0x181f21
movq %rbp, %rdi
callq 0x2220
movq 0x8(%rsp), %rdi
callq 0x2390
movq %rbx, %rdi
callq 0x1820c7
movq 0xd0cef(%rip), %rax     # 0x252fe0
movq (%rax), %rdi
leaq 0x71e0e(%rip), %rsi     # 0x1f4109
leaq 0x71d89(%rip), %rdx     # 0x1f408b
movl %r15d, %ecx
xorl %eax, %eax
callq 0x22b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd0cbe(%rip), %rcx     # 0x252fe0
movq (%rcx), %rdi
leaq 0x71d38(%rip), %rsi     # 0x1f4064
leaq 0x71d58(%rip), %rdx     # 0x1f408b
movl %r15d, %ecx
movl %r13d, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x22b0
leaq 0x71d5f(%rip), %rdi     # 0x1f40a9
leaq 0x6f7d2(%rip), %rsi     # 0x1f1b23
leaq 0x71cd6(%rip), %rcx     # 0x1f402e
movl $0x33bb, %edx           # imm = 0x33BB
callq 0x2110
leaq 0x71d4d(%rip), %rdi     # 0x1f40b6
leaq 0x6f7b3(%rip), %rsi     # 0x1f1b23
leaq 0x71cb7(%rip), %rcx     # 0x1f402e
movl $0x33be, %edx           # imm = 0x33BE
callq 0x2110
leaq 0x71d43(%rip), %rdi     # 0x1f40cb
leaq 0x6f794(%rip), %rsi     # 0x1f1b23
leaq 0x71c98(%rip), %rcx     # 0x1f402e
movl $0x33bf, %edx           # imm = 0x33BF
callq 0x2110
leaq 0x71d3a(%rip), %rdi     # 0x1f40e1
leaq 0x6f775(%rip), %rsi     # 0x1f1b23
leaq 0x71c79(%rip), %rcx     # 0x1f402e
movl $0x33c0, %edx           # imm = 0x33C0
callq 0x2110
leaq 0x71c65(%rip), %rdi     # 0x1f402b
leaq 0x6f756(%rip), %rsi     # 0x1f1b23
leaq 0x71c5a(%rip), %rcx     # 0x1f402e
movl $0x33a2, %edx           # imm = 0x33A2
callq 0x2110
leaq 0x71c46(%rip), %rdi     # 0x1f402b
leaq 0x6f737(%rip), %rsi     # 0x1f1b23
leaq 0x71c3b(%rip), %rcx     # 0x1f402e
movl $0x33b1, %edx           # imm = 0x33B1
callq 0x2110