#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, int, ...);
int main(void) {
  int num = 0xabcd34;
  int bits = 5;
  printf(" %x %d %o \n", num, num, num);
  printf(" %x | %x is: %x\n", num, num, num | num);
  printf(" %x & %x is: %x\n", num, num, num & num);
  printf(" %x ^ %x is: %x\n", num, num, num ^ num);
  printf(" ~ %x is: %x\n", num, ~num);
  printf(" %x >> %x is: %x\n", num, bits, num >> bits);
  printf(" %x << %x is: %x\n", num, bits, num << num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xabcd34,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
or     -0x8(%rbp),%ecx
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
and    -0x8(%rbp),%ecx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    -0x8(%rbp),%ecx
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
xor    $0xffffffff,%edx
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    %eax,%ecx
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xabcd34,%esi
mov    $0xabcd34,%edx
mov    $0xabcd34,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0xabcd34,%esi
mov    $0xabcd34,%edx
mov    $0xabcd34,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0xabcd34,%esi
mov    $0xabcd34,%edx
mov    $0xabcd34,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0xabcd34,%esi
mov    $0xabcd34,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    $0xabcd34,%esi
mov    $0xff5432cb,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0xabcd34,%esi
mov    $0x5,%edx
mov    $0x55e69,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea1(%rip),%rdi
mov    $0xabcd34,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c" %x %d %o \0A\00"
@.str.1 = [17 x i8] c" %x | %x is: %x\0A\00"
@.str.2 = [17 x i8] c" %x & %x is: %x\0A\00"
@.str.3 = [17 x i8] c" %x ^ %x is: %x\0A\00"
@.str.4 = [14 x i8] c" ~ %x is: %x\0A\00"
@.str.5 = [18 x i8] c" %x >> %x is: %x\0A\00"
@.str.6 = [18 x i8] c" %x << %x is: %x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 11259188, i32* %2
store i32 5, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %6)
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = or i32 %10, %11
%13 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9, i32 %12)
%14 = load i32, i32* %2
%15 = load i32, i32* %2
%16 = load i32, i32* %2
%17 = load i32, i32* %2
%18 = and i32 %16, %17
%19 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %14, i32 %15, i32 %18)
%20 = load i32, i32* %2
%21 = load i32, i32* %2
%22 = load i32, i32* %2
%23 = load i32, i32* %2
%24 = xor i32 %22, %23
%25 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %20, i32 %21, i32 %24)
%26 = load i32, i32* %2
%27 = load i32, i32* %2
%28 = xor i32 %27, -1
%29 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %26, i32 %28)
%30 = load i32, i32* %2
%31 = load i32, i32* %3
%32 = load i32, i32* %2
%33 = load i32, i32* %3
%34 = ashr i32 %32, %33
%35 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %30, i32 %31, i32 %34)
%36 = load i32, i32* %2
%37 = load i32, i32* %3
%38 = load i32, i32* %2
%39 = load i32, i32* %2
%40 = shl i32 %38, %39
%41 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 %36, i32 %37, i32 %40)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c" %x %d %o \0A\00"
@.str.1 = [17 x i8] c" %x | %x is: %x\0A\00"
@.str.2 = [17 x i8] c" %x & %x is: %x\0A\00"
@.str.3 = [17 x i8] c" %x ^ %x is: %x\0A\00"
@.str.4 = [14 x i8] c" ~ %x is: %x\0A\00"
@.str.5 = [18 x i8] c" %x >> %x is: %x\0A\00"
@.str.6 = [18 x i8] c" %x << %x is: %x\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11259188, i32 11259188, i32 11259188)
%2 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 11259188, i32 11259188, i32 11259188)
%3 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 11259188, i32 11259188, i32 11259188)
%4 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 11259188, i32 11259188, i32 0)
%5 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 11259188, i32 -11259189)
%6 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 11259188, i32 5, i32 351849)
%7 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 11259188, i32 5, i32 poison)
ret i32 0
}