#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);
void bitshifted_values(int *g) {
  printf("third:  %i\n", *g << 0);
  printf("third:  %i\n", *g << 1);
  printf("third:  %i\n", *g << 2);
  printf("third:  %i\n", *g << 3);
  printf("third:  %i\n", *g << 4);
  printf("third:  %i\n", *g << 5);
  printf("third:  %i\n", *g << 6);
  printf("third:  %i\n", *g << 7);
}


x86 assembly (clang, -O0):
<bitshifted_values>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
shl    $0x0,%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
shl    $0x1,%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
shl    $0x2,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
shl    $0x3,%esi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
shl    $0x4,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
shl    $0x5,%esi
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
shl    $0x6,%esi
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
shl    $0x7,%esi
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitshifted_values>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee0(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
add    %esi,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
shl    $0x2,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
shl    $0x3,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
shl    $0x4,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
shl    $0x5,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
shl    $0x6,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
shl    $0x7,%esi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"third: %i\0A\00"
define void @bitshifted_values(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = shl i32 %4, 0
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = shl i32 %8, 1
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32*, i32** %2
%12 = load i32, i32* %11
%13 = shl i32 %12, 2
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32*, i32** %2
%16 = load i32, i32* %15
%17 = shl i32 %16, 3
%18 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32*, i32** %2
%20 = load i32, i32* %19
%21 = shl i32 %20, 4
%22 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = load i32*, i32** %2
%24 = load i32, i32* %23
%25 = shl i32 %24, 5
%26 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = load i32*, i32** %2
%28 = load i32, i32* %27
%29 = shl i32 %28, 6
%30 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %29)
%31 = load i32*, i32** %2
%32 = load i32, i32* %31
%33 = shl i32 %32, 7
%34 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %33)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"third: %i\0A\00"
define void @bitshifted_values(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* %0
%5 = shl i32 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %0
%8 = shl i32 %7, 2
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %0
%11 = shl i32 %10, 3
%12 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %0
%14 = shl i32 %13, 4
%15 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %0
%17 = shl i32 %16, 5
%18 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %0
%20 = shl i32 %19, 6
%21 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %0
%23 = shl i32 %22, 7
%24 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %23)
ret void
}