#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*/ ct_init(char *);
int /*<<< orphan*/ ct_report(char *, int);
int /*<<< orphan*/ ct_summary();
int main(void) {
  ct_summary();
  ct_init("testsuit");
  ct_report("pass test", 1);
  ct_report("fail test", 0);
  ct_report("pass test again", 1);
  ct_report("fail again", 0);
  ct_report("pass again", 1);
  ct_report("fail more", 0);
  ct_report("fail more", 0);
  ct_summary();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <ct_summary@plt>
lea    0xeb3(%rip),%rdi
call   1050 <ct_init@plt>
lea    0xeb0(%rip),%rdi
mov    $0x1,%esi
call   1040 <ct_report@plt>
lea    0xea9(%rip),%rdi
xor    %esi,%esi
call   1040 <ct_report@plt>
lea    0xea5(%rip),%rdi
mov    $0x1,%esi
call   1040 <ct_report@plt>
lea    0xea4(%rip),%rdi
xor    %esi,%esi
call   1040 <ct_report@plt>
lea    0xea1(%rip),%rdi
mov    $0x1,%esi
call   1040 <ct_report@plt>
lea    0xe9b(%rip),%rdi
xor    %esi,%esi
call   1040 <ct_report@plt>
lea    0xe8d(%rip),%rdi
xor    %esi,%esi
call   1040 <ct_report@plt>
mov    $0x0,%al
call   1030 <ct_summary@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <ct_summary@plt>
lea    0xec1(%rip),%rdi
call   1050 <ct_init@plt>
lea    0xebe(%rip),%rdi
mov    $0x1,%esi
call   1040 <ct_report@plt>
lea    0xeb7(%rip),%rdi
xor    %esi,%esi
call   1040 <ct_report@plt>
lea    0xeb3(%rip),%rdi
mov    $0x1,%esi
call   1040 <ct_report@plt>
lea    0xeb2(%rip),%rdi
xor    %esi,%esi
call   1040 <ct_report@plt>
lea    0xeaf(%rip),%rdi
mov    $0x1,%esi
call   1040 <ct_report@plt>
lea    0xea9(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <ct_report@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <ct_report@plt>
xor    %eax,%eax
call   1030 <ct_summary@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"testsuit\00"
@.str.1 = [10 x i8] c"pass test\00"
@.str.2 = [10 x i8] c"fail test\00"
@.str.3 = [16 x i8] c"pass test again\00"
@.str.4 = [11 x i8] c"fail again\00"
@.str.5 = [11 x i8] c"pass again\00"
@.str.6 = [10 x i8] c"fail more\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @ct_summary()
%3 = call i32 @ct_init(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @ct_report(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = call i32 @ct_report(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 0)
%6 = call i32 @ct_report(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 1)
%7 = call i32 @ct_report(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 0)
%8 = call i32 @ct_report(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 1)
%9 = call i32 @ct_report(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 0)
%10 = call i32 @ct_report(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 0)
%11 = call i32 (...) @ct_summary()
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"testsuit\00"
@.str.1 = [10 x i8] c"pass test\00"
@.str.2 = [10 x i8] c"fail test\00"
@.str.3 = [16 x i8] c"pass test again\00"
@.str.4 = [11 x i8] c"fail again\00"
@.str.5 = [11 x i8] c"pass again\00"
@.str.6 = [10 x i8] c"fail more\00"
define i32 @main() {
%1 = tail call i32 (...) @ct_summary()
%2 = tail call i32 @ct_init(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @ct_report(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = tail call i32 @ct_report(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 0)
%5 = tail call i32 @ct_report(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 1)
%6 = tail call i32 @ct_report(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 0)
%7 = tail call i32 @ct_report(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 1)
%8 = tail call i32 @ct_report(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 0)
%9 = tail call i32 @ct_report(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 0)
%10 = tail call i32 (...) @ct_summary()
ret i32 0
}