#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*/ complain_and_quit();
int /*<<< orphan*/ print_opencl_ciphers_build_info();
int /*<<< orphan*/ printf(char *, char *);
int run_clinfo();
int run_tuning();
int run_validation();
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  print_opencl_ciphers_build_info();
  if (argc < 2) {
    complain_and_quit();
  } else {
    if (strcmp(argv[1], "tuning") == 0) {
      return run_tuning();
    } else if (strcmp(argv[1], "validation") == 0) {
      return run_validation();
    } else if (strcmp(argv[1], "clinfo") == 0) {
      return run_clinfo();
    } else if (strcmp(argv[1], "all") == 0) {
      run_clinfo();
      run_validation();
      return run_tuning();
    } else {
      printf("Option \"%s\" not recognized.\n", argv[1]);
      complain_and_quit();
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <print_opencl_ciphers_build_info@plt>
cmpl   $0x2,-0x8(%rbp)
jge    11a3 <main+0x33>
mov    $0x0,%al
call   1060 <complain_and_quit@plt>
jmp    1294 <main+0x124>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe4e(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11d0 <main+0x60>
mov    $0x0,%al
call   1030 <run_tuning@plt>
mov    %eax,-0x4(%rbp)
jmp    1294 <main+0x124>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe28(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11fd <main+0x8d>
mov    $0x0,%al
call   1090 <run_validation@plt>
mov    %eax,-0x4(%rbp)
jmp    1294 <main+0x124>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe06(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    122a <main+0xba>
mov    $0x0,%al
call   1080 <run_clinfo@plt>
mov    %eax,-0x4(%rbp)
jmp    1294 <main+0x124>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xde0(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1265 <main+0xf5>
mov    $0x0,%al
call   1080 <run_clinfo@plt>
mov    $0x0,%al
call   1090 <run_validation@plt>
mov    $0x0,%al
call   1030 <run_tuning@plt>
mov    %eax,-0x4(%rbp)
jmp    1294 <main+0x124>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xda9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <complain_and_quit@plt>
jmp    1285 <main+0x115>
jmp    128a <main+0x11a>
jmp    128f <main+0x11f>
jmp    1294 <main+0x124>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1070 <print_opencl_ciphers_build_info@plt>
cmp    $0x1,%ebp
jg     1194 <main+0x24>
xor    %eax,%eax
call   1060 <complain_and_quit@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x8(%rbx),%rdi
lea    0xe61(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1222 <main+0xb2>
mov    0x8(%rbx),%rdi
lea    0xe53(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11fa <main+0x8a>
mov    0x8(%rbx),%rdi
lea    0xe49(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1207 <main+0x97>
mov    0x8(%rbx),%rdi
lea    0xe3b(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1214 <main+0xa4>
mov    0x8(%rbx),%rsi
lea    0xe2a(%rip),%rdi
call   1040 <printf@plt>
jmp    1184 <main+0x14>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1090 <run_validation@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1080 <run_clinfo@plt>
xor    %eax,%eax
call   1080 <run_clinfo@plt>
xor    %eax,%eax
call   1090 <run_validation@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <run_tuning@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"tuning\00"
@.str.1 = [11 x i8] c"validation\00"
@.str.2 = [7 x i8] c"clinfo\00"
@.str.3 = [4 x i8] c"all\00"
@.str.4 = [29 x i8] c"Option \22%s\22 not recognized.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @print_opencl_ciphers_build_info()
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @complain_and_quit()
br label %55
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = call i32 (...) @run_tuning()
store i32 %18, i32* %3
br label %55
19: ; preds = %11
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %19
%26 = call i32 (...) @run_validation()
store i32 %26, i32* %3
br label %55
27: ; preds = %19
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %27
%34 = call i32 (...) @run_clinfo()
store i32 %34, i32* %3
br label %55
35: ; preds = %27
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %45
41: ; preds = %35
%42 = call i32 (...) @run_clinfo()
%43 = call i32 (...) @run_validation()
%44 = call i32 (...) @run_tuning()
store i32 %44, i32* %3
br label %55
45: ; preds = %35
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 1
%48 = load i8*, i8** %47
%49 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %48)
%50 = call i32 (...) @complain_and_quit()
br label %51
51: ; preds = %45
br label %52
52: ; preds = %51
br label %53
53: ; preds = %52
br label %54
54: ; preds = %53
br label %55
55: ; preds = %17, %25, %33, %41, %54, %9
%56 = load i32, i32* %3
ret i32 %56
}

LLVM IR (-O2):
@.str = [7 x i8] c"tuning\00"
@.str.1 = [11 x i8] c"validation\00"
@.str.2 = [7 x i8] c"clinfo\00"
@.str.3 = [4 x i8] c"all\00"
@.str.4 = [29 x i8] c"Option \22%s\22 not recognized.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @print_opencl_ciphers_build_info()
%4 = icmp slt i32 %0, 2
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @complain_and_quit()
br label %38
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = tail call i32 (...) @run_tuning()
br label %38
14: ; preds = %7
%15 = load i8*, i8** %8
%16 = tail call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = tail call i32 (...) @run_validation()
br label %38
20: ; preds = %14
%21 = load i8*, i8** %8
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = tail call i32 (...) @run_clinfo()
br label %38
26: ; preds = %20
%27 = load i8*, i8** %8
%28 = tail call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = tail call i32 (...) @run_clinfo()
%32 = tail call i32 (...) @run_validation()
%33 = tail call i32 (...) @run_tuning()
br label %38
34: ; preds = %26
%35 = load i8*, i8** %8
%36 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %35)
%37 = tail call i32 (...) @complain_and_quit()
br label %38
38: ; preds = %12, %18, %24, %30, %34, %5
%39 = phi i32 [ 0, %5 ], [ %13, %12 ], [ %19, %18 ], [ %25, %24 ], [ %33, %30 ], [ 0, %34 ]
ret i32 %39
}