#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*/ printf(char *, ...);
int main(void) {
  int e;
  printf("| %.2s | %.32s | %.32s | %.32s | %.32s | \n", "e", "~0 << e",
         "~0 >> e", "1 << e", "1 >> e");
  for (e = 0; e < 66; ++e) {
    printf("| %2d | %32u | %32u | %32u | %32u |\n", e, ~0 << e, ~0 >> e, 1 << e,
           1 >> e);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xf04(%rip),%rsi
lea    0xef7(%rip),%rdx
lea    0xef8(%rip),%rcx
lea    0xef9(%rip),%r8
lea    0xef9(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x42,-0x8(%rbp)
jge    11b2 <main+0xa2>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%eax
sar    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%r8d
shl    %cl,%r8d
mov    -0x8(%rbp),%ecx
mov    $0x1,%r9d
sar    %cl,%r9d
mov    -0xc(%rbp),%ecx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <main+0x47>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xee6(%rip),%rdi
lea    0xf10(%rip),%rsi
lea    0xf03(%rip),%rdx
lea    0xf04(%rip),%rcx
lea    0xf05(%rip),%r8
lea    0xf05(%rip),%r9
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefe(%rip),%rbx
xor    %ebp,%ebp
nopl   (%rax)
mov    $0xffffffff,%edx
mov    %ebp,%ecx
shl    %cl,%edx
mov    $0x1,%r8d
shl    %cl,%r8d
mov    $0x1,%r9d
shr    %cl,%r9d
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0xffffffff,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x42,%ebp
jne    1150 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [43 x i8] c"| %.2s | %.32s | %.32s | %.32s | %.32s | \0A\00"
@.str.1 = [2 x i8] c"e\00"
@.str.2 = [8 x i8] c"~0 << e\00"
@.str.3 = [8 x i8] c"~0 >> e\00"
@.str.4 = [7 x i8] c"1 << e\00"
@.str.5 = [7 x i8] c"1 >> e\00"
@.str.6 = [37 x i8] c"| %2d | %32u | %32u | %32u | %32u |\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %2
br label %4
4: ; preds = %18, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 66
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = shl i32 -1, %9
%11 = load i32, i32* %2
%12 = ashr i32 -1, %11
%13 = load i32, i32* %2
%14 = shl i32 1, %13
%15 = load i32, i32* %2
%16 = ashr i32 1, %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i32 %8, i32 %10, i32 %12, i32 %14, i32 %16)
br label %18
18: ; preds = %7
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %4
21: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [43 x i8] c"| %.2s | %.32s | %.32s | %.32s | %.32s | \0A\00"
@.str.1 = [2 x i8] c"e\00"
@.str.2 = [8 x i8] c"~0 << e\00"
@.str.3 = [8 x i8] c"~0 >> e\00"
@.str.4 = [7 x i8] c"1 << e\00"
@.str.5 = [7 x i8] c"1 >> e\00"
@.str.6 = [37 x i8] c"| %2d | %32u | %32u | %32u | %32u |\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %8, %2 ]
%4 = shl nsw i32 -1, %3
%5 = shl nuw i32 1, %3
%6 = lshr i32 1, %3
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i32 %3, i32 %4, i32 -1, i32 %5, i32 %6)
%8 = add nuw nsw i32 %3, 1
%9 = icmp eq i32 %8, 66
br i1 %9, label %10, label %2
10: ; preds = %2
ret i32 0
}