// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/expand.c
// Function: expand_expression
static int expand_expression(struct expression *expr)
{
	if (!expr)
		return 0;
	if (!expr->ctype || expr->ctype == &bad_ctype)
		return UNSAFE;

	switch (expr->type) {
	case EXPR_VALUE:
	case EXPR_FVALUE:
	case EXPR_STRING:
		return 0;
	case EXPR_TYPE:
	case EXPR_SYMBOL:
		return expand_symbol_expression(expr);
	case EXPR_BINOP:
		return expand_binop(expr);

	case EXPR_LOGICAL:
		return expand_logical(expr);

	case EXPR_COMMA:
		return expand_comma(expr);

	case EXPR_COMPARE:
		return expand_compare(expr);

	case EXPR_ASSIGNMENT:
		return expand_assignment(expr);

	case EXPR_PREOP:
		return expand_preop(expr);

	case EXPR_POSTOP:
		return expand_postop(expr);

	case EXPR_CAST:
	case EXPR_FORCE_CAST:
	case EXPR_IMPLIED_CAST:
		return expand_cast(expr);

	case EXPR_CALL:
		return expand_call(expr);

	case EXPR_DEREF:
		warning(expr->pos, "we should not have an EXPR_DEREF left at expansion time");
		return UNSAFE;

	case EXPR_SELECT:
	case EXPR_CONDITIONAL:
		return expand_conditional(expr);

	case EXPR_STATEMENT: {
		struct statement *stmt = expr->statement;
		int cost = expand_statement(stmt);

		if (stmt->type == STMT_EXPRESSION && stmt->expression)
			*expr = *stmt->expression;
		return cost;
	}

	case EXPR_LABEL:
		return 0;

	case EXPR_INITIALIZER:
		sort_expression_list(&expr->expr_list);
		verify_nonoverlapping(&expr->expr_list, expr);
		return expand_expression_list(expr->expr_list);

	case EXPR_IDENTIFIER:
		return UNSAFE;

	case EXPR_INDEX:
		return UNSAFE;

	case EXPR_SLICE:
		return expand_expression(expr->base) + 1;

	case EXPR_POS:
		return expand_pos_expression(expr);

	case EXPR_GENERIC:
	case EXPR_SIZEOF:
	case EXPR_PTRSIZEOF:
	case EXPR_ALIGNOF:
	case EXPR_OFFSETOF:
		expression_error(expr, "internal front-end error: sizeof in expansion?");
		return UNSAFE;
	}
	return SIDE_EFFECTS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x11b4f
movl $0x0, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x11b6b
movq -0x10(%rbp), %rax
leaq 0x81133(%rip), %rcx     # 0x92c98
cmpq %rcx, 0x10(%rax)
jne 0x11b77
movl $0x64, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x1e, %eax
ja 0x11d65
movq -0x28(%rbp), %rax
leaq 0x5046a(%rip), %rcx     # 0x62004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12300
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x123f0
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12470
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12600
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12700
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12820
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12870
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12930
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12960
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x129e0
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x504fd(%rip), %rsi     # 0x62165
movb $0x0, %al
callq 0x16d80
movl $0x64, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12a70
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x11d80
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x11cce
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x11cce
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movl $0x40, %edx
callq 0x111d0
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movl $0x0, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x12bb0
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
callq 0x12be0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x12db0
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movl $0x64, -0x4(%rbp)
jmp 0x11d6c
movl $0x64, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x11b30
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
callq 0x12e70
movl %eax, -0x4(%rbp)
jmp 0x11d6c
movq -0x10(%rbp), %rdi
leaq 0x50448(%rip), %rsi     # 0x6219d
movb $0x0, %al
callq 0x17030
movl $0x64, -0x4(%rbp)
jmp 0x11d6c
movl $0x2710, -0x4(%rbp)     # imm = 0x2710
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)