#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 bic(int, int);
int bis(int, int);
int bool_or(int, int);
int bool_xor(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 99;
  int y = 101;
  int test_bool_or = bool_or(x, y);
  int test_bool_xor = bool_xor(x, y);
  printf("bool_or: %d\n", test_bool_or);
  printf("bool_xor: %d\n", test_bool_xor);
  printf("bis: %d\n", bis(x, y));
  printf("bic: %d\n", bic(x, y));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x63,-0x8(%rbp)
movl   $0x65,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <bool_or@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <bool_xor@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1070 <bis@plt>
mov    %eax,%esi
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1060 <bic@plt>
mov    %eax,%esi
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x63,%edi
mov    $0x65,%esi
call   1040 <bool_or@plt>
mov    %eax,%ebx
mov    $0x63,%edi
mov    $0x65,%esi
call   1050 <bool_xor@plt>
mov    %eax,%ebp
lea    0xe84(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xe83(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
mov    $0x63,%edi
mov    $0x65,%esi
call   1070 <bis@plt>
lea    0xe74(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x63,%edi
mov    $0x65,%esi
call   1060 <bic@plt>
lea    0xe60(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"bool_or: %d\0A\00"
@.str.1 = [14 x i8] c"bool_xor: %d\0A\00"
@.str.2 = [9 x i8] c"bis: %d\0A\00"
@.str.3 = [9 x i8] c"bic: %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
store i32 99, i32* %2
store i32 101, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @bool_or(i32 %6, i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @bool_xor(i32 %9, i32 %10)
store i32 %11, i32* %5
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = call i32 @bis(i32 %16, i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = call i32 @bic(i32 %20, i32 %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"bool_or: %d\0A\00"
@.str.1 = [14 x i8] c"bool_xor: %d\0A\00"
@.str.2 = [9 x i8] c"bis: %d\0A\00"
@.str.3 = [9 x i8] c"bic: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @bool_or(i32 99, i32 101)
%2 = tail call i32 @bool_xor(i32 99, i32 101)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%5 = tail call i32 @bis(i32 99, i32 101)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @bic(i32 99, i32 101)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret i32 0
}