#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int val = 1;
  int resx = (val << 3) + (val << 2) + (val << 1);
  printf("%d\n", resx);
  int resy = (val << 1) + val;
  printf("%d\n", resy);
  int resw = (val << 2) + (val << 1);
  printf("%d\n", resw);
  int resz = (val << 5) - val;
  printf("%d\n", resz);
  int resk = (val << 1) - (val << 3);
  printf("%d\n", resk);
  int resj = (val << 6) - (val << 3) - val;
  printf("%d\n", resj);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    -0x8(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shl    $0x5,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shl    $0x6,%eax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
sub    %ecx,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
lea    0xe1e(%rip),%rdi
call   1030 <printf@plt>
mov    0x2df2(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xe,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1f,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffa,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x37,%esi
call   1030 <printf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%9 = load i32, i32* %2
%10 = shl i32 %9, 3
%11 = load i32, i32* %2
%12 = shl i32 %11, 2
%13 = add nsw i32 %10, %12
%14 = load i32, i32* %2
%15 = shl i32 %14, 1
%16 = add nsw i32 %13, %15
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %2
%20 = shl i32 %19, 1
%21 = load i32, i32* %2
%22 = add nsw i32 %20, %21
store i32 %22, i32* %4
%23 = load i32, i32* %4
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %2
%26 = shl i32 %25, 2
%27 = load i32, i32* %2
%28 = shl i32 %27, 1
%29 = add nsw i32 %26, %28
store i32 %29, i32* %5
%30 = load i32, i32* %5
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %2
%33 = shl i32 %32, 5
%34 = load i32, i32* %2
%35 = sub nsw i32 %33, %34
store i32 %35, i32* %6
%36 = load i32, i32* %6
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = load i32, i32* %2
%39 = shl i32 %38, 1
%40 = load i32, i32* %2
%41 = shl i32 %40, 3
%42 = sub nsw i32 %39, %41
store i32 %42, i32* %7
%43 = load i32, i32* %7
%44 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %43)
%45 = load i32, i32* %2
%46 = shl i32 %45, 6
%47 = load i32, i32* %2
%48 = shl i32 %47, 3
%49 = sub nsw i32 %46, %48
%50 = load i32, i32* %2
%51 = sub nsw i32 %49, %50
store i32 %51, i32* %8
%52 = load i32, i32* %8
%53 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %52)
%54 = load i32, i32* @EXIT_SUCCESS
ret i32 %54
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 14)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 31)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -6)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 55)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}