// File: /workspace/github_c_makefile_star2_O3/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 0x12362
movq %rdi, %r14
leaq 0x536bd(%rip), %rax     # 0x659d0
cmpq %rax, %rdi
je 0x1236e
movl 0x53722(%rip), %eax     # 0x65a40
incl %eax
movl %eax, 0x5371a(%rip)     # 0x65a40
andl $0x3, %eax
shll $0x6, %eax
leaq 0x5371d(%rip), %rbx     # 0x65a50
addq %rax, %rbx
movl 0x4(%r14), %ecx
leal -0x1(%rcx), %eax
cmpl $0x5, %eax
ja 0x12464
leaq 0x2e5a3(%rip), %rcx     # 0x408f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2f2ab(%rip), %rbx     # 0x41608
jmp 0x12492
leaq 0x2f23a(%rip), %rbx     # 0x415a3
jmp 0x12492
leaq 0x2f238(%rip), %rbx     # 0x415ad
jmp 0x12492
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x1249d
movq 0xd0(%rax), %rcx
testq %rcx, %rcx
je 0x124ba
movl 0x5365b(%rip), %eax     # 0x659f8
incl %eax
movl %eax, 0x53653(%rip)     # 0x659f8
andl $0x3, %eax
shll $0x4, %eax
leaq 0x5364e(%rip), %r14     # 0x65a00
addq %rax, %r14
movl 0x38(%rcx), %ecx
leaq 0x2f1df(%rip), %rdx     # 0x4159e
movl $0x10, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0xe100
leaq 0x39068(%rip), %rdx     # 0x4b43d
movl $0x40, %esi
movq %rbx, %rdi
movq %r14, %rcx
jmp 0x1248b
movl (%r14), %ecx
leaq 0x2f1f6(%rip), %rdx     # 0x415e5
jmp 0x1240f
movl (%r14), %ecx
leaq 0x2f1fd(%rip), %rdx     # 0x415f8
movl $0x40, %esi
movq %rbx, %rdi
jmp 0x12473
movl (%r14), %ecx
leaq 0x2f1f1(%rip), %rdx     # 0x41600
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x12492
movslq %eax, %r14
addq %rbx, %r14
callq 0x2de35
leaq 0x35242(%rip), %rsi     # 0x4767b
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe2c0
jmp 0x12492
movq 0x18(%r14), %rcx
leaq -0x3e9(%rcx), %rax
cmpq $-0x7d2, %rax           # imm = 0xF82E
ja 0x1247c
leaq 0x2f189(%rip), %rdx     # 0x415eb
jmp 0x12483
leaq 0x2f1a3(%rip), %rdx     # 0x4160e
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
jmp 0x12492
leaq 0x2f16f(%rip), %rdx     # 0x415f2
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movabsq $0x3e6c6f626d7973, %rax # imm = 0x3E6C6F626D7973
movq %rax, 0x5(%rbx)
movabsq $0x6d7973206461623c, %rax # imm = 0x6D7973206461623C
movq %rax, (%rbx)
jmp 0x12492
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x124dc
callq 0x2de35
leaq 0x38f6e(%rip), %rdx     # 0x4b43d
movl $0x40, %esi
movq %rbx, %rdi
movq %rax, %rcx
jmp 0x1248b
leaq 0x54981(%rip), %rcx     # 0x66e64
cmpl $0x0, (%rcx)
movq 0xb0(%rax), %r14
movl $0x0, %ecx
cmovneq %rax, %rcx
leaq 0x2f0c2(%rip), %rdx     # 0x415bf
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe100
testq %r14, %r14
je 0x12492
movzbl (%r14), %eax
cmpl $0x2, %eax
je 0x12533
cmpl $0x1, %eax
jne 0x12492
movq 0x20(%r14), %rcx
leaq 0x2f0a2(%rip), %rdx     # 0x415d0
jmp 0x12483
movq 0x28(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2de83