#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 *, unsigned int);
void test1() {
  int i = 0xFFFFFFFF;
  unsigned int ui = 0xFFFFFFFF;
  printf("int = %08X\n", i);
  printf("unsigned int = %08X\n", ui);
  i = i >> 4;
  ui = ui >> 4;
  printf("int >> 4 = %08X\n", i);
  printf("unsigned int >> 4 = %08X\n", ui);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %rax
lea    0xef1(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0xfffffff,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"int = %08X\0A\00"
@.str.1 = [21 x i8] c"unsigned int = %08X\0A\00"
@.str.2 = [17 x i8] c"int >> 4 = %08X\0A\00"
@.str.3 = [26 x i8] c"unsigned int >> 4 = %08X\0A\00"
define void @test1() {
%1 = alloca i32
%2 = alloca i32
store i32 -1, i32* %1
store i32 -1, i32* %2
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = ashr i32 %7, 4
store i32 %8, i32* %1
%9 = load i32, i32* %2
%10 = lshr i32 %9, 4
store i32 %10, i32* %2
%11 = load i32, i32* %1
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"int = %08X\0A\00"
@.str.1 = [21 x i8] c"unsigned int = %08X\0A\00"
@.str.2 = [17 x i8] c"int >> 4 = %08X\0A\00"
@.str.3 = [26 x i8] c"unsigned int >> 4 = %08X\0A\00"
define void @test1() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 -1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 -1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 268435455)
ret void
}