// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/show-parse.c
// Function: do_show_type
static void do_show_type(struct symbol *sym, struct type_name *name)
{
	const char *typename;
	unsigned long mod = 0;
	struct ident *as = NULL;
	int was_ptr = 0;
	int restr = 0;
	int fouled = 0;

deeper:
	if (sym && (sym->type != SYM_NODE && sym->type != SYM_ARRAY &&
		     sym->type != SYM_BITFIELD)) {
		const char *s;
		size_t len;

		if (as)
			prepend(name, "%s ", show_as(as));

		if (sym && (sym->type == SYM_BASETYPE || sym->type == SYM_ENUM))
			mod &= ~MOD_SPECIFIER;
		s = modifier_string(mod);
		len = strlen(s);
		name->start -= len;
		memcpy(name->start, s, len);
		mod = 0;
		as = NULL;
	}

	if (!sym)
		goto out;

	if ((typename = builtin_typename(sym))) {
		int len = strlen(typename);
		if (name->start != name->end)
			*--name->start = ' ';
		name->start -= len;
		memcpy(name->start, typename, len);
		goto out;
	}

	/* Prepend */
	switch (sym->type) {
	case SYM_PTR:
		prepend(name, "*");
		mod = sym->ctype.modifiers;
		as = sym->ctype.as;
		was_ptr = 1;
		examine_pointer_target(sym);
		break;

	case SYM_FN:
		if (was_ptr) {
			prepend(name, "( ");
			append(name, " )");
			was_ptr = 0;
		}
		append(name, "( ... )");
		break;

	case SYM_STRUCT:
		if (name->start != name->end)
			*--name->start = ' ';
		prepend(name, "struct %s", show_ident(sym->ident));
		goto out;

	case SYM_UNION:
		if (name->start != name->end)
			*--name->start = ' ';
		prepend(name, "union %s", show_ident(sym->ident));
		goto out;

	case SYM_ENUM:
		prepend(name, "enum %s ", show_ident(sym->ident));
		break;

	case SYM_NODE:
		if (sym->ident)
			append(name, "%s", show_ident(sym->ident));
		mod |= sym->ctype.modifiers;
		combine_address_space(sym->pos, &as, sym->ctype.as);
		break;

	case SYM_BITFIELD:
		mod |= sym->ctype.modifiers;
		combine_address_space(sym->pos, &as, sym->ctype.as);
		append(name, ":%d", sym->bit_size);
		break;

	case SYM_LABEL:
		append(name, "label(%s:%p)", show_ident(sym->ident), sym);
		return;

	case SYM_ARRAY:
		mod |= sym->ctype.modifiers;
		combine_address_space(sym->pos, &as, sym->ctype.as);
		if (was_ptr) {
			prepend(name, "( ");
			append(name, " )");
			was_ptr = 0;
		}
		append(name, "[%lld]", get_expression_value(sym->array_size));
		break;

	case SYM_RESTRICT:
		if (!sym->ident) {
			restr = 1;
			break;
		}
		if (name->start != name->end)
			*--name->start = ' ';
		prepend(name, "restricted %s", show_ident(sym->ident));
		goto out;

	case SYM_FOULED:
		fouled = 1;
		break;

	default:
		if (name->start != name->end)
			*--name->start = ' ';
		prepend(name, "unknown type %d", sym->type);
		goto out;
	}

	sym = sym->ctype.base_type;
	goto deeper;

out:
	if (restr)
		prepend(name, "restricted ");
	if (fouled)
		prepend(name, "fouled ");

	// strip trailing space
	if (name->end > name->start && name->end[-1] == ' ')
		name->end--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x32e75
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x3, %eax
je 0x32e75
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x6, %eax
je 0x32e75
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0xb, %eax
je 0x32e75
cmpq $0x0, -0x28(%rbp)
je 0x32dec
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x32b40
movq -0x58(%rbp), %rdi
movq %rax, %rdx
leaq 0x35639(%rip), %rsi     # 0x6841e
movb $0x0, %al
callq 0x34a90
cmpq $0x0, -0x8(%rbp)
je 0x32e21
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x2, %eax
je 0x32e13
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x9, %eax
jne 0x32e21
movq -0x20(%rbp), %rax
andq $-0xe001, %rax          # imm = 0xFFFF1FFF
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x32730
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x110c0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
xorl %edx, %edx
subq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x111d0
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x32e81
jmp 0x332d1
movq -0x8(%rbp), %rdi
callq 0x32b80
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x32ef7
movq -0x18(%rbp), %rdi
callq 0x110c0
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x32ec6
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
movb $0x20, -0x1(%rax)
movl -0x4c(%rbp), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rsi
xorl %edx, %edx
subq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movslq -0x4c(%rbp), %rdx
callq 0x111d0
jmp 0x332d1
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
addl $-0x3, %eax
movl %eax, %ecx
movq %rcx, -0x60(%rbp)
subl $0xb, %eax
ja 0x3327a
movq -0x60(%rbp), %rax
leaq 0x34fd5(%rip), %rcx     # 0x67ef0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
leaq 0x308c7(%rip), %rsi     # 0x637f6
movb $0x0, %al
callq 0x34a90
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x1, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x40260
jmp 0x332c0
cmpl $0x0, -0x2c(%rbp)
je 0x32f97
movq -0x10(%rbp), %rdi
leaq 0x35484(%rip), %rsi     # 0x683fb
movb $0x0, %al
callq 0x34a90
movq -0x10(%rbp), %rdi
leaq 0x3547a(%rip), %rsi     # 0x68403
movb $0x0, %al
callq 0x34b60
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x3545c(%rip), %rsi     # 0x683fe
movb $0x0, %al
callq 0x34b60
jmp 0x332c0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x32fd4
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
movb $0x20, -0x1(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x44150
movq -0x68(%rbp), %rdi
movq %rax, %rdx
leaq 0x3540f(%rip), %rsi     # 0x68406
movb $0x0, %al
callq 0x34a90
jmp 0x332d1
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x33029
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
movb $0x20, -0x1(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x44150
movq -0x70(%rbp), %rdi
movq %rax, %rdx
leaq 0x353c4(%rip), %rsi     # 0x68410
movb $0x0, %al
callq 0x34a90
jmp 0x332d1
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x44150
movq -0x78(%rbp), %rdi
movq %rax, %rdx
leaq 0x3539e(%rip), %rsi     # 0x68419
movb $0x0, %al
callq 0x34a90
jmp 0x332c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x330bc
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x44150
movq -0x80(%rbp), %rdi
movq %rax, %rdx
leaq 0x3a0e0(%rip), %rsi     # 0x6d195
movb $0x0, %al
callq 0x34b60
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x80(%rcx), %rdx
movq 0x4(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x34c30
jmp 0x332c0
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x80(%rcx), %rdx
movq 0x4(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x34c30
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x50(%rax), %edx
leaq 0x30431(%rip), %rsi     # 0x6355c
movb $0x0, %al
callq 0x34b60
jmp 0x332c0
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x44150
movq -0x88(%rbp), %rdi
movq %rax, %rdx
movq -0x8(%rbp), %rcx
leaq 0x352be(%rip), %rsi     # 0x68422
movb $0x0, %al
callq 0x34b60
jmp 0x33333
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x80(%rcx), %rdx
movq 0x4(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x34c30
cmpl $0x0, -0x2c(%rbp)
je 0x331cd
movq -0x10(%rbp), %rdi
leaq 0x3524e(%rip), %rsi     # 0x683fb
movb $0x0, %al
callq 0x34a90
movq -0x10(%rbp), %rdi
leaq 0x35244(%rip), %rsi     # 0x68403
movb $0x0, %al
callq 0x34b60
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x11ff0
movq -0x90(%rbp), %rdi
movq %rax, %rdx
leaq 0x35239(%rip), %rsi     # 0x6842f
movb $0x0, %al
callq 0x34b60
jmp 0x332c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x33219
movl $0x1, -0x30(%rbp)
jmp 0x332c0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x3323f
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
movb $0x20, -0x1(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x44150
movq -0x98(%rbp), %rdi
movq %rax, %rdx
leaq 0x351ce(%rip), %rsi     # 0x68436
movb $0x0, %al
callq 0x34a90
jmp 0x332d1
movl $0x1, -0x34(%rbp)
jmp 0x332c0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x332a0
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
movb $0x20, -0x1(%rax)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %edx
andl $0xff, %edx
leaq 0x3518d(%rip), %rsi     # 0x68444
movb $0x0, %al
callq 0x34a90
jmp 0x332d1
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x32d78
cmpl $0x0, -0x30(%rbp)
je 0x332e9
movq -0x10(%rbp), %rdi
leaq 0x35172(%rip), %rsi     # 0x68454
movb $0x0, %al
callq 0x34a90
cmpl $0x0, -0x34(%rbp)
je 0x33301
movq -0x10(%rbp), %rdi
leaq 0x35166(%rip), %rsi     # 0x68460
movb $0x0, %al
callq 0x34a90
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x33333
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl -0x1(%rax), %eax
cmpl $0x20, %eax
jne 0x33333
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)