#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 *, char *, ...);
int test_assertions();
int test_assertions2();
int yla_test_test() {
  int __yla_test_result = 0;
  char *__yla_test_name = "yla_test_test";
  printf("Start TEST %s\n", __yla_test_name);
  {
    char *__yla_test_case_name = "test_assertions";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_assertions();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  {
    char *__yla_test_case_name = "test_assertions2";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_assertions2();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  printf("Finished TEST %s %s\n", __yla_test_name,
         ((__yla_test_result) ? "FAILED" : "PASSED"));
  return __yla_test_result;
}


x86 assembly (clang, -O0):
<yla_test_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeba(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <test_assertions@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%ecx
lea    0xecf(%rip),%rdx
lea    0xec1(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xeaa(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <test_assertions2@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%ecx
lea    0xe75(%rip),%rdx
lea    0xe67(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%ecx
lea    0xe42(%rip),%rdx
lea    0xe34(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yla_test_test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xecc(%rip),%rdi
lea    0xeb7(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rbp
lea    0xebf(%rip),%r12
mov    %rbp,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <test_assertions@plt>
mov    %eax,%r14d
test   %eax,%eax
lea    0xee2(%rip),%r15
lea    0xed4(%rip),%rbx
mov    %rbx,%rdx
cmove  %r15,%rdx
lea    0xead(%rip),%r13
mov    %r13,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec0(%rip),%r12
mov    %rbp,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <test_assertions2@plt>
mov    %eax,%ebp
test   %eax,%eax
mov    %rbx,%rdx
cmove  %r15,%rdx
mov    %r13,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
or     %r14d,%ebp
cmove  %r15,%rbx
lea    0xe97(%rip),%rdi
lea    0xe18(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"yla_test_test\00"
@.str.1 = [15 x i8] c"Start TEST %s\0A\00"
@.str.2 = [16 x i8] c"test_assertions\00"
@.str.3 = [19 x i8] c"Start TESTCASE %s\0A\00"
@.str.4 = [25 x i8] c"Finished TESTCASE %s %s\0A\00"
@.str.5 = [7 x i8] c"FAILED\00"
@.str.6 = [7 x i8] c"PASSED\00"
@.str.7 = [17 x i8] c"test_assertions2\00"
@.str.8 = [21 x i8] c"Finished TEST %s %s\0A\00"
define i32 @yla_test_test() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%7 = load i8*, i8** %2
%8 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %7)
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8** %3
%9 = load i8*, i8** %3
%10 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %9)
%11 = call i32 (...) @test_assertions()
store i32 %11, i32* %4
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%17 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %12, i8* %16)
%18 = load i32, i32* %4
%19 = load i32, i32* %1
%20 = or i32 %19, %18
store i32 %20, i32* %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8** %5
%21 = load i8*, i8** %5
%22 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %21)
%23 = call i32 (...) @test_assertions2()
store i32 %23, i32* %6
%24 = load i8*, i8** %5
%25 = load i32, i32* %6
%26 = icmp ne i32 %25, 0
%27 = zext i1 %26 to i64
%28 = select i1 %26, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%29 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %24, i8* %28)
%30 = load i32, i32* %6
%31 = load i32, i32* %1
%32 = or i32 %31, %30
store i32 %32, i32* %1
%33 = load i8*, i8** %2
%34 = load i32, i32* %1
%35 = icmp ne i32 %34, 0
%36 = zext i1 %35 to i64
%37 = select i1 %35, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%38 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i8* %33, i8* %37)
%39 = load i32, i32* %1
ret i32 %39
}

LLVM IR (-O2):
@.str = [14 x i8] c"yla_test_test\00"
@.str.1 = [15 x i8] c"Start TEST %s\0A\00"
@.str.2 = [16 x i8] c"test_assertions\00"
@.str.3 = [19 x i8] c"Start TESTCASE %s\0A\00"
@.str.4 = [25 x i8] c"Finished TESTCASE %s %s\0A\00"
@.str.5 = [7 x i8] c"FAILED\00"
@.str.6 = [7 x i8] c"PASSED\00"
@.str.7 = [17 x i8] c"test_assertions2\00"
@.str.8 = [21 x i8] c"Finished TEST %s %s\0A\00"
define i32 @yla_test_test() {
%1 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (...) @test_assertions()
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%6 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%8 = tail call i32 (...) @test_assertions2()
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%11 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %10)
%12 = or i32 %8, %3
%13 = icmp eq i32 %12, 0
%14 = select i1 %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%15 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %14)
ret i32 %12
}