#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 main(int argc, char *argv[]) {
  unsigned char p = 0, p2 = 0, p3 = 0;
  printf("Res_1: %i\n", p);
  printf("Res_1: %i\n", p << 1);
  printf("Res_1: %i\n", p << 2);
  p2 <<= 1;
  p2 <<= 1;
  printf("Res_1: %i\n", p2);
  printf("Res_1: %i\n", p2);
  p3 |= 0x01;
  printf("Res_1: %i\n", p3);
  p3 |= 0x04;
  printf("Res_1: %i\n", p3);
  p3 |= 0x04;
  printf("Res_1: %i\n", p3);
  printf("Res_1: %x\n", 0x45 & 0xF0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movb   $0x0,-0x13(%rbp)
movzbl -0x11(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x11(%rbp),%esi
shl    $0x1,%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x11(%rbp),%esi
shl    $0x2,%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x12(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x12(%rbp)
movzbl -0x12(%rbp),%esi
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x12(%rbp),%esi
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x13(%rbp),%eax
or     $0x1,%eax
mov    %al,-0x13(%rbp)
movzbl -0x13(%rbp),%esi
lea    0xe4f(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x13(%rbp),%eax
or     $0x4,%eax
mov    %al,-0x13(%rbp)
movzbl -0x13(%rbp),%esi
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x13(%rbp),%eax
or     $0x4,%eax
mov    %al,-0x13(%rbp)
movzbl -0x13(%rbp),%esi
lea    0xe1b(%rip),%rdi
call   1030 <printf@plt>
lea    0xe1a(%rip),%rdi
mov    $0x40,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
mov    $0x40,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Res_1: %i\0A\00"
@.str.1 = [11 x i8] c"Res_1: %x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 0, i8* %6
store i8 0, i8* %7
store i8 0, i8* %8
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 1
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 2
%19 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i8, i8* %7
%21 = zext i8 %20 to i32
%22 = shl i32 %21, 1
%23 = trunc i32 %22 to i8
store i8 %23, i8* %7
%24 = load i8, i8* %7
%25 = zext i8 %24 to i32
%26 = shl i32 %25, 1
%27 = trunc i32 %26 to i8
store i8 %27, i8* %7
%28 = load i8, i8* %7
%29 = zext i8 %28 to i32
%30 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %29)
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = load i8, i8* %8
%35 = zext i8 %34 to i32
%36 = or i32 %35, 1
%37 = trunc i32 %36 to i8
store i8 %37, i8* %8
%38 = load i8, i8* %8
%39 = zext i8 %38 to i32
%40 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %39)
%41 = load i8, i8* %8
%42 = zext i8 %41 to i32
%43 = or i32 %42, 4
%44 = trunc i32 %43 to i8
store i8 %44, i8* %8
%45 = load i8, i8* %8
%46 = zext i8 %45 to i32
%47 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %46)
%48 = load i8, i8* %8
%49 = zext i8 %48 to i32
%50 = or i32 %49, 4
%51 = trunc i32 %50 to i8
store i8 %51, i8* %8
%52 = load i8, i8* %8
%53 = zext i8 %52 to i32
%54 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %53)
%55 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 64)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Res_1: %i\0A\00"
@.str.1 = [11 x i8] c"Res_1: %x\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 5)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 5)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 64)
ret i32 0
}