// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/evaluate.c
// Function: evaluate_expression
struct symbol *evaluate_expression(struct expression *expr)
{
	if (!expr)
		return NULL;
	if (expr->ctype)
		return expr->ctype;

	switch (expr->type) {
	case EXPR_VALUE:
	case EXPR_FVALUE:
		expression_error(expr, "value expression without a type");
		return NULL;
	case EXPR_STRING:
		return evaluate_string(expr);
	case EXPR_SYMBOL:
		return evaluate_symbol_expression(expr);
	case EXPR_BINOP:
		evaluate_expression(expr->left);
		evaluate_expression(expr->right);
		if (!valid_subexpr_type(expr))
			return NULL;
		return evaluate_binop(expr);
	case EXPR_LOGICAL:
		return evaluate_logical(expr);
	case EXPR_COMMA:
		evaluate_expression(expr->left);
		if (!evaluate_expression(expr->right))
			return NULL;
		return evaluate_comma(expr);
	case EXPR_COMPARE:
		evaluate_expression(expr->left);
		evaluate_expression(expr->right);
		if (!valid_subexpr_type(expr))
			return NULL;
		return evaluate_compare(expr);
	case EXPR_ASSIGNMENT:
		evaluate_expression(expr->left);
		evaluate_expression(expr->right);
		if (!valid_subexpr_type(expr))
			return NULL;
		return evaluate_assignment(expr);
	case EXPR_PREOP:
		if (!evaluate_expression(expr->unop))
			return NULL;
		return evaluate_preop(expr);
	case EXPR_POSTOP:
		if (!evaluate_expression(expr->unop))
			return NULL;
		return evaluate_postop(expr);
	case EXPR_CAST:
	case EXPR_FORCE_CAST:
	case EXPR_IMPLIED_CAST:
		return evaluate_cast(expr);
	case EXPR_SIZEOF:
		return evaluate_sizeof(expr);
	case EXPR_PTRSIZEOF:
		return evaluate_ptrsizeof(expr);
	case EXPR_ALIGNOF:
		return evaluate_alignof(expr);
	case EXPR_DEREF:
		return evaluate_member_dereference(expr);
	case EXPR_CALL:
		return evaluate_call(expr);
	case EXPR_SELECT:
	case EXPR_CONDITIONAL:
		return evaluate_conditional_expression(expr);
	case EXPR_STATEMENT:
		expr->ctype = evaluate_statement(expr->statement);
		return expr->ctype;

	case EXPR_LABEL:
		expr->ctype = &ptr_ctype;
		check_label_declaration(expr->pos, expr->label_symbol);
		return &ptr_ctype;

	case EXPR_TYPE:
		/* Evaluate the type of the symbol .. */
		evaluate_symbol(expr->symbol);
		/* .. but the type of the _expression_ is a "type" */
		expr->ctype = &type_ctype;
		return &type_ctype;

	case EXPR_OFFSETOF:
		return evaluate_offsetof(expr);

	case EXPR_GENERIC:
		return evaluate_generic_selection(expr);

	/* These can not exist as stand-alone expressions */
	case EXPR_INITIALIZER:
	case EXPR_IDENTIFIER:
	case EXPR_INDEX:
	case EXPR_POS:
		expression_error(expr, "internal front-end error: initializer in expression");
		return NULL;
	case EXPR_SLICE:
		expression_error(expr, "internal front-end error: SLICE re-evaluated");
		return NULL;
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x324c0
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
jne 0x324c3
movzbl (%rbx), %eax
decl %eax
cmpl $0x1e, %eax
ja 0x324c0
leaq 0x177a1(%rip), %rcx     # 0x49a00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x17ab7(%rip), %rsi     # 0x49d26
jmp 0x32508
movq 0x28(%rbx), %r15
testq %r15, %r15
je 0x324c0
cmpb $0x18, (%r15)
jne 0x3252d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37831
movq %rax, %r14
jmp 0x324c3
leaq 0x17a61(%rip), %rsi     # 0x49d06
jmp 0x32508
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34ffd
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34a7d
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x347b7
movq 0x20(%rbx), %rdi
callq 0x35be9
leaq 0x38efc(%rip), %r14     # 0x6b1f8
movq %r14, 0x10(%rbx)
jmp 0x324c3
movq 0x20(%rbx), %rdi
callq 0x32223
testq %rax, %rax
je 0x324c0
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34190
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32e97
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32fef
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x337a5
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34b2c
movq 0x20(%rbx), %rdi
callq 0x32223
movq 0x28(%rbx), %rdi
callq 0x32223
movq %rbx, %rdi
callq 0x330a9
testl %eax, %eax
je 0x324c0
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x330ef
movq 0x20(%rbx), %rdi
callq 0x32223
movq 0x28(%rbx), %rdi
callq 0x32223
movq %rbx, %rdi
callq 0x330a9
testl %eax, %eax
je 0x324c0
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33cf8
movq 0x20(%rbx), %rdi
callq 0x32223
testq %rax, %rax
je 0x324c0
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34642
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34b60
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34e13
movq 0x20(%rbx), %rdi
callq 0x32223
movq 0x28(%rbx), %rdi
callq 0x32223
testq %rax, %rax
je 0x324c0
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x337f8
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x360ec
movq 0x20(%rbx), %rdi
callq 0x32223
movq 0x28(%rbx), %rdi
callq 0x32223
movq %rbx, %rdi
callq 0x330a9
testl %eax, %eax
je 0x324c0
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33837
xorl %r14d, %r14d
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rbx), %rdi
callq 0x35508
movq %rax, %r14
movq %rax, 0x10(%rbx)
jmp 0x324c3
leaq 0x3a04a(%rip), %r14     # 0x6c538
movq %r14, 0x10(%rbx)
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
callq 0x35b9d
jmp 0x324c3
leaq 0x17852(%rip), %rsi     # 0x49d5a
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11b04
jmp 0x324c3
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x35d6e
movq 0x20(%rbx), %rdi
callq 0x2b0b8
movq %rax, %rdi
callq 0x364a3
movq %rax, %r14
movq %rax, 0x10(%rbx)
movq %rax, 0x20(%rbx)
movq %r15, %rdi
callq 0x32223
movq %r15, %rdi
callq 0x32bf6
leaq 0x18(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x32a35
movl %eax, %ebp
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x36580
shll $0x8, %eax
movl $0xffff00ff, %ecx       # imm = 0xFFFF00FF
andl (%rbx), %ecx
orl %eax, %ecx
movl %ecx, (%rbx)
movq (%r12), %r12
cmpq 0x2d9b8(%rip), %r12     # 0x5ff48
je 0x324c3
movq 0x10(%r15), %rdi
movq %rdi, 0x8(%rsp)
testq %rdi, %rdi
je 0x3265a
leaq 0x8(%rsp), %rsi
callq 0x32a35
cmpb $0xc, (%rbx)
je 0x324c3
movl %eax, %edx
testb $-0x60, %bpl
movl %eax, 0x4(%rsp)
je 0x3267c
movq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x378a5
testq %rax, %rax
je 0x32666
movq %rax, %r13
leaq 0x3485d(%rip), %rax     # 0x66e48
cmpl $0x0, (%rax)
je 0x32602
movq 0x8(%rbx), %rdi
leaq 0x17d37(%rip), %rsi     # 0x4a332
xorl %eax, %eax
callq 0x118fc
movq 0x8(%r15), %rbp
xorl %edi, %edi
callq 0x2f9f5
movq %rax, %r12
movq %rbp, 0x8(%rax)
movw $0x19, (%rax)
movq 0x18(%r13), %rax
movq %rax, 0x28(%r12)
movq %r15, 0x38(%r12)
movq 0x8(%r15), %r13
xorl %edi, %edi
callq 0x2f9f5
movq %rax, %r15
movq %r13, 0x8(%rax)
movw $0x18, (%rax)
leaq 0x20(%rax), %rdi
movq %r12, %rsi
callq 0x227b4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37831
jmp 0x324c3
leaq 0x17cba(%rip), %rsi     # 0x4a31b
jmp 0x3250b
movq 0x8(%rbx), %rdi
leaq 0x17cd4(%rip), %rsi     # 0x4a345
xorl %eax, %eax
callq 0x118fc
movl 0x4(%rsp), %edx
testb $0x20, %dl
je 0x32697
movq 0x8(%rbx), %rdi
leaq 0x17ccc(%rip), %rsi     # 0x4a358
xorl %eax, %eax
callq 0x118fc
movl 0x4(%rsp), %edx
movq 0x8(%rsp), %rsi
testb $0x40, %dl
movq %r12, %r8
je 0x326ad
movq 0x60(%rsi), %rsi
movq %rsi, 0x8(%rsp)
cmpq %rsi, %r8
movq %rsi, %r13
je 0x32728
testb $0x4, %bpl
je 0x326ef
cmpb $0x1, (%r15)
jne 0x326c8
cmpq $0x0, 0x20(%r15)
je 0x326ef
movq %r8, %rdi
callq 0x237c5
movq 0x8(%rbx), %rdi
leaq 0x17c92(%rip), %rsi     # 0x4a36d
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
movq %r12, %r8
movq %r13, %rsi
movl 0x4(%rsp), %edx
testb $0x4, %dl
je 0x32728
cmpq 0x2d8ed(%rip), %r8      # 0x5ffe8
je 0x329ad
movq %rsi, %rdi
callq 0x237c5
movq 0x8(%rbx), %rdi
leaq 0x17c64(%rip), %rsi     # 0x4a378
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
movq %r12, %r8
movq %r13, %rsi
movl 0x4(%rsp), %edx
cmpq 0x2d7f1(%rip), %r8      # 0x5ff20
je 0x3273d
leaq 0x3b858(%rip), %rax     # 0x6df90
cmpq (%rax), %r8
jne 0x32752
leaq 0x346a4(%rip), %rax     # 0x66de8
cmpl $0x0, (%rax)
jne 0x32752
leaq 0x32c90(%rip), %rcx     # 0x653e0
jmp 0x32775
cmpl $0x10, %ebp
jne 0x32773
movq %r8, %rdi
callq 0x2baa4
movq %r12, %r8
movq %r13, %rsi
movl 0x4(%rsp), %edx
movq 0x80(%r12), %rcx
jmp 0x32775
xorl %ecx, %ecx
leaq 0x32c64(%rip), %rdi     # 0x653e0
cmpq 0x2d79d(%rip), %rsi     # 0x5ff20
je 0x327bd
leaq 0x3b804(%rip), %rax     # 0x6df90
cmpq (%rax), %rsi
je 0x327bd
cmpl $0x10, %edx
jne 0x327bb
movq %rsi, %rdi
movq %rcx, 0x10(%rsp)
callq 0x2baa4
movq %r12, %r8
movq %r13, %rsi
movq 0x10(%rsp), %rcx
movl 0x4(%rsp), %edx
movq 0x80(%r13), %rdi
jmp 0x327bd
xorl %edi, %edi
testq %rcx, %rcx
je 0x3282f
leaq 0x32c17(%rip), %rax     # 0x653e0
cmpq %rax, %rcx
je 0x328c7
testq %rdi, %rdi
je 0x328be
cmpq %rax, %rdi
je 0x328be
cmpq %rdi, %rcx
je 0x328be
movq %rcx, 0x10(%rsp)
callq 0x23268
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23268
movq 0x8(%rbx), %rdi
leaq 0x17ba2(%rip), %rsi     # 0x4a3b3
movq 0x20(%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x118fc
movq %r12, %r8
movq %r13, %rsi
movl 0x4(%rsp), %edx
jmp 0x328c7
testq %rdi, %rdi
sete %al
leaq 0x32ba4(%rip), %rcx     # 0x653e0
cmpq %rcx, %rdi
sete %cl
orb %al, %cl
jne 0x3286a
callq 0x23268
movq 0x8(%rbx), %rdi
leaq 0x17b2f(%rip), %rsi     # 0x4a385
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
movq %r12, %r8
movq %r13, %rsi
movl 0x4(%rsp), %edx
testl $0x1c001e00, 0x68(%r8)  # imm = 0x1C001E00
jne 0x328c7
cmpl $0x10, %ebp
jne 0x328c7
testb $0x10, 0x1(%r15)
je 0x328c7
movq 0x60(%r8), %rax
cmpq 0x2d6bd(%rip), %rax     # 0x5ff48
jne 0x328c7
movq %r15, %rdi
callq 0xf54a
movq %r12, %r8
movq %r13, %rsi
movl 0x4(%rsp), %edx
testl %eax, %eax
je 0x328c7
movb $0x1, (%rbx)
leaq 0x3a0eb(%rip), %r14     # 0x6c998
movq %r14, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
jmp 0x324c3
testq %rdi, %rdi
je 0x329e2
cmpq 0x2d71a(%rip), %r8      # 0x5ffe8
jne 0x328e2
movq %rbx, %rdi
callq 0x36646
movq %r12, %r8
movq %r13, %rsi
movl 0x4(%rsp), %edx
leaq 0x3882f(%rip), %r13     # 0x6b118
leaq 0x344f4(%rip), %rax     # 0x66de4
cmpl $0x0, (%rax)
je 0x324c3
cmpl $0x10, %ebp
jne 0x324c3
cmpl $0x10, %edx
jne 0x324c3
movq %rsi, %r12
movq 0x60(%r8), %rdi
leaq 0x18(%rsp), %rsi
callq 0x32a35
movl %eax, %ebp
movq 0x60(%r12), %rdi
leaq 0x8(%rsp), %rsi
callq 0x32a35
movq 0x18(%rsp), %r8
movq 0x8(%rsp), %rsi
cmpq %rsi, %r8
je 0x324c3
testq %r8, %r8
je 0x324c3
testq %rsi, %rsi
je 0x324c3
cmpq %r13, %r8
je 0x324c3
cmpq %r13, %rsi
je 0x324c3
testb $0x4, %bpl
jne 0x3298b
movl %eax, %edx
testb $0x4, %dl
je 0x328e9
movq 0x10(%r15), %rdi
callq 0x237c5
movq 0x8(%rbx), %rdi
leaq 0x179ef(%rip), %rsi     # 0x4a378
jmp 0x3299e
movq %r14, %rdi
callq 0x237c5
movq 0x8(%rbx), %rdi
leaq 0x179cf(%rip), %rsi     # 0x4a36d
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
jmp 0x324c3
testb $0x40, %dl
je 0x32731
movq %rsi, %rdi
callq 0x237c5
movq 0x8(%rbx), %rdi
leaq 0x174ca(%rip), %rsi     # 0x49e93
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
movq %r12, %r8
movq %r13, %rsi
movl 0x4(%rsp), %edx
jmp 0x32731
movq %r15, %rdi
movq %rcx, 0x10(%rsp)
callq 0x371d0
movq %r12, %r8
movq %r13, %rsi
movq 0x10(%rsp), %rdi
movl 0x4(%rsp), %edx
testl %eax, %eax
jne 0x328c7
leaq 0x343df(%rip), %rax     # 0x66dec
cmpl $0x0, (%rax)
je 0x328c7
callq 0x23268
movq 0x8(%rbx), %rdi
leaq 0x179b4(%rip), %rsi     # 0x4a3da
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
jmp 0x32820