// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x33a5f
movl $0x0, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x33ad1
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x6, %rax
andq $0x3fff, %rax           # imm = 0x3FFF
movl %eax, %edi
callq 0x44030
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movl %eax, %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x16, %rax
andq $0x3ff, %rax            # imm = 0x3FF
movl %eax, %ecx
leaq 0x34643(%rip), %rdi     # 0x68101
movb $0x0, %al
callq 0x110f0
movl $0x0, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x1e, %eax
ja 0x33cd9
movq -0x20(%rbp), %rax
leaq 0x34464(%rip), %rcx     # 0x67f58
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
callq 0x341e0
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x34400
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x34480
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x344b0
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x34550
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x345c0
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x33e30
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x34590(%rip), %rsi     # 0x68117
movb $0x0, %al
callq 0x16d80
movl $0x0, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x345e0
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x346c0
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x34710
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x34760
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x347c0
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x34950
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x349d0
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x349f0
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rdi
callq 0x34a30
movl %eax, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x344f1(%rip), %rsi     # 0x6813b
movb $0x0, %al
callq 0x16d80
movl $0x0, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x34504(%rip), %rsi     # 0x68170
movb $0x0, %al
callq 0x16d80
movl $0x0, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x3450a(%rip), %rsi     # 0x68195
movb $0x0, %al
callq 0x16d80
movl $0x0, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x3450b(%rip), %rsi     # 0x681b5
movb $0x0, %al
callq 0x16d80
movl $0x0, -0x4(%rbp)
jmp 0x33ce0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x3450b(%rip), %rsi     # 0x681d4
movb $0x0, %al
callq 0x16d80
movl $0x0, -0x4(%rbp)
jmp 0x33ce0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)