#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct symbol {
  int dummy;
};
struct expression {
  int dummy;
};

/* Variables and functions */
int classify_type(struct symbol *, struct symbol **);
int /*<<< orphan*/ expression_error(struct expression *, char *);
int /*<<< orphan*/ handle_simple_initializer(struct expression **,
                                             int /*<<< orphan*/, int,
                                             struct symbol *);
void evaluate_initializer(struct symbol *ctype, struct expression **ep) {
  struct symbol *type;
  int class = classify_type(ctype, &type);
  if (!handle_simple_initializer(ep, 0, class, ctype))
    expression_error(*ep, "invalid initializer");
}


x86 assembly (clang, -O0):
<evaluate_initializer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <classify_type@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x8(%rbp),%rcx
xor    %esi,%esi
call   1050 <handle_simple_initializer@plt>
cmp    $0x0,%eax
jne    117e <evaluate_initializer+0x4e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe87(%rip),%rsi
call   1040 <expression_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evaluate_initializer>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
call   1030 <classify_type@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %eax,%edx
mov    %rbx,%rcx
call   1050 <handle_simple_initializer@plt>
test   %eax,%eax
jne    1164 <evaluate_initializer+0x34>
mov    (%r14),%rdi
lea    0xea1(%rip),%rsi
call   1040 <expression_error@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.symbol = type { i32 }
%struct.expression = type { i32 }
@.str = [20 x i8] c"invalid initializer\00"
define void @evaluate_initializer(%struct.symbol* %0, %struct.expression** %1) {
%3 = alloca %struct.symbol*
%4 = alloca %struct.expression**
%5 = alloca %struct.symbol*
%6 = alloca i32
store %struct.symbol* %0, %struct.symbol** %3
store %struct.expression** %1, %struct.expression*** %4
%7 = load %struct.symbol*, %struct.symbol** %3
%8 = call i32 @classify_type(%struct.symbol* %7, %struct.symbol** %5)
store i32 %8, i32* %6
%9 = load %struct.expression**, %struct.expression*** %4
%10 = load i32, i32* %6
%11 = load %struct.symbol*, %struct.symbol** %3
%12 = call i32 @handle_simple_initializer(%struct.expression** %9, i32 0, i32 %10, %struct.symbol* %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %2
%15 = load %struct.expression**, %struct.expression*** %4
%16 = load %struct.expression*, %struct.expression** %15
%17 = call i32 @expression_error(%struct.expression* %16, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
%struct.symbol = type { i32 }
%struct.expression = type { i32 }
@.str = [20 x i8] c"invalid initializer\00"
define void @evaluate_initializer(%struct.symbol* %0, %struct.expression** %1) {
%3 = alloca %struct.symbol*
%4 = bitcast %struct.symbol** %3 to i8*
%5 = call i32 @classify_type(%struct.symbol* %0, %struct.symbol** %3)
%6 = call i32 @handle_simple_initializer(%struct.expression** %1, i32 0, i32 %5, %struct.symbol* %0)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load %struct.expression*, %struct.expression** %1
%10 = call i32 @expression_error(%struct.expression* %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %2
ret void
}