// File: /workspace/github_cpp_makefile_star2_O3/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 0x1fa185
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 0x1f9f2f
incq %r15
cmpq 0x50(%r14), %r15
jb 0x1f9f0f
jmp 0x1fa188
leaq (%rax,%rcx), %rsi
movq 0x30(%rax,%rcx), %rax
movq %rax, 0x8(%rsp)
movq 0x9b09c(%rip), %rax     # 0x294fe0
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 0x4bde0(%rip), %rsi     # 0x245d45
movq %r15, %r8
xorl %eax, %eax
callq 0x22b0
cmpq %r13, 0x20(%rsp)
jae 0x1f9fbe
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
movq 0x9b00e(%rip), %rax     # 0x294fe0
movq (%rax), %rsi
cmpl $0x0, 0x14(%rsp)
je 0x1fa12d
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 0x1fa015
incq %r14
cmpq %r13, %r14
jne 0x1fa001
jmp 0x1fa17b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r14
movq %rbx, %rcx
je 0x1fa111
movq %r14, %r15
leaq (%r15,%r15,8), %rbp
movl (%r11,%rbp,4), %r10d
movzbl 0x20(%r11,%rbp,4), %eax
btl $0x5, %eax
leaq 0x38291(%rip), %rax     # 0x2322d3
adcq $0x0, %rax
xorl %r12d, %r12d
testq %rcx, %rcx
je 0x1fa068
cmpq %r10, (%rcx)
jbe 0x1fa068
movq 0x8(%rcx), %rcx
movl (%rcx,%r10,4), %ecx
cmpl $-0x1, %ecx
je 0x1fa068
notl %ecx
shrl $0x1f, %ecx
movl %ecx, %r12d
leaq 0x9c1c1(%rip), %rsi     # 0x296230
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 0x9af47(%rip), %rsi     # 0x294fe0
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 0x4bc9e(%rip), %rsi     # 0x245d5c
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 0x1fa19e
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 0x1fa029
movq %rcx, %rbx
callq 0x2eab2
movq 0x8(%rsp), %r11
movq 0x30(%rsp), %r15
movq 0x28(%rsp), %r13
jmp 0x1fa008
movl $0x9, %edi
callq 0x2270
xorl %r14d, %r14d
cmpb $0x0, (%r12,%r14)
jne 0x1fa15f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r14
jne 0x1fa169
movq 0x9ae8e(%rip), %rax     # 0x294fe0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x2270
incq %r14
cmpq %r14, %r13
jne 0x1fa13a
jmp 0x1fa17b
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x2eace
jmp 0x1fa14b
movq 0x18(%rsp), %r14
jmp 0x1f9f21
xorl %r12d, %r12d
movq %r12, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
leaq 0x4bbed(%rip), %rdi     # 0x245d92
leaq 0x4b45d(%rip), %rsi     # 0x245609
leaq 0x4bbec(%rip), %rcx     # 0x245d9f
movl $0xbae, %edx            # imm = 0xBAE
callq 0x2110