#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 EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ _testDRcount();
scalar_t__ _testdeepfree();
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int passes = 0, fails = 0;
  _testdeepfree() ? passes++ : fails++;
  _testDRcount() ? passes++ : fails++;
  printf("%d out of %d tests passed\n", passes, passes + fails);
  return !fails ? EXIT_SUCCESS : EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1050 <_testdeepfree@plt>
cmp    $0x0,%rax
je     116c <main+0x3c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1175 <main+0x45>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <_testDRcount@plt>
cmp    $0x0,%rax
je     1194 <main+0x64>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    119d <main+0x6d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
add    -0xc(%rbp),%edx
lea    0xe53(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    11cd <main+0x9d>
mov    0x2e15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
jmp    11d9 <main+0xa9>
mov    0x2e0c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <_testdeepfree@plt>
xor    %ebx,%ebx
xor    %ebp,%ebp
test   %rax,%rax
sete   %bl
setne  %bpl
xor    %eax,%eax
call   1030 <_testDRcount@plt>
mov    $0x2,%esi
sub    %ebx,%esi
test   %rax,%rax
cmove  %ebp,%esi
lea    0x1(%rbx),%ebp
cmovne %ebx,%ebp
lea    (%rsi,%rbp,1),%edx
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
test   %ebp,%ebp
jne    117e <main+0x4e>
mov    0x2e5c(%rip),%rax
jmp    1185 <main+0x55>
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"%d out of %d tests passed\0A\00"
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i64 (...) @_testdeepfree()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
br label %12
9: ; preds = %0
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %6
%13 = phi i32 [ %7, %6 ], [ %10, %9 ]
%14 = call i64 (...) @_testDRcount()
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %22
19: ; preds = %12
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %22
22: ; preds = %19, %16
%23 = phi i32 [ %17, %16 ], [ %20, %19 ]
%24 = load i32, i32* %2
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = add nsw i32 %25, %26
%28 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %24, i32 %27)
%29 = load i32, i32* %3
%30 = icmp ne i32 %29, 0
br i1 %30, label %33, label %31
31: ; preds = %22
%32 = load i32, i32* @EXIT_SUCCESS
br label %35
33: ; preds = %22
%34 = load i32, i32* @EXIT_FAILURE
br label %35
35: ; preds = %33, %31
%36 = phi i32 [ %32, %31 ], [ %34, %33 ]
ret i32 %36
}

LLVM IR (-O2):
@.str = [27 x i8] c"%d out of %d tests passed\0A\00"
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @_testdeepfree()
%2 = icmp eq i64 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
%5 = zext i1 %2 to i32
%6 = tail call i64 (...) @_testDRcount()
%7 = icmp eq i64 %6, 0
%8 = select i1 %2, i32 1, i32 2
%9 = select i1 %2, i32 2, i32 1
%10 = select i1 %7, i32 %4, i32 %8
%11 = select i1 %7, i32 %9, i32 %5
%12 = add nuw nsw i32 %10, %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %12)
%14 = icmp eq i32 %11, 0
%15 = load i32, i32* @EXIT_SUCCESS
%16 = load i32, i32* @EXIT_FAILURE
%17 = select i1 %14, i32 %15, i32 %16
ret i32 %17
}