int main() {
  int a = 14;
  if (a >> 1 != 7)
    return 1;
  if (a >> 2 != 3)
    return 2;
  if (a << 1 != 28)
    return 3;
  if (a << 2 != 56)
    return 4;
  int b = 3;
  if (a >> b != 1)
    return 5;
  if (a << b != 112)
    return 6;
  int c = a >> (b - 1);
  if (c != 3)
    return 7;
  if ((1 << 16) - 1 != 65535)
    return 8;
  if (3 << 8 != 768)
    return 9;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xe,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
cmp    $0x7,%eax
je     112d <main+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    11de <main+0xde>
mov    -0x8(%rbp),%eax
sar    $0x2,%eax
cmp    $0x3,%eax
je     1148 <main+0x48>
movl   $0x2,-0x4(%rbp)
jmp    11de <main+0xde>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
cmp    $0x1c,%eax
je     1163 <main+0x63>
movl   $0x3,-0x4(%rbp)
jmp    11de <main+0xde>
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
cmp    $0x38,%eax
je     117e <main+0x7e>
movl   $0x4,-0x4(%rbp)
jmp    11de <main+0xde>
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
cmp    $0x1,%eax
je     11a2 <main+0xa2>
movl   $0x5,-0x4(%rbp)
jmp    11de <main+0xde>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
cmp    $0x70,%eax
je     11bf <main+0xbf>
movl   $0x6,-0x4(%rbp)
jmp    11de <main+0xde>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
sar    %cl,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
je     11de <main+0xde>
movl   $0x7,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 14, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = icmp ne i32 %6, 7
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 1, i32* %1
br label %44
9: ; preds = %0
%10 = load i32, i32* %2
%11 = ashr i32 %10, 2
%12 = icmp ne i32 %11, 3
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 2, i32* %1
br label %44
14: ; preds = %9
%15 = load i32, i32* %2
%16 = shl i32 %15, 1
%17 = icmp ne i32 %16, 28
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 3, i32* %1
br label %44
19: ; preds = %14
%20 = load i32, i32* %2
%21 = shl i32 %20, 2
%22 = icmp ne i32 %21, 56
br i1 %22, label %23, label %24
23: ; preds = %19
store i32 4, i32* %1
br label %44
24: ; preds = %19
store i32 3, i32* %3
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = ashr i32 %25, %26
%28 = icmp ne i32 %27, 1
br i1 %28, label %29, label %30
29: ; preds = %24
store i32 5, i32* %1
br label %44
30: ; preds = %24
%31 = load i32, i32* %2
%32 = load i32, i32* %3
%33 = shl i32 %31, %32
%34 = icmp ne i32 %33, 112
br i1 %34, label %35, label %36
35: ; preds = %30
store i32 6, i32* %1
br label %44
36: ; preds = %30
%37 = load i32, i32* %2
%38 = load i32, i32* %3
%39 = sub nsw i32 %38, 1
%40 = ashr i32 %37, %39
store i32 %40, i32* %4
%41 = load i32, i32* %4
%42 = icmp ne i32 %41, 3
br i1 %42, label %43, label %44
43: ; preds = %36
store i32 7, i32* %1
br label %44
44: ; preds = %8, %13, %18, %23, %29, %35, %43, %36
%45 = load i32, i32* %1
ret i32 %45
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}