// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/linearize.c
// Function: show_pseudo
const char *show_pseudo(pseudo_t pseudo)
{
	static int n;
	static char buffer[4][64];
	char *buf;
	int i;

	if (!pseudo)
		return "no pseudo";
	if (pseudo == VOID)
		return "VOID";
	buf = buffer[3 & ++n];
	switch(pseudo->type) {
	case PSEUDO_SYM: {
		struct symbol *sym = pseudo->sym;
		struct expression *expr;

		if (!sym) {
			snprintf(buf, 64, "<bad symbol>");
			break;
		}
		if (sym->bb_target) {
			snprintf(buf, 64, "%s", show_label(sym->bb_target));
			break;
		}
		if (sym->ident) {
			snprintf(buf, 64, "%s", show_ident(sym->ident));
			break;
		}
		expr = sym->initializer;
		snprintf(buf, 64, "<anon symbol:%p>", verbose ? sym : NULL);
		if (expr) {
			switch (expr->type) {
			case EXPR_VALUE:
				snprintf(buf, 64, "<symbol value: %lld>", expr->value);
				break;
			case EXPR_STRING:
				return show_string(expr->string);
			default:
				break;
			}
		}
		break;
	}
	case PSEUDO_REG:
		i = snprintf(buf, 64, "%%r%d", pseudo->nr);
		if (pseudo->ident)
			sprintf(buf+i, "(%s)", show_ident(pseudo->ident));
		break;
	case PSEUDO_VAL: {
		long long value = pseudo->value;
		if (value > 1000 || value < -1000)
			snprintf(buf, 64, "$%#llx", value);
		else
			snprintf(buf, 64, "$%lld", value);
		break;
	}
	case PSEUDO_ARG:
		snprintf(buf, 64, "%%arg%d", pseudo->nr);
		break;
	case PSEUDO_PHI:
		i = snprintf(buf, 64, "%%phi%d", pseudo->nr);
		if (pseudo->ident)
			sprintf(buf+i, "(%s)", show_ident(pseudo->ident));
		break;
	case PSEUDO_UNDEF:
		return "UNDEF";
	default:
		snprintf(buf, 64, "<bad pseudo type %d>", pseudo->type);
	}
	return buf;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x11ab0
movq %rdi, %r14
leaq 0x4df6f(%rip), %rax     # 0x5f9d0
cmpq %rax, %rdi
je 0x11abc
movl 0x4dfd4(%rip), %eax     # 0x5fa40
incl %eax
movl %eax, 0x4dfcc(%rip)     # 0x5fa40
andl $0x3, %eax
shll $0x6, %eax
leaq 0x4dfcf(%rip), %rbx     # 0x5fa50
addq %rax, %rbx
movl 0x4(%r14), %ecx
leal -0x1(%rcx), %eax
cmpl $0x5, %eax
ja 0x11b71
leaq 0x27e55(%rip), %rcx     # 0x398f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x28bbd(%rip), %rbx     # 0x3a668
jmp 0x11bd8
leaq 0x28b4c(%rip), %rbx     # 0x3a603
jmp 0x11bd8
leaq 0x28b4a(%rip), %rbx     # 0x3a60d
jmp 0x11bd8
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x11b96
movq 0xd0(%rax), %rdi
testq %rdi, %rdi
je 0x11bb3
callq 0x11a05
jmp 0x11bc1
movl (%r14), %ecx
leaq 0x28b4c(%rip), %rdx     # 0x3a645
jmp 0x11b17
movl (%r14), %ecx
leaq 0x28b53(%rip), %rdx     # 0x3a658
pushq $0x40
popq %rsi
movq %rbx, %rdi
jmp 0x11b7e
movl (%r14), %ecx
leaq 0x28b49(%rip), %rdx     # 0x3a660
pushq $0x40
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x11bd8
movslq %eax, %r14
addq %rbx, %r14
callq 0x2936d
leaq 0x2ed08(%rip), %rsi     # 0x4084b
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe2d0
jmp 0x11bd8
movq 0x18(%r14), %rcx
leaq -0x3e9(%rcx), %rax
cmpq $-0x7d2, %rax           # imm = 0xF82E
ja 0x11b87
leaq 0x28adc(%rip), %rdx     # 0x3a64b
jmp 0x11b8e
leaq 0x28af6(%rip), %rdx     # 0x3a66e
pushq $0x40
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
jmp 0x11bd8
leaq 0x28ac4(%rip), %rdx     # 0x3a652
pushq $0x40
popq %rsi
movq %rbx, %rdi
jmp 0x11bd1
movabsq $0x3e6c6f626d7973, %rax # imm = 0x3E6C6F626D7973
movq %rax, 0x5(%rbx)
movabsq $0x6d7973206461623c, %rax # imm = 0x6D7973206461623C
movq %rax, (%rbx)
jmp 0x11bd8
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x11be3
callq 0x2936d
leaq 0x32ac5(%rip), %rdx     # 0x4468d
pushq $0x40
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0xe100
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4f27a(%rip), %rcx     # 0x60e64
cmpl $0x0, (%rcx)
movq 0xb0(%rax), %r14
movl $0x0, %ecx
cmovneq %rax, %rcx
leaq 0x28a1b(%rip), %rdx     # 0x3a61f
pushq $0x40
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
testq %r14, %r14
je 0x11bd8
movzbl (%r14), %eax
cmpl $0x2, %eax
je 0x11c34
cmpl $0x1, %eax
jne 0x11bd8
movq 0x20(%r14), %rcx
leaq 0x28a01(%rip), %rdx     # 0x3a630
jmp 0x11b8e
movq 0x28(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x293bb