unary_operator(op) int *op;
{
  switch (yyselect()) {
  case 86: {
    get_lexval();
    *op = '&';
  } break;
  case 87: {
    get_lexval();
    *op = '*';
  } break;
  case 88: {
    get_lexval();
    *op = '+';
  } break;
  case 89: {
    get_lexval();
    *op = '-';
  } break;
  case 90: {
    get_lexval();
    *op = '~';
  } break;
  case 91: {
    get_lexval();
    *op = '!';
  } break;
  }
}


x86 assembly (clang, -O0):
<unary_operator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
call   1030 <yyselect@plt>
add    $0xffffffaa,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x5,%eax
ja     11d8 <unary_operator+0xb8>
mov    -0x18(%rbp),%rax
lea    0xeb0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x10(%rbp),%rax
movl   $0x26,(%rax)
jmp    11d8 <unary_operator+0xb8>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x10(%rbp),%rax
movl   $0x2a,(%rax)
jmp    11d8 <unary_operator+0xb8>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x10(%rbp),%rax
movl   $0x2b,(%rax)
jmp    11d8 <unary_operator+0xb8>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x10(%rbp),%rax
movl   $0x2d,(%rax)
jmp    11d8 <unary_operator+0xb8>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x10(%rbp),%rax
movl   $0x7e,(%rax)
jmp    11d8 <unary_operator+0xb8>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x10(%rbp),%rax
movl   $0x21,(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unary_operator>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <yyselect@plt>
add    $0xffffffaa,%eax
cmp    $0x5,%eax
ja     114a <unary_operator+0x2a>
cltq
lea    0xec2(%rip),%rcx
mov    (%rcx,%rax,4),%ebp
xor    %eax,%eax
call   1040 <get_lexval@plt>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @unary_operator(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = call i32 (...) @yyselect()
switch i32 %4, label %23 [
i32 86, label %5
i32 87, label %8
i32 88, label %11
i32 89, label %14
i32 90, label %17
i32 91, label %20
]
5: ; preds = %1
%6 = call i32 (...) @get_lexval()
%7 = load i32*, i32** %3
store i32 38, i32* %7
br label %23
8: ; preds = %1
%9 = call i32 (...) @get_lexval()
%10 = load i32*, i32** %3
store i32 42, i32* %10
br label %23
11: ; preds = %1
%12 = call i32 (...) @get_lexval()
%13 = load i32*, i32** %3
store i32 43, i32* %13
br label %23
14: ; preds = %1
%15 = call i32 (...) @get_lexval()
%16 = load i32*, i32** %3
store i32 45, i32* %16
br label %23
17: ; preds = %1
%18 = call i32 (...) @get_lexval()
%19 = load i32*, i32** %3
store i32 126, i32* %19
br label %23
20: ; preds = %1
%21 = call i32 (...) @get_lexval()
%22 = load i32*, i32** %3
store i32 33, i32* %22
br label %23
23: ; preds = %1, %20, %17, %14, %11, %8, %5
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
@switch.table.unary_operator = [6 x i32] [i32 38, i32 42, i32 43, i32 45, i32 126, i32 33]
define i32 @unary_operator(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @yyselect()
%3 = add i32 %2, -86
%4 = icmp ult i32 %3, 6
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.unary_operator, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = tail call i32 (...) @get_lexval()
store i32 %8, i32* %0
br label %10
10: ; preds = %1, %5
ret i32 undef
}