#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*/ PrintBits(unsigned int);
unsigned int SetBits(unsigned int, int, int, unsigned int);
int /*<<< orphan*/ printf(char *);
main() {
  unsigned x = 1523200103;
  unsigned y = 1234097820;
  printf("x : ");
  PrintBits(x);
  printf("y : ");
  PrintBits(y);
  x = SetBits(x, 14, 3, y);
  printf("x : ");
  PrintBits(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5aca3067,-0x4(%rbp)
movl   $0x498ed69c,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <PrintBits@plt>
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <PrintBits@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%ecx
mov    $0xe,%esi
mov    $0x3,%edx
call   1030 <SetBits@plt>
mov    %eax,-0x4(%rbp)
lea    0xe73(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <PrintBits@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    $0x5aca3067,%edi
call   1050 <PrintBits@plt>
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
mov    $0x498ed69c,%edi
call   1050 <PrintBits@plt>
mov    $0x5aca3067,%edi
mov    $0xe,%esi
mov    $0x3,%edx
mov    $0x498ed69c,%ecx
call   1030 <SetBits@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %ebp,%edi
call   1050 <PrintBits@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"x : \00"
@.str.1 = [5 x i8] c"y : \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @PrintBits(i32 1523200103)
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @PrintBits(i32 1234097820)
%5 = tail call i32 @SetBits(i32 1523200103, i32 14, i32 3, i32 1234097820)
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @PrintBits(i32 %5)
ret i32 0
}