#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 */
struct testgroup_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _tinytest_set_flag(struct testgroup_t *, char *,
                                      int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void usage(struct testgroup_t *groups, int list_groups) {
  puts("Options are: [--verbose|--quiet|--terse] [--no-fork]");
  puts("  Specify tests by name, or using a prefix ending with '..'");
  puts("  To skip a test, list give its name prefixed with a colon.");
  puts("  Use --list-tests for a list of tests.");
  if (list_groups) {
    puts("Known tests are:");
    _tinytest_set_flag(groups, "..", 0);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf13(%rip),%rdi
call   1030 <puts@plt>
lea    0xf43(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0xc(%rbp)
je     1197 <usage+0x67>
lea    0xf55(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rdi
lea    0xf56(%rip),%rsi
xor    %edx,%edx
call   1040 <_tinytest_set_flag@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4a(%rip),%rdi
call   1030 <puts@plt>
test   %ebp,%ebp
je     1189 <usage+0x59>
lea    0xf62(%rip),%rdi
call   1030 <puts@plt>
lea    0xf67(%rip),%rsi
mov    %rbx,%rdi
xor    %edx,%edx
call   1040 <_tinytest_set_flag@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.testgroup_t = type { i32 }
@.str = [53 x i8] c"Options are: [--verbose|--quiet|--terse] [--no-fork]\00"
@.str.1 = [60 x i8] c" Specify tests by name, or using a prefix ending with '..'\00"
@.str.2 = [60 x i8] c" To skip a test, list give its name prefixed with a colon.\00"
@.str.3 = [40 x i8] c" Use --list-tests for a list of tests.\00"
@.str.4 = [17 x i8] c"Known tests are:\00"
@.str.5 = [3 x i8] c"..\00"
define void @usage(%struct.testgroup_t* %0, i32 %1) {
%3 = alloca %struct.testgroup_t*
%4 = alloca i32
store %struct.testgroup_t* %0, %struct.testgroup_t** %3
store i32 %1, i32* %4
%5 = call i32 @puts(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%13 = load %struct.testgroup_t*, %struct.testgroup_t** %3
%14 = call i32 @_tinytest_set_flag(%struct.testgroup_t* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 0)
br label %15
15: ; preds = %11, %2
%16 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.testgroup_t = type { i32 }
@.str = [53 x i8] c"Options are: [--verbose|--quiet|--terse] [--no-fork]\00"
@.str.1 = [60 x i8] c" Specify tests by name, or using a prefix ending with '..'\00"
@.str.2 = [60 x i8] c" To skip a test, list give its name prefixed with a colon.\00"
@.str.3 = [40 x i8] c" Use --list-tests for a list of tests.\00"
@.str.4 = [17 x i8] c"Known tests are:\00"
@.str.5 = [3 x i8] c"..\00"
define void @usage(%struct.testgroup_t* %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%7 = icmp eq i32 %1, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @_tinytest_set_flag(%struct.testgroup_t* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 0)
br label %11
11: ; preds = %8, %2
%12 = tail call i32 @exit(i32 0)
unreachable
}