// File: /workspace/github_c_makefile_star2_O1/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 $0x38, %rsp
testq %rdi, %rdi
je 0x32f00
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
jne 0x32f03
movzbl (%rbx), %eax
decl %eax
cmpl $0x1e, %eax
ja 0x32f00
leaq 0x17df1(%rip), %rcx     # 0x4aa90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x18107(%rip), %rsi     # 0x4adb6
jmp 0x32f48
movq 0x28(%rbx), %r15
testq %r15, %r15
je 0x32f00
cmpb $0x18, (%r15)
jne 0x32f6d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38301
movq %rax, %r14
jmp 0x32f03
leaq 0x180b1(%rip), %rsi     # 0x4ad96
jmp 0x32f48
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x35a2a
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x35494
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x351a1
movq 0x20(%rbx), %rdi
callq 0x366a3
leaq 0x394bc(%rip), %r14     # 0x6c1f8
movq %r14, 0x10(%rbx)
jmp 0x32f03
movq 0x20(%rbx), %rdi
callq 0x32c63
testq %rax, %rax
je 0x32f00
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34bab
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x338eb
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33a64
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x341cf
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3553e
movq 0x20(%rbx), %rdi
callq 0x32c63
movq 0x28(%rbx), %rdi
callq 0x32c63
movq %rbx, %rdi
callq 0x33b25
testl %eax, %eax
je 0x32f00
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33b6b
movq 0x20(%rbx), %rdi
callq 0x32c63
movq 0x28(%rbx), %rdi
callq 0x32c63
movq %rbx, %rdi
callq 0x33b25
testl %eax, %eax
je 0x32f00
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x346f7
movq 0x20(%rbx), %rdi
callq 0x32c63
testq %rax, %rax
je 0x32f00
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3503d
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x35572
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3584b
movq 0x20(%rbx), %rdi
callq 0x32c63
movq 0x28(%rbx), %rdi
callq 0x32c63
testq %rax, %rax
je 0x32f00
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34222
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36bd5
movq 0x20(%rbx), %rdi
callq 0x32c63
movq 0x28(%rbx), %rdi
callq 0x32c63
movq %rbx, %rdi
callq 0x33b25
testl %eax, %eax
je 0x32f00
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34261
xorl %r14d, %r14d
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rbx), %rdi
callq 0x35f67
movq %rax, %r14
movq %rax, 0x10(%rbx)
jmp 0x32f03
leaq 0x3a60a(%rip), %r14     # 0x6d538
movq %r14, 0x10(%rbx)
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
callq 0x36657
jmp 0x32f03
leaq 0x17ea2(%rip), %rsi     # 0x4adea
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11abc
jmp 0x32f03
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36820
movq 0x20(%rbx), %rdi
callq 0x2b5f4
movq %rax, %rdi
callq 0x36fb5
movq %rax, %r14
movq %rax, 0x10(%rbx)
movq %rax, 0x20(%rbx)
movq %r15, %rdi
callq 0x32c63
movq %r15, %rdi
callq 0x33628
leaq 0x20(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x33465
movl %eax, %ebp
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37092
shll $0x8, %eax
movl $0xffff00ff, %ecx       # imm = 0xFFFF00FF
andl (%rbx), %ecx
orl %eax, %ecx
movl %ecx, (%rbx)
movq (%r12), %r13
cmpq 0x2df69(%rip), %r13     # 0x60f38
je 0x32f03
movq 0x10(%r15), %rdi
movq %rdi, 0x10(%rsp)
testq %rdi, %rdi
je 0x330a8
leaq 0x10(%rsp), %rsi
callq 0x33465
cmpb $0xc, (%rbx)
je 0x32f03
movl %eax, %r12d
testb $-0x60, %bpl
je 0x330c6
movq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x3837d
testq %rax, %rax
je 0x330b4
movq %rax, %rbp
leaq 0x34e21(%rip), %rax     # 0x67e48
cmpl $0x0, (%rax)
je 0x3303e
movq 0x8(%rbx), %rdi
leaq 0x1838b(%rip), %rsi     # 0x4b3c2
xorl %eax, %eax
callq 0x118b4
movq 0x8(%r15), %r13
xorl %edi, %edi
callq 0x30029
movq %rax, %r12
movl (%rax), %eax
orl $0x19, %eax
movq %r13, 0x8(%r12)
andl $0xffff0019, %eax       # imm = 0xFFFF0019
movl %eax, (%r12)
movq 0x18(%rbp), %rax
movq %rax, 0x28(%r12)
movq %r15, 0x38(%r12)
movq 0x8(%r15), %r13
xorl %edi, %edi
callq 0x30029
movq %rax, %r15
movl (%rax), %eax
orl $0x18, %eax
movq %r13, 0x8(%r15)
andl $0xffff0018, %eax       # imm = 0xFFFF0018
movl %eax, (%r15)
leaq 0x20(%r15), %rdi
movq %r12, %rsi
callq 0x2285b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38301
jmp 0x32f03
leaq 0x182fc(%rip), %rsi     # 0x4b3ab
jmp 0x32f4b
movq 0x8(%rbx), %rdi
leaq 0x18316(%rip), %rsi     # 0x4b3d5
xorl %eax, %eax
callq 0x118b4
testb $0x20, %r12b
je 0x330de
movq 0x8(%rbx), %rdi
leaq 0x18311(%rip), %rsi     # 0x4b3e8
xorl %eax, %eax
callq 0x118b4
testb $0x40, %r12b
je 0x330f2
movq 0x10(%rsp), %rax
movq 0x60(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rcx
cmpq %rcx, %r13
movq %rcx, 0x18(%rsp)
je 0x33191
testb $0x4, %bpl
je 0x3313a
cmpb $0x1, (%r15)
jne 0x33118
cmpq $0x0, 0x20(%r15)
je 0x3313a
movq %r13, %rdi
callq 0x2386c
movq 0x8(%rbx), %rdi
leaq 0x182d2(%rip), %rsi     # 0x4b3fd
movq %rax, %rdx
xorl %eax, %eax
callq 0x118b4
movq 0x18(%rsp), %rcx
testb $0x4, %r12b
je 0x33191
cmpq 0x2de99(%rip), %r13     # 0x60fe0
jne 0x33151
movl %r12d, %eax
andl $0x40, %eax
je 0x33191
cmpq 0x2de88(%rip), %r13     # 0x60fe0
leaq 0x182a9(%rip), %rax     # 0x4b408
leaq 0x17dbd(%rip), %rdx     # 0x4af23
cmovneq %rax, %rdx
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x2386c
movq 0x8(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x118b4
movq 0x18(%rsp), %rcx
cmpq 0x2dd78(%rip), %r13     # 0x60f10
je 0x331a6
leaq 0x3bdef(%rip), %rax     # 0x6ef90
cmpq (%rax), %r13
jne 0x331bb
leaq 0x34c3b(%rip), %rax     # 0x67de8
cmpl $0x0, (%rax)
jne 0x331bb
leaq 0x33227(%rip), %rdx     # 0x663e0
jmp 0x331d8
cmpl $0x10, %ebp
jne 0x331d6
movq %r13, %rdi
callq 0x2bfd0
movq 0x18(%rsp), %rcx
movq 0x80(%r13), %rdx
jmp 0x331d8
xorl %edx, %edx
leaq 0x33201(%rip), %rsi     # 0x663e0
cmpq 0x2dd2a(%rip), %rcx     # 0x60f10
movq %rdx, 0x8(%rsp)
je 0x3321c
leaq 0x3bd9c(%rip), %rax     # 0x6ef90
cmpq (%rax), %rcx
je 0x3321c
cmpl $0x10, %r12d
jne 0x3321a
movq %rcx, %rdi
callq 0x2bfd0
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x80(%rax), %rsi
jmp 0x3321c
xorl %esi, %esi
movq %r13, 0x18(%rsp)
testq %rdx, %rdx
jne 0x33265
testq %rsi, %rsi
sete %al
leaq 0x331ad(%rip), %rcx     # 0x663e0
cmpq %rcx, %rsi
sete %cl
orb %al, %cl
jne 0x33265
movq %rsi, %r13
movq %rsi, %rdi
callq 0x23311
movq 0x8(%rbx), %rdi
leaq 0x181c2(%rip), %rsi     # 0x4b415
movq %rax, %rdx
xorl %eax, %eax
callq 0x118b4
movq %r13, %rsi
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
setne %cl
leaq 0x3316e(%rip), %rax     # 0x663e0
cmpq %rax, %rdx
setne %r13b
andb %cl, %r13b
cmpb $0x1, %r13b
jne 0x332d3
testq %rsi, %rsi
je 0x332d3
cmpq %rax, %rsi
je 0x332d3
cmpq %rsi, %rdx
je 0x332d3
movq %rsi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x23311
movq %rax, 0x30(%rsp)
movq 0x8(%rsp), %rdi
callq 0x23311
movq 0x8(%rbx), %rdi
leaq 0x18189(%rip), %rsi     # 0x4b443
movq 0x30(%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x118b4
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdx
testq %rsi, %rsi
sete %al
andb %al, %r13b
cmpb $0x1, %r13b
jne 0x33323
movq %r15, %rdi
callq 0x37ced
movq 0x8(%rsp), %rdx
testl %eax, %eax
jne 0x33323
leaq 0x34af2(%rip), %rax     # 0x67dec
cmpl $0x0, (%rax)
je 0x33323
movq 0x8(%rsp), %rdi
callq 0x23311
movq 0x8(%rbx), %rdi
leaq 0x18156(%rip), %rsi     # 0x4b46a
movq %rax, %rdx
xorl %eax, %eax
callq 0x118b4
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
movq 0x18(%rsp), %r13
jne 0x33355
movq 0x68(%r13), %rax
andl $0x1c001e00, %eax       # imm = 0x1C001E00
jne 0x33355
cmpl $0x10, %ebp
jne 0x33355
testb $0x10, 0x1(%r15)
je 0x33355
movq 0x60(%r13), %rax
cmpq 0x2dbe9(%rip), %rax     # 0x60f38
je 0x3343a
cmpq 0x2dc84(%rip), %r13     # 0x60fe0
jne 0x33366
movq %rbx, %rdi
callq 0x37144
leaq 0x38dab(%rip), %r13     # 0x6c118
leaq 0x34a70(%rip), %rax     # 0x67de4
cmpl $0x0, (%rax)
je 0x32f03
cmpl $0x10, %ebp
jne 0x32f03
cmpl $0x10, %r12d
jne 0x32f03
movq 0x20(%rsp), %rax
movq 0x60(%rax), %rdi
leaq 0x20(%rsp), %rsi
callq 0x33465
movl %eax, %ebp
movq 0x10(%rsp), %rax
movq 0x60(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x33465
movl %eax, %r12d
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
cmpq %rax, %rcx
je 0x32f03
testq %rcx, %rcx
je 0x32f03
testq %rax, %rax
je 0x32f03
cmpq %r13, %rcx
je 0x32f03
cmpq %r13, %rax
je 0x32f03
testb $0x4, %bpl
jne 0x33418
testb $0x4, %r12b
je 0x3336d
movq 0x10(%r15), %rdi
callq 0x2386c
movq 0x8(%rbx), %rdi
leaq 0x17ff2(%rip), %rsi     # 0x4b408
jmp 0x3342b
movq %r14, %rdi
callq 0x2386c
movq 0x8(%rbx), %rdi
leaq 0x17fd2(%rip), %rsi     # 0x4b3fd
movq %rax, %rdx
xorl %eax, %eax
callq 0x118b4
jmp 0x32f03
movq %r15, %rdi
callq 0xf386
testl %eax, %eax
je 0x33355
movb $0x1, (%rbx)
leaq 0x3a544(%rip), %r14     # 0x6d998
movq %r14, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
jmp 0x32f03