// File: /workspace/github_c_makefile_star2_O3/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
subq $0x10, %rsp
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x23e76
movq %rdi, %r14
movq 0x10(%rdi), %rsi
testq %rsi, %rsi
je 0x23e3d
movzbl (%r14), %eax
decl %eax
cmpl $0x1e, %eax
ja 0x23e76
leaq 0x22726(%rip), %rcx     # 0x46544
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rdi
leaq 0x228b5(%rip), %rsi     # 0x466e7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x118fc
jmp 0x23e76
movl 0x8(%r14), %edi
shrl $0x6, %edi
andl $0x3fff, %edi           # imm = 0x3FFF
callq 0x2dd94
movq 0x8(%r14), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
shrl $0x16, %ecx
leaq 0x22867(%rip), %rdi     # 0x466d1
xorl %ebx, %ebx
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%r14), %rdi
callq 0x23ded
movl %eax, %ebp
movq 0x28(%r14), %rdi
callq 0x23ded
movl %eax, %r15d
movl 0x46b3e(%rip), %ebx     # 0x6a9e0
incl %ebx
movl %ebx, 0x46b36(%rip)     # 0x6a9e0
movl 0x4(%r14), %r12d
movl %r12d, %edi
callq 0x2ddfa
cmpq $0x7c, %r12
ja 0x23ec7
leaq 0x3516d(%rip), %rax     # 0x59030
movq (%rax,%r12,8), %rax
movq 0x10(%r14), %rcx
movl 0x50(%rcx), %edx
leaq 0x22cca(%rip), %rdi     # 0x46b9f
movq %rax, %rsi
movl %ebx, %ecx
movl %ebp, %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0xe0f0
jmp 0x23e76
movq 0x28(%r14), %rdi
callq 0x23ded
movq 0x20(%r14), %rdx
movq 0x28(%r14), %rcx
movq 0x10(%rcx), %rsi
movl 0x50(%rsi), %ecx
movl 0x50(%rdx), %edx
cmpl %edx, %ecx
jge 0x23fa0
movl 0x46ace(%rip), %ebx     # 0x6a9e0
incl %ebx
movl %ebx, 0x46ac6(%rip)     # 0x6a9e0
movzbl (%rsi), %edi
cmpl $0x3, %edi
jne 0x23f29
movq 0x60(%rsi), %rsi
movzbl (%rsi), %edi
cmpl $0x4, %edi
je 0x23fa7
testb $0x40, 0x69(%rsi)
jne 0x23fa7
leaq 0x22ca6(%rip), %rdi     # 0x46be1
movl %ecx, %esi
movl %ebx, %ecx
movl %eax, %r8d
xorl %eax, %eax
callq 0xe0f0
jmp 0x23e76
movq 0x20(%r14), %rdi
callq 0x23ded
movl %eax, %ebp
movq 0x28(%r14), %rdi
callq 0x23ded
movl %eax, %r15d
movq 0x30(%r14), %rdi
callq 0x23ded
movl 0x46a6c(%rip), %ebx     # 0x6a9e0
incl %ebx
movl %ebx, 0x46a64(%rip)     # 0x6a9e0
movq 0x10(%r14), %rcx
movl 0x50(%rcx), %edx
leaq 0x22cf6(%rip), %rdi     # 0x46c80
movl %ebp, %esi
movl %ebx, %ecx
movl %r15d, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0xe0f0
jmp 0x23e76
movl %eax, %ebx
jmp 0x23e76
movq $-0x1, %r8
shlq %cl, %r8
notq %r8
leaq 0x22c3a(%rip), %rdi     # 0x46bf5
movl %edx, %esi
movl %ebx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe0f0
jmp 0x23e76
movq 0x8(%r14), %rdi
leaq 0x22733(%rip), %rsi     # 0x4670b
jmp 0x23e32
movq %r14, %rdi
movl $0x1, %esi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x248f7
movq 0x8(%r14), %rdi
leaq 0x2273f(%rip), %rsi     # 0x46740
jmp 0x23e32
movq %r14, %rdi
callq 0x245c9
jmp 0x23e76
movq 0x20(%r14), %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24204
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24468
movq 0x8(%r14), %rdi
leaq 0x2273e(%rip), %rsi     # 0x46785
jmp 0x23e32
movq 0x20(%r14), %rcx
movl 0x50(%rsi), %esi
movl 0x46987(%rip), %ebx     # 0x6a9e0
incl %ebx
movl %ebx, 0x4697f(%rip)     # 0x6a9e0
leaq 0x22ba5(%rip), %rdi     # 0x46c0d
jmp 0x24105
movq 0x28(%r14), %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2458c
movq 0x20(%r14), %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x237f3
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24303
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x244c6
movq 0x8(%r14), %rdi
leaq 0x226da(%rip), %rsi     # 0x467a4
jmp 0x23e32
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x244af
movq 0x20(%r14), %rcx
movl 0x468f3(%rip), %ebx     # 0x6a9e0
incl %ebx
movl %ebx, 0x468eb(%rip)     # 0x6a9e0
leaq 0x40630(%rip), %rax     # 0x6472c
movl (%rax), %esi
leaq 0x22b97(%rip), %rdi     # 0x46c9c
movl %ebx, %edx
xorl %eax, %eax
callq 0xe0f0
jmp 0x23e76
fldt 0x20(%r14)
movl 0x50(%rsi), %esi
movl 0x468c0(%rip), %ebx     # 0x6a9e0
incl %ebx
movl %ebx, 0x468b8(%rip)     # 0x6a9e0
fstpt (%rsp)
leaq 0x22af0(%rip), %rdi     # 0x46c22
movl %ebx, %edx
xorl %eax, %eax
callq 0xe0f0
jmp 0x23e76
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24758
movq 0x8(%r14), %rdi
leaq 0x22606(%rip), %rsi     # 0x46765
jmp 0x23e32