#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*/ _IONBF;
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
scalar_t__ test_1();
scalar_t__ test_rosetta();
int main(int argc, char **argv) {
  int SuccessCnt = 0;
  int FailureCnt = 0;
  setvbuf(stdout, NULL, _IONBF, 0);
  if (test_1()) {
    SuccessCnt++;
  } else {
    FailureCnt++;
  }
  if (test_rosetta()) {
    SuccessCnt++;
  } else {
    FailureCnt++;
  }
  printf("Success/Failure: %d/%d\n\n", SuccessCnt, FailureCnt);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
mov    0x2e74(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
call   1050 <setvbuf@plt>
mov    $0x0,%al
call   1030 <test_1@plt>
cmp    $0x0,%rax
je     11a0 <main+0x60>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a9 <main+0x69>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <test_rosetta@plt>
cmp    $0x0,%rax
je     11c8 <main+0x88>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11d1 <main+0x91>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe22(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    0x2e95(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1050 <setvbuf@plt>
xor    %eax,%eax
call   1030 <test_1@plt>
xor    %ebx,%ebx
xor    %ebp,%ebp
test   %rax,%rax
sete   %bl
setne  %bpl
xor    %eax,%eax
call   1060 <test_rosetta@plt>
mov    $0x2,%esi
sub    %ebx,%esi
lea    0x1(%rbx),%edx
test   %rax,%rax
cmove  %ebp,%esi
cmovne %ebx,%edx
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@_IONBF = global i32 0
@.str = [25 x i8] c"Success/Failure: %d/%d\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* @stdout
%9 = load i32, i32* @_IONBF
%10 = call i32 @setvbuf(i32 %8, i32* null, i32 %9, i32 0)
%11 = call i64 (...) @test_1()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* %6
%15 = add nsw i32 %14, 1
store i32 %15, i32* %6
br label %19
16: ; preds = %2
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 1
store i32 %18, i32* %7
br label %19
19: ; preds = %16, %13
%20 = call i64 (...) @test_rosetta()
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %28
25: ; preds = %19
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
br label %28
28: ; preds = %25, %22
%29 = load i32, i32* %6
%30 = load i32, i32* %7
%31 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %29, i32 %30)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@_IONBF = global i32 0
@.str = [25 x i8] c"Success/Failure: %d/%d\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = load i32, i32* @_IONBF
%5 = tail call i32 @setvbuf(i32 %3, i32* null, i32 %4, i32 0)
%6 = tail call i64 (...) @test_1()
%7 = icmp eq i64 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = zext i1 %7 to i32
%11 = tail call i64 (...) @test_rosetta()
%12 = icmp eq i64 %11, 0
%13 = select i1 %7, i32 1, i32 2
%14 = select i1 %7, i32 2, i32 1
%15 = select i1 %12, i32 %9, i32 %13
%16 = select i1 %12, i32 %14, i32 %10
%17 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16)
ret i32 0
}