#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*/ test(char *, char *);
void TEST_shift(void) {
  test("1", "main(){printf(\"%d\", 1<<0);}");
  test("4", "main(){printf(\"%d\", 1<<2);}");
  test("1", "main(){printf(\"%d\", 1>>0);}");
  test("1", "main(){printf(\"%d\", 4>>2);}");
  test("16", "main(){int i=4; i<<=2; printf(\"%d\", i);}");
  test("2", "main(){int i=8; i>>=2; printf(\"%d\", i);}");
}


x86 assembly (clang, -O0):
<TEST_shift>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <test@plt>
lea    0xef0(%rip),%rdi
lea    0xeeb(%rip),%rsi
call   1030 <test@plt>
lea    0xebf(%rip),%rdi
lea    0xef4(%rip),%rsi
call   1030 <test@plt>
lea    0xeac(%rip),%rdi
lea    0xefd(%rip),%rsi
call   1030 <test@plt>
lea    0xf0d(%rip),%rdi
lea    0xf09(%rip),%rsi
call   1030 <test@plt>
lea    0xf26(%rip),%rdi
lea    0xf21(%rip),%rsi
call   1030 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TEST_shift>:
push   %rbx
lea    0xee8(%rip),%rbx
lea    0xee3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test@plt>
lea    0xef0(%rip),%rdi
lea    0xeeb(%rip),%rsi
call   1030 <test@plt>
lea    0xefb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test@plt>
lea    0xf08(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test@plt>
lea    0xf15(%rip),%rdi
lea    0xf11(%rip),%rsi
call   1030 <test@plt>
lea    0xf2e(%rip),%rdi
lea    0xf29(%rip),%rsi
pop    %rbx
jmp    1030 <test@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [28 x i8] c"main(){printf(\22%d\22, 1<<0);}\00"
@.str.2 = [2 x i8] c"4\00"
@.str.3 = [28 x i8] c"main(){printf(\22%d\22, 1<<2);}\00"
@.str.4 = [28 x i8] c"main(){printf(\22%d\22, 1>>0);}\00"
@.str.5 = [28 x i8] c"main(){printf(\22%d\22, 4>>2);}\00"
@.str.6 = [3 x i8] c"16\00"
@.str.7 = [41 x i8] c"main(){int i=4; i<<=2; printf(\22%d\22, i);}\00"
@.str.8 = [2 x i8] c"2\00"
@.str.9 = [41 x i8] c"main(){int i=8; i>>=2; printf(\22%d\22, i);}\00"
define void @TEST_shift() {
%1 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%4 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%5 = call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%6 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
@.str.1 = [28 x i8] c"main(){printf(\22%d\22, 1<<0);}\00"
@.str.2 = [2 x i8] c"4\00"
@.str.3 = [28 x i8] c"main(){printf(\22%d\22, 1<<2);}\00"
@.str.4 = [28 x i8] c"main(){printf(\22%d\22, 1>>0);}\00"
@.str.5 = [28 x i8] c"main(){printf(\22%d\22, 4>>2);}\00"
@.str.6 = [3 x i8] c"16\00"
@.str.7 = [41 x i8] c"main(){int i=4; i<<=2; printf(\22%d\22, i);}\00"
@.str.8 = [2 x i8] c"2\00"
@.str.9 = [41 x i8] c"main(){int i=8; i>>=2; printf(\22%d\22, i);}\00"
define void @TEST_shift() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%5 = tail call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%6 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0))
ret void
}