#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*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int test_access_basic();
int test_fd_all();
int test_fd_bad_desc();
int test_fd_copy();
int test_fd_devnull();
int test_fd_dup();
int test_fd_multidesc();
int test_fd_open_path();
int test_fd_read();
int test_fd_readwrite();
int test_fork_sigchld_ignored();
int test_fork_signal();
int test_fork_wait();
int test_fstat();
int test_lseek_basic();
int test_lseek_errors();
int test_misbehave();
int test_mmap();
int test_sbrk();
int test_signal_abort();
int test_signal_basic();
int test_signal_segfault();
int test_signal_send();
int test_stat();
int main(int argc, char **argv) {
  if (argc < 2) {
    printf("Not enough arguments provided to utest.\n");
    return 1;
  }
  char *test_name = argv[1];
  printf("Starting user test \"%s\".\n", test_name);
  if (strcmp(test_name, "mmap") == 0)
    return test_mmap();
  ;
  if (strcmp(test_name, "sbrk") == 0)
    return test_sbrk();
  ;
  if (strcmp(test_name, "misbehave") == 0)
    return test_misbehave();
  ;
  if (strcmp(test_name, "fd_read") == 0)
    return test_fd_read();
  ;
  if (strcmp(test_name, "fd_devnull") == 0)
    return test_fd_devnull();
  ;
  if (strcmp(test_name, "fd_multidesc") == 0)
    return test_fd_multidesc();
  ;
  if (strcmp(test_name, "fd_readwrite") == 0)
    return test_fd_readwrite();
  ;
  if (strcmp(test_name, "fd_copy") == 0)
    return test_fd_copy();
  ;
  if (strcmp(test_name, "fd_bad_desc") == 0)
    return test_fd_bad_desc();
  ;
  if (strcmp(test_name, "fd_open_path") == 0)
    return test_fd_open_path();
  ;
  if (strcmp(test_name, "fd_dup") == 0)
    return test_fd_dup();
  ;
  if (strcmp(test_name, "fd_all") == 0)
    return test_fd_all();
  ;
  if (strcmp(test_name, "signal_basic") == 0)
    return test_signal_basic();
  ;
  if (strcmp(test_name, "signal_send") == 0)
    return test_signal_send();
  ;
  if (strcmp(test_name, "signal_abort") == 0)
    return test_signal_abort();
  ;
  if (strcmp(test_name, "signal_segfault") == 0)
    return test_signal_segfault();
  ;
  if (strcmp(test_name, "fork_wait") == 0)
    return test_fork_wait();
  ;
  if (strcmp(test_name, "fork_signal") == 0)
    return test_fork_signal();
  ;
  if (strcmp(test_name, "fork_sigchld_ignored") == 0)
    return test_fork_sigchld_ignored();
  ;
  if (strcmp(test_name, "lseek_basic") == 0)
    return test_lseek_basic();
  ;
  if (strcmp(test_name, "lseek_errors") == 0)
    return test_lseek_errors();
  ;
  if (strcmp(test_name, "access_basic") == 0)
    return test_access_basic();
  ;
  if (strcmp(test_name, "stat") == 0)
    return test_stat();
  ;
  if (strcmp(test_name, "fstat") == 0)
    return test_fstat();
  ;
  printf("No user test \"%s\" available.\n", test_name);
  return 1;
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    12da <main+0x3a>
lea    0xd39(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xd38(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    -0x18(%rbp),%rdi
lea    0xd40(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1321 <main+0x81>
mov    $0x0,%al
call   10f0 <test_mmap@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xd1c(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    134a <main+0xaa>
mov    $0x0,%al
call   1030 <test_sbrk@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xcf8(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1373 <main+0xd3>
mov    $0x0,%al
call   1110 <test_misbehave@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xcd9(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    139c <main+0xfc>
mov    $0x0,%al
call   1040 <test_fd_read@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xcb8(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    13c5 <main+0x125>
mov    $0x0,%al
call   10a0 <test_fd_devnull@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xc9a(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    13ee <main+0x14e>
mov    $0x0,%al
call   1160 <test_fd_multidesc@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xc7e(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1417 <main+0x177>
mov    $0x0,%al
call   1120 <test_fd_readwrite@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xc62(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1440 <main+0x1a0>
mov    $0x0,%al
call   1050 <test_fd_copy@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xc41(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1469 <main+0x1c9>
mov    $0x0,%al
call   1180 <test_fd_bad_desc@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xc24(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1492 <main+0x1f2>
mov    $0x0,%al
call   11a0 <test_fd_open_path@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xc08(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    14bb <main+0x21b>
mov    $0x0,%al
call   10d0 <test_fd_dup@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xbe6(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    14e4 <main+0x244>
mov    $0x0,%al
call   1080 <test_fd_all@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xbc4(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    150d <main+0x26d>
mov    $0x0,%al
call   10c0 <test_signal_basic@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xba8(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1536 <main+0x296>
mov    $0x0,%al
call   1070 <test_signal_send@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xb8b(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    155f <main+0x2bf>
mov    $0x0,%al
call   1150 <test_signal_abort@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xb6f(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1588 <main+0x2e8>
mov    $0x0,%al
call   11c0 <test_signal_segfault@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xb56(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    15b1 <main+0x311>
mov    $0x0,%al
call   10e0 <test_fork_wait@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xb37(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    15da <main+0x33a>
mov    $0x0,%al
call   1130 <test_fork_signal@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xb1a(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1603 <main+0x363>
mov    $0x0,%al
call   11b0 <test_fork_sigchld_ignored@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xb06(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    162c <main+0x38c>
mov    $0x0,%al
call   1170 <test_lseek_basic@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xae9(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    1655 <main+0x3b5>
mov    $0x0,%al
call   1140 <test_lseek_errors@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xacd(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    167e <main+0x3de>
mov    $0x0,%al
call   1090 <test_access_basic@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xab2(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    16a7 <main+0x407>
mov    $0x0,%al
call   1190 <test_stat@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rdi
lea    0xa88(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
jne    16d0 <main+0x430>
mov    $0x0,%al
call   1060 <test_fstat@plt>
mov    %eax,-0x4(%rbp)
jmp    16e9 <main+0x449>
mov    -0x18(%rbp),%rsi
lea    0xa65(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jg     12c9 <main+0x19>
lea    0xe78(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
pop    %rbx
ret
mov    0x8(%rsi),%rbx
lea    0xd2c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10c0 <printf@plt>
lea    0xd35(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     1534 <main+0x284>
lea    0xd22(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     153c <main+0x28c>
lea    0xd0f(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     1544 <main+0x294>
lea    0xd01(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     154c <main+0x29c>
lea    0xcf1(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     1554 <main+0x2a4>
lea    0xce4(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     155c <main+0x2ac>
lea    0xcd9(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     1564 <main+0x2b4>
lea    0xcce(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     156c <main+0x2bc>
lea    0xcbe(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     1574 <main+0x2c4>
lea    0xcb2(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     157c <main+0x2cc>
lea    0xca7(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     1584 <main+0x2d4>
lea    0xc96(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     158c <main+0x2dc>
lea    0xc85(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     1594 <main+0x2e4>
lea    0xc7a(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     159c <main+0x2ec>
lea    0xc6e(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15a4 <main+0x2f4>
lea    0xc63(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15ac <main+0x2fc>
lea    0xc5b(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15b4 <main+0x304>
lea    0xc4d(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15bc <main+0x30c>
lea    0xc41(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15c4 <main+0x314>
lea    0xc3e(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15cc <main+0x31c>
lea    0xc32(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15d4 <main+0x324>
lea    0xc27(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15dc <main+0x32c>
lea    0xc1d(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15e4 <main+0x334>
lea    0xc04(%rip),%rsi
mov    %rbx,%rdi
call   1110 <strcmp@plt>
test   %rax,%rax
je     15ec <main+0x33c>
lea    0xbf2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10c0 <printf@plt>
jmp    12c2 <main+0x12>
xor    %eax,%eax
pop    %rbx
jmp    1100 <test_mmap@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <test_sbrk@plt>
xor    %eax,%eax
pop    %rbx
jmp    1120 <test_misbehave@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <test_fd_read@plt>
xor    %eax,%eax
pop    %rbx
jmp    10b0 <test_fd_devnull@plt>
xor    %eax,%eax
pop    %rbx
jmp    1170 <test_fd_multidesc@plt>
xor    %eax,%eax
pop    %rbx
jmp    1130 <test_fd_readwrite@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <test_fd_copy@plt>
xor    %eax,%eax
pop    %rbx
jmp    1190 <test_fd_bad_desc@plt>
xor    %eax,%eax
pop    %rbx
jmp    11b0 <test_fd_open_path@plt>
xor    %eax,%eax
pop    %rbx
jmp    10e0 <test_fd_dup@plt>
xor    %eax,%eax
pop    %rbx
jmp    1090 <test_fd_all@plt>
xor    %eax,%eax
pop    %rbx
jmp    10d0 <test_signal_basic@plt>
xor    %eax,%eax
pop    %rbx
jmp    1080 <test_signal_send@plt>
xor    %eax,%eax
pop    %rbx
jmp    1160 <test_signal_abort@plt>
xor    %eax,%eax
pop    %rbx
jmp    11d0 <test_signal_segfault@plt>
xor    %eax,%eax
pop    %rbx
jmp    10f0 <test_fork_wait@plt>
xor    %eax,%eax
pop    %rbx
jmp    1140 <test_fork_signal@plt>
xor    %eax,%eax
pop    %rbx
jmp    11c0 <test_fork_sigchld_ignored@plt>
xor    %eax,%eax
pop    %rbx
jmp    1180 <test_lseek_basic@plt>
xor    %eax,%eax
pop    %rbx
jmp    1150 <test_lseek_errors@plt>
xor    %eax,%eax
pop    %rbx
jmp    10a0 <test_access_basic@plt>
xor    %eax,%eax
pop    %rbx
jmp    11a0 <test_stat@plt>
xor    %eax,%eax
pop    %rbx
jmp    1070 <test_fstat@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Not enough arguments provided to utest.\0A\00"
@.str.1 = [26 x i8] c"Starting user test \22%s\22.\0A\00"
@.str.2 = [5 x i8] c"mmap\00"
@.str.3 = [5 x i8] c"sbrk\00"
@.str.4 = [10 x i8] c"misbehave\00"
@.str.5 = [8 x i8] c"fd_read\00"
@.str.6 = [11 x i8] c"fd_devnull\00"
@.str.7 = [13 x i8] c"fd_multidesc\00"
@.str.8 = [13 x i8] c"fd_readwrite\00"
@.str.9 = [8 x i8] c"fd_copy\00"
@.str.10 = [12 x i8] c"fd_bad_desc\00"
@.str.11 = [13 x i8] c"fd_open_path\00"
@.str.12 = [7 x i8] c"fd_dup\00"
@.str.13 = [7 x i8] c"fd_all\00"
@.str.14 = [13 x i8] c"signal_basic\00"
@.str.15 = [12 x i8] c"signal_send\00"
@.str.16 = [13 x i8] c"signal_abort\00"
@.str.17 = [16 x i8] c"signal_segfault\00"
@.str.18 = [10 x i8] c"fork_wait\00"
@.str.19 = [12 x i8] c"fork_signal\00"
@.str.20 = [21 x i8] c"fork_sigchld_ignored\00"
@.str.21 = [12 x i8] c"lseek_basic\00"
@.str.22 = [13 x i8] c"lseek_errors\00"
@.str.23 = [13 x i8] c"access_basic\00"
@.str.24 = [5 x i8] c"stat\00"
@.str.25 = [6 x i8] c"fstat\00"
@.str.26 = [30 x i8] c"No user test \22%s\22 available.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %163
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
store i8* %14, i8** %6
%15 = load i8*, i8** %6
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = load i8*, i8** %6
%18 = call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %11
%21 = call i32 (...) @test_mmap()
store i32 %21, i32* %3
br label %163
22: ; preds = %11
%23 = load i8*, i8** %6
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 (...) @test_sbrk()
store i32 %27, i32* %3
br label %163
28: ; preds = %22
%29 = load i8*, i8** %6
%30 = call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = call i32 (...) @test_misbehave()
store i32 %33, i32* %3
br label %163
34: ; preds = %28
%35 = load i8*, i8** %6
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = call i32 (...) @test_fd_read()
store i32 %39, i32* %3
br label %163
40: ; preds = %34
%41 = load i8*, i8** %6
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %40
%45 = call i32 (...) @test_fd_devnull()
store i32 %45, i32* %3
br label %163
46: ; preds = %40
%47 = load i8*, i8** %6
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %46
%51 = call i32 (...) @test_fd_multidesc()
store i32 %51, i32* %3
br label %163
52: ; preds = %46
%53 = load i8*, i8** %6
%54 = call i64 @strcmp(i8* %53, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %52
%57 = call i32 (...) @test_fd_readwrite()
store i32 %57, i32* %3
br label %163
58: ; preds = %52
%59 = load i8*, i8** %6
%60 = call i64 @strcmp(i8* %59, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %58
%63 = call i32 (...) @test_fd_copy()
store i32 %63, i32* %3
br label %163
64: ; preds = %58
%65 = load i8*, i8** %6
%66 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %64
%69 = call i32 (...) @test_fd_bad_desc()
store i32 %69, i32* %3
br label %163
70: ; preds = %64
%71 = load i8*, i8** %6
%72 = call i64 @strcmp(i8* %71, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %76
74: ; preds = %70
%75 = call i32 (...) @test_fd_open_path()
store i32 %75, i32* %3
br label %163
76: ; preds = %70
%77 = load i8*, i8** %6
%78 = call i64 @strcmp(i8* %77, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %76
%81 = call i32 (...) @test_fd_dup()
store i32 %81, i32* %3
br label %163
82: ; preds = %76
%83 = load i8*, i8** %6
%84 = call i64 @strcmp(i8* %83, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%85 = icmp eq i64 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %82
%87 = call i32 (...) @test_fd_all()
store i32 %87, i32* %3
br label %163
88: ; preds = %82
%89 = load i8*, i8** %6
%90 = call i64 @strcmp(i8* %89, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%91 = icmp eq i64 %90, 0
br i1 %91, label %92, label %94
92: ; preds = %88
%93 = call i32 (...) @test_signal_basic()
store i32 %93, i32* %3
br label %163
94: ; preds = %88
%95 = load i8*, i8** %6
%96 = call i64 @strcmp(i8* %95, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
%97 = icmp eq i64 %96, 0
br i1 %97, label %98, label %100
98: ; preds = %94
%99 = call i32 (...) @test_signal_send()
store i32 %99, i32* %3
br label %163
100: ; preds = %94
%101 = load i8*, i8** %6
%102 = call i64 @strcmp(i8* %101, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
%103 = icmp eq i64 %102, 0
br i1 %103, label %104, label %106
104: ; preds = %100
%105 = call i32 (...) @test_signal_abort()
store i32 %105, i32* %3
br label %163
106: ; preds = %100
%107 = load i8*, i8** %6
%108 = call i64 @strcmp(i8* %107, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0))
%109 = icmp eq i64 %108, 0
br i1 %109, label %110, label %112
110: ; preds = %106
%111 = call i32 (...) @test_signal_segfault()
store i32 %111, i32* %3
br label %163
112: ; preds = %106
%113 = load i8*, i8** %6
%114 = call i64 @strcmp(i8* %113, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%115 = icmp eq i64 %114, 0
br i1 %115, label %116, label %118
116: ; preds = %112
%117 = call i32 (...) @test_fork_wait()
store i32 %117, i32* %3
br label %163
118: ; preds = %112
%119 = load i8*, i8** %6
%120 = call i64 @strcmp(i8* %119, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0))
%121 = icmp eq i64 %120, 0
br i1 %121, label %122, label %124
122: ; preds = %118
%123 = call i32 (...) @test_fork_signal()
store i32 %123, i32* %3
br label %163
124: ; preds = %118
%125 = load i8*, i8** %6
%126 = call i64 @strcmp(i8* %125, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0))
%127 = icmp eq i64 %126, 0
br i1 %127, label %128, label %130
128: ; preds = %124
%129 = call i32 (...) @test_fork_sigchld_ignored()
store i32 %129, i32* %3
br label %163
130: ; preds = %124
%131 = load i8*, i8** %6
%132 = call i64 @strcmp(i8* %131, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0))
%133 = icmp eq i64 %132, 0
br i1 %133, label %134, label %136
134: ; preds = %130
%135 = call i32 (...) @test_lseek_basic()
store i32 %135, i32* %3
br label %163
136: ; preds = %130
%137 = load i8*, i8** %6
%138 = call i64 @strcmp(i8* %137, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0))
%139 = icmp eq i64 %138, 0
br i1 %139, label %140, label %142
140: ; preds = %136
%141 = call i32 (...) @test_lseek_errors()
store i32 %141, i32* %3
br label %163
142: ; preds = %136
%143 = load i8*, i8** %6
%144 = call i64 @strcmp(i8* %143, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0))
%145 = icmp eq i64 %144, 0
br i1 %145, label %146, label %148
146: ; preds = %142
%147 = call i32 (...) @test_access_basic()
store i32 %147, i32* %3
br label %163
148: ; preds = %142
%149 = load i8*, i8** %6
%150 = call i64 @strcmp(i8* %149, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0))
%151 = icmp eq i64 %150, 0
br i1 %151, label %152, label %154
152: ; preds = %148
%153 = call i32 (...) @test_stat()
store i32 %153, i32* %3
br label %163
154: ; preds = %148
%155 = load i8*, i8** %6
%156 = call i64 @strcmp(i8* %155, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.25, i64 0, i64 0))
%157 = icmp eq i64 %156, 0
br i1 %157, label %158, label %160
158: ; preds = %154
%159 = call i32 (...) @test_fstat()
store i32 %159, i32* %3
br label %163
160: ; preds = %154
%161 = load i8*, i8** %6
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.26, i64 0, i64 0), i8* %161)
store i32 1, i32* %3
br label %163
163: ; preds = %160, %158, %152, %146, %140, %134, %128, %122, %116, %110, %104, %98, %92, %86, %80, %74, %68, %62, %56, %50, %44, %38, %32, %26, %20, %9
%164 = load i32, i32* %3
ret i32 %164
}

LLVM IR (-O2):
@.str.1 = [26 x i8] c"Starting user test \22%s\22.\0A\00"
@.str.2 = [5 x i8] c"mmap\00"
@.str.3 = [5 x i8] c"sbrk\00"
@.str.4 = [10 x i8] c"misbehave\00"
@.str.5 = [8 x i8] c"fd_read\00"
@.str.6 = [11 x i8] c"fd_devnull\00"
@.str.7 = [13 x i8] c"fd_multidesc\00"
@.str.8 = [13 x i8] c"fd_readwrite\00"
@.str.9 = [8 x i8] c"fd_copy\00"
@.str.10 = [12 x i8] c"fd_bad_desc\00"
@.str.11 = [13 x i8] c"fd_open_path\00"
@.str.12 = [7 x i8] c"fd_dup\00"
@.str.13 = [7 x i8] c"fd_all\00"
@.str.14 = [13 x i8] c"signal_basic\00"
@.str.15 = [12 x i8] c"signal_send\00"
@.str.16 = [13 x i8] c"signal_abort\00"
@.str.17 = [16 x i8] c"signal_segfault\00"
@.str.18 = [10 x i8] c"fork_wait\00"
@.str.19 = [12 x i8] c"fork_signal\00"
@.str.20 = [21 x i8] c"fork_sigchld_ignored\00"
@.str.21 = [12 x i8] c"lseek_basic\00"
@.str.22 = [13 x i8] c"lseek_errors\00"
@.str.23 = [13 x i8] c"access_basic\00"
@.str.24 = [5 x i8] c"stat\00"
@.str.25 = [6 x i8] c"fstat\00"
@.str.26 = [30 x i8] c"No user test \22%s\22 available.\0A\00"
@str = [40 x i8] c"Not enough arguments provided to utest.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
br label %131
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %6
%13 = tail call i32 (...) @test_mmap()
br label %131
14: ; preds = %6
%15 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = tail call i32 (...) @test_sbrk()
br label %131
19: ; preds = %14
%20 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = tail call i32 (...) @test_misbehave()
br label %131
24: ; preds = %19
%25 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = tail call i32 (...) @test_fd_read()
br label %131
29: ; preds = %24
%30 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = tail call i32 (...) @test_fd_devnull()
br label %131
34: ; preds = %29
%35 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = tail call i32 (...) @test_fd_multidesc()
br label %131
39: ; preds = %34
%40 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = tail call i32 (...) @test_fd_readwrite()
br label %131
44: ; preds = %39
%45 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = tail call i32 (...) @test_fd_copy()
br label %131
49: ; preds = %44
%50 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %54
52: ; preds = %49
%53 = tail call i32 (...) @test_fd_bad_desc()
br label %131
54: ; preds = %49
%55 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = tail call i32 (...) @test_fd_open_path()
br label %131
59: ; preds = %54
%60 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = tail call i32 (...) @test_fd_dup()
br label %131
64: ; preds = %59
%65 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %64
%68 = tail call i32 (...) @test_fd_all()
br label %131
69: ; preds = %64
%70 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = tail call i32 (...) @test_signal_basic()
br label %131
74: ; preds = %69
%75 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %74
%78 = tail call i32 (...) @test_signal_send()
br label %131
79: ; preds = %74
%80 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0))
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %84
82: ; preds = %79
%83 = tail call i32 (...) @test_signal_abort()
br label %131
84: ; preds = %79
%85 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0))
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %84
%88 = tail call i32 (...) @test_signal_segfault()
br label %131
89: ; preds = %84
%90 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%91 = icmp eq i64 %90, 0
br i1 %91, label %92, label %94
92: ; preds = %89
%93 = tail call i32 (...) @test_fork_wait()
br label %131
94: ; preds = %89
%95 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0))
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %99
97: ; preds = %94
%98 = tail call i32 (...) @test_fork_signal()
br label %131
99: ; preds = %94
%100 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0))
%101 = icmp eq i64 %100, 0
br i1 %101, label %102, label %104
102: ; preds = %99
%103 = tail call i32 (...) @test_fork_sigchld_ignored()
br label %131
104: ; preds = %99
%105 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0))
%106 = icmp eq i64 %105, 0
br i1 %106, label %107, label %109
107: ; preds = %104
%108 = tail call i32 (...) @test_lseek_basic()
br label %131
109: ; preds = %104
%110 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0))
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %109
%113 = tail call i32 (...) @test_lseek_errors()
br label %131
114: ; preds = %109
%115 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0))
%116 = icmp eq i64 %115, 0
br i1 %116, label %117, label %119
117: ; preds = %114
%118 = tail call i32 (...) @test_access_basic()
br label %131
119: ; preds = %114
%120 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0))
%121 = icmp eq i64 %120, 0
br i1 %121, label %122, label %124
122: ; preds = %119
%123 = tail call i32 (...) @test_stat()
br label %131
124: ; preds = %119
%125 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.25, i64 0, i64 0))
%126 = icmp eq i64 %125, 0
br i1 %126, label %127, label %129
127: ; preds = %124
%128 = tail call i32 (...) @test_fstat()
br label %131
129: ; preds = %124
%130 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.26, i64 0, i64 0), i8* %8)
br label %131
131: ; preds = %12, %17, %22, %27, %32, %37, %42, %47, %52, %57, %62, %67, %72, %77, %82, %87, %92, %97, %102, %107, %112, %117, %122, %127, %129, %4
%132 = phi i32 [ 1, %4 ], [ %13, %12 ], [ %18, %17 ], [ %23, %22 ], [ %28, %27 ], [ %33, %32 ], [ %38, %37 ], [ %43, %42 ], [ %48, %47 ], [ %53, %52 ], [ %58, %57 ], [ %63, %62 ], [ %68, %67 ], [ %73, %72 ], [ %78, %77 ], [ %83, %82 ], [ %88, %87 ], [ %93, %92 ], [ %98, %97 ], [ %103, %102 ], [ %108, %107 ], [ %113, %112 ], [ %118, %117 ], [ %123, %122 ], [ %128, %127 ], [ 1, %129 ]
ret i32 %132
}