// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/compile-i386.c
// Function: x86_expression
static struct storage *x86_expression(struct expression *expr)
{
	if (!expr)
		return NULL;

	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 NULL;
	}

	switch (expr->type) {
	default:
		return NULL;
	case EXPR_CALL:
		return x86_call_expression(expr);

	case EXPR_ASSIGNMENT:
		return x86_assignment(expr);

	case EXPR_COMPARE:
		return emit_compare(expr);
	case EXPR_BINOP:
	case EXPR_COMMA:
	case EXPR_LOGICAL:
		return emit_binop(expr);
	case EXPR_PREOP:
		return x86_preop(expr);
	case EXPR_POSTOP:
		return emit_postop(expr);
	case EXPR_SYMBOL:
		return emit_symbol_expr_init(expr->symbol);
	case EXPR_DEREF:
	case EXPR_SIZEOF:
	case EXPR_ALIGNOF:
		warning(expr->pos, "invalid expression after evaluation");
		return NULL;
	case EXPR_CAST:
	case EXPR_FORCE_CAST:
	case EXPR_IMPLIED_CAST:
		return emit_cast_expr(expr);
	case EXPR_VALUE:
		return emit_value(expr);
	case EXPR_STRING:
		return emit_string_expr(expr);
	case EXPR_INITIALIZER:
		x86_initializer_expr(expr, expr->ctype);
		return NULL;
	case EXPR_SELECT:
		return emit_select_expr(expr);
	case EXPR_CONDITIONAL:
		return emit_conditional_expr(expr);
	case EXPR_STATEMENT:
		return x86_statement_expr(expr);
	case EXPR_LABEL:
		return x86_label_expr(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 NULL;
	case EXPR_IDENTIFIER:
		warning(expr->pos, "unable to show identifier expression");
		return NULL;
	case EXPR_INDEX:
		warning(expr->pos, "unable to show index expression");
		return NULL;
	case EXPR_TYPE:
		warning(expr->pos, "unable to show type expression");
		return NULL;
	case EXPR_FVALUE:
		warning(expr->pos, "floating point support is not implemented");
		return NULL;
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x62240
movq $0x0, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x622b3
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 0x31390
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 0x9895(%rip), %rdi      # 0x6bb34
movb $0x0, %al
callq 0x11110
movq $0x0, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x1b, %eax
ja 0x622db
movq -0x20(%rbp), %rax
leaq 0x103e6(%rip), %rcx     # 0x726b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x64c90
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x64fe0
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x650c0
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x65340
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x656a0
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x65710
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x65730
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x97d1(%rip), %rsi      # 0x6bb4a
movb $0x0, %al
callq 0x16df0
movq $0x0, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x65810
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x658e0
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x65920
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x65990
movq $0x0, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x65ac0
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x65c00
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x65cd0
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rdi
callq 0x65cf0
movq %rax, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x9736(%rip), %rsi      # 0x6bb6e
movb $0x0, %al
callq 0x16df0
movq $0x0, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x974b(%rip), %rsi      # 0x6bba3
movb $0x0, %al
callq 0x16df0
movq $0x0, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x9750(%rip), %rsi      # 0x6bbc8
movb $0x0, %al
callq 0x16df0
movq $0x0, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x9750(%rip), %rsi      # 0x6bbe8
movb $0x0, %al
callq 0x16df0
movq $0x0, -0x8(%rbp)
jmp 0x624c7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x108ec(%rip), %rsi     # 0x72da4
movb $0x0, %al
callq 0x16df0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)