// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x1231e
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x54701(%rip), %rax     # 0x669d0
cmpq %rax, %rdi
je 0x12326
movl 0x54766(%rip), %eax     # 0x66a40
incl %eax
movl %eax, 0x5475e(%rip)     # 0x66a40
andl $0x3, %eax
shll $0x6, %eax
leaq 0x54761(%rip), %rbx     # 0x66a50
addq %rax, %rbx
movl 0x4(%r14), %ecx
leal -0x1(%rcx), %eax
cmpl $0x5, %eax
ja 0x12423
leaq 0x2f5e7(%rip), %rcx     # 0x418f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3031f(%rip), %rax     # 0x42638
jmp 0x124a2
leaq 0x302ae(%rip), %rax     # 0x425d3
retq
leaq 0x302b0(%rip), %rax     # 0x425dd
jmp 0x124a2
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x12453
movq 0xd0(%rax), %rcx
testq %rcx, %rcx
je 0x12470
movl 0x546a3(%rip), %eax     # 0x669f8
incl %eax
movl %eax, 0x5469b(%rip)     # 0x669f8
andl $0x3, %eax
shll $0x4, %eax
leaq 0x54696(%rip), %r14     # 0x66a00
addq %rax, %r14
movl 0x38(%rcx), %ecx
leaq 0x30257(%rip), %rdx     # 0x425ce
movl $0x10, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0xe100
leaq 0x3a140(%rip), %rdx     # 0x4c4cd
movl $0x40, %esi
movq %rbx, %rdi
movq %r14, %rcx
jmp 0x12490
movl (%r14), %ecx
leaq 0x3026e(%rip), %rdx     # 0x42615
jmp 0x123c7
movl (%r14), %ecx
leaq 0x30275(%rip), %rdx     # 0x42628
movl $0x40, %esi
movq %rbx, %rdi
jmp 0x12432
movl (%r14), %ecx
leaq 0x30269(%rip), %rdx     # 0x42630
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x1249f
movslq %eax, %r14
addq %rbx, %r14
callq 0x2e465
leaq 0x36306(%rip), %rsi     # 0x486fb
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe2c0
jmp 0x1249f
movq 0x18(%r14), %rcx
leaq -0x3e9(%rcx), %rax
cmpq $-0x7d2, %rax           # imm = 0xF82E
ja 0x1243b
leaq 0x301fa(%rip), %rdx     # 0x4261b
jmp 0x12442
leaq 0x30214(%rip), %rdx     # 0x4263e
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
jmp 0x1249f
leaq 0x301e0(%rip), %rdx     # 0x42622
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
jmp 0x1249f
movabsq $0x3e6c6f626d7973, %rax # imm = 0x3E6C6F626D7973
movq %rax, 0x5(%rbx)
movabsq $0x6d7973206461623c, %rax # imm = 0x6D7973206461623C
movq %rax, (%rbx)
jmp 0x12497
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x124a7
callq 0x2e465
leaq 0x3a048(%rip), %rdx     # 0x4c4cd
movl $0x40, %esi
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0xe100
movb $0x1, %bpl
testb %bpl, %bpl
je 0x124a2
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x559b6(%rip), %rcx     # 0x67e64
cmpl $0x0, (%rcx)
movq 0xb0(%rax), %r14
movl $0x0, %ecx
cmovneq %rax, %rcx
leaq 0x30127(%rip), %rdx     # 0x425ef
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
movb $0x1, %bpl
testq %r14, %r14
je 0x1249a
movzbl (%r14), %eax
cmpl $0x2, %eax
je 0x12509
cmpl $0x1, %eax
jne 0x1249a
movq 0x20(%r14), %rcx
leaq 0x30108(%rip), %rdx     # 0x42600
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
jmp 0x1249a
movq 0x28(%r14), %rdi
callq 0x2e4b3
xorl %ebp, %ebp
jmp 0x1249a