// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/linearize.c
// Function: show_bb
void show_bb(struct basic_block *bb)
{
	struct instruction *insn;

	printf("%s:\n", show_label(bb));
	if (verbose) {
		pseudo_t needs, defines;
		printf("%s:%d\n", stream_name(bb->pos.stream), bb->pos.line);

		FOR_EACH_PTR(bb->needs, needs) {
			struct instruction *def = needs->def;
			if (def->opcode != OP_PHI) {
				printf("  **uses %s (from %s)**\n", show_pseudo(needs), show_label(def->bb));
			} else {
				pseudo_t phi;
				const char *sep = " ";
				printf("  **uses %s (from", show_pseudo(needs));
				FOR_EACH_PTR(def->phi_list, phi) {
					if (phi == VOID)
						continue;
					printf("%s(%s:%s)", sep, show_pseudo(phi), show_label(phi->def->bb));
					sep = ", ";
				} END_FOR_EACH_PTR(phi);		
				printf(")**\n");
			}
		} END_FOR_EACH_PTR(needs);

		FOR_EACH_PTR(bb->defines, defines) {
			printf("  **defines %s **\n", show_pseudo(defines));
		} END_FOR_EACH_PTR(defines);

		if (bb->parents) {
			struct basic_block *from;
			FOR_EACH_PTR(bb->parents, from) {
				printf("  **from %s (%s:%d:%d)**\n", show_label(from),
					stream_name(from->pos.stream), from->pos.line, from->pos.pos);
			} END_FOR_EACH_PTR(from);
		}

		if (bb->children) {
			struct basic_block *to;
			FOR_EACH_PTR(bb->children, to) {
				printf("  **to %s (%s:%d:%d)**\n", show_label(to),
					stream_name(to->pos.stream), to->pos.line, to->pos.pos);
			} END_FOR_EACH_PTR(to);
		}
	}

	FOR_EACH_PTR(bb->insns, insn) {
		if (!insn->bb && verbose < 2)
			continue;
		printf("\t%s\n", show_instruction(insn));
	} END_FOR_EACH_PTR(insn);
	if (!bb_terminated(bb))
		printf("\tEND\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, (%rsp)
callq 0x11a05
leaq 0x2707d(%rip), %rdi     # 0x39577
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
leaq 0x4e959(%rip), %rax     # 0x60e64
cmpl $0x0, (%rax)
je 0x127f6
movq (%rsp), %rbx
movl (%rbx), %edi
shrl $0x6, %edi
andl $0x3fff, %edi           # imm = 0x3FFF
callq 0x292d8
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl 0x4(%rbx), %edx
leaq 0x28268(%rip), %rdi     # 0x3a79f
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
movq 0x48(%rbx), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x12698
leaq 0x4d476(%rip), %r15     # 0x5f9d0
movq 0x8(%rsp), %r12
xorl %r13d, %r13d
movq %r12, 0x18(%rsp)
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %r13
jge 0x12688
movq 0x18(%r12,%r13,8), %rdi
cmpw $0x100, %ax             # imm = 0x100
jb 0x1258c
testq %rdi, %rdi
je 0x12680
movq 0x18(%rdi), %rbx
movl (%rbx), %r14d
andl $0x7f, %r14d
callq 0x11a4e
movq %rax, %rbp
cmpl $0x46, %r14d
jne 0x12663
movq %r13, 0x20(%rsp)
leaq 0x2820a(%rip), %rdi     # 0x3a7bf
movq %rbp, %rsi
xorl %eax, %eax
callq 0xe0f0
movq 0x38(%rbx), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x1264b
movq 0x10(%rsp), %r12
leaq 0x28117(%rip), %rbp     # 0x3a6f0
xorl %r13d, %r13d
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %r13
jge 0x1263f
movq 0x18(%r12,%r13,8), %rbx
cmpw $0x100, %ax             # imm = 0x100
setae %al
testq %rbx, %rbx
sete %cl
testb %cl, %al
jne 0x1263a
cmpq %r15, %rbx
je 0x1263a
movq %rbx, %rdi
callq 0x11a4e
movq %rax, %r14
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x11a05
leaq 0x281ae(%rip), %rdi     # 0x3a7d1
movq %rbp, %rsi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe0f0
leaq 0x281a1(%rip), %rbp     # 0x3a7db
incq %r13
jmp 0x125dc
movq 0x10(%r12), %r12
cmpq 0x10(%rsp), %r12
jne 0x125d9
leaq 0x28609(%rip), %rdi     # 0x3ac5b
callq 0xe0a0
movq 0x18(%rsp), %r12
movq 0x20(%rsp), %r13
jmp 0x12680
movq 0x8(%rbx), %rdi
callq 0x11a05
leaq 0x28133(%rip), %rdi     # 0x3a7a6
movq %rbp, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe0f0
incq %r13
jmp 0x12567
movq 0x10(%r12), %r12
cmpq 0x8(%rsp), %r12
jne 0x1255f
movq (%rsp), %rax
movq 0x50(%rax), %rbx
testq %rbx, %rbx
je 0x126ee
leaq 0x28132(%rip), %r14     # 0x3a7de
movq %rbx, %r15
xorl %r12d, %r12d
movl (%r15), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jge 0x126e5
movq 0x18(%r15,%r12,8), %rdi
cmpw $0x100, %ax             # imm = 0x100
jb 0x126ce
testq %rdi, %rdi
je 0x126e0
callq 0x11a4e
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
incq %r12
jmp 0x126b2
movq 0x10(%r15), %r15
cmpq %rbx, %r15
jne 0x126af
movq (%rsp), %rax
movq 0x18(%rax), %r12
testq %r12, %r12
je 0x12772
leaq 0x280ef(%rip), %r14     # 0x3a7f1
movq %r12, %r13
xorl %ebp, %ebp
movl (%r13), %eax
movsbq %al, %rcx
cmpq %rcx, %rbp
jge 0x12769
movq 0x18(%r13,%rbp,8), %r15
cmpw $0x100, %ax             # imm = 0x100
jb 0x12724
testq %r15, %r15
je 0x12764
movq %r15, %rdi
callq 0x11a05
movq %rax, %rbx
movl (%r15), %edi
shrl $0x6, %edi
andl $0x3fff, %edi           # imm = 0x3FFF
callq 0x292d8
movq (%r15), %r8
movq %r8, %rcx
shrq $0x20, %rcx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
shrl $0x16, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe0f0
incq %rbp
jmp 0x12707
movq 0x10(%r13), %r13
cmpq %r12, %r13
jne 0x12705
movq (%rsp), %rax
movq 0x20(%rax), %r12
testq %r12, %r12
je 0x127f6
leaq 0x28085(%rip), %r14     # 0x3a80b
movq %r12, %r13
xorl %ebp, %ebp
movl (%r13), %eax
movsbq %al, %rcx
cmpq %rcx, %rbp
jge 0x127ed
movq 0x18(%r13,%rbp,8), %r15
cmpw $0x100, %ax             # imm = 0x100
jb 0x127a8
testq %r15, %r15
je 0x127e8
movq %r15, %rdi
callq 0x11a05
movq %rax, %rbx
movl (%r15), %edi
shrl $0x6, %edi
andl $0x3fff, %edi           # imm = 0x3FFF
callq 0x292d8
movq (%r15), %r8
movq %r8, %rcx
shrq $0x20, %rcx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
shrl $0x16, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe0f0
incq %rbp
jmp 0x1278b
movq 0x10(%r13), %r13
cmpq %r12, %r13
jne 0x12789
movq (%rsp), %rax
movq 0x28(%rax), %rbx
testq %rbx, %rbx
je 0x12868
leaq 0x2d39c(%rip), %r14     # 0x3fba6
leaq 0x4d33f(%rip), %r15     # 0x5fb50
movq %rbx, %r12
xorl %r13d, %r13d
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %r13
jge 0x1285e
movq 0x18(%r12,%r13,8), %rdi
cmpw $0x100, %ax             # imm = 0x100
jb 0x12834
testq %rdi, %rdi
je 0x12859
cmpq $0x0, 0x8(%rdi)
jne 0x12847
leaq 0x4e622(%rip), %rax     # 0x60e64
cmpl $0x2, (%rax)
jl 0x12859
callq 0x11c44
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xe0f0
incq %r13
jmp 0x12817
movq 0x10(%r12), %r12
cmpq %rbx, %r12
jne 0x12814
movq (%rsp), %rdi
callq 0x1289e
testl %eax, %eax
je 0x12884
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x283cb(%rip), %rdi     # 0x3ac56
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe0a0