#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 *);
scalar_t__ t(int);
int /*<<< orphan*/ tt(int, int);
int main() {
  tt(0, 0);
  tt(0, 1);
  tt(1, 0);
  tt(1, 1);
  printf("\n\n");
  t(1) && t(1) || t(0) && t(0);
  printf("\n");
  t(0) && t(0) || t(1) && t(1);
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1050 <tt@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <tt@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <tt@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <tt@plt>
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <t@plt>
cmp    $0x0,%rax
je     11a8 <main+0x78>
mov    $0x1,%edi
call   1030 <t@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    11d8 <main+0xa8>
xor    %edi,%edi
call   1030 <t@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x6(%rbp)
je     11d2 <main+0xa2>
xor    %edi,%edi
call   1030 <t@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
lea    0xe1f(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1030 <t@plt>
cmp    $0x0,%rax
je     1211 <main+0xe1>
xor    %edi,%edi
call   1030 <t@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x7(%rbp)
jne    1247 <main+0x117>
mov    $0x1,%edi
call   1030 <t@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x8(%rbp)
je     1241 <main+0x111>
mov    $0x1,%edi
call   1030 <t@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x8(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
lea    0xdb0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1060 <tt@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1060 <tt@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1060 <tt@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1060 <tt@plt>
lea    0xe88(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1050 <t@plt>
test   %rax,%rax
je     119b <main+0x5b>
mov    $0x1,%edi
call   1050 <t@plt>
test   %rax,%rax
jne    11ae <main+0x6e>
xor    %edi,%edi
call   1050 <t@plt>
test   %rax,%rax
je     11ae <main+0x6e>
xor    %edi,%edi
call   1050 <t@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <t@plt>
test   %rax,%rax
je     11d0 <main+0x90>
xor    %edi,%edi
call   1050 <t@plt>
test   %rax,%rax
jne    11e9 <main+0xa9>
mov    $0x1,%edi
call   1050 <t@plt>
test   %rax,%rax
je     11e9 <main+0xa9>
mov    $0x1,%edi
call   1050 <t@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @tt(i32 0, i32 0)
%3 = call i32 @tt(i32 0, i32 1)
%4 = call i32 @tt(i32 1, i32 0)
%5 = call i32 @tt(i32 1, i32 1)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = call i64 @t(i32 1)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = call i64 @t(i32 1)
%11 = icmp ne i64 %10, 0
br i1 %11, label %20, label %12
12: ; preds = %9, %0
%13 = call i64 @t(i32 0)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = call i64 @t(i32 0)
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %15, %12
%19 = phi i1 [ false, %12 ], [ %17, %15 ]
br label %20
20: ; preds = %18, %9
%21 = phi i1 [ true, %9 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
%23 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = call i64 @t(i32 0)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %20
%27 = call i64 @t(i32 0)
%28 = icmp ne i64 %27, 0
br i1 %28, label %37, label %29
29: ; preds = %26, %20
%30 = call i64 @t(i32 1)
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = call i64 @t(i32 1)
%34 = icmp ne i64 %33, 0
br label %35
35: ; preds = %32, %29
%36 = phi i1 [ false, %29 ], [ %34, %32 ]
br label %37
37: ; preds = %35, %26
%38 = phi i1 [ true, %26 ], [ %36, %35 ]
%39 = zext i1 %38 to i32
%40 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%41 = load i32, i32* %1
ret i32 %41
}

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @tt(i32 0, i32 0)
%2 = tail call i32 @tt(i32 0, i32 1)
%3 = tail call i32 @tt(i32 1, i32 0)
%4 = tail call i32 @tt(i32 1, i32 1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%6 = tail call i64 @t(i32 1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %0
%9 = tail call i64 @t(i32 1)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %8, %0
%12 = tail call i64 @t(i32 0)
%13 = icmp eq i64 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = tail call i64 @t(i32 0)
br label %16
16: ; preds = %11, %14, %8
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i64 @t(i32 0)
%19 = icmp eq i64 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %16
%21 = tail call i64 @t(i32 0)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %28
23: ; preds = %20, %16
%24 = tail call i64 @t(i32 1)
%25 = icmp eq i64 %24, 0
br i1 %25, label %28, label %26
26: ; preds = %23
%27 = tail call i64 @t(i32 1)
br label %28
28: ; preds = %23, %26, %20
%29 = tail call i32 @putchar(i32 10)
ret i32 0
}