#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*/ perftest(void (*)(int *, int, int), char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
scalar_t__ sorttest(void (*)(int *, int, int), char *, int);
void alltests(void foo(int *, int, int), char *name, int debug) {
  if (sorttest(foo, name, debug)) {
    perftest(foo, name);
  } else {
    puts("Not running accompanying performance test.");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<alltests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <sorttest@plt>
cmp    $0x0,%rax
je     117f <alltests+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <perftest@plt>
jmp    118b <alltests+0x4b>
lea    0xe7a(%rip),%rdi
call   1030 <puts@plt>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alltests>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <sorttest@plt>
test   %rax,%rax
je     1161 <alltests+0x21>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <perftest@plt>
jmp    116d <alltests+0x2d>
lea    0xe98(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Not running accompanying performance test.\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @alltests(void (i32*, i32, i32)* %0, i8* %1, i32 %2) {
%4 = alloca void (i32*, i32, i32)*
%5 = alloca i8*
%6 = alloca i32
store void (i32*, i32, i32)* %0, void (i32*, i32, i32)** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load void (i32*, i32, i32)*, void (i32*, i32, i32)** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i64 @sorttest(void (i32*, i32, i32)* %7, i8* %8, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load void (i32*, i32, i32)*, void (i32*, i32, i32)** %4
%14 = load i8*, i8** %5
%15 = call i32 @perftest(void (i32*, i32, i32)* %13, i8* %14)
br label %18
16: ; preds = %3
%17 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %12
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"Not running accompanying performance test.\00"
define void @alltests(void (i32*, i32, i32)* %0, i8* %1, i32 %2) {
%4 = tail call i64 @sorttest(void (i32*, i32, i32)* %0, i8* %1, i32 %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @perftest(void (i32*, i32, i32)* %0, i8* %1)
br label %10
8: ; preds = %3
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = tail call i32 @putchar(i32 10)
ret void
}