#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 atoi(char *);
int /*<<< orphan*/ executeFloatingPointTests(int, int, int);
int /*<<< orphan*/ executeIntegerTests(int, int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printMessage();
int /*<<< orphan*/ printUsage(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  int nsize = 0;
  int niters = 0;
  int j;
  int mode = 0;
  int quiet = 0;
  while (*(++argv)) {
    if (strcmp(*argv, "-nsize") == 0)
      nsize = atoi(*(++argv));
    if (strcmp(*argv, "-niters") == 0)
      niters = atoi(*(++argv));
    if (strcmp(*argv, "-mode") == 0)
      mode = atoi(*(++argv));
    if (strcmp(*argv, "-quiet") == 0)
      quiet = 1;
  }
  if (niters == 0 || nsize == 0) {
    printUsage(stderr, "One or more mandatory parameters are missing");
    exit(1);
  }
  if (!quiet)
    printMessage();
  if (mode >= 0 && mode <= 9)
    executeFloatingPointTests(mode, nsize, niters);
  else if (mode >= 10 && mode <= 18)
    executeIntegerTests(mode, nsize, niters);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
cmpq   $0x0,0x8(%rax)
je     128d <main+0x11d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe36(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11f4 <main+0x84>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe05(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    122c <main+0xbc>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdd5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1264 <main+0xf4>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xda3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1288 <main+0x118>
movl   $0x1,-0x24(%rbp)
jmp    11a2 <main+0x32>
cmpl   $0x0,-0x18(%rbp)
je     12a1 <main+0x131>
cmpl   $0x0,-0x14(%rbp)
jne    12c0 <main+0x150>
mov    0x2d38(%rip),%rax
mov    (%rax),%edi
lea    0xd6b(%rip),%rsi
call   1070 <printUsage@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
cmpl   $0x0,-0x24(%rbp)
jne    12d1 <main+0x161>
mov    $0x0,%al
call   1040 <printMessage@plt>
cmpl   $0x0,-0x20(%rbp)
jl     12f8 <main+0x188>
cmpl   $0x9,-0x20(%rbp)
jg     12f8 <main+0x188>
mov    -0x20(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1060 <executeFloatingPointTests@plt>
jmp    131f <main+0x1af>
cmpl   $0xa,-0x20(%rbp)
jl     131a <main+0x1aa>
cmpl   $0x12,-0x20(%rbp)
jg     131a <main+0x1aa>
mov    -0x20(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1050 <executeIntegerTests@plt>
jmp    131f <main+0x1af>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     12f5 <main+0x185>
mov    %rsi,%r15
lea    0x8(%rsi),%rbp
xor    %r13d,%r13d
lea    0xe79(%rip),%r14
xor    %eax,%eax
mov    %rax,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
jmp    1200 <main+0x90>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%rbp),%rbx
add    $0x8,%rbp
mov    %rbx,%rdi
call   1080 <atoi@plt>
mov    %rax,0x10(%rsp)
mov    %rbp,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x1,%eax
cmove  %eax,%r13d
add    $0x8,%rbp
mov    0x8(%r15),%rdi
test   %rdi,%rdi
je     1295 <main+0x125>
lea    0xdf9(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1220 <main+0xb0>
mov    0x0(%rbp),%r12
jmp    1237 <main+0xc7>
nopw   0x0(%rax,%rax,1)
mov    0x10(%r15),%r12
add    $0x10,%r15
mov    %r12,%rdi
call   1080 <atoi@plt>
mov    %eax,0x8(%rsp)
mov    %r15,%rbp
mov    %r12,%rdi
lea    0xdc6(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1260 <main+0xf0>
mov    0x0(%rbp),%rbx
jmp    1274 <main+0x104>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x8(%rbp),%rbx
add    $0x8,%rbp
mov    %rbx,%rdi
call   1080 <atoi@plt>
mov    %eax,0xc(%rsp)
mov    %rbx,%rdi
lea    0xd91(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11c0 <main+0x50>
mov    0x0(%rbp),%rbx
jmp    11d5 <main+0x65>
mov    0xc(%rsp),%r14d
test   %r14d,%r14d
mov    0x8(%rsp),%ebx
je     12f5 <main+0x185>
test   %ebx,%ebx
je     12f5 <main+0x185>
test   %r13d,%r13d
mov    0x10(%rsp),%rbp
je     12c4 <main+0x154>
cmp    $0x9,%ebp
ja     12d0 <main+0x160>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14d,%edx
call   1060 <executeFloatingPointTests@plt>
jmp    12e4 <main+0x174>
xor    %eax,%eax
call   1040 <printMessage@plt>
cmp    $0x9,%ebp
jbe    12b6 <main+0x146>
lea    -0xa(%rbp),%eax
cmp    $0x8,%eax
ja     12e4 <main+0x174>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14d,%edx
call   1050 <executeIntegerTests@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2ce4(%rip),%rax
mov    (%rax),%edi
lea    0xd17(%rip),%rsi
call   1070 <printUsage@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"-nsize\00"
@.str.1 = [8 x i8] c"-niters\00"
@.str.2 = [6 x i8] c"-mode\00"
@.str.3 = [7 x i8] c"-quiet\00"
@stderr = global i32 0
@.str.4 = [45 x i8] c"One or more mandatory parameters are missing\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %9
store i32 0, i32* %10
br label %11
11: ; preds = %52, %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i32 1
store i8** %13, i8*** %5
%14 = load i8*, i8** %13
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %53
16: ; preds = %11
%17 = load i8**, i8*** %5
%18 = load i8*, i8** %17
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %16
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i32 1
store i8** %23, i8*** %5
%24 = load i8*, i8** %23
%25 = call i32 @atoi(i8* %24)
store i32 %25, i32* %6
br label %26
26: ; preds = %21, %16
%27 = load i8**, i8*** %5
%28 = load i8*, i8** %27
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %36
31: ; preds = %26
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i32 1
store i8** %33, i8*** %5
%34 = load i8*, i8** %33
%35 = call i32 @atoi(i8* %34)
store i32 %35, i32* %7
br label %36
36: ; preds = %31, %26
%37 = load i8**, i8*** %5
%38 = load i8*, i8** %37
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %46
41: ; preds = %36
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i32 1
store i8** %43, i8*** %5
%44 = load i8*, i8** %43
%45 = call i32 @atoi(i8* %44)
store i32 %45, i32* %9
br label %46
46: ; preds = %41, %36
%47 = load i8**, i8*** %5
%48 = load i8*, i8** %47
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %46
store i32 1, i32* %10
br label %52
52: ; preds = %51, %46
br label %11
53: ; preds = %11
%54 = load i32, i32* %7
%55 = icmp eq i32 %54, 0
br i1 %55, label %59, label %56
56: ; preds = %53
%57 = load i32, i32* %6
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %63
59: ; preds = %56, %53
%60 = load i32, i32* @stderr
%61 = call i32 @printUsage(i32 %60, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%62 = call i32 @exit(i32 1)
unreachable
63: ; preds = %56
%64 = load i32, i32* %10
%65 = icmp ne i32 %64, 0
br i1 %65, label %68, label %66
66: ; preds = %63
%67 = call i32 (...) @printMessage()
br label %68
68: ; preds = %66, %63
%69 = load i32, i32* %9
%70 = icmp sge i32 %69, 0
br i1 %70, label %71, label %79
71: ; preds = %68
%72 = load i32, i32* %9
%73 = icmp sle i32 %72, 9
br i1 %73, label %74, label %79
74: ; preds = %71
%75 = load i32, i32* %9
%76 = load i32, i32* %6
%77 = load i32, i32* %7
%78 = call i32 @executeFloatingPointTests(i32 %75, i32 %76, i32 %77)
br label %91
79: ; preds = %71, %68
%80 = load i32, i32* %9
%81 = icmp sge i32 %80, 10
br i1 %81, label %82, label %90
82: ; preds = %79
%83 = load i32, i32* %9
%84 = icmp sle i32 %83, 18
br i1 %84, label %85, label %90
85: ; preds = %82
%86 = load i32, i32* %9
%87 = load i32, i32* %6
%88 = load i32, i32* %7
%89 = call i32 @executeIntegerTests(i32 %86, i32 %87, i32 %88)
br label %90
90: ; preds = %85, %82, %79
br label %91
91: ; preds = %90, %74
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"-nsize\00"
@.str.1 = [8 x i8] c"-niters\00"
@.str.2 = [6 x i8] c"-mode\00"
@.str.3 = [7 x i8] c"-quiet\00"
@stderr = global i32 0
@.str.4 = [45 x i8] c"One or more mandatory parameters are missing\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %60, label %6
6: ; preds = %2, %46
%7 = phi i8* [ %54, %46 ], [ %4, %2 ]
%8 = phi i8** [ %53, %46 ], [ %3, %2 ]
%9 = phi i32 [ %52, %46 ], [ 0, %2 ]
%10 = phi i32 [ %49, %46 ], [ 0, %2 ]
%11 = phi i8** [ %48, %46 ], [ %1, %2 ]
%12 = phi i32 [ %36, %46 ], [ 0, %2 ]
%13 = phi i32 [ %24, %46 ], [ 0, %2 ]
%14 = tail call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %6
%17 = load i8*, i8** %8
br label %22
18: ; preds = %6
%19 = getelementptr inbounds i8*, i8** %11, i64 2
%20 = load i8*, i8** %19
%21 = tail call i32 @atoi(i8* %20)
br label %22
22: ; preds = %16, %18
%23 = phi i8* [ %20, %18 ], [ %17, %16 ]
%24 = phi i32 [ %21, %18 ], [ %13, %16 ]
%25 = phi i8** [ %19, %18 ], [ %8, %16 ]
%26 = tail call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %22
%29 = load i8*, i8** %25
br label %34
30: ; preds = %22
%31 = getelementptr inbounds i8*, i8** %25, i64 1
%32 = load i8*, i8** %31
%33 = tail call i32 @atoi(i8* %32)
br label %34
34: ; preds = %28, %30
%35 = phi i8* [ %32, %30 ], [ %29, %28 ]
%36 = phi i32 [ %33, %30 ], [ %12, %28 ]
%37 = phi i8** [ %31, %30 ], [ %25, %28 ]
%38 = tail call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %42, label %40
40: ; preds = %34
%41 = load i8*, i8** %37
br label %46
42: ; preds = %34
%43 = getelementptr inbounds i8*, i8** %37, i64 1
%44 = load i8*, i8** %43
%45 = tail call i32 @atoi(i8* %44)
br label %46
46: ; preds = %40, %42
%47 = phi i8* [ %44, %42 ], [ %41, %40 ]
%48 = phi i8** [ %43, %42 ], [ %37, %40 ]
%49 = phi i32 [ %45, %42 ], [ %10, %40 ]
%50 = tail call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
%52 = select i1 %51, i32 1, i32 %9
%53 = getelementptr inbounds i8*, i8** %48, i64 1
%54 = load i8*, i8** %53
%55 = icmp eq i8* %54, null
br i1 %55, label %56, label %6
56: ; preds = %46
%57 = icmp eq i32 %36, 0
%58 = icmp eq i32 %24, 0
%59 = select i1 %57, i1 true, i1 %58
br i1 %59, label %60, label %64
60: ; preds = %2, %56
%61 = load i32, i32* @stderr
%62 = tail call i32 @printUsage(i32 %61, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%63 = tail call i32 @exit(i32 1)
unreachable
64: ; preds = %56
%65 = icmp eq i32 %52, 0
br i1 %65, label %66, label %68
66: ; preds = %64
%67 = tail call i32 (...) @printMessage()
br label %68
68: ; preds = %66, %64
%69 = icmp ult i32 %49, 10
br i1 %69, label %70, label %72
70: ; preds = %68
%71 = tail call i32 @executeFloatingPointTests(i32 %49, i32 %24, i32 %36)
br label %77
72: ; preds = %68
%73 = add i32 %49, -10
%74 = icmp ult i32 %73, 9
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = tail call i32 @executeIntegerTests(i32 %49, i32 %24, i32 %36)
br label %77
77: ; preds = %72, %75, %70
ret i32 0
}