#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*/ die(char *);
int /*<<< orphan*/ run_test(char *, int);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  int i;
  if (!argv[1])
    die("no tests specified, bailing out\n");
  else if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) {
    usage();
    return 0;
  }
  for (i = 1; i < argc; i++) {
    if (*argv[i] == '!') {
      if (!run_test(argv[i] + 1, 1))
        return 1;
    } else {
      if (!run_test(argv[i], 0))
        return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    1176 <main+0x36>
lea    0xe94(%rip),%rdi
call   1060 <die@plt>
jmp    11ca <main+0x8a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe9c(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11b2 <main+0x72>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe81(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11c5 <main+0x85>
mov    $0x0,%al
call   1050 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    1270 <main+0x130>
jmp    11ca <main+0x8a>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1269 <main+0x129>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x21,%eax
jne    1229 <main+0xe9>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1040 <run_test@plt>
cmp    $0x0,%eax
jne    1224 <main+0xe4>
movl   $0x1,-0x4(%rbp)
jmp    1270 <main+0x130>
jmp    1256 <main+0x116>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
xor    %esi,%esi
call   1040 <run_test@plt>
cmp    $0x0,%eax
jne    1251 <main+0x111>
movl   $0x1,-0x4(%rbp)
jmp    1270 <main+0x130>
jmp    1256 <main+0x116>
jmp    125b <main+0x11b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11d1 <main+0x91>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %edi,%r14d
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     1187 <main+0x47>
lea    0xec4(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     117c <main+0x3c>
mov    0x8(%r15),%rdi
lea    0xeb2(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1193 <main+0x53>
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <usage@plt>
jmp    11e8 <main+0xa8>
lea    0xe72(%rip),%rdi
call   1060 <die@plt>
xor    %ebp,%ebp
cmp    $0x2,%r14d
jl     11e8 <main+0xa8>
mov    %r14d,%r14d
mov    $0x1,%ebx
mov    $0x1,%ebp
jmp    11cb <main+0x8b>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rdi
mov    $0x1,%esi
call   1040 <run_test@plt>
test   %eax,%eax
je     11e8 <main+0xa8>
add    $0x1,%rbx
cmp    %rbx,%r14
je     11e6 <main+0xa6>
mov    (%r15,%rbx,8),%rdi
cmpb   $0x21,(%rdi)
je     11b0 <main+0x70>
xor    %esi,%esi
call   1040 <run_test@plt>
test   %eax,%eax
jne    11c2 <main+0x82>
mov    $0x1,%ebp
jmp    11e8 <main+0xa8>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"no tests specified, bailing out\0A\00"
@.str.1 = [3 x i8] c"-h\00"
@.str.2 = [7 x i8] c"--help\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %28
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %25, label %19
19: ; preds = %13
%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 ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %19, %13
%26 = call i32 (...) @usage()
store i32 0, i32* %3
br label %68
27: ; preds = %19
br label %28
28: ; preds = %27, %11
store i32 1, i32* %6
br label %29
29: ; preds = %64, %28
%30 = load i32, i32* %6
%31 = load i32, i32* %4
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %67
33: ; preds = %29
%34 = load i8**, i8*** %5
%35 = load i32, i32* %6
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8*, i8** %34, i64 %36
%38 = load i8*, i8** %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 33
br i1 %41, label %42, label %53
42: ; preds = %33
%43 = load i8**, i8*** %5
%44 = load i32, i32* %6
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8*, i8** %43, i64 %45
%47 = load i8*, i8** %46
%48 = getelementptr inbounds i8, i8* %47, i64 1
%49 = call i32 @run_test(i8* %48, i32 1)
%50 = icmp ne i32 %49, 0
br i1 %50, label %52, label %51
51: ; preds = %42
store i32 1, i32* %3
br label %68
52: ; preds = %42
br label %63
53: ; preds = %33
%54 = load i8**, i8*** %5
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i8*, i8** %54, i64 %56
%58 = load i8*, i8** %57
%59 = call i32 @run_test(i8* %58, i32 0)
%60 = icmp ne i32 %59, 0
br i1 %60, label %62, label %61
61: ; preds = %53
store i32 1, i32* %3
br label %68
62: ; preds = %53
br label %63
63: ; preds = %62, %52
br label %64
64: ; preds = %63
%65 = load i32, i32* %6
%66 = add nsw i32 %65, 1
store i32 %66, i32* %6
br label %29
67: ; preds = %29
store i32 0, i32* %3
br label %68
68: ; preds = %67, %61, %51, %25
%69 = load i32, i32* %3
ret i32 %69
}

LLVM IR (-O2):
@.str = [33 x i8] c"no tests specified, bailing out\0A\00"
@.str.1 = [3 x i8] c"-h\00"
@.str.2 = [7 x i8] c"--help\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 %6, label %8
6: ; preds = %2
%7 = tail call i32 @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %17
8: ; preds = %2
%9 = tail call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = load i8*, i8** %3
%13 = tail call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11, %8
%16 = tail call i32 (...) @usage()
br label %37
17: ; preds = %11, %6
%18 = icmp sgt i32 %0, 1
br i1 %18, label %19, label %37
19: ; preds = %17
%20 = zext i32 %0 to i64
br label %21
21: ; preds = %19, %34
%22 = phi i64 [ 1, %19 ], [ %35, %34 ]
%23 = getelementptr inbounds i8*, i8** %1, i64 %22
%24 = load i8*, i8** %23
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 33
br i1 %26, label %27, label %31
27: ; preds = %21
%28 = getelementptr inbounds i8, i8* %24, i64 1
%29 = tail call i32 @run_test(i8* %28, i32 1)
%30 = icmp eq i32 %29, 0
br i1 %30, label %37, label %34
31: ; preds = %21
%32 = tail call i32 @run_test(i8* %24, i32 0)
%33 = icmp eq i32 %32, 0
br i1 %33, label %37, label %34
34: ; preds = %27, %31
%35 = add nuw nsw i64 %22, 1
%36 = icmp eq i64 %35, %20
br i1 %36, label %37, label %21
37: ; preds = %27, %31, %34, %17, %15
%38 = phi i32 [ 0, %15 ], [ 0, %17 ], [ 1, %27 ], [ 1, %31 ], [ 0, %34 ]
ret i32 %38
}