#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*/ bit_and(int, int);
int /*<<< orphan*/ bit_neg(int, int);
int /*<<< orphan*/ bit_or(int, int);
int /*<<< orphan*/ bit_shift_left(int, int);
int /*<<< orphan*/ bit_shift_right(int, int);
int /*<<< orphan*/ bit_xor(int, int);
int strtol(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
void main(int argc, char *argv[]) {
  int flag = strtol(argv[1], NULL, 0);
  int mask = strtol(argv[2], NULL, 0);
  bit_and(flag, mask);
  bit_neg(flag, mask);
  bit_or(flag, mask);
  bit_xor(flag, mask);
  bit_shift_left(flag, mask);
  bit_shift_right(flag, mask);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1080 <bit_and@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <bit_neg@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <bit_or@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1090 <bit_xor@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <bit_shift_left@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <bit_shift_right@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    0x8(%rsi),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %eax,%ebx
mov    0x10(%r14),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %eax,%esi
call   1080 <bit_and@plt>
mov    %ebx,%edi
mov    %ebp,%esi
call   1050 <bit_neg@plt>
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <bit_or@plt>
mov    %ebx,%edi
mov    %ebp,%esi
call   1090 <bit_xor@plt>
mov    %ebx,%edi
mov    %ebp,%esi
call   1060 <bit_shift_left@plt>
mov    %ebx,%edi
mov    %ebp,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <bit_shift_right@plt>

LLVM IR (-O0):
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @strtol(i8* %9, i32* null, i32 0)
store i32 %10, i32* %5
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 2
%13 = load i8*, i8** %12
%14 = call i32 @strtol(i8* %13, i32* null, i32 0)
store i32 %14, i32* %6
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = call i32 @bit_and(i32 %15, i32 %16)
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = call i32 @bit_neg(i32 %18, i32 %19)
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = call i32 @bit_or(i32 %21, i32 %22)
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = call i32 @bit_xor(i32 %24, i32 %25)
%27 = load i32, i32* %5
%28 = load i32, i32* %6
%29 = call i32 @bit_shift_left(i32 %27, i32 %28)
%30 = load i32, i32* %5
%31 = load i32, i32* %6
%32 = call i32 @bit_shift_right(i32 %30, i32 %31)
ret void
}

LLVM IR (-O2):
define void @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @strtol(i8* nocapture %4, i32* null, i32 0)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @strtol(i8* nocapture %7, i32* null, i32 0)
%9 = tail call i32 @bit_and(i32 %5, i32 %8)
%10 = tail call i32 @bit_neg(i32 %5, i32 %8)
%11 = tail call i32 @bit_or(i32 %5, i32 %8)
%12 = tail call i32 @bit_xor(i32 %5, i32 %8)
%13 = tail call i32 @bit_shift_left(i32 %5, i32 %8)
%14 = tail call i32 @bit_shift_right(i32 %5, i32 %8)
ret void
}