#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 *, char const *);
scalar_t__ strstr(char const *, char *);
void nu_print_usage(const char *program) {
  if (strstr(program, "./"))
    program += 2;
  printf("USAGE:\n"
         "  ./%s [options]\n"
         "\n"
         "OPTIONS:\n"
         "  -l <level>   Output level. Accepts: 't', 's', 'test', 'suite'.\n"
         "  -s <suite>   Test suite to run. By default, all suites are run.\n"
         "  -c           Enable colorized output.\n"
         "  -v           Print the nu_unit version and exit.\n"
         "  -h           Show this usage info.\n",
         program);
}


x86 assembly (clang, -O0):
<nu_print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1152 <nu_print_usage+0x32>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nu_print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    (%rbx,%rcx,2),%rsi
lea    0xec0(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"./\00"
@.str.1 = [294 x i8] c"USAGE:\0A ./%s [options]\0A\0AOPTIONS:\0A -l <level> Output level. Accepts: 't', 's', 'test', 'suite'.\0A -s <suite> Test suite to run. By default, all suites are run.\0A -c Enable colorized output.\0A -v Print the nu_unit version and exit.\0A -h Show this usage info.\0A\00"
define void @nu_print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strstr(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 2
store i8* %8, i8** %2
br label %9
9: ; preds = %6, %1
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([294 x i8], [294 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"./\00"
@.str.1 = [294 x i8] c"USAGE:\0A ./%s [options]\0A\0AOPTIONS:\0A -l <level> Output level. Accepts: 't', 's', 'test', 'suite'.\0A -s <suite> Test suite to run. By default, all suites are run.\0A -c Enable colorized output.\0A -v Print the nu_unit version and exit.\0A -h Show this usage info.\0A\00"
define void @nu_print_usage(i8* %0) {
%2 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i64 0, i64 2
%5 = getelementptr i8, i8* %0, i64 %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([294 x i8], [294 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}