#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*/ exit(int);
int /*<<< orphan*/ get_lexval();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ statement_expr();
int /*<<< orphan*/ var_dcl();
int yyselect();
block() {
  switch (yyselect()) {
  case 36: {
    get_lexval();
    while (1) {
      switch (yyselect()) {
      case 117: {
        switch (yyselect()) {
        case 115: {
          var_dcl();
        } break;
        case 116: {
          statement_expr();
        } break;
        default:
          printf("???\n");
          exit(1);
        }
      } break;
      default:
        goto yy1;
      }
    }
  yy1:;
    get_lexval();
  } break;
  }
}


x86 assembly (clang, -O0):
<block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1060 <yyselect@plt>
sub    $0x24,%eax
jne    1208 <block+0xa8>
jmp    117d <block+0x1d>
mov    $0x0,%al
call   1070 <get_lexval@plt>
xor    %eax,%eax
call   1060 <yyselect@plt>
sub    $0x75,%eax
jne    11f7 <block+0x97>
jmp    1199 <block+0x39>
xor    %eax,%eax
call   1060 <yyselect@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0x73,%eax
je     11c4 <block+0x64>
jmp    11b3 <block+0x53>
mov    -0x8(%rbp),%eax
sub    $0x74,%eax
je     11d0 <block+0x70>
jmp    11dc <block+0x7c>
mov    $0x0,%al
call   1030 <var_dcl@plt>
jmp    11f2 <block+0x92>
mov    $0x0,%al
call   1040 <statement_expr@plt>
jmp    11f2 <block+0x92>
lea    0xe1d(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    11fc <block+0x9c>
jmp    1201 <block+0xa1>
jmp    1184 <block+0x24>
mov    $0x0,%al
call   1070 <get_lexval@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block>:
push   %rax
xor    %eax,%eax
call   1060 <yyselect@plt>
cmp    $0x24,%eax
jne    11b4 <block+0x54>
xor    %eax,%eax
call   1070 <get_lexval@plt>
jmp    1187 <block+0x27>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <statement_expr@plt>
xor    %eax,%eax
call   1060 <yyselect@plt>
cmp    $0x75,%eax
jne    11ad <block+0x4d>
xor    %eax,%eax
call   1060 <yyselect@plt>
cmp    $0x74,%eax
je     1180 <block+0x20>
cmp    $0x73,%eax
jne    11b6 <block+0x56>
xor    %eax,%eax
call   1030 <var_dcl@plt>
jmp    1187 <block+0x27>
xor    %eax,%eax
call   1070 <get_lexval@plt>
pop    %rcx
ret
lea    0xe43(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"???\0A\00"
define i32 @block() {
%1 = alloca i32
%2 = call i32 (...) @yyselect()
switch i32 %2, label %21 [
i32 36, label %3
]
3: ; preds = %0
%4 = call i32 (...) @get_lexval()
br label %5
5: ; preds = %3, %18
%6 = call i32 (...) @yyselect()
switch i32 %6, label %17 [
i32 117, label %7
]
7: ; preds = %5
%8 = call i32 (...) @yyselect()
switch i32 %8, label %13 [
i32 115, label %9
i32 116, label %11
]
9: ; preds = %7
%10 = call i32 (...) @var_dcl()
br label %16
11: ; preds = %7
%12 = call i32 (...) @statement_expr()
br label %16
13: ; preds = %7
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %11, %9
br label %18
17: ; preds = %5
br label %19
18: ; preds = %16
br label %5
19: ; preds = %17
%20 = call i32 (...) @get_lexval()
br label %21
21: ; preds = %0, %19
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@str = [4 x i8] c"???\00"
define i32 @block() {
%1 = tail call i32 (...) @yyselect()
%2 = icmp eq i32 %1, 36
br i1 %2, label %3, label %21
3: ; preds = %0
%4 = tail call i32 (...) @get_lexval()
%5 = tail call i32 (...) @yyselect()
%6 = icmp eq i32 %5, 117
br i1 %6, label %7, label %19
7: ; preds = %3, %16
%8 = tail call i32 (...) @yyselect()
switch i32 %8, label %13 [
i32 115, label %9
i32 116, label %11
]
9: ; preds = %7
%10 = tail call i32 (...) @var_dcl()
br label %16
11: ; preds = %7
%12 = tail call i32 (...) @statement_expr()
br label %16
13: ; preds = %7
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %9, %11
%17 = tail call i32 (...) @yyselect()
%18 = icmp eq i32 %17, 117
br i1 %18, label %7, label %19
19: ; preds = %16, %3
%20 = tail call i32 (...) @get_lexval()
br label %21
21: ; preds = %0, %19
ret i32 undef
}