#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 */
char CHAR_BIT;
int INT_MIN;
void test() {
  char c;
  c = 0 << 0;
  c = 0 << 1;
  c = 1 << 0;
  c = 1 << -0;
  c = 1 >> -0;
  c = 1 << -1;
  c = 1 >> -1;
  c = 1 << c;
  c <<= 0;
  c >>= 0;
  c <<= 1;
  c >>= 1;
  c <<= -1;
  c >>= -1;
  c <<= 999999;
  c >>= 999999;
  c <<= CHAR_BIT;
  c >>= CHAR_BIT;
  c <<= CHAR_BIT + 1;
  c >>= CHAR_BIT + 1;
  (void)((long)c << CHAR_BIT);
  int i;
  i = 1 << ((sizeof(int) * CHAR_BIT) - 2);
  i = 2 << ((sizeof(int) * CHAR_BIT) - 1);
  i = 1 << ((sizeof(int) * CHAR_BIT) - 1);
  i = -1 << ((sizeof(int) * CHAR_BIT) - 1);
  i = 0 << ((sizeof(int) * CHAR_BIT) - 1);
  i = (char)1 << ((sizeof(int) * CHAR_BIT) - 2);
  unsigned u;
  u = 1U << ((sizeof(int) * CHAR_BIT) - 1);
  u = 5U << ((sizeof(int) * CHAR_BIT) - 1);
  long long int lli;
  lli = INT_MIN << 2;
  lli = 1LL << (sizeof(long long) * CHAR_BIT - 2);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
movb   $0x0,-0x1(%rbp)
movb   $0x1,-0x1(%rbp)
movb   $0x1,-0x1(%rbp)
movb   $0x1,-0x1(%rbp)
mov    %al,-0x1(%rbp)
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
shl    $0x0,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sar    $0x0,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sar    $0x1,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    $0xffffffff,%ecx
shl    %cl,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    $0xffffffff,%ecx
sar    %cl,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    $0xf423f,%ecx
shl    %cl,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    $0xf423f,%ecx
sar    %cl,%eax
mov    %al,-0x1(%rbp)
mov    0x2e45(%rip),%rax
movsbl (%rax),%ecx
movsbl -0x1(%rbp),%eax
shl    %cl,%eax
mov    %al,-0x1(%rbp)
mov    0x2e32(%rip),%rax
movsbl (%rax),%ecx
movsbl -0x1(%rbp),%eax
sar    %cl,%eax
mov    %al,-0x1(%rbp)
mov    0x2e1f(%rip),%rax
movsbl (%rax),%ecx
add    $0x1,%ecx
movsbl -0x1(%rbp),%eax
shl    %cl,%eax
mov    %al,-0x1(%rbp)
mov    0x2e09(%rip),%rax
movsbl (%rax),%ecx
add    $0x1,%ecx
movsbl -0x1(%rbp),%eax
sar    %cl,%eax
mov    %al,-0x1(%rbp)
mov    0x2df3(%rip),%rax
movsbq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    0x2dd4(%rip),%rax
movsbq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x2,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    0x2db5(%rip),%rax
movsbq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    0x2d96(%rip),%rax
movsbq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    0x2d77(%rip),%rax
movsbq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%ecx
xor    %eax,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    0x2d5b(%rip),%rax
movsbq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    0x2d3c(%rip),%rax
movsbq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    0x2d1d(%rip),%rax
movsbq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x5,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    0x2d0e(%rip),%rax
mov    (%rax),%eax
shl    $0x2,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    0x2cec(%rip),%rax
movsbq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
ret

LLVM IR (-O0):
@CHAR_BIT = global i8 0
@INT_MIN = global i32 0
define void @test() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i8 0, i8* %1
store i8 0, i8* %1
store i8 1, i8* %1
store i8 1, i8* %1
store i8 1, i8* %1
store i8 poison, i8* %1
store i8 poison, i8* %1
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = shl i32 1, %6
%8 = trunc i32 %7 to i8
store i8 %8, i8* %1
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
%11 = shl i32 %10, 0
%12 = trunc i32 %11 to i8
store i8 %12, i8* %1
%13 = load i8, i8* %1
%14 = sext i8 %13 to i32
%15 = ashr i32 %14, 0
%16 = trunc i32 %15 to i8
store i8 %16, i8* %1
%17 = load i8, i8* %1
%18 = sext i8 %17 to i32
%19 = shl i32 %18, 1
%20 = trunc i32 %19 to i8
store i8 %20, i8* %1
%21 = load i8, i8* %1
%22 = sext i8 %21 to i32
%23 = ashr i32 %22, 1
%24 = trunc i32 %23 to i8
store i8 %24, i8* %1
%25 = load i8, i8* %1
%26 = sext i8 %25 to i32
%27 = shl i32 %26, -1
%28 = trunc i32 %27 to i8
store i8 %28, i8* %1
%29 = load i8, i8* %1
%30 = sext i8 %29 to i32
%31 = ashr i32 %30, -1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %1
%33 = load i8, i8* %1
%34 = sext i8 %33 to i32
%35 = shl i32 %34, 999999
%36 = trunc i32 %35 to i8
store i8 %36, i8* %1
%37 = load i8, i8* %1
%38 = sext i8 %37 to i32
%39 = ashr i32 %38, 999999
%40 = trunc i32 %39 to i8
store i8 %40, i8* %1
%41 = load i8, i8* @CHAR_BIT
%42 = sext i8 %41 to i32
%43 = load i8, i8* %1
%44 = sext i8 %43 to i32
%45 = shl i32 %44, %42
%46 = trunc i32 %45 to i8
store i8 %46, i8* %1
%47 = load i8, i8* @CHAR_BIT
%48 = sext i8 %47 to i32
%49 = load i8, i8* %1
%50 = sext i8 %49 to i32
%51 = ashr i32 %50, %48
%52 = trunc i32 %51 to i8
store i8 %52, i8* %1
%53 = load i8, i8* @CHAR_BIT
%54 = sext i8 %53 to i32
%55 = add nsw i32 %54, 1
%56 = load i8, i8* %1
%57 = sext i8 %56 to i32
%58 = shl i32 %57, %55
%59 = trunc i32 %58 to i8
store i8 %59, i8* %1
%60 = load i8, i8* @CHAR_BIT
%61 = sext i8 %60 to i32
%62 = add nsw i32 %61, 1
%63 = load i8, i8* %1
%64 = sext i8 %63 to i32
%65 = ashr i32 %64, %62
%66 = trunc i32 %65 to i8
store i8 %66, i8* %1
%67 = load i8, i8* %1
%68 = sext i8 %67 to i64
%69 = load i8, i8* @CHAR_BIT
%70 = sext i8 %69 to i32
%71 = zext i32 %70 to i64
%72 = shl i64 %68, %71
%73 = load i8, i8* @CHAR_BIT
%74 = sext i8 %73 to i64
%75 = mul i64 4, %74
%76 = sub i64 %75, 2
%77 = trunc i64 %76 to i32
%78 = shl i32 1, %77
store i32 %78, i32* %2
%79 = load i8, i8* @CHAR_BIT
%80 = sext i8 %79 to i64
%81 = mul i64 4, %80
%82 = sub i64 %81, 1
%83 = trunc i64 %82 to i32
%84 = shl i32 2, %83
store i32 %84, i32* %2
%85 = load i8, i8* @CHAR_BIT
%86 = sext i8 %85 to i64
%87 = mul i64 4, %86
%88 = sub i64 %87, 1
%89 = trunc i64 %88 to i32
%90 = shl i32 1, %89
store i32 %90, i32* %2
%91 = load i8, i8* @CHAR_BIT
%92 = sext i8 %91 to i64
%93 = mul i64 4, %92
%94 = sub i64 %93, 1
%95 = trunc i64 %94 to i32
%96 = shl i32 -1, %95
store i32 %96, i32* %2
%97 = load i8, i8* @CHAR_BIT
%98 = sext i8 %97 to i64
%99 = mul i64 4, %98
%100 = sub i64 %99, 1
%101 = trunc i64 %100 to i32
%102 = shl i32 0, %101
store i32 %102, i32* %2
%103 = load i8, i8* @CHAR_BIT
%104 = sext i8 %103 to i64
%105 = mul i64 4, %104
%106 = sub i64 %105, 2
%107 = trunc i64 %106 to i32
%108 = shl i32 1, %107
store i32 %108, i32* %2
%109 = load i8, i8* @CHAR_BIT
%110 = sext i8 %109 to i64
%111 = mul i64 4, %110
%112 = sub i64 %111, 1
%113 = trunc i64 %112 to i32
%114 = shl i32 1, %113
store i32 %114, i32* %3
%115 = load i8, i8* @CHAR_BIT
%116 = sext i8 %115 to i64
%117 = mul i64 4, %116
%118 = sub i64 %117, 1
%119 = trunc i64 %118 to i32
%120 = shl i32 5, %119
store i32 %120, i32* %3
%121 = load i32, i32* @INT_MIN
%122 = shl i32 %121, 2
%123 = sext i32 %122 to i64
store i64 %123, i64* %4
%124 = load i8, i8* @CHAR_BIT
%125 = sext i8 %124 to i64
%126 = mul i64 8, %125
%127 = sub i64 %126, 2
%128 = shl i64 1, %127
store i64 %128, i64* %4
ret void
}

LLVM IR (-O2):
@CHAR_BIT = global i8 0
@INT_MIN = global i32 0
define void @test() {
ret void
}