// File: 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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movl %edx, -0x2c(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jae 0x320cdc
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x38(%rbp), %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x38(%rbp), %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x320751
jmp 0x320ccb
movq 0xa3888(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x38(%rbp), %r8
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x38(%rbp), %rsi
addq %rsi, %rax
movl 0x18(%rax), %r9d
leaq 0x7614f(%rip), %rsi     # 0x3968f5
movb $0x0, %al
callq 0x22a0
movq -0x68(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x32083f
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
shrq %rax
orq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
shrq $0x2, %rax
orq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
shrq $0x4, %rax
orq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
shrq $0x8, %rax
orq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
shrq $0x10, %rax
orq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
shlq $0x0, %rsi
callq 0x2360
movq %rax, -0x60(%rbp)
jmp 0x320841
movq -0x60(%rbp), %rdi
movq -0x40(%rbp), %rdx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x2100
cmpl $0x0, -0x2c(%rbp)
je 0x320b6f
movq 0xa377b(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
leaq 0x661b9(%rip), %rsi     # 0x386a28
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x320b6a
movq -0x60(%rbp), %rax
movq -0x48(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x32089f
jmp 0x320b59
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x50(%rbp)
je 0x320b41
movq 0xa3723(%rip), %rax     # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
leaq 0xa4a02(%rip), %rax     # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x58(%rbp), %rcx
imulq $0x24, -0x50(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
leaq 0xa49e0(%rip), %rcx     # 0x3c52d0
movq 0x40(%rcx), %rcx
movq -0x58(%rbp), %rdx
imulq $0x24, -0x50(%rbp), %rsi
addq %rsi, %rdx
movl (%rdx), %edx
subq (%rcx,%rdx,8), %rax
movl %eax, -0x9c(%rbp)
leaq 0xa49bd(%rip), %rax     # 0x3c52d0
movq 0x8(%rax), %rax
leaq 0xa49b2(%rip), %rcx     # 0x3c52d0
movq 0x40(%rcx), %rcx
movq -0x58(%rbp), %rdx
imulq $0x24, -0x50(%rbp), %rsi
addq %rsi, %rdx
movl (%rdx), %edx
addq (%rcx,%rdx,8), %rax
movq %rax, -0x98(%rbp)
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %ecx
leaq 0x62540(%rip), %rax     # 0x382e9b
movsbl (%rax,%rcx), %eax
movl %eax, -0x90(%rbp)
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x8c(%rbp)
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x88(%rbp)
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x84(%rbp)
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0x80(%rbp)
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
leaq 0xa4902(%rip), %rax     # 0x3c52d0
movq 0x18(%rax), %rax
movq -0x58(%rbp), %rcx
imulq $0x24, -0x50(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x320a77
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, %ecx
movq -0x28(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0xa9(%rbp)
jae 0x320a64
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rdx
addq %rdx, %rax
movl (%rax), %eax
movl %eax, %edx
xorl %eax, %eax
cmpl $-0x1, (%rcx,%rdx,4)
movb %al, -0xa9(%rbp)
je 0x320a64
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x58(%rbp), %rcx
imulq $0x24, -0x50(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xb0(%rbp)
jmp 0x320a81
xorl %eax, %eax
movl %eax, -0xb0(%rbp)
jmp 0x320a81
movq -0x78(%rbp), %r10
movl -0x7c(%rbp), %r11d
movl -0x80(%rbp), %ebx
movl -0x84(%rbp), %r14d
movl -0x88(%rbp), %r15d
movl -0x8c(%rbp), %r9d
movl -0x90(%rbp), %r8d
movq -0x98(%rbp), %rcx
movl -0x9c(%rbp), %edx
movq -0xa8(%rbp), %rdi
movl -0xb0(%rbp), %eax
leaq 0x75e43(%rip), %rsi     # 0x39690c
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x320afe
jmp 0x320b1d
leaq 0x75e3d(%rip), %rdi     # 0x396942
leaq 0x756ad(%rip), %rsi     # 0x3961b9
movl $0xbae, %edx            # imm = 0xBAE
leaq 0x75e37(%rip), %rcx     # 0x39694f
callq 0x2130
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movq %rax, -0x50(%rbp)
jmp 0x3208a7
movq 0xa3498(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
leaq 0x688bc(%rip), %rsi     # 0x38940e
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x32087e
jmp 0x320cc9
movq 0xa346a(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
leaq 0x77fac(%rip), %rsi     # 0x398b2c
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x320cc7
movq -0x60(%rbp), %rax
movq -0x48(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x320bb0
jmp 0x320cb6
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x50(%rbp)
je 0x320c9e
movq 0xa3412(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
leaq 0xa46f8(%rip), %rax     # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x58(%rbp), %rcx
imulq $0x24, -0x50(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
leaq 0xa46d6(%rip), %rcx     # 0x3c52d0
movq 0x40(%rcx), %rcx
movq -0x58(%rbp), %rdx
imulq $0x24, -0x50(%rbp), %rsi
addq %rsi, %rdx
movl (%rdx), %edx
subq (%rcx,%rdx,8), %rax
movl %eax, %edx
leaq 0xa46b7(%rip), %rax     # 0x3c52d0
movq 0x8(%rax), %rcx
leaq 0xa46ac(%rip), %rax     # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x58(%rbp), %rsi
imulq $0x24, -0x50(%rbp), %r8
addq %r8, %rsi
movl (%rsi), %esi
addq (%rax,%rsi,8), %rcx
leaq 0x6e689(%rip), %rsi     # 0x38f2ca
movb $0x0, %al
callq 0x22a0
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x320c5b
jmp 0x320c7a
leaq 0x75ce0(%rip), %rdi     # 0x396942
leaq 0x75550(%rip), %rsi     # 0x3961b9
movl $0xbba, %edx            # imm = 0xBBA
leaq 0x75cda(%rip), %rcx     # 0x39694f
callq 0x2130
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movq -0x58(%rbp), %rax
imulq $0x24, -0x50(%rbp), %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movq %rax, -0x50(%rbp)
jmp 0x320bb8
movq 0xa333b(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
leaq 0x65d79(%rip), %rsi     # 0x386a28
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x320b8f
jmp 0x320cc9
jmp 0x320ccb
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x320703
movq -0x60(%rbp), %rdi
callq 0x2210
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)