#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*/ add_usage_tests(char const *);
int /*<<< orphan*/ assert(char *);
int /*<<< orphan*/ bestmatch_usage_tests(char const *, char *);
int /*<<< orphan*/ cmp_usage_tests(char const *, char *);
int /*<<< orphan*/ elastic_pthread_usage_tests(char const *, char *);
int /*<<< orphan*/ execfd_usage_tests(char const *, char *);
int /*<<< orphan*/ free(char *);
char *lace_compat_file_catpath(char const *, char *);
int /*<<< orphan*/ time2sec_usage_tests(char const *);
int /*<<< orphan*/ ujoin_usage_tests(char const *, char *);
int main(int argc, char **argv) {
  const char *lace_exe = argv[1];
  char *bad_filename;
  assert(argc == 2 && lace_exe && "Need lace executable.");
  bad_filename = lace_compat_file_catpath(lace_exe, "no_file_here");
  assert(bad_filename);
  add_usage_tests(lace_exe);
  bestmatch_usage_tests(lace_exe, bad_filename);
  cmp_usage_tests(lace_exe, bad_filename);
  elastic_pthread_usage_tests(lace_exe, bad_filename);
  execfd_usage_tests(lace_exe, bad_filename);
  time2sec_usage_tests(lace_exe);
  ujoin_usage_tests(lace_exe, bad_filename);
  free(bad_filename);
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0x21(%rbp)
jne    11eb <main+0x4b>
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x21(%rbp)
je     11eb <main+0x4b>
mov    $0x1,%al
mov    %al,-0x21(%rbp)
jmp    11eb <main+0x4b>
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdi
call   1090 <assert@plt>
mov    -0x18(%rbp),%rdi
lea    0xe10(%rip),%rsi
call   10c0 <lace_compat_file_catpath@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1090 <assert@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <add_usage_tests@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <bestmatch_usage_tests@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <cmp_usage_tests@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <elastic_pthread_usage_tests@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <execfd_usage_tests@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <time2sec_usage_tests@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <ujoin_usage_tests@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x8(%rsi),%rbx
cmp    $0x2,%edi
sete   %al
test   %rbx,%rbx
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1090 <assert@plt>
lea    0xe3b(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <lace_compat_file_catpath@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1090 <assert@plt>
mov    %rbx,%rdi
call   10b0 <add_usage_tests@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <bestmatch_usage_tests@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <cmp_usage_tests@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <elastic_pthread_usage_tests@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <execfd_usage_tests@plt>
mov    %rbx,%rdi
call   10a0 <time2sec_usage_tests@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <ujoin_usage_tests@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Need lace executable.\00"
@.str.1 = [13 x i8] c"no_file_here\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %17
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %13
br label %17
17: ; preds = %16, %13, %2
%18 = phi i1 [ false, %13 ], [ false, %2 ], [ true, %16 ]
%19 = zext i1 %18 to i32
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i8*
%22 = call i32 @assert(i8* %21)
%23 = load i8*, i8** %6
%24 = call i8* @lace_compat_file_catpath(i8* %23, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
store i8* %24, i8** %7
%25 = load i8*, i8** %7
%26 = call i32 @assert(i8* %25)
%27 = load i8*, i8** %6
%28 = call i32 @add_usage_tests(i8* %27)
%29 = load i8*, i8** %6
%30 = load i8*, i8** %7
%31 = call i32 @bestmatch_usage_tests(i8* %29, i8* %30)
%32 = load i8*, i8** %6
%33 = load i8*, i8** %7
%34 = call i32 @cmp_usage_tests(i8* %32, i8* %33)
%35 = load i8*, i8** %6
%36 = load i8*, i8** %7
%37 = call i32 @elastic_pthread_usage_tests(i8* %35, i8* %36)
%38 = load i8*, i8** %6
%39 = load i8*, i8** %7
%40 = call i32 @execfd_usage_tests(i8* %38, i8* %39)
%41 = load i8*, i8** %6
%42 = call i32 @time2sec_usage_tests(i8* %41)
%43 = load i8*, i8** %6
%44 = load i8*, i8** %7
%45 = call i32 @ujoin_usage_tests(i8* %43, i8* %44)
%46 = load i8*, i8** %7
%47 = call i32 @free(i8* %46)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"no_file_here\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 i32 %0, 2
%6 = icmp ne i8* %4, null
%7 = select i1 %5, i1 %6, i1 false
%8 = zext i1 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 @assert(i8* %9)
%11 = tail call i8* @lace_compat_file_catpath(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @assert(i8* %11)
%13 = tail call i32 @add_usage_tests(i8* %4)
%14 = tail call i32 @bestmatch_usage_tests(i8* %4, i8* %11)
%15 = tail call i32 @cmp_usage_tests(i8* %4, i8* %11)
%16 = tail call i32 @elastic_pthread_usage_tests(i8* %4, i8* %11)
%17 = tail call i32 @execfd_usage_tests(i8* %4, i8* %11)
%18 = tail call i32 @time2sec_usage_tests(i8* %4)
%19 = tail call i32 @ujoin_usage_tests(i8* %4, i8* %11)
%20 = tail call i32 @free(i8* %11)
ret i32 0
}