#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 */
scalar_t__ one();
int /*<<< orphan*/ printf(char *, int);
scalar_t__ zero();
int main() {
  printf("%d\n", 0 && 0);
  printf("%d\n", 0 && 1);
  printf("%d\n", 1 && 0);
  printf("%d\n", 1 && 1);
  printf("%d\n", 0 || 0);
  printf("%d\n", 0 || 1);
  printf("%d\n", 1 || 0);
  printf("%d\n", 1 || 1);
  printf("%d\n", zero() && zero());
  printf("%d\n", zero() && one());
  printf("%d\n", one() && zero());
  printf("%d\n", one() && one());
  printf("%d\n", zero() || zero());
  printf("%d\n", zero() || one());
  printf("%d\n", one() || zero());
  printf("%d\n", one() || one());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xe9e(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xe7f(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xe71(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xe60(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xe4f(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <zero@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     11e5 <main+0xb5>
mov    $0x0,%al
call   1040 <zero@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <zero@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x6(%rbp)
je     1223 <main+0xf3>
mov    $0x0,%al
call   1050 <one@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xdce(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <one@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x7(%rbp)
je     1261 <main+0x131>
mov    $0x0,%al
call   1040 <zero@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd90(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <one@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x8(%rbp)
je     129f <main+0x16f>
mov    $0x0,%al
call   1050 <one@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x8(%rbp)
mov    -0x8(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd52(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <zero@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    12dd <main+0x1ad>
mov    $0x0,%al
call   1040 <zero@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd14(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <zero@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xa(%rbp)
jne    131b <main+0x1eb>
mov    $0x0,%al
call   1050 <one@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xcd6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <one@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xb(%rbp)
jne    1359 <main+0x229>
mov    $0x0,%al
call   1040 <zero@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xc98(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <one@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xc(%rbp)
jne    1397 <main+0x267>
mov    $0x0,%al
call   1050 <one@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xc(%rbp)
mov    -0xc(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xc5a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rbx
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%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    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <zero@plt>
mov    $0x0,%esi
test   %rax,%rax
je     11b9 <main+0x89>
xor    %eax,%eax
call   1040 <zero@plt>
xor    %esi,%esi
test   %rax,%rax
setne  %sil
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <zero@plt>
test   %rax,%rax
je     11e1 <main+0xb1>
xor    %eax,%eax
call   1050 <one@plt>
xor    %ebp,%ebp
test   %rax,%rax
setne  %bpl
lea    0xe18(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <one@plt>
mov    $0x0,%esi
test   %rax,%rax
je     1212 <main+0xe2>
xor    %eax,%eax
call   1040 <zero@plt>
xor    %esi,%esi
test   %rax,%rax
setne  %sil
lea    0xde7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <one@plt>
test   %rax,%rax
je     1239 <main+0x109>
xor    %eax,%eax
call   1050 <one@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
lea    0xdc0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <zero@plt>
mov    $0x1,%ebx
mov    $0x1,%esi
test   %rax,%rax
jne    126d <main+0x13d>
xor    %eax,%eax
call   1040 <zero@plt>
xor    %esi,%esi
test   %rax,%rax
setne  %sil
lea    0xd8c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <zero@plt>
test   %rax,%rax
jne    1294 <main+0x164>
xor    %eax,%eax
call   1050 <one@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
lea    0xd65(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <one@plt>
mov    $0x1,%ebx
mov    $0x1,%esi
test   %rax,%rax
jne    12c8 <main+0x198>
xor    %eax,%eax
call   1040 <zero@plt>
xor    %esi,%esi
test   %rax,%rax
setne  %sil
lea    0xd31(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <one@plt>
test   %rax,%rax
jne    12ef <main+0x1bf>
xor    %eax,%eax
call   1050 <one@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
lea    0xd0a(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [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 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%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, i64 0, i64 0), i32 1)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%9 = tail call i64 (...) @zero()
%10 = icmp eq i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %0
%12 = tail call i64 (...) @zero()
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %11, %0
%16 = phi i32 [ 0, %0 ], [ %14, %11 ]
%17 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = tail call i64 (...) @zero()
%19 = icmp eq i64 %18, 0
br i1 %19, label %24, label %20
20: ; preds = %15
%21 = tail call i64 (...) @one()
%22 = icmp ne i64 %21, 0
%23 = zext i1 %22 to i32
br label %24
24: ; preds = %20, %15
%25 = phi i32 [ 0, %15 ], [ %23, %20 ]
%26 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = tail call i64 (...) @one()
%28 = icmp eq i64 %27, 0
br i1 %28, label %33, label %29
29: ; preds = %24
%30 = tail call i64 (...) @zero()
%31 = icmp ne i64 %30, 0
%32 = zext i1 %31 to i32
br label %33
33: ; preds = %29, %24
%34 = phi i32 [ 0, %24 ], [ %32, %29 ]
%35 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = tail call i64 (...) @one()
%37 = icmp eq i64 %36, 0
br i1 %37, label %42, label %38
38: ; preds = %33
%39 = tail call i64 (...) @one()
%40 = icmp ne i64 %39, 0
%41 = zext i1 %40 to i32
br label %42
42: ; preds = %38, %33
%43 = phi i32 [ 0, %33 ], [ %41, %38 ]
%44 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %43)
%45 = tail call i64 (...) @zero()
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %51
47: ; preds = %42
%48 = tail call i64 (...) @zero()
%49 = icmp ne i64 %48, 0
%50 = zext i1 %49 to i32
br label %51
51: ; preds = %47, %42
%52 = phi i32 [ 1, %42 ], [ %50, %47 ]
%53 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %52)
%54 = tail call i64 (...) @zero()
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %60
56: ; preds = %51
%57 = tail call i64 (...) @one()
%58 = icmp ne i64 %57, 0
%59 = zext i1 %58 to i32
br label %60
60: ; preds = %56, %51
%61 = phi i32 [ 1, %51 ], [ %59, %56 ]
%62 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %61)
%63 = tail call i64 (...) @one()
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %69
65: ; preds = %60
%66 = tail call i64 (...) @zero()
%67 = icmp ne i64 %66, 0
%68 = zext i1 %67 to i32
br label %69
69: ; preds = %65, %60
%70 = phi i32 [ 1, %60 ], [ %68, %65 ]
%71 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %70)
%72 = tail call i64 (...) @one()
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %78
74: ; preds = %69
%75 = tail call i64 (...) @one()
%76 = icmp ne i64 %75, 0
%77 = zext i1 %76 to i32
br label %78
78: ; preds = %74, %69
%79 = phi i32 [ 1, %69 ], [ %77, %74 ]
%80 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %79)
ret i32 0
}