#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 lower_one_mask(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int n;
  n = 6;
  printf("0X%.8X\n", lower_one_mask(n));
  n = 17;
  printf("0X%.8X\n", lower_one_mask(n));
  n = 1;
  printf("0X%.8X\n", lower_one_mask(n));
  n = 32;
  printf("0X%.8X\n", lower_one_mask(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <lower_one_mask@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x11,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <lower_one_mask@plt>
mov    %eax,%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <lower_one_mask@plt>
mov    %eax,%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
movl   $0x20,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <lower_one_mask@plt>
mov    %eax,%esi
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x6,%edi
call   1040 <lower_one_mask@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x11,%edi
call   1040 <lower_one_mask@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <lower_one_mask@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x20,%edi
call   1040 <lower_one_mask@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"0X%.8X\0A\00"
define i32 @main() {
%1 = tail call i32 @lower_one_mask(i32 6)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @lower_one_mask(i32 17)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @lower_one_mask(i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @lower_one_mask(i32 32)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}