#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*/ run_test(int, char const **);
int /*<<< orphan*/ sprintf(char *, char *, int);
void test_whatever(const char *impl, int queue_size, int workers,
                   int iterations) {
  char qs[16], wk[16], it[16];
  const char *args[] = {"./scheduler", impl, qs, wk, it, NULL};
  sprintf(qs, "%d", queue_size);
  sprintf(wk, "%d", workers);
  sprintf(it, "%d", iterations);
  run_test(5, args);
}


x86 assembly (clang, -O0):
<test_whatever>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x70(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x68(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0x60(%rbp)
movq   $0x0,-0x58(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe93(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%edx
lea    0xe80(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x50(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe6d(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rsi
mov    $0x5,%edi
call   1030 <run_test@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_whatever>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x60,%rsp
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%edx
lea    0xec6(%rip),%rax
mov    %rax,(%rsp)
mov    %rdi,0x8(%rsp)
lea    0x50(%rsp),%rdi
mov    %rdi,0x10(%rsp)
lea    0x40(%rsp),%r12
mov    %r12,0x18(%rsp)
lea    0x30(%rsp),%r15
mov    %r15,0x20(%rsp)
movq   $0x0,0x28(%rsp)
lea    0xe9b(%rip),%rbx
mov    %rbx,%rsi
call   1040 <sprintf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <sprintf@plt>
mov    %rsp,%rsi
mov    $0x5,%edi
call   1030 <run_test@plt>
add    $0x60,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"./scheduler\00"
@.str.1 = [3 x i8] c"%d\00"
define void @test_whatever(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [16 x i8]
%10 = alloca [16 x i8]
%11 = alloca [16 x i8]
%12 = alloca [6 x i8*]
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%13 = getelementptr inbounds [6 x i8*], [6 x i8*]* %12, i64 0, i64 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %13
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %5
store i8* %15, i8** %14
%16 = getelementptr inbounds i8*, i8** %14, i64 1
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
store i8* %17, i8** %16
%18 = getelementptr inbounds i8*, i8** %16, i64 1
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
store i8* %19, i8** %18
%20 = getelementptr inbounds i8*, i8** %18, i64 1
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
store i8* %21, i8** %20
%22 = getelementptr inbounds i8*, i8** %20, i64 1
store i8* null, i8** %22
%23 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%24 = load i32, i32* %6
%25 = call i32 @sprintf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%27 = load i32, i32* %7
%28 = call i32 @sprintf(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %27)
%29 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%30 = load i32, i32* %8
%31 = call i32 @sprintf(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = getelementptr inbounds [6 x i8*], [6 x i8*]* %12, i64 0, i64 0
%33 = call i32 @run_test(i32 5, i8** %32)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"./scheduler\00"
@.str.1 = [3 x i8] c"%d\00"
define void @test_whatever(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [16 x i8]
%6 = alloca [16 x i8]
%7 = alloca [16 x i8]
%8 = alloca [6 x i8*]
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%12 = bitcast [6 x i8*]* %8 to i8*
%13 = getelementptr inbounds [6 x i8*], [6 x i8*]* %8, i64 0, i64 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %13
%14 = getelementptr inbounds [6 x i8*], [6 x i8*]* %8, i64 0, i64 1
store i8* %0, i8** %14
%15 = getelementptr inbounds [6 x i8*], [6 x i8*]* %8, i64 0, i64 2
store i8* %9, i8** %15
%16 = getelementptr inbounds [6 x i8*], [6 x i8*]* %8, i64 0, i64 3
store i8* %10, i8** %16
%17 = getelementptr inbounds [6 x i8*], [6 x i8*]* %8, i64 0, i64 4
store i8* %11, i8** %17
%18 = getelementptr inbounds [6 x i8*], [6 x i8*]* %8, i64 0, i64 5
store i8* null, i8** %18
%19 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%20 = call i32 @sprintf(i8* %10, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%21 = call i32 @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%22 = call i32 @run_test(i32 5, i8** %13)
ret void
}