// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/show-parse.c
// Function: show_expression
int show_expression(struct expression *expr)
{
	if (!expr)
		return 0;

	if (!expr->ctype) {
		struct position *pos = &expr->pos;
		printf("\tno type at %s:%d:%d\n",
			stream_name(pos->stream),
			pos->line, pos->pos);
		return 0;
	}
		
	switch (expr->type) {
	case EXPR_CALL:
		return show_call_expression(expr);
		
	case EXPR_ASSIGNMENT:
		return show_assignment(expr);

	case EXPR_COMMA:
		return show_comma(expr);
	case EXPR_BINOP:
	case EXPR_COMPARE:
	case EXPR_LOGICAL:
		return show_binop(expr);
	case EXPR_PREOP:
		return show_preop(expr);
	case EXPR_POSTOP:
		return show_postop(expr);
	case EXPR_SYMBOL:
		return show_symbol_expr(expr->symbol);
	case EXPR_DEREF:
	case EXPR_SIZEOF:
	case EXPR_PTRSIZEOF:
	case EXPR_ALIGNOF:
	case EXPR_OFFSETOF:
		warning(expr->pos, "invalid expression after evaluation");
		return 0;
	case EXPR_CAST:
	case EXPR_FORCE_CAST:
	case EXPR_IMPLIED_CAST:
		return show_cast_expr(expr);
	case EXPR_VALUE:
		return show_value(expr);
	case EXPR_FVALUE:
		return show_fvalue(expr);
	case EXPR_STRING:
		return show_string_expr(expr);
	case EXPR_INITIALIZER:
		return show_initializer_expr(expr, expr->ctype);
	case EXPR_SELECT:
	case EXPR_CONDITIONAL:
		return show_conditional_expr(expr);
	case EXPR_STATEMENT:
		return show_statement_expr(expr);
	case EXPR_LABEL:
		return show_label_expr(expr);
	case EXPR_SLICE:
		return show_slice(expr);

	// None of these should exist as direct expressions: they are only
	// valid as sub-expressions of initializers.
	case EXPR_POS:
		warning(expr->pos, "unable to show plain initializer position expression");
		return 0;
	case EXPR_IDENTIFIER:
		warning(expr->pos, "unable to show identifier expression");
		return 0;
	case EXPR_INDEX:
		warning(expr->pos, "unable to show index expression");
		return 0;
	case EXPR_TYPE:
		warning(expr->pos, "unable to show type expression");
		return 0;
	case EXPR_GENERIC:
		warning(expr->pos, "unable to show generic expression");
		return 0;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x23f3d
movq %rdi, %r14
movq 0x10(%rdi), %rsi
testq %rsi, %rsi
je 0x23f04
movzbl (%r14), %eax
decl %eax
cmpl $0x1e, %eax
ja 0x23f3d
leaq 0x236df(%rip), %rcx     # 0x475c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rdi
leaq 0x2386e(%rip), %rsi     # 0x47767
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x118b4
jmp 0x23f3d
movl 0x8(%r14), %edi
shrl $0x6, %edi
andl $0x3fff, %edi           # imm = 0x3FFF
callq 0x2e3c4
movq 0x8(%r14), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
shrl $0x16, %ecx
leaq 0x23820(%rip), %rdi     # 0x47751
xorl %ebx, %ebx
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%r14), %rdi
callq 0x23eb8
movl %eax, %ebp
movq 0x28(%r14), %rdi
callq 0x23eb8
movl %eax, %r15d
movl 0x47a7b(%rip), %ebx     # 0x6b9e0
incl %ebx
movl %ebx, 0x47a73(%rip)     # 0x6b9e0
movl 0x4(%r14), %r12d
movl %r12d, %edi
callq 0x2e42a
cmpq $0x7c, %r12
ja 0x23f8a
leaq 0x3609a(%rip), %rax     # 0x5a020
movq (%rax,%r12,8), %rax
movq 0x10(%r14), %rcx
movl 0x50(%rcx), %edx
leaq 0x23c87(%rip), %rdi     # 0x47c1f
movq %rax, %rsi
movl %ebx, %ecx
movl %ebp, %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0xe0f0
jmp 0x23f3d
movq 0x28(%r14), %rdi
callq 0x23eb8
movq 0x20(%r14), %rdx
movq 0x28(%r14), %rcx
movq 0x10(%rcx), %rsi
movl 0x50(%rsi), %ecx
movl 0x50(%rdx), %edx
cmpl %edx, %ecx
jge 0x2405d
movl 0x47a0b(%rip), %ebx     # 0x6b9e0
incl %ebx
movl %ebx, 0x47a03(%rip)     # 0x6b9e0
cmpb $0x3, (%rsi)
jne 0x23fe6
movq 0x60(%rsi), %rsi
cmpb $0x4, (%rsi)
je 0x24064
testb $0x40, 0x69(%rsi)
jne 0x24064
leaq 0x23c69(%rip), %rdi     # 0x47c61
movl %ecx, %esi
movl %ebx, %ecx
movl %eax, %r8d
xorl %eax, %eax
callq 0xe0f0
jmp 0x23f3d
movq 0x20(%r14), %rdi
callq 0x23eb8
movl %eax, %ebp
movq 0x28(%r14), %rdi
callq 0x23eb8
movl %eax, %r15d
movq 0x30(%r14), %rdi
callq 0x23eb8
movl 0x479af(%rip), %ebx     # 0x6b9e0
incl %ebx
movl %ebx, 0x479a7(%rip)     # 0x6b9e0
movq 0x10(%r14), %rcx
movl 0x50(%rcx), %edx
leaq 0x23cb9(%rip), %rdi     # 0x47d00
movl %ebp, %esi
movl %ebx, %ecx
movl %r15d, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0xe0f0
jmp 0x23f3d
movl %eax, %ebx
jmp 0x23f3d
movq $-0x1, %r8
shlq %cl, %r8
notq %r8
leaq 0x23bfd(%rip), %rdi     # 0x47c75
movl %edx, %esi
movl %ebx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe0f0
jmp 0x23f3d
movq 0x8(%r14), %rdi
leaq 0x236f6(%rip), %rsi     # 0x4778b
jmp 0x23ef9
movq %r14, %rdi
movl $0x1, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24998
movq 0x8(%r14), %rdi
leaq 0x23706(%rip), %rsi     # 0x477c0
jmp 0x23ef9
movq %r14, %rdi
callq 0x2466a
jmp 0x23f3d
movq 0x20(%r14), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24269
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2449f
movq 0x8(%r14), %rdi
leaq 0x2370d(%rip), %rsi     # 0x47805
jmp 0x23ef9
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x245c3
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24629
movq 0x20(%r14), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2389a
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2432d
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x244fd
movq 0x8(%r14), %rdi
leaq 0x236cb(%rip), %rsi     # 0x47824
jmp 0x23ef9
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x244e6
movl 0x4786c(%rip), %ebx     # 0x6b9e0
incl %ebx
movl %ebx, 0x47864(%rip)     # 0x6b9e0
leaq 0x415a9(%rip), %rax     # 0x6572c
movl (%rax), %esi
movq 0x20(%r14), %rcx
leaq 0x23b8c(%rip), %rdi     # 0x47d1c
movl %ebx, %edx
xorl %eax, %eax
callq 0xe0f0
jmp 0x23f3d
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x245f1
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x247f9
movq 0x8(%r14), %rdi
leaq 0x2361c(%rip), %rsi     # 0x477e5
jmp 0x23ef9