#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(void) {
  int f1 = 1;
  int fn = 1;
  printf("%d ", f1 == 0 && fn == 1);
  printf("%d ", !(f1 == 0 && fn == 1));
  printf("%d\n", f1 != 0 || fn != 1);
  f1 = 0;
  printf("%d ", f1 == 0 && fn == 1);
  printf("%d ", !(f1 == 0 && fn == 1));
  printf("%d\n", f1 != 0 || fn != 1);
  while (f1 != 0 || fn != 1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jne    1146 <main+0x36>
cmpl   $0x1,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xe(%rbp)
jne    1173 <main+0x63>
cmpl   $0x1,-0xc(%rbp)
sete   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xf(%rbp)
jne    11a2 <main+0x92>
cmpl   $0x1,-0xc(%rbp)
setne  %al
mov    %al,-0xf(%rbp)
mov    -0xf(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x10(%rbp)
jne    11d6 <main+0xc6>
cmpl   $0x1,-0xc(%rbp)
sete   %al
mov    %al,-0x10(%rbp)
mov    -0x10(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe1b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    1203 <main+0xf3>
cmpl   $0x1,-0xc(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xdec(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x12(%rbp)
jne    1232 <main+0x122>
cmpl   $0x1,-0xc(%rbp)
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xdc3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x13(%rbp)
jne    125f <main+0x14f>
cmpl   $0x1,-0xc(%rbp)
setne  %al
mov    %al,-0x13(%rbp)
mov    -0x13(%rbp),%al
test   $0x1,%al
jne    126f <main+0x15f>
jmp    1274 <main+0x164>
jmp    1246 <main+0x136>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xecb(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 1
br label %9
9: ; preds = %6, %0
%10 = phi i1 [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %9
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 1
br label %18
18: ; preds = %15, %9
%19 = phi i1 [ false, %9 ], [ %17, %15 ]
%20 = xor i1 %19, true
%21 = zext i1 %20 to i32
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %2
%24 = icmp ne i32 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %18
%26 = load i32, i32* %3
%27 = icmp ne i32 %26, 1
br label %28
28: ; preds = %25, %18
%29 = phi i1 [ true, %18 ], [ %27, %25 ]
%30 = zext i1 %29 to i32
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %30)
store i32 0, i32* %2
%32 = load i32, i32* %2
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %28
%35 = load i32, i32* %3
%36 = icmp eq i32 %35, 1
br label %37
37: ; preds = %34, %28
%38 = phi i1 [ false, %28 ], [ %36, %34 ]
%39 = zext i1 %38 to i32
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %2
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %37
%44 = load i32, i32* %3
%45 = icmp eq i32 %44, 1
br label %46
46: ; preds = %43, %37
%47 = phi i1 [ false, %37 ], [ %45, %43 ]
%48 = xor i1 %47, true
%49 = zext i1 %48 to i32
%50 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %49)
%51 = load i32, i32* %2
%52 = icmp ne i32 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %46
%54 = load i32, i32* %3
%55 = icmp ne i32 %54, 1
br label %56
56: ; preds = %53, %46
%57 = phi i1 [ true, %46 ], [ %55, %53 ]
%58 = zext i1 %57 to i32
%59 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %58)
br label %60
60: ; preds = %68, %56
%61 = load i32, i32* %2
%62 = icmp ne i32 %61, 0
br i1 %62, label %66, label %63
63: ; preds = %60
%64 = load i32, i32* %3
%65 = icmp ne i32 %64, 1
br label %66
66: ; preds = %63, %60
%67 = phi i1 [ true, %60 ], [ %65, %63 ]
br i1 %67, label %68, label %69
68: ; preds = %66
br label %60
69: ; preds = %66
%70 = load i32, i32* %1
ret i32 %70
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 0
}