#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, int);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *, int *);
int main() {
  FILE *in = fopen("task.in", "r");
  FILE *out = fopen("task.out", "w");
  int a, b;
  fscanf(in, "%d%d", &a, &b);
  fclose(in);
  fprintf(out, "%d&%d=%d\n", a, b, a & b);
  fprintf(out, "%d|%d=%d\n", a, b, a | b);
  fprintf(out, "%d^%d=%d\n", a, b, a ^ b);
  fprintf(out, "%d<<%d=%d\n", a, b, a << b);
  fprintf(out, "%d>>%d=%d\n", a, b, a >> b);
  fclose(out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xeab(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xe9d(%rip),%rdi
lea    0xe9f(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe8d(%rip),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <fscanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
and    -0x20(%rbp),%r8d
lea    0xe63(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
or     -0x20(%rbp),%r8d
lea    0xe4f(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
xor    -0x20(%rbp),%r8d
lea    0xe3b(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%ecx
shl    %cl,%r8d
mov    -0x28(%rbp),%ecx
lea    0xe1f(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%ecx
sar    %cl,%r8d
mov    -0x24(%rbp),%ecx
lea    0xe04(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
lea    0xea9(%rip),%rdi
lea    0xeab(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r14
lea    0xe9e(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %rsp,%rcx
mov    %rbx,%rdi
call   1040 <fscanf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
mov    %ecx,%r8d
and    %edx,%r8d
lea    0xe77(%rip),%rsi
mov    %r14,%rdi
call   1050 <fprintf@plt>
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
mov    %ecx,%r8d
or     %edx,%r8d
lea    0xe65(%rip),%rsi
mov    %r14,%rdi
call   1050 <fprintf@plt>
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
mov    %ecx,%r8d
xor    %edx,%r8d
lea    0xe53(%rip),%rsi
mov    %r14,%rdi
call   1050 <fprintf@plt>
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
mov    %edx,%r8d
shl    %cl,%r8d
lea    0xe41(%rip),%rsi
mov    %r14,%rdi
call   1050 <fprintf@plt>
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
mov    %edx,%r8d
sar    %cl,%r8d
lea    0xe30(%rip),%rsi
mov    %r14,%rdi
call   1050 <fprintf@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"task.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [9 x i8] c"task.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [5 x i8] c"%d%d\00"
@.str.5 = [10 x i8] c"%d&%d=%d\0A\00"
@.str.6 = [10 x i8] c"%d|%d=%d\0A\00"
@.str.7 = [10 x i8] c"%d^%d=%d\0A\00"
@.str.8 = [11 x i8] c"%d<<%d=%d\0A\00"
@.str.9 = [11 x i8] c"%d>>%d=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32* %1, i32* %2)
%8 = call i32 @fclose(i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = and i32 %10, %9
%12 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = or i32 %14, %13
%16 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %1
%18 = load i32, i32* %2
%19 = xor i32 %18, %17
%20 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %17, i32 %18, i32 %19)
%21 = load i32, i32* %1
%22 = load i32, i32* %2
%23 = shl i32 %21, %22
%24 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 %21, i32 %22, i32 %23)
%25 = load i32, i32* %1
%26 = load i32, i32* %2
%27 = ashr i32 %25, %26
%28 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 %25, i32 %26, i32 %27)
%29 = call i32 @fclose(i32* %4)
ret i32 0
}