#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 */

/* Variables and functions */
int /*<<< orphan*/ conditional();
int /*<<< orphan*/ const_val();
int /*<<< orphan*/ double_unary_op();
int /*<<< orphan*/ get_lexval();
int /*<<< orphan*/ method_call_expr();
int /*<<< orphan*/ variable();
int yyselect();
expr() {
  switch (yyselect()) {
  case 85: {
    expr();
    conditional();
    expr();
  } break;
  case 86: {
    get_lexval();
    expr();
    get_lexval();
  } break;
  case 87: {
    method_call_expr();
  } break;
  case 88: {
    variable();
  } break;
  case 89: {
    const_val();
  } break;
  case 90: {
    get_lexval();
    expr();
  } break;
  case 91: {
    get_lexval();
    expr();
  } break;
  case 92: {
    double_unary_op();
    variable();
  } break;
  case 93: {
    variable();
    double_unary_op();
  } break;
  }
}


x86 assembly (clang, -O0):
<expr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <yyselect@plt>
add    $0xffffffab,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x8,%eax
ja     124a <expr+0xca>
mov    -0x10(%rbp),%rax
lea    0xe54(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
call   1070 <expr@plt>
mov    $0x0,%al
call   1090 <conditional@plt>
call   1070 <expr@plt>
jmp    124a <expr+0xca>
mov    $0x0,%al
call   1050 <get_lexval@plt>
call   1070 <expr@plt>
mov    $0x0,%al
call   1050 <get_lexval@plt>
jmp    124a <expr+0xca>
mov    $0x0,%al
call   1030 <method_call_expr@plt>
jmp    124a <expr+0xca>
mov    $0x0,%al
call   1060 <variable@plt>
jmp    124a <expr+0xca>
mov    $0x0,%al
call   10a0 <const_val@plt>
jmp    124a <expr+0xca>
mov    $0x0,%al
call   1050 <get_lexval@plt>
call   1070 <expr@plt>
jmp    124a <expr+0xca>
mov    $0x0,%al
call   1050 <get_lexval@plt>
call   1070 <expr@plt>
jmp    124a <expr+0xca>
mov    $0x0,%al
call   1080 <double_unary_op@plt>
mov    $0x0,%al
call   1060 <variable@plt>
jmp    124a <expr+0xca>
mov    $0x0,%al
call   1060 <variable@plt>
mov    $0x0,%al
call   1080 <double_unary_op@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expr>:
push   %rbx
lea    0xe78(%rip),%rbx
jmp    1197 <expr+0x17>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <get_lexval@plt>
xor    %eax,%eax
call   1040 <yyselect@plt>
add    $0xffffffab,%eax
cmp    $0x8,%eax
ja     1202 <expr+0x82>
movslq (%rbx,%rax,4),%rax
add    %rbx,%rax
jmp    *%rax
call   1070 <expr@plt>
xor    %eax,%eax
call   1090 <conditional@plt>
jmp    1197 <expr+0x17>
xor    %eax,%eax
call   1050 <get_lexval@plt>
call   1070 <expr@plt>
xor    %eax,%eax
call   1050 <get_lexval@plt>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <method_call_expr@plt>
pop    %rbx
ret
xor    %eax,%eax
call   10a0 <const_val@plt>
pop    %rbx
ret
xor    %eax,%eax
call   1080 <double_unary_op@plt>
xor    %eax,%eax
call   1060 <variable@plt>
pop    %rbx
ret
xor    %eax,%eax
call   1060 <variable@plt>
xor    %eax,%eax
call   1080 <double_unary_op@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @expr() {
%1 = alloca i32
%2 = call i32 (...) @yyselect()
switch i32 %2, label %29 [
i32 85, label %3
i32 86, label %7
i32 87, label %11
i32 88, label %13
i32 89, label %15
i32 90, label %17
i32 91, label %20
i32 92, label %23
i32 93, label %26
]
3: ; preds = %0
%4 = call i32 @expr()
%5 = call i32 (...) @conditional()
%6 = call i32 @expr()
br label %29
7: ; preds = %0
%8 = call i32 (...) @get_lexval()
%9 = call i32 @expr()
%10 = call i32 (...) @get_lexval()
br label %29
11: ; preds = %0
%12 = call i32 (...) @method_call_expr()
br label %29
13: ; preds = %0
%14 = call i32 (...) @variable()
br label %29
15: ; preds = %0
%16 = call i32 (...) @const_val()
br label %29
17: ; preds = %0
%18 = call i32 (...) @get_lexval()
%19 = call i32 @expr()
br label %29
20: ; preds = %0
%21 = call i32 (...) @get_lexval()
%22 = call i32 @expr()
br label %29
23: ; preds = %0
%24 = call i32 (...) @double_unary_op()
%25 = call i32 (...) @variable()
br label %29
26: ; preds = %0
%27 = call i32 (...) @variable()
%28 = call i32 (...) @double_unary_op()
br label %29
29: ; preds = %0, %26, %23, %20, %17, %15, %13, %11, %7, %3
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
define i32 @expr() {
br label %1
1: ; preds = %6, %0
%2 = tail call i32 (...) @yyselect()
switch i32 %2, label %7 [
i32 85, label %3
i32 86, label %8
i32 87, label %12
i32 88, label %14
i32 89, label %16
i32 90, label %18
i32 91, label %20
i32 92, label %22
i32 93, label %25
]
3: ; preds = %1
%4 = tail call i32 @expr()
%5 = tail call i32 (...) @conditional()
br label %6
6: ; preds = %3, %18, %20
br label %1
7: ; preds = %1, %12, %14, %16, %22, %25, %8
ret i32 undef
8: ; preds = %1
%9 = tail call i32 (...) @get_lexval()
%10 = tail call i32 @expr()
%11 = tail call i32 (...) @get_lexval()
br label %7
12: ; preds = %1
%13 = tail call i32 (...) @method_call_expr()
br label %7
14: ; preds = %1
%15 = tail call i32 (...) @variable()
br label %7
16: ; preds = %1
%17 = tail call i32 (...) @const_val()
br label %7
18: ; preds = %1
%19 = tail call i32 (...) @get_lexval()
br label %6
20: ; preds = %1
%21 = tail call i32 (...) @get_lexval()
br label %6
22: ; preds = %1
%23 = tail call i32 (...) @double_unary_op()
%24 = tail call i32 (...) @variable()
br label %7
25: ; preds = %1
%26 = tail call i32 (...) @variable()
%27 = tail call i32 (...) @double_unary_op()
br label %7
}