#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 /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int a, b, c, d, e, p, q;
  printf("please enter two numbers:\n");
  scanf("%d%d", &a, &b);
  c = a & b;
  d = b | a;
  e = a >> b;
  p = b ^ a;
  q = b << 3;
  printf("c=%d,d=%d,e=%d,p=%d,q=%d\n", c, d, e, p, q);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%r9d
mov    %r9d,%esi
and    %eax,%esi
mov    %r9d,%edx
or     %eax,%edx
mov    %r9d,%r8d
xor    %eax,%r8d
mov    %r9d,%ecx
sar    %cl,%eax
shl    $0x3,%r9d
lea    0xe8c(%rip),%rdi
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"please enter two numbers:\0A\00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [26 x i8] c"c=%d,d=%d,e=%d,p=%d,q=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = and i32 %11, %12
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = or i32 %14, %15
store i32 %16, i32* %5
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = ashr i32 %17, %18
store i32 %19, i32* %6
%20 = load i32, i32* %3
%21 = load i32, i32* %2
%22 = xor i32 %20, %21
store i32 %22, i32* %7
%23 = load i32, i32* %3
%24 = shl i32 %23, 3
store i32 %24, i32* %8
%25 = load i32, i32* %4
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = load i32, i32* %7
%29 = load i32, i32* %8
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %25, i32 %26, i32 %27, i32 %28, i32 %29)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [26 x i8] c"c=%d,d=%d,e=%d,p=%d,q=%d\0A\00"
@str = [26 x i8] c"please enter two numbers:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = and i32 %8, %7
%10 = or i32 %8, %7
%11 = ashr i32 %7, %8
%12 = xor i32 %8, %7
%13 = shl i32 %8, 3
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12, i32 %13)
ret i32 0
}