// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_raw_u2rgfa_seq(all_ul_t*, R_to_U*, unsigned int)
void print_raw_u2rgfa_seq(all_ul_t *aln, R_to_U* rI, uint32_t is_detail)
{
	uint64_t id, a_n, k, z; uc_block_t *a = NULL; 
	kvec_t(uint8_t) ff; kv_init(ff);
	for (id = 0; id < aln->n; id++) {
		a = aln->a[id].bb.a; a_n = aln->a[id].bb.n;
		if(a_n == 0) continue;
		fprintf(stderr,"\n%.*s\tid::%lu\trlen::%u", (int32_t)aln->nid.a[id].n, aln->nid.a[id].a, id, aln->a[id].rlen);
		kv_resize(uint8_t, ff, a_n); memset(ff.a, 0, a_n*sizeof((*(ff.a))));
		if(is_detail) {
			fprintf(stderr, "\n");
			for (k = 0; k < a_n; k++) {
				if(ff.a[k]) continue;
				for (z = k; z != (uint32_t)-1; z = a[z].aidx) {
					fprintf(stderr, "%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tid::%u\ttl::%lu\tc::%u\n", 
					(int)Get_NAME_LENGTH(R_INF, a[z].hid), Get_NAME(R_INF, a[z].hid), "+-"[a[z].rev],
					a[z].qs, a[z].qe, a[z].ts, a[z].te, a[z].hid, Get_READ_LENGTH(R_INF, a[z].hid),
                    rI?is_contain_r((*rI), a[z].hid):0);
					assert(ff.a[z] == 0);
					ff.a[z] = 1;
				}
				fprintf(stderr, "************\n");
			}
		} else {
			fprintf(stderr, "\t");
			for (k = 0; k < a_n; k++) {
				if(ff.a[k]) continue;
				for (z = k; z != (uint32_t)-1; z = a[z].aidx) {
					fprintf(stderr, "%.*s\t", 
					(int)Get_NAME_LENGTH(R_INF, a[z].hid), Get_NAME(R_INF, a[z].hid));
					assert(ff.a[z] == 0);
					ff.a[z] = 1;
				}
				fprintf(stderr, "\n");
			}
		}
	}
	kv_destroy(ff);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, 0x14(%rsp)
cmpq $0x0, 0x50(%rdi)
je 0x1eee61
movq %rdi, %r14
xorl %r15d, %r15d
movq $0x0, 0x20(%rsp)
xorl %r12d, %r12d
movq %rsi, %rbx
movq %rsi, 0x38(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x48(%r14), %rax
imulq $0x58, %r15, %rcx
movq 0x20(%rax,%rcx), %r13
testq %r13, %r13
jne 0x1eec03
incq %r15
cmpq 0x50(%r14), %r15
jb 0x1eebe3
jmp 0x1eee64
leaq (%rax,%rcx), %rsi
movq 0x30(%rax,%rcx), %rax
movq %rax, 0x8(%rsp)
movq 0x9b3c8(%rip), %rax     # 0x289fe0
movq (%rax), %rdi
movq 0x10(%r14), %rax
movq %r15, %rcx
shlq $0x4, %rcx
movl 0x8(%rax,%rcx), %edx
movq (%rax,%rcx), %rcx
movl 0x18(%rsi), %r9d
leaq 0x4ae28(%rip), %rsi     # 0x239a61
movq %r15, %r8
xorl %eax, %eax
callq 0x22b0
cmpq %r13, 0x20(%rsp)
jae 0x1eec92
leaq -0x1(%r13), %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, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %r12, %rdi
movq %rsi, 0x20(%rsp)
callq 0x2370
movq %rax, %r12
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x20e0
cmpq $0x1, %r13
adcq $0x0, %r13
movq 0x9b332(%rip), %rax     # 0x289fe0
movq (%rax), %rsi
cmpl $0x0, 0x14(%rsp)
je 0x1eee09
movl $0xa, %edi
callq 0x2270
xorl %r14d, %r14d
movq %r12, 0x40(%rsp)
movq 0x8(%rsp), %r11
movq %r15, 0x30(%rsp)
movq %r13, 0x28(%rsp)
cmpb $0x0, (%r12,%r14)
je 0x1eecf1
incq %r14
cmpq %r13, %r14
jne 0x1eecdd
jmp 0x1eee57
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r14
movq %rbx, %rcx
je 0x1eeded
movq %r14, %r15
leaq (%r15,%r15,8), %rbp
movl (%r11,%rbp,4), %r10d
movzbl 0x20(%r11,%rbp,4), %eax
btl $0x5, %eax
leaq 0x374a5(%rip), %rax     # 0x2261c3
adcq $0x0, %rax
xorl %r12d, %r12d
testq %rcx, %rcx
je 0x1eed44
cmpq %r10, (%rcx)
jbe 0x1eed44
movq 0x8(%rcx), %rcx
movl (%rcx,%r10,4), %ecx
cmpl $-0x1, %ecx
je 0x1eed44
notl %ecx
shrl $0x1f, %ecx
movl %ecx, %r12d
leaq 0x9c4e5(%rip), %rsi     # 0x28b230
movq 0x18(%rsi), %rcx
movq %rcx, 0x50(%rsp)
movq 0x40(%rsi), %rcx
movl 0x4(%r11,%rbp,4), %r9d
leal 0x1(%r10), %edx
movl (%rcx,%rdx,8), %edx
movq (%rcx,%r10,8), %rcx
subl %ecx, %edx
addq 0x8(%rsi), %rcx
movq 0x9b26b(%rip), %rsi     # 0x289fe0
movq (%rsi), %rdi
movsbl (%rax), %r8d
movl 0x8(%r11,%rbp,4), %eax
movq %rax, 0x48(%rsp)
movl 0xc(%r11,%rbp,4), %r13d
movq %r11, %rbx
movl 0x10(%r11,%rbp,4), %r11d
leaq 0x4acde(%rip), %rsi     # 0x239a78
xorl %eax, %eax
pushq %r12
movq 0x58(%rsp), %r12
pushq (%r12,%r10,8)
pushq %r10
pushq %r11
pushq %r13
pushq 0x70(%rsp)
callq 0x22b0
addq $0x30, %rsp
movq 0x40(%rsp), %r12
cmpb $0x0, (%r12,%r15)
jne 0x1eee7a
leaq (%rbx,%rbp,4), %rax
movb $0x1, (%r12,%r15)
movl 0x1c(%rax), %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r15
movq 0x38(%rsp), %rcx
movq %rbx, %r11
jne 0x1eed05
movq %rcx, %rbx
callq 0x2f758
movq 0x8(%rsp), %r11
movq 0x30(%rsp), %r15
movq 0x28(%rsp), %r13
jmp 0x1eece4
movl $0x9, %edi
callq 0x2270
xorl %r14d, %r14d
cmpb $0x0, (%r12,%r14)
jne 0x1eee3b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r14
jne 0x1eee45
movq 0x9b1b2(%rip), %rax     # 0x289fe0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x2270
incq %r14
cmpq %r14, %r13
jne 0x1eee16
jmp 0x1eee57
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x2f774
jmp 0x1eee27
movq 0x18(%rsp), %r14
jmp 0x1eebf5
xorl %r12d, %r12d
movq %r12, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
leaq 0x4ac2d(%rip), %rdi     # 0x239aae
leaq 0x4a49d(%rip), %rsi     # 0x239325
leaq 0x4ac2c(%rip), %rcx     # 0x239abb
movl $0xbae, %edx            # imm = 0xBAE
callq 0x2110